From 1d685e309ffc7a06b825ac097136d8e55657b0ca Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Dec 2022 21:04:57 +0300 Subject: telegram: missing files --- protocols/Telegram/tdlib/td/.gitignore | 2 - .../td/td/generate/auto/td/mtproto/mtproto_api.cpp | 1927 + .../td/td/generate/auto/td/mtproto/mtproto_api.h | 1138 + .../td/td/generate/auto/td/mtproto/mtproto_api.hpp | 294 + .../td/td/generate/auto/td/telegram/secret_api.cpp | 4072 ++ .../td/td/generate/auto/td/telegram/secret_api.h | 2138 + .../td/td/generate/auto/td/telegram/secret_api.hpp | 678 + .../td/td/generate/auto/td/telegram/td_api.cpp | 33908 ++++++++++++ .../tdlib/td/td/generate/auto/td/telegram/td_api.h | 29772 +++++++++++ .../td/td/generate/auto/td/telegram/td_api.hpp | 8977 ++++ .../td/generate/auto/td/telegram/td_api_json.cpp | 15711 ++++++ .../td/td/generate/auto/td/telegram/td_api_json.h | 4122 ++ .../td/generate/auto/td/telegram/telegram_api.cpp | 52616 +++++++++++++++++++ .../td/td/generate/auto/td/telegram/telegram_api.h | 33072 ++++++++++++ .../td/generate/auto/td/telegram/telegram_api.hpp | 9507 ++++ .../tdlib/td/td/generate/auto/tlo/mtproto_api.tlo | Bin 0 -> 8044 bytes .../tdlib/td/td/generate/auto/tlo/secret_api.tlo | Bin 0 -> 15340 bytes .../tdlib/td/td/generate/auto/tlo/td_api.tlo | Bin 0 -> 253152 bytes .../tdlib/td/td/generate/auto/tlo/telegram_api.tlo | Bin 0 -> 287380 bytes .../generate/auto/extension_to_mime_type.cpp | 3057 ++ .../generate/auto/extension_to_mime_type.gperf | 1018 + .../generate/auto/mime_type_to_extension.cpp | 3031 ++ .../generate/auto/mime_type_to_extension.gperf | 804 + 23 files changed, 205842 insertions(+), 2 deletions(-) create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.cpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.h create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.hpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.cpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.h create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.hpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.cpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.h create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.hpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api_json.cpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api_json.h create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/telegram_api.cpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/telegram_api.h create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/telegram_api.hpp create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/tlo/mtproto_api.tlo create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/tlo/secret_api.tlo create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/tlo/td_api.tlo create mode 100644 protocols/Telegram/tdlib/td/td/generate/auto/tlo/telegram_api.tlo create mode 100644 protocols/Telegram/tdlib/td/tdutils/generate/auto/extension_to_mime_type.cpp create mode 100644 protocols/Telegram/tdlib/td/tdutils/generate/auto/extension_to_mime_type.gperf create mode 100644 protocols/Telegram/tdlib/td/tdutils/generate/auto/mime_type_to_extension.cpp create mode 100644 protocols/Telegram/tdlib/td/tdutils/generate/auto/mime_type_to_extension.gperf (limited to 'protocols') diff --git a/protocols/Telegram/tdlib/td/.gitignore b/protocols/Telegram/tdlib/td/.gitignore index 2572f22305..9ecee470aa 100644 --- a/protocols/Telegram/tdlib/td/.gitignore +++ b/protocols/Telegram/tdlib/td/.gitignore @@ -1,8 +1,6 @@ **/*build*/ **/.*.swp **/.DS_Store -**/auto/ -auto/ db_backup *.pyc docs/ diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.cpp b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.cpp new file mode 100644 index 0000000000..7e85a47bdd --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.cpp @@ -0,0 +1,1927 @@ +#include "mtproto_api.h" + +#include "td/tl/tl_object_parse.h" +#include "td/tl/tl_object_store.h" + +#include "td/utils/common.h" +#include "td/utils/format.h" +#include "td/utils/logging.h" +#include "td/utils/SliceBuilder.h" +#include "td/utils/tl_parsers.h" +#include "td/utils/tl_storers.h" +#include "td/utils/TlStorerToString.h" + +namespace td { +namespace mtproto_api { + +std::string to_string(const BaseObject &value) { + TlStorerToString storer; + value.store(storer, ""); + return storer.move_as_string(); +} + +object_ptr Object::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case bad_msg_notification::ID: + return bad_msg_notification::fetch(p); + case bad_server_salt::ID: + return bad_server_salt::fetch(p); + case bind_auth_key_inner::ID: + return bind_auth_key_inner::fetch(p); + case client_DH_inner_data::ID: + return client_DH_inner_data::fetch(p); + case destroy_auth_key_ok::ID: + return destroy_auth_key_ok::fetch(p); + case destroy_auth_key_none::ID: + return destroy_auth_key_none::fetch(p); + case destroy_auth_key_fail::ID: + return destroy_auth_key_fail::fetch(p); + case future_salt::ID: + return future_salt::fetch(p); + case future_salts::ID: + return future_salts::fetch(p); + case gzip_packed::ID: + return gzip_packed::fetch(p); + case dummyHttpWait::ID: + return dummyHttpWait::fetch(p); + case msg_detailed_info::ID: + return msg_detailed_info::fetch(p); + case msg_new_detailed_info::ID: + return msg_new_detailed_info::fetch(p); + case msg_resend_req::ID: + return msg_resend_req::fetch(p); + case msgs_ack::ID: + return msgs_ack::fetch(p); + case msgs_all_info::ID: + return msgs_all_info::fetch(p); + case msgs_state_info::ID: + return msgs_state_info::fetch(p); + case msgs_state_req::ID: + return msgs_state_req::fetch(p); + case new_session_created::ID: + return new_session_created::fetch(p); + case p_q_inner_data_dc::ID: + return p_q_inner_data_dc::fetch(p); + case p_q_inner_data_temp_dc::ID: + return p_q_inner_data_temp_dc::fetch(p); + case pong::ID: + return pong::fetch(p); + case rsa_public_key::ID: + return rsa_public_key::fetch(p); + case resPQ::ID: + return resPQ::fetch(p); + case rpc_answer_unknown::ID: + return rpc_answer_unknown::fetch(p); + case rpc_answer_dropped_running::ID: + return rpc_answer_dropped_running::fetch(p); + case rpc_answer_dropped::ID: + return rpc_answer_dropped::fetch(p); + case rpc_error::ID: + return rpc_error::fetch(p); + case server_DH_params_ok::ID: + return server_DH_params_ok::fetch(p); + case server_DH_inner_data::ID: + return server_DH_inner_data::fetch(p); + case dh_gen_ok::ID: + return dh_gen_ok::fetch(p); + case dh_gen_retry::ID: + return dh_gen_retry::fetch(p); + case dh_gen_fail::ID: + return dh_gen_fail::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +object_ptr Function::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case destroy_auth_key::ID: + return destroy_auth_key::fetch(p); + case get_future_salts::ID: + return get_future_salts::fetch(p); + case http_wait::ID: + return http_wait::fetch(p); + case ping_delay_disconnect::ID: + return ping_delay_disconnect::fetch(p); + case req_DH_params::ID: + return req_DH_params::fetch(p); + case req_pq_multi::ID: + return req_pq_multi::fetch(p); + case rpc_drop_answer::ID: + return rpc_drop_answer::fetch(p); + case set_client_DH_params::ID: + return set_client_DH_params::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +object_ptr BadMsgNotification::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case bad_msg_notification::ID: + return bad_msg_notification::fetch(p); + case bad_server_salt::ID: + return bad_server_salt::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +bad_msg_notification::bad_msg_notification(int64 bad_msg_id_, int32 bad_msg_seqno_, int32 error_code_) + : bad_msg_id_(bad_msg_id_) + , bad_msg_seqno_(bad_msg_seqno_) + , error_code_(error_code_) +{} + +const std::int32_t bad_msg_notification::ID; + +object_ptr bad_msg_notification::fetch(TlParser &p) { + return make_tl_object(p); +} + +bad_msg_notification::bad_msg_notification(TlParser &p) +#define FAIL(error) p.set_error(error) + : bad_msg_id_(TlFetchLong::parse(p)) + , bad_msg_seqno_(TlFetchInt::parse(p)) + , error_code_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void bad_msg_notification::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(bad_msg_id_, s); + TlStoreBinary::store(bad_msg_seqno_, s); + TlStoreBinary::store(error_code_, s); +} + +void bad_msg_notification::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(bad_msg_id_, s); + TlStoreBinary::store(bad_msg_seqno_, s); + TlStoreBinary::store(error_code_, s); +} + +void bad_msg_notification::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "bad_msg_notification"); + s.store_field("bad_msg_id", bad_msg_id_); + s.store_field("bad_msg_seqno", bad_msg_seqno_); + s.store_field("error_code", error_code_); + s.store_class_end(); + } +} + +bad_server_salt::bad_server_salt(int64 bad_msg_id_, int32 bad_msg_seqno_, int32 error_code_, int64 new_server_salt_) + : bad_msg_id_(bad_msg_id_) + , bad_msg_seqno_(bad_msg_seqno_) + , error_code_(error_code_) + , new_server_salt_(new_server_salt_) +{} + +const std::int32_t bad_server_salt::ID; + +object_ptr bad_server_salt::fetch(TlParser &p) { + return make_tl_object(p); +} + +bad_server_salt::bad_server_salt(TlParser &p) +#define FAIL(error) p.set_error(error) + : bad_msg_id_(TlFetchLong::parse(p)) + , bad_msg_seqno_(TlFetchInt::parse(p)) + , error_code_(TlFetchInt::parse(p)) + , new_server_salt_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void bad_server_salt::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(bad_msg_id_, s); + TlStoreBinary::store(bad_msg_seqno_, s); + TlStoreBinary::store(error_code_, s); + TlStoreBinary::store(new_server_salt_, s); +} + +void bad_server_salt::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(bad_msg_id_, s); + TlStoreBinary::store(bad_msg_seqno_, s); + TlStoreBinary::store(error_code_, s); + TlStoreBinary::store(new_server_salt_, s); +} + +void bad_server_salt::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "bad_server_salt"); + s.store_field("bad_msg_id", bad_msg_id_); + s.store_field("bad_msg_seqno", bad_msg_seqno_); + s.store_field("error_code", error_code_); + s.store_field("new_server_salt", new_server_salt_); + s.store_class_end(); + } +} + +bind_auth_key_inner::bind_auth_key_inner(int64 nonce_, int64 temp_auth_key_id_, int64 perm_auth_key_id_, int64 temp_session_id_, int32 expires_at_) + : nonce_(nonce_) + , temp_auth_key_id_(temp_auth_key_id_) + , perm_auth_key_id_(perm_auth_key_id_) + , temp_session_id_(temp_session_id_) + , expires_at_(expires_at_) +{} + +const std::int32_t bind_auth_key_inner::ID; + +object_ptr bind_auth_key_inner::fetch(TlParser &p) { + return make_tl_object(p); +} + +bind_auth_key_inner::bind_auth_key_inner(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchLong::parse(p)) + , temp_auth_key_id_(TlFetchLong::parse(p)) + , perm_auth_key_id_(TlFetchLong::parse(p)) + , temp_session_id_(TlFetchLong::parse(p)) + , expires_at_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void bind_auth_key_inner::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(temp_auth_key_id_, s); + TlStoreBinary::store(perm_auth_key_id_, s); + TlStoreBinary::store(temp_session_id_, s); + TlStoreBinary::store(expires_at_, s); +} + +void bind_auth_key_inner::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(temp_auth_key_id_, s); + TlStoreBinary::store(perm_auth_key_id_, s); + TlStoreBinary::store(temp_session_id_, s); + TlStoreBinary::store(expires_at_, s); +} + +void bind_auth_key_inner::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "bind_auth_key_inner"); + s.store_field("nonce", nonce_); + s.store_field("temp_auth_key_id", temp_auth_key_id_); + s.store_field("perm_auth_key_id", perm_auth_key_id_); + s.store_field("temp_session_id", temp_session_id_); + s.store_field("expires_at", expires_at_); + s.store_class_end(); + } +} + +client_DH_inner_data::client_DH_inner_data(UInt128 const &nonce_, UInt128 const &server_nonce_, int64 retry_id_, string const &g_b_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , retry_id_(retry_id_) + , g_b_(g_b_) +{} + +const std::int32_t client_DH_inner_data::ID; + +object_ptr client_DH_inner_data::fetch(TlParser &p) { + return make_tl_object(p); +} + +client_DH_inner_data::client_DH_inner_data(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , retry_id_(TlFetchLong::parse(p)) + , g_b_(TlFetchString::parse(p)) +#undef FAIL +{} + +void client_DH_inner_data::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(retry_id_, s); + TlStoreString::store(g_b_, s); +} + +void client_DH_inner_data::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(retry_id_, s); + TlStoreString::store(g_b_, s); +} + +void client_DH_inner_data::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "client_DH_inner_data"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("retry_id", retry_id_); + s.store_field("g_b", g_b_); + s.store_class_end(); + } +} + +object_ptr DestroyAuthKeyRes::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case destroy_auth_key_ok::ID: + return destroy_auth_key_ok::fetch(p); + case destroy_auth_key_none::ID: + return destroy_auth_key_none::fetch(p); + case destroy_auth_key_fail::ID: + return destroy_auth_key_fail::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +const std::int32_t destroy_auth_key_ok::ID; + +object_ptr destroy_auth_key_ok::fetch(TlParser &p) { + return make_tl_object(); +} + +void destroy_auth_key_ok::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_ok::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_ok::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "destroy_auth_key_ok"); + s.store_class_end(); + } +} + +const std::int32_t destroy_auth_key_none::ID; + +object_ptr destroy_auth_key_none::fetch(TlParser &p) { + return make_tl_object(); +} + +void destroy_auth_key_none::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_none::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_none::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "destroy_auth_key_none"); + s.store_class_end(); + } +} + +const std::int32_t destroy_auth_key_fail::ID; + +object_ptr destroy_auth_key_fail::fetch(TlParser &p) { + return make_tl_object(); +} + +void destroy_auth_key_fail::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_fail::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void destroy_auth_key_fail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "destroy_auth_key_fail"); + s.store_class_end(); + } +} + +future_salt::future_salt(int32 valid_since_, int32 valid_until_, int64 salt_) + : valid_since_(valid_since_) + , valid_until_(valid_until_) + , salt_(salt_) +{} + +const std::int32_t future_salt::ID; + +object_ptr future_salt::fetch(TlParser &p) { + return make_tl_object(p); +} + +future_salt::future_salt(TlParser &p) +#define FAIL(error) p.set_error(error) + : valid_since_(TlFetchInt::parse(p)) + , valid_until_(TlFetchInt::parse(p)) + , salt_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void future_salt::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(valid_since_, s); + TlStoreBinary::store(valid_until_, s); + TlStoreBinary::store(salt_, s); +} + +void future_salt::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(valid_since_, s); + TlStoreBinary::store(valid_until_, s); + TlStoreBinary::store(salt_, s); +} + +void future_salt::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "future_salt"); + s.store_field("valid_since", valid_since_); + s.store_field("valid_until", valid_until_); + s.store_field("salt", salt_); + s.store_class_end(); + } +} + +future_salts::future_salts(int64 req_msg_id_, int32 now_, array> &&salts_) + : req_msg_id_(req_msg_id_) + , now_(now_) + , salts_(std::move(salts_)) +{} + +const std::int32_t future_salts::ID; + +object_ptr future_salts::fetch(TlParser &p) { + return make_tl_object(p); +} + +future_salts::future_salts(TlParser &p) +#define FAIL(error) p.set_error(error) + : req_msg_id_(TlFetchLong::parse(p)) + , now_(TlFetchInt::parse(p)) + , salts_(TlFetchVector>::parse(p)) +#undef FAIL +{} + +void future_salts::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(req_msg_id_, s); + TlStoreBinary::store(now_, s); + TlStoreVector::store(salts_, s); +} + +void future_salts::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(req_msg_id_, s); + TlStoreBinary::store(now_, s); + TlStoreVector::store(salts_, s); +} + +void future_salts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "future_salts"); + s.store_field("req_msg_id", req_msg_id_); + s.store_field("now", now_); + { s.store_vector_begin("salts", salts_.size()); for (const auto &_value : salts_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +gzip_packed::gzip_packed(string const &packed_data_) + : packed_data_(packed_data_) +{} + +const std::int32_t gzip_packed::ID; + +object_ptr gzip_packed::fetch(TlParser &p) { + return make_tl_object(p); +} + +gzip_packed::gzip_packed(TlParser &p) +#define FAIL(error) p.set_error(error) + : packed_data_(TlFetchString::parse(p)) +#undef FAIL +{} + +void gzip_packed::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(packed_data_, s); +} + +void gzip_packed::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(packed_data_, s); +} + +void gzip_packed::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "gzip_packed"); + s.store_field("packed_data", packed_data_); + s.store_class_end(); + } +} + +const std::int32_t dummyHttpWait::ID; + +object_ptr dummyHttpWait::fetch(TlParser &p) { + return make_tl_object(); +} + +void dummyHttpWait::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void dummyHttpWait::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void dummyHttpWait::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "dummyHttpWait"); + s.store_class_end(); + } +} + +object_ptr MsgDetailedInfo::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case msg_detailed_info::ID: + return msg_detailed_info::fetch(p); + case msg_new_detailed_info::ID: + return msg_new_detailed_info::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +msg_detailed_info::msg_detailed_info(int64 msg_id_, int64 answer_msg_id_, int32 bytes_, int32 status_) + : msg_id_(msg_id_) + , answer_msg_id_(answer_msg_id_) + , bytes_(bytes_) + , status_(status_) +{} + +const std::int32_t msg_detailed_info::ID; + +object_ptr msg_detailed_info::fetch(TlParser &p) { + return make_tl_object(p); +} + +msg_detailed_info::msg_detailed_info(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_id_(TlFetchLong::parse(p)) + , answer_msg_id_(TlFetchLong::parse(p)) + , bytes_(TlFetchInt::parse(p)) + , status_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void msg_detailed_info::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(answer_msg_id_, s); + TlStoreBinary::store(bytes_, s); + TlStoreBinary::store(status_, s); +} + +void msg_detailed_info::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(answer_msg_id_, s); + TlStoreBinary::store(bytes_, s); + TlStoreBinary::store(status_, s); +} + +void msg_detailed_info::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msg_detailed_info"); + s.store_field("msg_id", msg_id_); + s.store_field("answer_msg_id", answer_msg_id_); + s.store_field("bytes", bytes_); + s.store_field("status", status_); + s.store_class_end(); + } +} + +msg_new_detailed_info::msg_new_detailed_info(int64 answer_msg_id_, int32 bytes_, int32 status_) + : answer_msg_id_(answer_msg_id_) + , bytes_(bytes_) + , status_(status_) +{} + +const std::int32_t msg_new_detailed_info::ID; + +object_ptr msg_new_detailed_info::fetch(TlParser &p) { + return make_tl_object(p); +} + +msg_new_detailed_info::msg_new_detailed_info(TlParser &p) +#define FAIL(error) p.set_error(error) + : answer_msg_id_(TlFetchLong::parse(p)) + , bytes_(TlFetchInt::parse(p)) + , status_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void msg_new_detailed_info::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(answer_msg_id_, s); + TlStoreBinary::store(bytes_, s); + TlStoreBinary::store(status_, s); +} + +void msg_new_detailed_info::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(answer_msg_id_, s); + TlStoreBinary::store(bytes_, s); + TlStoreBinary::store(status_, s); +} + +void msg_new_detailed_info::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msg_new_detailed_info"); + s.store_field("answer_msg_id", answer_msg_id_); + s.store_field("bytes", bytes_); + s.store_field("status", status_); + s.store_class_end(); + } +} + +msg_resend_req::msg_resend_req(array &&msg_ids_) + : msg_ids_(std::move(msg_ids_)) +{} + +const std::int32_t msg_resend_req::ID; + +object_ptr msg_resend_req::fetch(TlParser &p) { + return make_tl_object(p); +} + +msg_resend_req::msg_resend_req(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void msg_resend_req::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msg_resend_req::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msg_resend_req::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msg_resend_req"); + { s.store_vector_begin("msg_ids", msg_ids_.size()); for (const auto &_value : msg_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +msgs_ack::msgs_ack(array &&msg_ids_) + : msg_ids_(std::move(msg_ids_)) +{} + +const std::int32_t msgs_ack::ID; + +object_ptr msgs_ack::fetch(TlParser &p) { + return make_tl_object(p); +} + +msgs_ack::msgs_ack(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void msgs_ack::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msgs_ack::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msgs_ack::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msgs_ack"); + { s.store_vector_begin("msg_ids", msg_ids_.size()); for (const auto &_value : msg_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +msgs_all_info::msgs_all_info(array &&msg_ids_, string const &info_) + : msg_ids_(std::move(msg_ids_)) + , info_(info_) +{} + +const std::int32_t msgs_all_info::ID; + +object_ptr msgs_all_info::fetch(TlParser &p) { + return make_tl_object(p); +} + +msgs_all_info::msgs_all_info(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_ids_(TlFetchBoxed, 481674261>::parse(p)) + , info_(TlFetchString::parse(p)) +#undef FAIL +{} + +void msgs_all_info::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); + TlStoreString::store(info_, s); +} + +void msgs_all_info::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); + TlStoreString::store(info_, s); +} + +void msgs_all_info::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msgs_all_info"); + { s.store_vector_begin("msg_ids", msg_ids_.size()); for (const auto &_value : msg_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_field("info", info_); + s.store_class_end(); + } +} + +msgs_state_info::msgs_state_info(int64 req_msg_id_, string const &info_) + : req_msg_id_(req_msg_id_) + , info_(info_) +{} + +const std::int32_t msgs_state_info::ID; + +object_ptr msgs_state_info::fetch(TlParser &p) { + return make_tl_object(p); +} + +msgs_state_info::msgs_state_info(TlParser &p) +#define FAIL(error) p.set_error(error) + : req_msg_id_(TlFetchLong::parse(p)) + , info_(TlFetchString::parse(p)) +#undef FAIL +{} + +void msgs_state_info::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(req_msg_id_, s); + TlStoreString::store(info_, s); +} + +void msgs_state_info::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(req_msg_id_, s); + TlStoreString::store(info_, s); +} + +void msgs_state_info::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msgs_state_info"); + s.store_field("req_msg_id", req_msg_id_); + s.store_field("info", info_); + s.store_class_end(); + } +} + +msgs_state_req::msgs_state_req(array &&msg_ids_) + : msg_ids_(std::move(msg_ids_)) +{} + +const std::int32_t msgs_state_req::ID; + +object_ptr msgs_state_req::fetch(TlParser &p) { + return make_tl_object(p); +} + +msgs_state_req::msgs_state_req(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void msgs_state_req::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msgs_state_req::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(msg_ids_, s); +} + +void msgs_state_req::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "msgs_state_req"); + { s.store_vector_begin("msg_ids", msg_ids_.size()); for (const auto &_value : msg_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +new_session_created::new_session_created(int64 first_msg_id_, int64 unique_id_, int64 server_salt_) + : first_msg_id_(first_msg_id_) + , unique_id_(unique_id_) + , server_salt_(server_salt_) +{} + +const std::int32_t new_session_created::ID; + +object_ptr new_session_created::fetch(TlParser &p) { + return make_tl_object(p); +} + +new_session_created::new_session_created(TlParser &p) +#define FAIL(error) p.set_error(error) + : first_msg_id_(TlFetchLong::parse(p)) + , unique_id_(TlFetchLong::parse(p)) + , server_salt_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void new_session_created::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(first_msg_id_, s); + TlStoreBinary::store(unique_id_, s); + TlStoreBinary::store(server_salt_, s); +} + +void new_session_created::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(first_msg_id_, s); + TlStoreBinary::store(unique_id_, s); + TlStoreBinary::store(server_salt_, s); +} + +void new_session_created::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "new_session_created"); + s.store_field("first_msg_id", first_msg_id_); + s.store_field("unique_id", unique_id_); + s.store_field("server_salt", server_salt_); + s.store_class_end(); + } +} + +object_ptr P_Q_inner_data::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case p_q_inner_data_dc::ID: + return p_q_inner_data_dc::fetch(p); + case p_q_inner_data_temp_dc::ID: + return p_q_inner_data_temp_dc::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +p_q_inner_data_dc::p_q_inner_data_dc(string const &pq_, string const &p_, string const &q_, UInt128 const &nonce_, UInt128 const &server_nonce_, UInt256 const &new_nonce_, int32 dc_) + : pq_(pq_) + , p_(p_) + , q_(q_) + , nonce_(nonce_) + , server_nonce_(server_nonce_) + , new_nonce_(new_nonce_) + , dc_(dc_) +{} + +const std::int32_t p_q_inner_data_dc::ID; + +object_ptr p_q_inner_data_dc::fetch(TlParser &p) { + return make_tl_object(p); +} + +p_q_inner_data_dc::p_q_inner_data_dc(TlParser &p) +#define FAIL(error) p.set_error(error) + : pq_(TlFetchString::parse(p)) + , p_(TlFetchString::parse(p)) + , q_(TlFetchString::parse(p)) + , nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , new_nonce_(TlFetchInt256::parse(p)) + , dc_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void p_q_inner_data_dc::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(pq_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_, s); + TlStoreBinary::store(dc_, s); +} + +void p_q_inner_data_dc::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(pq_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_, s); + TlStoreBinary::store(dc_, s); +} + +void p_q_inner_data_dc::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "p_q_inner_data_dc"); + s.store_field("pq", pq_); + s.store_field("p", p_); + s.store_field("q", q_); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("new_nonce", new_nonce_); + s.store_field("dc", dc_); + s.store_class_end(); + } +} + +p_q_inner_data_temp_dc::p_q_inner_data_temp_dc(string const &pq_, string const &p_, string const &q_, UInt128 const &nonce_, UInt128 const &server_nonce_, UInt256 const &new_nonce_, int32 dc_, int32 expires_in_) + : pq_(pq_) + , p_(p_) + , q_(q_) + , nonce_(nonce_) + , server_nonce_(server_nonce_) + , new_nonce_(new_nonce_) + , dc_(dc_) + , expires_in_(expires_in_) +{} + +const std::int32_t p_q_inner_data_temp_dc::ID; + +object_ptr p_q_inner_data_temp_dc::fetch(TlParser &p) { + return make_tl_object(p); +} + +p_q_inner_data_temp_dc::p_q_inner_data_temp_dc(TlParser &p) +#define FAIL(error) p.set_error(error) + : pq_(TlFetchString::parse(p)) + , p_(TlFetchString::parse(p)) + , q_(TlFetchString::parse(p)) + , nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , new_nonce_(TlFetchInt256::parse(p)) + , dc_(TlFetchInt::parse(p)) + , expires_in_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void p_q_inner_data_temp_dc::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(pq_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_, s); + TlStoreBinary::store(dc_, s); + TlStoreBinary::store(expires_in_, s); +} + +void p_q_inner_data_temp_dc::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(pq_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_, s); + TlStoreBinary::store(dc_, s); + TlStoreBinary::store(expires_in_, s); +} + +void p_q_inner_data_temp_dc::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "p_q_inner_data_temp_dc"); + s.store_field("pq", pq_); + s.store_field("p", p_); + s.store_field("q", q_); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("new_nonce", new_nonce_); + s.store_field("dc", dc_); + s.store_field("expires_in", expires_in_); + s.store_class_end(); + } +} + +pong::pong(int64 msg_id_, int64 ping_id_) + : msg_id_(msg_id_) + , ping_id_(ping_id_) +{} + +const std::int32_t pong::ID; + +object_ptr pong::fetch(TlParser &p) { + return make_tl_object(p); +} + +pong::pong(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_id_(TlFetchLong::parse(p)) + , ping_id_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void pong::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(ping_id_, s); +} + +void pong::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(ping_id_, s); +} + +void pong::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "pong"); + s.store_field("msg_id", msg_id_); + s.store_field("ping_id", ping_id_); + s.store_class_end(); + } +} + +rsa_public_key::rsa_public_key(string const &n_, string const &e_) + : n_(n_) + , e_(e_) +{} + +const std::int32_t rsa_public_key::ID; + +object_ptr rsa_public_key::fetch(TlParser &p) { + return make_tl_object(p); +} + +rsa_public_key::rsa_public_key(TlParser &p) +#define FAIL(error) p.set_error(error) + : n_(TlFetchString::parse(p)) + , e_(TlFetchString::parse(p)) +#undef FAIL +{} + +void rsa_public_key::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(n_, s); + TlStoreString::store(e_, s); +} + +void rsa_public_key::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(n_, s); + TlStoreString::store(e_, s); +} + +void rsa_public_key::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rsa_public_key"); + s.store_field("n", n_); + s.store_field("e", e_); + s.store_class_end(); + } +} + +resPQ::resPQ(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &pq_, array &&server_public_key_fingerprints_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , pq_(pq_) + , server_public_key_fingerprints_(std::move(server_public_key_fingerprints_)) +{} + +const std::int32_t resPQ::ID; + +object_ptr resPQ::fetch(TlParser &p) { + return make_tl_object(p); +} + +resPQ::resPQ(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , pq_(TlFetchString::parse(p)) + , server_public_key_fingerprints_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void resPQ::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(pq_, s); + TlStoreBoxed, 481674261>::store(server_public_key_fingerprints_, s); +} + +void resPQ::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(pq_, s); + TlStoreBoxed, 481674261>::store(server_public_key_fingerprints_, s); +} + +void resPQ::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "resPQ"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("pq", pq_); + { s.store_vector_begin("server_public_key_fingerprints", server_public_key_fingerprints_.size()); for (const auto &_value : server_public_key_fingerprints_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +object_ptr RpcDropAnswer::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case rpc_answer_unknown::ID: + return rpc_answer_unknown::fetch(p); + case rpc_answer_dropped_running::ID: + return rpc_answer_dropped_running::fetch(p); + case rpc_answer_dropped::ID: + return rpc_answer_dropped::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +const std::int32_t rpc_answer_unknown::ID; + +object_ptr rpc_answer_unknown::fetch(TlParser &p) { + return make_tl_object(); +} + +void rpc_answer_unknown::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void rpc_answer_unknown::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void rpc_answer_unknown::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rpc_answer_unknown"); + s.store_class_end(); + } +} + +const std::int32_t rpc_answer_dropped_running::ID; + +object_ptr rpc_answer_dropped_running::fetch(TlParser &p) { + return make_tl_object(); +} + +void rpc_answer_dropped_running::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void rpc_answer_dropped_running::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void rpc_answer_dropped_running::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rpc_answer_dropped_running"); + s.store_class_end(); + } +} + +rpc_answer_dropped::rpc_answer_dropped(int64 msg_id_, int32 seq_no_, int32 bytes_) + : msg_id_(msg_id_) + , seq_no_(seq_no_) + , bytes_(bytes_) +{} + +const std::int32_t rpc_answer_dropped::ID; + +object_ptr rpc_answer_dropped::fetch(TlParser &p) { + return make_tl_object(p); +} + +rpc_answer_dropped::rpc_answer_dropped(TlParser &p) +#define FAIL(error) p.set_error(error) + : msg_id_(TlFetchLong::parse(p)) + , seq_no_(TlFetchInt::parse(p)) + , bytes_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void rpc_answer_dropped::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(seq_no_, s); + TlStoreBinary::store(bytes_, s); +} + +void rpc_answer_dropped::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(msg_id_, s); + TlStoreBinary::store(seq_no_, s); + TlStoreBinary::store(bytes_, s); +} + +void rpc_answer_dropped::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rpc_answer_dropped"); + s.store_field("msg_id", msg_id_); + s.store_field("seq_no", seq_no_); + s.store_field("bytes", bytes_); + s.store_class_end(); + } +} + +rpc_error::rpc_error(int32 error_code_, string const &error_message_) + : error_code_(error_code_) + , error_message_(error_message_) +{} + +const std::int32_t rpc_error::ID; + +object_ptr rpc_error::fetch(TlParser &p) { + return make_tl_object(p); +} + +rpc_error::rpc_error(TlParser &p) +#define FAIL(error) p.set_error(error) + : error_code_(TlFetchInt::parse(p)) + , error_message_(TlFetchString::parse(p)) +#undef FAIL +{} + +void rpc_error::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(error_code_, s); + TlStoreString::store(error_message_, s); +} + +void rpc_error::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(error_code_, s); + TlStoreString::store(error_message_, s); +} + +void rpc_error::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rpc_error"); + s.store_field("error_code", error_code_); + s.store_field("error_message", error_message_); + s.store_class_end(); + } +} + +server_DH_params_ok::server_DH_params_ok(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &encrypted_answer_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , encrypted_answer_(encrypted_answer_) +{} + +const std::int32_t server_DH_params_ok::ID; + +object_ptr server_DH_params_ok::fetch(TlParser &p) { + return make_tl_object(p); +} + +server_DH_params_ok::server_DH_params_ok(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , encrypted_answer_(TlFetchString::parse(p)) +#undef FAIL +{} + +void server_DH_params_ok::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(encrypted_answer_, s); +} + +void server_DH_params_ok::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(encrypted_answer_, s); +} + +void server_DH_params_ok::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "server_DH_params_ok"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("encrypted_answer", encrypted_answer_); + s.store_class_end(); + } +} + +server_DH_inner_data::server_DH_inner_data(UInt128 const &nonce_, UInt128 const &server_nonce_, int32 g_, string const &dh_prime_, string const &g_a_, int32 server_time_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , g_(g_) + , dh_prime_(dh_prime_) + , g_a_(g_a_) + , server_time_(server_time_) +{} + +const std::int32_t server_DH_inner_data::ID; + +object_ptr server_DH_inner_data::fetch(TlParser &p) { + return make_tl_object(p); +} + +server_DH_inner_data::server_DH_inner_data(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , g_(TlFetchInt::parse(p)) + , dh_prime_(TlFetchString::parse(p)) + , g_a_(TlFetchString::parse(p)) + , server_time_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void server_DH_inner_data::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(g_, s); + TlStoreString::store(dh_prime_, s); + TlStoreString::store(g_a_, s); + TlStoreBinary::store(server_time_, s); +} + +void server_DH_inner_data::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(g_, s); + TlStoreString::store(dh_prime_, s); + TlStoreString::store(g_a_, s); + TlStoreBinary::store(server_time_, s); +} + +void server_DH_inner_data::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "server_DH_inner_data"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("g", g_); + s.store_field("dh_prime", dh_prime_); + s.store_field("g_a", g_a_); + s.store_field("server_time", server_time_); + s.store_class_end(); + } +} + +object_ptr Set_client_DH_params_answer::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case dh_gen_ok::ID: + return dh_gen_ok::fetch(p); + case dh_gen_retry::ID: + return dh_gen_retry::fetch(p); + case dh_gen_fail::ID: + return dh_gen_fail::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +dh_gen_ok::dh_gen_ok(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash1_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , new_nonce_hash1_(new_nonce_hash1_) +{} + +const std::int32_t dh_gen_ok::ID; + +object_ptr dh_gen_ok::fetch(TlParser &p) { + return make_tl_object(p); +} + +dh_gen_ok::dh_gen_ok(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , new_nonce_hash1_(TlFetchInt128::parse(p)) +#undef FAIL +{} + +void dh_gen_ok::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash1_, s); +} + +void dh_gen_ok::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash1_, s); +} + +void dh_gen_ok::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "dh_gen_ok"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("new_nonce_hash1", new_nonce_hash1_); + s.store_class_end(); + } +} + +dh_gen_retry::dh_gen_retry(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash2_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , new_nonce_hash2_(new_nonce_hash2_) +{} + +const std::int32_t dh_gen_retry::ID; + +object_ptr dh_gen_retry::fetch(TlParser &p) { + return make_tl_object(p); +} + +dh_gen_retry::dh_gen_retry(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , new_nonce_hash2_(TlFetchInt128::parse(p)) +#undef FAIL +{} + +void dh_gen_retry::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash2_, s); +} + +void dh_gen_retry::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash2_, s); +} + +void dh_gen_retry::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "dh_gen_retry"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("new_nonce_hash2", new_nonce_hash2_); + s.store_class_end(); + } +} + +dh_gen_fail::dh_gen_fail(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash3_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , new_nonce_hash3_(new_nonce_hash3_) +{} + +const std::int32_t dh_gen_fail::ID; + +object_ptr dh_gen_fail::fetch(TlParser &p) { + return make_tl_object(p); +} + +dh_gen_fail::dh_gen_fail(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , new_nonce_hash3_(TlFetchInt128::parse(p)) +#undef FAIL +{} + +void dh_gen_fail::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash3_, s); +} + +void dh_gen_fail::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreBinary::store(new_nonce_hash3_, s); +} + +void dh_gen_fail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "dh_gen_fail"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("new_nonce_hash3", new_nonce_hash3_); + s.store_class_end(); + } +} + +const std::int32_t destroy_auth_key::ID; + +object_ptr destroy_auth_key::fetch(TlParser &p) { + return make_tl_object(); +} + +void destroy_auth_key::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-784117408); +} + +void destroy_auth_key::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-784117408); +} + +void destroy_auth_key::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "destroy_auth_key"); + s.store_class_end(); + } +} + +destroy_auth_key::ReturnType destroy_auth_key::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchObject::parse(p); +#undef FAIL +} + +get_future_salts::get_future_salts(int32 num_) + : num_(num_) +{} + +const std::int32_t get_future_salts::ID; + +object_ptr get_future_salts::fetch(TlParser &p) { + return make_tl_object(p); +} + +get_future_salts::get_future_salts(TlParser &p) +#define FAIL(error) p.set_error(error) + : num_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void get_future_salts::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-1188971260); + TlStoreBinary::store(num_, s); +} + +void get_future_salts::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-1188971260); + TlStoreBinary::store(num_, s); +} + +void get_future_salts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "get_future_salts"); + s.store_field("num", num_); + s.store_class_end(); + } +} + +get_future_salts::ReturnType get_future_salts::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBoxed, -1370486635>::parse(p); +#undef FAIL +} + +http_wait::http_wait(int32 max_delay_, int32 wait_after_, int32 max_wait_) + : max_delay_(max_delay_) + , wait_after_(wait_after_) + , max_wait_(max_wait_) +{} + +const std::int32_t http_wait::ID; + +object_ptr http_wait::fetch(TlParser &p) { + return make_tl_object(p); +} + +http_wait::http_wait(TlParser &p) +#define FAIL(error) p.set_error(error) + : max_delay_(TlFetchInt::parse(p)) + , wait_after_(TlFetchInt::parse(p)) + , max_wait_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void http_wait::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-1835453025); + TlStoreBinary::store(max_delay_, s); + TlStoreBinary::store(wait_after_, s); + TlStoreBinary::store(max_wait_, s); +} + +void http_wait::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-1835453025); + TlStoreBinary::store(max_delay_, s); + TlStoreBinary::store(wait_after_, s); + TlStoreBinary::store(max_wait_, s); +} + +void http_wait::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "http_wait"); + s.store_field("max_delay", max_delay_); + s.store_field("wait_after", wait_after_); + s.store_field("max_wait", max_wait_); + s.store_class_end(); + } +} + +http_wait::ReturnType http_wait::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBoxed, -919090642>::parse(p); +#undef FAIL +} + +ping_delay_disconnect::ping_delay_disconnect(int64 ping_id_, int32 disconnect_delay_) + : ping_id_(ping_id_) + , disconnect_delay_(disconnect_delay_) +{} + +const std::int32_t ping_delay_disconnect::ID; + +object_ptr ping_delay_disconnect::fetch(TlParser &p) { + return make_tl_object(p); +} + +ping_delay_disconnect::ping_delay_disconnect(TlParser &p) +#define FAIL(error) p.set_error(error) + : ping_id_(TlFetchLong::parse(p)) + , disconnect_delay_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void ping_delay_disconnect::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-213746804); + TlStoreBinary::store(ping_id_, s); + TlStoreBinary::store(disconnect_delay_, s); +} + +void ping_delay_disconnect::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-213746804); + TlStoreBinary::store(ping_id_, s); + TlStoreBinary::store(disconnect_delay_, s); +} + +void ping_delay_disconnect::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "ping_delay_disconnect"); + s.store_field("ping_id", ping_id_); + s.store_field("disconnect_delay", disconnect_delay_); + s.store_class_end(); + } +} + +ping_delay_disconnect::ReturnType ping_delay_disconnect::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBoxed, 880243653>::parse(p); +#undef FAIL +} + +req_DH_params::req_DH_params(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &p_, string const &q_, int64 public_key_fingerprint_, string const &encrypted_data_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , p_(p_) + , q_(q_) + , public_key_fingerprint_(public_key_fingerprint_) + , encrypted_data_(encrypted_data_) +{} + +const std::int32_t req_DH_params::ID; + +object_ptr req_DH_params::fetch(TlParser &p) { + return make_tl_object(p); +} + +req_DH_params::req_DH_params(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , p_(TlFetchString::parse(p)) + , q_(TlFetchString::parse(p)) + , public_key_fingerprint_(TlFetchLong::parse(p)) + , encrypted_data_(TlFetchString::parse(p)) +#undef FAIL +{} + +void req_DH_params::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-686627650); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(public_key_fingerprint_, s); + TlStoreString::store(encrypted_data_, s); +} + +void req_DH_params::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-686627650); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(p_, s); + TlStoreString::store(q_, s); + TlStoreBinary::store(public_key_fingerprint_, s); + TlStoreString::store(encrypted_data_, s); +} + +void req_DH_params::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "req_DH_params"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("p", p_); + s.store_field("q", q_); + s.store_field("public_key_fingerprint", public_key_fingerprint_); + s.store_field("encrypted_data", encrypted_data_); + s.store_class_end(); + } +} + +req_DH_params::ReturnType req_DH_params::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBoxed, -790100132>::parse(p); +#undef FAIL +} + +req_pq_multi::req_pq_multi(UInt128 const &nonce_) + : nonce_(nonce_) +{} + +const std::int32_t req_pq_multi::ID; + +object_ptr req_pq_multi::fetch(TlParser &p) { + return make_tl_object(p); +} + +req_pq_multi::req_pq_multi(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) +#undef FAIL +{} + +void req_pq_multi::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-1099002127); + TlStoreBinary::store(nonce_, s); +} + +void req_pq_multi::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-1099002127); + TlStoreBinary::store(nonce_, s); +} + +void req_pq_multi::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "req_pq_multi"); + s.store_field("nonce", nonce_); + s.store_class_end(); + } +} + +req_pq_multi::ReturnType req_pq_multi::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBoxed, 85337187>::parse(p); +#undef FAIL +} + +rpc_drop_answer::rpc_drop_answer(int64 req_msg_id_) + : req_msg_id_(req_msg_id_) +{} + +const std::int32_t rpc_drop_answer::ID; + +object_ptr rpc_drop_answer::fetch(TlParser &p) { + return make_tl_object(p); +} + +rpc_drop_answer::rpc_drop_answer(TlParser &p) +#define FAIL(error) p.set_error(error) + : req_msg_id_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void rpc_drop_answer::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(1491380032); + TlStoreBinary::store(req_msg_id_, s); +} + +void rpc_drop_answer::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(1491380032); + TlStoreBinary::store(req_msg_id_, s); +} + +void rpc_drop_answer::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "rpc_drop_answer"); + s.store_field("req_msg_id", req_msg_id_); + s.store_class_end(); + } +} + +rpc_drop_answer::ReturnType rpc_drop_answer::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchObject::parse(p); +#undef FAIL +} + +set_client_DH_params::set_client_DH_params(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &encrypted_data_) + : nonce_(nonce_) + , server_nonce_(server_nonce_) + , encrypted_data_(encrypted_data_) +{} + +const std::int32_t set_client_DH_params::ID; + +object_ptr set_client_DH_params::fetch(TlParser &p) { + return make_tl_object(p); +} + +set_client_DH_params::set_client_DH_params(TlParser &p) +#define FAIL(error) p.set_error(error) + : nonce_(TlFetchInt128::parse(p)) + , server_nonce_(TlFetchInt128::parse(p)) + , encrypted_data_(TlFetchString::parse(p)) +#undef FAIL +{} + +void set_client_DH_params::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-184262881); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(encrypted_data_, s); +} + +void set_client_DH_params::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-184262881); + TlStoreBinary::store(nonce_, s); + TlStoreBinary::store(server_nonce_, s); + TlStoreString::store(encrypted_data_, s); +} + +void set_client_DH_params::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "set_client_DH_params"); + s.store_field("nonce", nonce_); + s.store_field("server_nonce", server_nonce_); + s.store_field("encrypted_data", encrypted_data_); + s.store_class_end(); + } +} + +set_client_DH_params::ReturnType set_client_DH_params::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchObject::parse(p); +#undef FAIL +} +} // namespace mtproto_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.h b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.h new file mode 100644 index 0000000000..457a9a9642 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.h @@ -0,0 +1,1138 @@ +#pragma once + +#include "td/tl/TlObject.h" + +#include "td/utils/Slice.h" +#include "td/utils/UInt.h" + +#include +#include +#include + +namespace td { +class TlStorerCalcLength; +class TlStorerUnsafe; +class TlStorerToString; +class TlParser; + +namespace mtproto_api { + +using int32 = std::int32_t; +using int53 = std::int64_t; +using int64 = std::int64_t; + +using string = Slice; + +using bytes = Slice; + +template +using array = std::vector; + +using BaseObject = ::td::TlObject; + +template +using object_ptr = ::td::tl_object_ptr; + +template +object_ptr make_object(Args &&... args) { + return object_ptr(new Type(std::forward(args)...)); +} + +template +object_ptr move_object_as(FromType &&from) { + return object_ptr(static_cast(from.release())); +} + +std::string to_string(const BaseObject &value); + +template +std::string to_string(const object_ptr &value) { + if (value == nullptr) { + return "null"; + } + + return to_string(*value); +} + +template +std::string to_string(const std::vector> &values) { + std::string result = "{\n"; + for (const auto &value : values) { + if (value == nullptr) { + result += "null\n"; + } else { + result += to_string(*value); + } + } + result += "}\n"; + return result; +} + +class BadMsgNotification; + +class bind_auth_key_inner; + +class client_DH_inner_data; + +class DestroyAuthKeyRes; + +class future_salt; + +class future_salts; + +class gzip_packed; + +class dummyHttpWait; + +class MsgDetailedInfo; + +class msg_resend_req; + +class msgs_ack; + +class msgs_all_info; + +class msgs_state_info; + +class msgs_state_req; + +class new_session_created; + +class P_Q_inner_data; + +class pong; + +class rsa_public_key; + +class resPQ; + +class RpcDropAnswer; + +class rpc_error; + +class server_DH_params_ok; + +class server_DH_inner_data; + +class Set_client_DH_params_answer; + +class Object; + +class Object: public TlObject { + public: + + static object_ptr fetch(TlParser &p); +}; + +class Function: public TlObject { + public: + + static object_ptr fetch(TlParser &p); +}; + +class BadMsgNotification: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class bad_msg_notification final : public BadMsgNotification { + public: + int64 bad_msg_id_; + int32 bad_msg_seqno_; + int32 error_code_; + + bad_msg_notification(int64 bad_msg_id_, int32 bad_msg_seqno_, int32 error_code_); + + static const std::int32_t ID = -1477445615; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit bad_msg_notification(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class bad_server_salt final : public BadMsgNotification { + public: + int64 bad_msg_id_; + int32 bad_msg_seqno_; + int32 error_code_; + int64 new_server_salt_; + + bad_server_salt(int64 bad_msg_id_, int32 bad_msg_seqno_, int32 error_code_, int64 new_server_salt_); + + static const std::int32_t ID = -307542917; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit bad_server_salt(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class bind_auth_key_inner final : public Object { + public: + int64 nonce_; + int64 temp_auth_key_id_; + int64 perm_auth_key_id_; + int64 temp_session_id_; + int32 expires_at_; + + bind_auth_key_inner(int64 nonce_, int64 temp_auth_key_id_, int64 perm_auth_key_id_, int64 temp_session_id_, int32 expires_at_); + + static const std::int32_t ID = 1973679973; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit bind_auth_key_inner(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class client_DH_inner_data final : public Object { + public: + UInt128 nonce_; + UInt128 server_nonce_; + int64 retry_id_; + string g_b_; + + client_DH_inner_data(UInt128 const &nonce_, UInt128 const &server_nonce_, int64 retry_id_, string const &g_b_); + + static const std::int32_t ID = 1715713620; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit client_DH_inner_data(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class DestroyAuthKeyRes: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class destroy_auth_key_ok final : public DestroyAuthKeyRes { + public: + + static const std::int32_t ID = -161422892; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class destroy_auth_key_none final : public DestroyAuthKeyRes { + public: + + static const std::int32_t ID = 178201177; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class destroy_auth_key_fail final : public DestroyAuthKeyRes { + public: + + static const std::int32_t ID = -368010477; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class future_salt final : public Object { + public: + int32 valid_since_; + int32 valid_until_; + int64 salt_; + + future_salt(int32 valid_since_, int32 valid_until_, int64 salt_); + + static const std::int32_t ID = 155834844; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit future_salt(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class future_salts final : public Object { + public: + int64 req_msg_id_; + int32 now_; + array> salts_; + + future_salts(int64 req_msg_id_, int32 now_, array> &&salts_); + + static const std::int32_t ID = -1370486635; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit future_salts(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class gzip_packed final : public Object { + public: + string packed_data_; + + explicit gzip_packed(string const &packed_data_); + + static const std::int32_t ID = 812830625; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit gzip_packed(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class dummyHttpWait final : public Object { + public: + + static const std::int32_t ID = -919090642; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class MsgDetailedInfo: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class msg_detailed_info final : public MsgDetailedInfo { + public: + int64 msg_id_; + int64 answer_msg_id_; + int32 bytes_; + int32 status_; + + msg_detailed_info(int64 msg_id_, int64 answer_msg_id_, int32 bytes_, int32 status_); + + static const std::int32_t ID = 661470918; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msg_detailed_info(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msg_new_detailed_info final : public MsgDetailedInfo { + public: + int64 answer_msg_id_; + int32 bytes_; + int32 status_; + + msg_new_detailed_info(int64 answer_msg_id_, int32 bytes_, int32 status_); + + static const std::int32_t ID = -2137147681; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msg_new_detailed_info(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msg_resend_req final : public Object { + public: + array msg_ids_; + + explicit msg_resend_req(array &&msg_ids_); + + static const std::int32_t ID = 2105940488; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msg_resend_req(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msgs_ack final : public Object { + public: + array msg_ids_; + + explicit msgs_ack(array &&msg_ids_); + + static const std::int32_t ID = 1658238041; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msgs_ack(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msgs_all_info final : public Object { + public: + array msg_ids_; + string info_; + + msgs_all_info(array &&msg_ids_, string const &info_); + + static const std::int32_t ID = -1933520591; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msgs_all_info(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msgs_state_info final : public Object { + public: + int64 req_msg_id_; + string info_; + + msgs_state_info(int64 req_msg_id_, string const &info_); + + static const std::int32_t ID = 81704317; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msgs_state_info(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class msgs_state_req final : public Object { + public: + array msg_ids_; + + explicit msgs_state_req(array &&msg_ids_); + + static const std::int32_t ID = -630588590; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit msgs_state_req(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class new_session_created final : public Object { + public: + int64 first_msg_id_; + int64 unique_id_; + int64 server_salt_; + + new_session_created(int64 first_msg_id_, int64 unique_id_, int64 server_salt_); + + static const std::int32_t ID = -1631450872; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit new_session_created(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class P_Q_inner_data: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class p_q_inner_data_dc final : public P_Q_inner_data { + public: + string pq_; + string p_; + string q_; + UInt128 nonce_; + UInt128 server_nonce_; + UInt256 new_nonce_; + int32 dc_; + + p_q_inner_data_dc(string const &pq_, string const &p_, string const &q_, UInt128 const &nonce_, UInt128 const &server_nonce_, UInt256 const &new_nonce_, int32 dc_); + + static const std::int32_t ID = -1443537003; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit p_q_inner_data_dc(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class p_q_inner_data_temp_dc final : public P_Q_inner_data { + public: + string pq_; + string p_; + string q_; + UInt128 nonce_; + UInt128 server_nonce_; + UInt256 new_nonce_; + int32 dc_; + int32 expires_in_; + + p_q_inner_data_temp_dc(string const &pq_, string const &p_, string const &q_, UInt128 const &nonce_, UInt128 const &server_nonce_, UInt256 const &new_nonce_, int32 dc_, int32 expires_in_); + + static const std::int32_t ID = 1459478408; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit p_q_inner_data_temp_dc(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class pong final : public Object { + public: + int64 msg_id_; + int64 ping_id_; + + pong(int64 msg_id_, int64 ping_id_); + + static const std::int32_t ID = 880243653; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit pong(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class rsa_public_key final : public Object { + public: + string n_; + string e_; + + rsa_public_key(string const &n_, string const &e_); + + static const std::int32_t ID = 2048510838; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit rsa_public_key(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class resPQ final : public Object { + public: + UInt128 nonce_; + UInt128 server_nonce_; + string pq_; + array server_public_key_fingerprints_; + + resPQ(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &pq_, array &&server_public_key_fingerprints_); + + static const std::int32_t ID = 85337187; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit resPQ(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class RpcDropAnswer: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class rpc_answer_unknown final : public RpcDropAnswer { + public: + + static const std::int32_t ID = 1579864942; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class rpc_answer_dropped_running final : public RpcDropAnswer { + public: + + static const std::int32_t ID = -847714938; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class rpc_answer_dropped final : public RpcDropAnswer { + public: + int64 msg_id_; + int32 seq_no_; + int32 bytes_; + + rpc_answer_dropped(int64 msg_id_, int32 seq_no_, int32 bytes_); + + static const std::int32_t ID = -1539647305; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit rpc_answer_dropped(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class rpc_error final : public Object { + public: + int32 error_code_; + string error_message_; + + rpc_error(int32 error_code_, string const &error_message_); + + static const std::int32_t ID = 558156313; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit rpc_error(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class server_DH_params_ok final : public Object { + public: + UInt128 nonce_; + UInt128 server_nonce_; + string encrypted_answer_; + + server_DH_params_ok(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &encrypted_answer_); + + static const std::int32_t ID = -790100132; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit server_DH_params_ok(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class server_DH_inner_data final : public Object { + public: + UInt128 nonce_; + UInt128 server_nonce_; + int32 g_; + string dh_prime_; + string g_a_; + int32 server_time_; + + server_DH_inner_data(UInt128 const &nonce_, UInt128 const &server_nonce_, int32 g_, string const &dh_prime_, string const &g_a_, int32 server_time_); + + static const std::int32_t ID = -1249309254; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit server_DH_inner_data(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class Set_client_DH_params_answer: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class dh_gen_ok final : public Set_client_DH_params_answer { + public: + UInt128 nonce_; + UInt128 server_nonce_; + UInt128 new_nonce_hash1_; + + dh_gen_ok(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash1_); + + static const std::int32_t ID = 1003222836; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit dh_gen_ok(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class dh_gen_retry final : public Set_client_DH_params_answer { + public: + UInt128 nonce_; + UInt128 server_nonce_; + UInt128 new_nonce_hash2_; + + dh_gen_retry(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash2_); + + static const std::int32_t ID = 1188831161; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit dh_gen_retry(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class dh_gen_fail final : public Set_client_DH_params_answer { + public: + UInt128 nonce_; + UInt128 server_nonce_; + UInt128 new_nonce_hash3_; + + dh_gen_fail(UInt128 const &nonce_, UInt128 const &server_nonce_, UInt128 const &new_nonce_hash3_); + + static const std::int32_t ID = -1499615742; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit dh_gen_fail(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class destroy_auth_key final : public Function { + public: + + static const std::int32_t ID = -784117408; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class get_future_salts final : public Function { + public: + int32 num_; + + explicit get_future_salts(int32 num_); + + static const std::int32_t ID = -1188971260; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit get_future_salts(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class http_wait final : public Function { + public: + int32 max_delay_; + int32 wait_after_; + int32 max_wait_; + + http_wait(int32 max_delay_, int32 wait_after_, int32 max_wait_); + + static const std::int32_t ID = -1835453025; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit http_wait(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class ping_delay_disconnect final : public Function { + public: + int64 ping_id_; + int32 disconnect_delay_; + + ping_delay_disconnect(int64 ping_id_, int32 disconnect_delay_); + + static const std::int32_t ID = -213746804; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit ping_delay_disconnect(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class req_DH_params final : public Function { + public: + UInt128 nonce_; + UInt128 server_nonce_; + string p_; + string q_; + int64 public_key_fingerprint_; + string encrypted_data_; + + req_DH_params(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &p_, string const &q_, int64 public_key_fingerprint_, string const &encrypted_data_); + + static const std::int32_t ID = -686627650; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit req_DH_params(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class req_pq_multi final : public Function { + public: + UInt128 nonce_; + + explicit req_pq_multi(UInt128 const &nonce_); + + static const std::int32_t ID = -1099002127; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit req_pq_multi(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class rpc_drop_answer final : public Function { + public: + int64 req_msg_id_; + + explicit rpc_drop_answer(int64 req_msg_id_); + + static const std::int32_t ID = 1491380032; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit rpc_drop_answer(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +class set_client_DH_params final : public Function { + public: + UInt128 nonce_; + UInt128 server_nonce_; + string encrypted_data_; + + set_client_DH_params(UInt128 const &nonce_, UInt128 const &server_nonce_, string const &encrypted_data_); + + static const std::int32_t ID = -184262881; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = object_ptr; + + static object_ptr fetch(TlParser &p); + + explicit set_client_DH_params(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +} // namespace mtproto_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.hpp b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.hpp new file mode 100644 index 0000000000..3cc60f32a0 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/mtproto/mtproto_api.hpp @@ -0,0 +1,294 @@ +#pragma once + +/** + * \file + * Contains downcast_call methods for calling a function object on downcasted to + * the most derived class TDLib API object. + */ +#include "mtproto_api.h" + +namespace td { +namespace mtproto_api { + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(Object &obj, const T &func) { + switch (obj.get_id()) { + case bad_msg_notification::ID: + func(static_cast(obj)); + return true; + case bad_server_salt::ID: + func(static_cast(obj)); + return true; + case bind_auth_key_inner::ID: + func(static_cast(obj)); + return true; + case client_DH_inner_data::ID: + func(static_cast(obj)); + return true; + case destroy_auth_key_ok::ID: + func(static_cast(obj)); + return true; + case destroy_auth_key_none::ID: + func(static_cast(obj)); + return true; + case destroy_auth_key_fail::ID: + func(static_cast(obj)); + return true; + case future_salt::ID: + func(static_cast(obj)); + return true; + case future_salts::ID: + func(static_cast(obj)); + return true; + case gzip_packed::ID: + func(static_cast(obj)); + return true; + case dummyHttpWait::ID: + func(static_cast(obj)); + return true; + case msg_detailed_info::ID: + func(static_cast(obj)); + return true; + case msg_new_detailed_info::ID: + func(static_cast(obj)); + return true; + case msg_resend_req::ID: + func(static_cast(obj)); + return true; + case msgs_ack::ID: + func(static_cast(obj)); + return true; + case msgs_all_info::ID: + func(static_cast(obj)); + return true; + case msgs_state_info::ID: + func(static_cast(obj)); + return true; + case msgs_state_req::ID: + func(static_cast(obj)); + return true; + case new_session_created::ID: + func(static_cast(obj)); + return true; + case p_q_inner_data_dc::ID: + func(static_cast(obj)); + return true; + case p_q_inner_data_temp_dc::ID: + func(static_cast(obj)); + return true; + case pong::ID: + func(static_cast(obj)); + return true; + case rsa_public_key::ID: + func(static_cast(obj)); + return true; + case resPQ::ID: + func(static_cast(obj)); + return true; + case rpc_answer_unknown::ID: + func(static_cast(obj)); + return true; + case rpc_answer_dropped_running::ID: + func(static_cast(obj)); + return true; + case rpc_answer_dropped::ID: + func(static_cast(obj)); + return true; + case rpc_error::ID: + func(static_cast(obj)); + return true; + case server_DH_params_ok::ID: + func(static_cast(obj)); + return true; + case server_DH_inner_data::ID: + func(static_cast(obj)); + return true; + case dh_gen_ok::ID: + func(static_cast(obj)); + return true; + case dh_gen_retry::ID: + func(static_cast(obj)); + return true; + case dh_gen_fail::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(Function &obj, const T &func) { + switch (obj.get_id()) { + case destroy_auth_key::ID: + func(static_cast(obj)); + return true; + case get_future_salts::ID: + func(static_cast(obj)); + return true; + case http_wait::ID: + func(static_cast(obj)); + return true; + case ping_delay_disconnect::ID: + func(static_cast(obj)); + return true; + case req_DH_params::ID: + func(static_cast(obj)); + return true; + case req_pq_multi::ID: + func(static_cast(obj)); + return true; + case rpc_drop_answer::ID: + func(static_cast(obj)); + return true; + case set_client_DH_params::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(BadMsgNotification &obj, const T &func) { + switch (obj.get_id()) { + case bad_msg_notification::ID: + func(static_cast(obj)); + return true; + case bad_server_salt::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(DestroyAuthKeyRes &obj, const T &func) { + switch (obj.get_id()) { + case destroy_auth_key_ok::ID: + func(static_cast(obj)); + return true; + case destroy_auth_key_none::ID: + func(static_cast(obj)); + return true; + case destroy_auth_key_fail::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(MsgDetailedInfo &obj, const T &func) { + switch (obj.get_id()) { + case msg_detailed_info::ID: + func(static_cast(obj)); + return true; + case msg_new_detailed_info::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(P_Q_inner_data &obj, const T &func) { + switch (obj.get_id()) { + case p_q_inner_data_dc::ID: + func(static_cast(obj)); + return true; + case p_q_inner_data_temp_dc::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(RpcDropAnswer &obj, const T &func) { + switch (obj.get_id()) { + case rpc_answer_unknown::ID: + func(static_cast(obj)); + return true; + case rpc_answer_dropped_running::ID: + func(static_cast(obj)); + return true; + case rpc_answer_dropped::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(Set_client_DH_params_answer &obj, const T &func) { + switch (obj.get_id()) { + case dh_gen_ok::ID: + func(static_cast(obj)); + return true; + case dh_gen_retry::ID: + func(static_cast(obj)); + return true; + case dh_gen_fail::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +} // namespace mtproto_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.cpp b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.cpp new file mode 100644 index 0000000000..6dbfc94299 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.cpp @@ -0,0 +1,4072 @@ +#include "secret_api.h" + +#include "td/tl/tl_object_parse.h" +#include "td/tl/tl_object_store.h" + +#include "td/utils/common.h" +#include "td/utils/format.h" +#include "td/utils/logging.h" +#include "td/utils/SliceBuilder.h" +#include "td/utils/tl_parsers.h" +#include "td/utils/tl_storers.h" +#include "td/utils/TlStorerToString.h" + +namespace td { +namespace secret_api { + +std::string to_string(const BaseObject &value) { + TlStorerToString storer; + value.store(storer, ""); + return storer.move_as_string(); +} + +object_ptr Object::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case decryptedMessage8::ID: + return decryptedMessage8::fetch(p); + case decryptedMessageService8::ID: + return decryptedMessageService8::fetch(p); + case decryptedMessage23::ID: + return decryptedMessage23::fetch(p); + case decryptedMessageService::ID: + return decryptedMessageService::fetch(p); + case decryptedMessage46::ID: + return decryptedMessage46::fetch(p); + case decryptedMessage::ID: + return decryptedMessage::fetch(p); + case decryptedMessageActionSetMessageTTL::ID: + return decryptedMessageActionSetMessageTTL::fetch(p); + case decryptedMessageActionReadMessages::ID: + return decryptedMessageActionReadMessages::fetch(p); + case decryptedMessageActionDeleteMessages::ID: + return decryptedMessageActionDeleteMessages::fetch(p); + case decryptedMessageActionScreenshotMessages::ID: + return decryptedMessageActionScreenshotMessages::fetch(p); + case decryptedMessageActionFlushHistory::ID: + return decryptedMessageActionFlushHistory::fetch(p); + case decryptedMessageActionResend::ID: + return decryptedMessageActionResend::fetch(p); + case decryptedMessageActionNotifyLayer::ID: + return decryptedMessageActionNotifyLayer::fetch(p); + case decryptedMessageActionTyping::ID: + return decryptedMessageActionTyping::fetch(p); + case decryptedMessageActionRequestKey::ID: + return decryptedMessageActionRequestKey::fetch(p); + case decryptedMessageActionAcceptKey::ID: + return decryptedMessageActionAcceptKey::fetch(p); + case decryptedMessageActionAbortKey::ID: + return decryptedMessageActionAbortKey::fetch(p); + case decryptedMessageActionCommitKey::ID: + return decryptedMessageActionCommitKey::fetch(p); + case decryptedMessageActionNoop::ID: + return decryptedMessageActionNoop::fetch(p); + case decryptedMessageLayer::ID: + return decryptedMessageLayer::fetch(p); + case decryptedMessageMediaEmpty::ID: + return decryptedMessageMediaEmpty::fetch(p); + case decryptedMessageMediaPhoto8::ID: + return decryptedMessageMediaPhoto8::fetch(p); + case decryptedMessageMediaVideo8::ID: + return decryptedMessageMediaVideo8::fetch(p); + case decryptedMessageMediaGeoPoint::ID: + return decryptedMessageMediaGeoPoint::fetch(p); + case decryptedMessageMediaContact::ID: + return decryptedMessageMediaContact::fetch(p); + case decryptedMessageMediaDocument8::ID: + return decryptedMessageMediaDocument8::fetch(p); + case decryptedMessageMediaAudio8::ID: + return decryptedMessageMediaAudio8::fetch(p); + case decryptedMessageMediaVideo23::ID: + return decryptedMessageMediaVideo23::fetch(p); + case decryptedMessageMediaAudio::ID: + return decryptedMessageMediaAudio::fetch(p); + case decryptedMessageMediaExternalDocument::ID: + return decryptedMessageMediaExternalDocument::fetch(p); + case decryptedMessageMediaPhoto::ID: + return decryptedMessageMediaPhoto::fetch(p); + case decryptedMessageMediaVideo::ID: + return decryptedMessageMediaVideo::fetch(p); + case decryptedMessageMediaDocument46::ID: + return decryptedMessageMediaDocument46::fetch(p); + case decryptedMessageMediaVenue::ID: + return decryptedMessageMediaVenue::fetch(p); + case decryptedMessageMediaWebPage::ID: + return decryptedMessageMediaWebPage::fetch(p); + case decryptedMessageMediaDocument::ID: + return decryptedMessageMediaDocument::fetch(p); + case documentAttributeImageSize::ID: + return documentAttributeImageSize::fetch(p); + case documentAttributeAnimated::ID: + return documentAttributeAnimated::fetch(p); + case documentAttributeSticker23::ID: + return documentAttributeSticker23::fetch(p); + case documentAttributeVideo23::ID: + return documentAttributeVideo23::fetch(p); + case documentAttributeAudio23::ID: + return documentAttributeAudio23::fetch(p); + case documentAttributeFilename::ID: + return documentAttributeFilename::fetch(p); + case documentAttributeAudio45::ID: + return documentAttributeAudio45::fetch(p); + case documentAttributeSticker::ID: + return documentAttributeSticker::fetch(p); + case documentAttributeAudio::ID: + return documentAttributeAudio::fetch(p); + case documentAttributeVideo::ID: + return documentAttributeVideo::fetch(p); + case fileLocationUnavailable::ID: + return fileLocationUnavailable::fetch(p); + case fileLocation::ID: + return fileLocation::fetch(p); + case inputStickerSetShortName::ID: + return inputStickerSetShortName::fetch(p); + case inputStickerSetEmpty::ID: + return inputStickerSetEmpty::fetch(p); + case messageEntityUnknown::ID: + return messageEntityUnknown::fetch(p); + case messageEntityMention::ID: + return messageEntityMention::fetch(p); + case messageEntityHashtag::ID: + return messageEntityHashtag::fetch(p); + case messageEntityBotCommand::ID: + return messageEntityBotCommand::fetch(p); + case messageEntityUrl::ID: + return messageEntityUrl::fetch(p); + case messageEntityEmail::ID: + return messageEntityEmail::fetch(p); + case messageEntityBold::ID: + return messageEntityBold::fetch(p); + case messageEntityItalic::ID: + return messageEntityItalic::fetch(p); + case messageEntityCode::ID: + return messageEntityCode::fetch(p); + case messageEntityPre::ID: + return messageEntityPre::fetch(p); + case messageEntityTextUrl::ID: + return messageEntityTextUrl::fetch(p); + case messageEntityMentionName::ID: + return messageEntityMentionName::fetch(p); + case messageEntityPhone::ID: + return messageEntityPhone::fetch(p); + case messageEntityCashtag::ID: + return messageEntityCashtag::fetch(p); + case messageEntityBankCard::ID: + return messageEntityBankCard::fetch(p); + case messageEntityUnderline::ID: + return messageEntityUnderline::fetch(p); + case messageEntityStrike::ID: + return messageEntityStrike::fetch(p); + case messageEntityBlockquote::ID: + return messageEntityBlockquote::fetch(p); + case messageEntitySpoiler::ID: + return messageEntitySpoiler::fetch(p); + case messageEntityCustomEmoji::ID: + return messageEntityCustomEmoji::fetch(p); + case photoSizeEmpty::ID: + return photoSizeEmpty::fetch(p); + case photoSize::ID: + return photoSize::fetch(p); + case photoCachedSize::ID: + return photoCachedSize::fetch(p); + case sendMessageTypingAction::ID: + return sendMessageTypingAction::fetch(p); + case sendMessageCancelAction::ID: + return sendMessageCancelAction::fetch(p); + case sendMessageRecordVideoAction::ID: + return sendMessageRecordVideoAction::fetch(p); + case sendMessageUploadVideoAction::ID: + return sendMessageUploadVideoAction::fetch(p); + case sendMessageRecordAudioAction::ID: + return sendMessageRecordAudioAction::fetch(p); + case sendMessageUploadAudioAction::ID: + return sendMessageUploadAudioAction::fetch(p); + case sendMessageUploadPhotoAction::ID: + return sendMessageUploadPhotoAction::fetch(p); + case sendMessageUploadDocumentAction::ID: + return sendMessageUploadDocumentAction::fetch(p); + case sendMessageGeoLocationAction::ID: + return sendMessageGeoLocationAction::fetch(p); + case sendMessageChooseContactAction::ID: + return sendMessageChooseContactAction::fetch(p); + case sendMessageRecordRoundAction::ID: + return sendMessageRecordRoundAction::fetch(p); + case sendMessageUploadRoundAction::ID: + return sendMessageUploadRoundAction::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +object_ptr Function::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case test_dummyFunction::ID: + return test_dummyFunction::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +object_ptr DecryptedMessage::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case decryptedMessage8::ID: + return decryptedMessage8::fetch(p); + case decryptedMessageService8::ID: + return decryptedMessageService8::fetch(p); + case decryptedMessage23::ID: + return decryptedMessage23::fetch(p); + case decryptedMessageService::ID: + return decryptedMessageService::fetch(p); + case decryptedMessage46::ID: + return decryptedMessage46::fetch(p); + case decryptedMessage::ID: + return decryptedMessage::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +decryptedMessage8::decryptedMessage8(int64 random_id_, bytes &&random_bytes_, string const &message_, object_ptr &&media_) + : random_id_(random_id_) + , random_bytes_(std::move(random_bytes_)) + , message_(message_) + , media_(std::move(media_)) +{} + +const std::int32_t decryptedMessage8::ID; + +object_ptr decryptedMessage8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessage8::decryptedMessage8(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_id_(TlFetchLong::parse(p)) + , random_bytes_(TlFetchBytes::parse(p)) + , message_(TlFetchString::parse(p)) + , media_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessage8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreString::store(random_bytes_, s); + TlStoreString::store(message_, s); + TlStoreBoxedUnknown::store(media_, s); +} + +void decryptedMessage8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreString::store(random_bytes_, s); + TlStoreString::store(message_, s); + TlStoreBoxedUnknown::store(media_, s); +} + +void decryptedMessage8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessage8"); + s.store_field("random_id", random_id_); + s.store_bytes_field("random_bytes", random_bytes_); + s.store_field("message", message_); + s.store_object_field("media", static_cast(media_.get())); + s.store_class_end(); + } +} + +decryptedMessageService8::decryptedMessageService8(int64 random_id_, bytes &&random_bytes_, object_ptr &&action_) + : random_id_(random_id_) + , random_bytes_(std::move(random_bytes_)) + , action_(std::move(action_)) +{} + +const std::int32_t decryptedMessageService8::ID; + +object_ptr decryptedMessageService8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageService8::decryptedMessageService8(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_id_(TlFetchLong::parse(p)) + , random_bytes_(TlFetchBytes::parse(p)) + , action_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessageService8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreString::store(random_bytes_, s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageService8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreString::store(random_bytes_, s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageService8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageService8"); + s.store_field("random_id", random_id_); + s.store_bytes_field("random_bytes", random_bytes_); + s.store_object_field("action", static_cast(action_.get())); + s.store_class_end(); + } +} + +decryptedMessage23::decryptedMessage23(int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_) + : random_id_(random_id_) + , ttl_(ttl_) + , message_(message_) + , media_(std::move(media_)) +{} + +const std::int32_t decryptedMessage23::ID; + +object_ptr decryptedMessage23::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessage23::decryptedMessage23(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_id_(TlFetchLong::parse(p)) + , ttl_(TlFetchInt::parse(p)) + , message_(TlFetchString::parse(p)) + , media_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessage23::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + TlStoreBoxedUnknown::store(media_, s); +} + +void decryptedMessage23::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + TlStoreBoxedUnknown::store(media_, s); +} + +void decryptedMessage23::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessage23"); + s.store_field("random_id", random_id_); + s.store_field("ttl", ttl_); + s.store_field("message", message_); + s.store_object_field("media", static_cast(media_.get())); + s.store_class_end(); + } +} + +decryptedMessageService::decryptedMessageService(int64 random_id_, object_ptr &&action_) + : random_id_(random_id_) + , action_(std::move(action_)) +{} + +const std::int32_t decryptedMessageService::ID; + +object_ptr decryptedMessageService::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageService::decryptedMessageService(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_id_(TlFetchLong::parse(p)) + , action_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessageService::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageService::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(random_id_, s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageService::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageService"); + s.store_field("random_id", random_id_); + s.store_object_field("action", static_cast(action_.get())); + s.store_class_end(); + } +} + +decryptedMessage46::decryptedMessage46() + : flags_() + , random_id_() + , ttl_() + , message_() + , media_() + , entities_() + , via_bot_name_() + , reply_to_random_id_() +{} + +decryptedMessage46::decryptedMessage46(int32 flags_, int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_, array> &&entities_, string const &via_bot_name_, int64 reply_to_random_id_) + : flags_(flags_) + , random_id_(random_id_) + , ttl_(ttl_) + , message_(message_) + , media_(std::move(media_)) + , entities_(std::move(entities_)) + , via_bot_name_(via_bot_name_) + , reply_to_random_id_(reply_to_random_id_) +{} + +const std::int32_t decryptedMessage46::ID; + +object_ptr decryptedMessage46::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + object_ptr res = make_tl_object(); + int32 var0; + if ((var0 = res->flags_ = TlFetchInt::parse(p)) < 0) { FAIL("Variable of type # can't be negative"); } + res->random_id_ = TlFetchLong::parse(p); + res->ttl_ = TlFetchInt::parse(p); + res->message_ = TlFetchString::parse(p); + if (var0 & 512) { res->media_ = TlFetchObject::parse(p); } + if (var0 & 128) { res->entities_ = TlFetchBoxed>, 481674261>::parse(p); } + if (var0 & 2048) { res->via_bot_name_ = TlFetchString::parse(p); } + if (var0 & 8) { res->reply_to_random_id_ = TlFetchLong::parse(p); } + if (p.get_error()) { FAIL(""); } + return std::move(res); +#undef FAIL +} + +void decryptedMessage46::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + if (var0 & 512) { TlStoreBoxedUnknown::store(media_, s); } + if (var0 & 128) { TlStoreBoxed>, 481674261>::store(entities_, s); } + if (var0 & 2048) { TlStoreString::store(via_bot_name_, s); } + if (var0 & 8) { TlStoreBinary::store(reply_to_random_id_, s); } +} + +void decryptedMessage46::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + if (var0 & 512) { TlStoreBoxedUnknown::store(media_, s); } + if (var0 & 128) { TlStoreBoxed>, 481674261>::store(entities_, s); } + if (var0 & 2048) { TlStoreString::store(via_bot_name_, s); } + if (var0 & 8) { TlStoreBinary::store(reply_to_random_id_, s); } +} + +void decryptedMessage46::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessage46"); + int32 var0; + s.store_field("flags", (var0 = flags_)); + s.store_field("random_id", random_id_); + s.store_field("ttl", ttl_); + s.store_field("message", message_); + if (var0 & 512) { s.store_object_field("media", static_cast(media_.get())); } + if (var0 & 128) { { s.store_vector_begin("entities", entities_.size()); for (const auto &_value : entities_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } } + if (var0 & 2048) { s.store_field("via_bot_name", via_bot_name_); } + if (var0 & 8) { s.store_field("reply_to_random_id", reply_to_random_id_); } + s.store_class_end(); + } +} + +decryptedMessage::decryptedMessage() + : flags_() + , silent_() + , random_id_() + , ttl_() + , message_() + , media_() + , entities_() + , via_bot_name_() + , reply_to_random_id_() + , grouped_id_() +{} + +decryptedMessage::decryptedMessage(int32 flags_, bool silent_, int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_, array> &&entities_, string const &via_bot_name_, int64 reply_to_random_id_, int64 grouped_id_) + : flags_(flags_) + , silent_(silent_) + , random_id_(random_id_) + , ttl_(ttl_) + , message_(message_) + , media_(std::move(media_)) + , entities_(std::move(entities_)) + , via_bot_name_(via_bot_name_) + , reply_to_random_id_(reply_to_random_id_) + , grouped_id_(grouped_id_) +{} + +const std::int32_t decryptedMessage::ID; + +object_ptr decryptedMessage::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + object_ptr res = make_tl_object(); + int32 var0; + if ((var0 = res->flags_ = TlFetchInt::parse(p)) < 0) { FAIL("Variable of type # can't be negative"); } + if (var0 & 32) { res->silent_ = TlFetchTrue::parse(p); } + res->random_id_ = TlFetchLong::parse(p); + res->ttl_ = TlFetchInt::parse(p); + res->message_ = TlFetchString::parse(p); + if (var0 & 512) { res->media_ = TlFetchObject::parse(p); } + if (var0 & 128) { res->entities_ = TlFetchBoxed>, 481674261>::parse(p); } + if (var0 & 2048) { res->via_bot_name_ = TlFetchString::parse(p); } + if (var0 & 8) { res->reply_to_random_id_ = TlFetchLong::parse(p); } + if (var0 & 131072) { res->grouped_id_ = TlFetchLong::parse(p); } + if (p.get_error()) { FAIL(""); } + return std::move(res); +#undef FAIL +} + +void decryptedMessage::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + if (var0 & 512) { TlStoreBoxedUnknown::store(media_, s); } + if (var0 & 128) { TlStoreBoxed>, 481674261>::store(entities_, s); } + if (var0 & 2048) { TlStoreString::store(via_bot_name_, s); } + if (var0 & 8) { TlStoreBinary::store(reply_to_random_id_, s); } + if (var0 & 131072) { TlStoreBinary::store(grouped_id_, s); } +} + +void decryptedMessage::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(random_id_, s); + TlStoreBinary::store(ttl_, s); + TlStoreString::store(message_, s); + if (var0 & 512) { TlStoreBoxedUnknown::store(media_, s); } + if (var0 & 128) { TlStoreBoxed>, 481674261>::store(entities_, s); } + if (var0 & 2048) { TlStoreString::store(via_bot_name_, s); } + if (var0 & 8) { TlStoreBinary::store(reply_to_random_id_, s); } + if (var0 & 131072) { TlStoreBinary::store(grouped_id_, s); } +} + +void decryptedMessage::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessage"); + int32 var0; + s.store_field("flags", (var0 = flags_)); + s.store_field("random_id", random_id_); + s.store_field("ttl", ttl_); + s.store_field("message", message_); + if (var0 & 512) { s.store_object_field("media", static_cast(media_.get())); } + if (var0 & 128) { { s.store_vector_begin("entities", entities_.size()); for (const auto &_value : entities_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } } + if (var0 & 2048) { s.store_field("via_bot_name", via_bot_name_); } + if (var0 & 8) { s.store_field("reply_to_random_id", reply_to_random_id_); } + if (var0 & 131072) { s.store_field("grouped_id", grouped_id_); } + s.store_class_end(); + } +} + +object_ptr DecryptedMessageAction::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case decryptedMessageActionSetMessageTTL::ID: + return decryptedMessageActionSetMessageTTL::fetch(p); + case decryptedMessageActionReadMessages::ID: + return decryptedMessageActionReadMessages::fetch(p); + case decryptedMessageActionDeleteMessages::ID: + return decryptedMessageActionDeleteMessages::fetch(p); + case decryptedMessageActionScreenshotMessages::ID: + return decryptedMessageActionScreenshotMessages::fetch(p); + case decryptedMessageActionFlushHistory::ID: + return decryptedMessageActionFlushHistory::fetch(p); + case decryptedMessageActionResend::ID: + return decryptedMessageActionResend::fetch(p); + case decryptedMessageActionNotifyLayer::ID: + return decryptedMessageActionNotifyLayer::fetch(p); + case decryptedMessageActionTyping::ID: + return decryptedMessageActionTyping::fetch(p); + case decryptedMessageActionRequestKey::ID: + return decryptedMessageActionRequestKey::fetch(p); + case decryptedMessageActionAcceptKey::ID: + return decryptedMessageActionAcceptKey::fetch(p); + case decryptedMessageActionAbortKey::ID: + return decryptedMessageActionAbortKey::fetch(p); + case decryptedMessageActionCommitKey::ID: + return decryptedMessageActionCommitKey::fetch(p); + case decryptedMessageActionNoop::ID: + return decryptedMessageActionNoop::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +decryptedMessageActionSetMessageTTL::decryptedMessageActionSetMessageTTL(int32 ttl_seconds_) + : ttl_seconds_(ttl_seconds_) +{} + +const std::int32_t decryptedMessageActionSetMessageTTL::ID; + +object_ptr decryptedMessageActionSetMessageTTL::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionSetMessageTTL::decryptedMessageActionSetMessageTTL(TlParser &p) +#define FAIL(error) p.set_error(error) + : ttl_seconds_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionSetMessageTTL::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(ttl_seconds_, s); +} + +void decryptedMessageActionSetMessageTTL::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(ttl_seconds_, s); +} + +void decryptedMessageActionSetMessageTTL::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionSetMessageTTL"); + s.store_field("ttl_seconds", ttl_seconds_); + s.store_class_end(); + } +} + +decryptedMessageActionReadMessages::decryptedMessageActionReadMessages(array &&random_ids_) + : random_ids_(std::move(random_ids_)) +{} + +const std::int32_t decryptedMessageActionReadMessages::ID; + +object_ptr decryptedMessageActionReadMessages::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionReadMessages::decryptedMessageActionReadMessages(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionReadMessages::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionReadMessages::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionReadMessages::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionReadMessages"); + { s.store_vector_begin("random_ids", random_ids_.size()); for (const auto &_value : random_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +decryptedMessageActionDeleteMessages::decryptedMessageActionDeleteMessages(array &&random_ids_) + : random_ids_(std::move(random_ids_)) +{} + +const std::int32_t decryptedMessageActionDeleteMessages::ID; + +object_ptr decryptedMessageActionDeleteMessages::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionDeleteMessages::decryptedMessageActionDeleteMessages(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionDeleteMessages::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionDeleteMessages::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionDeleteMessages::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionDeleteMessages"); + { s.store_vector_begin("random_ids", random_ids_.size()); for (const auto &_value : random_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +decryptedMessageActionScreenshotMessages::decryptedMessageActionScreenshotMessages(array &&random_ids_) + : random_ids_(std::move(random_ids_)) +{} + +const std::int32_t decryptedMessageActionScreenshotMessages::ID; + +object_ptr decryptedMessageActionScreenshotMessages::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionScreenshotMessages::decryptedMessageActionScreenshotMessages(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_ids_(TlFetchBoxed, 481674261>::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionScreenshotMessages::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionScreenshotMessages::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxed, 481674261>::store(random_ids_, s); +} + +void decryptedMessageActionScreenshotMessages::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionScreenshotMessages"); + { s.store_vector_begin("random_ids", random_ids_.size()); for (const auto &_value : random_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +const std::int32_t decryptedMessageActionFlushHistory::ID; + +object_ptr decryptedMessageActionFlushHistory::fetch(TlParser &p) { + return make_tl_object(); +} + +void decryptedMessageActionFlushHistory::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void decryptedMessageActionFlushHistory::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void decryptedMessageActionFlushHistory::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionFlushHistory"); + s.store_class_end(); + } +} + +decryptedMessageActionResend::decryptedMessageActionResend(int32 start_seq_no_, int32 end_seq_no_) + : start_seq_no_(start_seq_no_) + , end_seq_no_(end_seq_no_) +{} + +const std::int32_t decryptedMessageActionResend::ID; + +object_ptr decryptedMessageActionResend::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionResend::decryptedMessageActionResend(TlParser &p) +#define FAIL(error) p.set_error(error) + : start_seq_no_(TlFetchInt::parse(p)) + , end_seq_no_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionResend::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(start_seq_no_, s); + TlStoreBinary::store(end_seq_no_, s); +} + +void decryptedMessageActionResend::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(start_seq_no_, s); + TlStoreBinary::store(end_seq_no_, s); +} + +void decryptedMessageActionResend::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionResend"); + s.store_field("start_seq_no", start_seq_no_); + s.store_field("end_seq_no", end_seq_no_); + s.store_class_end(); + } +} + +decryptedMessageActionNotifyLayer::decryptedMessageActionNotifyLayer(int32 layer_) + : layer_(layer_) +{} + +const std::int32_t decryptedMessageActionNotifyLayer::ID; + +object_ptr decryptedMessageActionNotifyLayer::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionNotifyLayer::decryptedMessageActionNotifyLayer(TlParser &p) +#define FAIL(error) p.set_error(error) + : layer_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionNotifyLayer::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(layer_, s); +} + +void decryptedMessageActionNotifyLayer::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(layer_, s); +} + +void decryptedMessageActionNotifyLayer::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionNotifyLayer"); + s.store_field("layer", layer_); + s.store_class_end(); + } +} + +decryptedMessageActionTyping::decryptedMessageActionTyping(object_ptr &&action_) + : action_(std::move(action_)) +{} + +const std::int32_t decryptedMessageActionTyping::ID; + +object_ptr decryptedMessageActionTyping::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionTyping::decryptedMessageActionTyping(TlParser &p) +#define FAIL(error) p.set_error(error) + : action_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionTyping::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageActionTyping::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBoxedUnknown::store(action_, s); +} + +void decryptedMessageActionTyping::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionTyping"); + s.store_object_field("action", static_cast(action_.get())); + s.store_class_end(); + } +} + +decryptedMessageActionRequestKey::decryptedMessageActionRequestKey(int64 exchange_id_, bytes &&g_a_) + : exchange_id_(exchange_id_) + , g_a_(std::move(g_a_)) +{} + +const std::int32_t decryptedMessageActionRequestKey::ID; + +object_ptr decryptedMessageActionRequestKey::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionRequestKey::decryptedMessageActionRequestKey(TlParser &p) +#define FAIL(error) p.set_error(error) + : exchange_id_(TlFetchLong::parse(p)) + , g_a_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionRequestKey::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreString::store(g_a_, s); +} + +void decryptedMessageActionRequestKey::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreString::store(g_a_, s); +} + +void decryptedMessageActionRequestKey::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionRequestKey"); + s.store_field("exchange_id", exchange_id_); + s.store_bytes_field("g_a", g_a_); + s.store_class_end(); + } +} + +decryptedMessageActionAcceptKey::decryptedMessageActionAcceptKey(int64 exchange_id_, bytes &&g_b_, int64 key_fingerprint_) + : exchange_id_(exchange_id_) + , g_b_(std::move(g_b_)) + , key_fingerprint_(key_fingerprint_) +{} + +const std::int32_t decryptedMessageActionAcceptKey::ID; + +object_ptr decryptedMessageActionAcceptKey::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionAcceptKey::decryptedMessageActionAcceptKey(TlParser &p) +#define FAIL(error) p.set_error(error) + : exchange_id_(TlFetchLong::parse(p)) + , g_b_(TlFetchBytes::parse(p)) + , key_fingerprint_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionAcceptKey::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreString::store(g_b_, s); + TlStoreBinary::store(key_fingerprint_, s); +} + +void decryptedMessageActionAcceptKey::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreString::store(g_b_, s); + TlStoreBinary::store(key_fingerprint_, s); +} + +void decryptedMessageActionAcceptKey::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionAcceptKey"); + s.store_field("exchange_id", exchange_id_); + s.store_bytes_field("g_b", g_b_); + s.store_field("key_fingerprint", key_fingerprint_); + s.store_class_end(); + } +} + +decryptedMessageActionAbortKey::decryptedMessageActionAbortKey(int64 exchange_id_) + : exchange_id_(exchange_id_) +{} + +const std::int32_t decryptedMessageActionAbortKey::ID; + +object_ptr decryptedMessageActionAbortKey::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionAbortKey::decryptedMessageActionAbortKey(TlParser &p) +#define FAIL(error) p.set_error(error) + : exchange_id_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionAbortKey::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); +} + +void decryptedMessageActionAbortKey::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); +} + +void decryptedMessageActionAbortKey::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionAbortKey"); + s.store_field("exchange_id", exchange_id_); + s.store_class_end(); + } +} + +decryptedMessageActionCommitKey::decryptedMessageActionCommitKey(int64 exchange_id_, int64 key_fingerprint_) + : exchange_id_(exchange_id_) + , key_fingerprint_(key_fingerprint_) +{} + +const std::int32_t decryptedMessageActionCommitKey::ID; + +object_ptr decryptedMessageActionCommitKey::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageActionCommitKey::decryptedMessageActionCommitKey(TlParser &p) +#define FAIL(error) p.set_error(error) + : exchange_id_(TlFetchLong::parse(p)) + , key_fingerprint_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void decryptedMessageActionCommitKey::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreBinary::store(key_fingerprint_, s); +} + +void decryptedMessageActionCommitKey::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(exchange_id_, s); + TlStoreBinary::store(key_fingerprint_, s); +} + +void decryptedMessageActionCommitKey::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionCommitKey"); + s.store_field("exchange_id", exchange_id_); + s.store_field("key_fingerprint", key_fingerprint_); + s.store_class_end(); + } +} + +const std::int32_t decryptedMessageActionNoop::ID; + +object_ptr decryptedMessageActionNoop::fetch(TlParser &p) { + return make_tl_object(); +} + +void decryptedMessageActionNoop::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void decryptedMessageActionNoop::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void decryptedMessageActionNoop::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageActionNoop"); + s.store_class_end(); + } +} + +decryptedMessageLayer::decryptedMessageLayer(bytes &&random_bytes_, int32 layer_, int32 in_seq_no_, int32 out_seq_no_, object_ptr &&message_) + : random_bytes_(std::move(random_bytes_)) + , layer_(layer_) + , in_seq_no_(in_seq_no_) + , out_seq_no_(out_seq_no_) + , message_(std::move(message_)) +{} + +const std::int32_t decryptedMessageLayer::ID; + +object_ptr decryptedMessageLayer::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageLayer::decryptedMessageLayer(TlParser &p) +#define FAIL(error) p.set_error(error) + : random_bytes_(TlFetchBytes::parse(p)) + , layer_(TlFetchInt::parse(p)) + , in_seq_no_(TlFetchInt::parse(p)) + , out_seq_no_(TlFetchInt::parse(p)) + , message_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void decryptedMessageLayer::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(random_bytes_, s); + TlStoreBinary::store(layer_, s); + TlStoreBinary::store(in_seq_no_, s); + TlStoreBinary::store(out_seq_no_, s); + TlStoreBoxedUnknown::store(message_, s); +} + +void decryptedMessageLayer::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(random_bytes_, s); + TlStoreBinary::store(layer_, s); + TlStoreBinary::store(in_seq_no_, s); + TlStoreBinary::store(out_seq_no_, s); + TlStoreBoxedUnknown::store(message_, s); +} + +void decryptedMessageLayer::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageLayer"); + s.store_bytes_field("random_bytes", random_bytes_); + s.store_field("layer", layer_); + s.store_field("in_seq_no", in_seq_no_); + s.store_field("out_seq_no", out_seq_no_); + s.store_object_field("message", static_cast(message_.get())); + s.store_class_end(); + } +} + +object_ptr DecryptedMessageMedia::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case decryptedMessageMediaEmpty::ID: + return decryptedMessageMediaEmpty::fetch(p); + case decryptedMessageMediaPhoto8::ID: + return decryptedMessageMediaPhoto8::fetch(p); + case decryptedMessageMediaVideo8::ID: + return decryptedMessageMediaVideo8::fetch(p); + case decryptedMessageMediaGeoPoint::ID: + return decryptedMessageMediaGeoPoint::fetch(p); + case decryptedMessageMediaContact::ID: + return decryptedMessageMediaContact::fetch(p); + case decryptedMessageMediaDocument8::ID: + return decryptedMessageMediaDocument8::fetch(p); + case decryptedMessageMediaAudio8::ID: + return decryptedMessageMediaAudio8::fetch(p); + case decryptedMessageMediaVideo23::ID: + return decryptedMessageMediaVideo23::fetch(p); + case decryptedMessageMediaAudio::ID: + return decryptedMessageMediaAudio::fetch(p); + case decryptedMessageMediaExternalDocument::ID: + return decryptedMessageMediaExternalDocument::fetch(p); + case decryptedMessageMediaPhoto::ID: + return decryptedMessageMediaPhoto::fetch(p); + case decryptedMessageMediaVideo::ID: + return decryptedMessageMediaVideo::fetch(p); + case decryptedMessageMediaDocument46::ID: + return decryptedMessageMediaDocument46::fetch(p); + case decryptedMessageMediaVenue::ID: + return decryptedMessageMediaVenue::fetch(p); + case decryptedMessageMediaWebPage::ID: + return decryptedMessageMediaWebPage::fetch(p); + case decryptedMessageMediaDocument::ID: + return decryptedMessageMediaDocument::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +const std::int32_t decryptedMessageMediaEmpty::ID; + +object_ptr decryptedMessageMediaEmpty::fetch(TlParser &p) { + return make_tl_object(); +} + +void decryptedMessageMediaEmpty::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void decryptedMessageMediaEmpty::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void decryptedMessageMediaEmpty::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaEmpty"); + s.store_class_end(); + } +} + +decryptedMessageMediaPhoto8::decryptedMessageMediaPhoto8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , w_(w_) + , h_(h_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaPhoto8::ID; + +object_ptr decryptedMessageMediaPhoto8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaPhoto8::decryptedMessageMediaPhoto8(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaPhoto8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaPhoto8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaPhoto8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaPhoto8"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaVideo8::decryptedMessageMediaVideo8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , duration_(duration_) + , w_(w_) + , h_(h_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaVideo8::ID; + +object_ptr decryptedMessageMediaVideo8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaVideo8::decryptedMessageMediaVideo8(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , duration_(TlFetchInt::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaVideo8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaVideo8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaVideo8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaVideo8"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("duration", duration_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaGeoPoint::decryptedMessageMediaGeoPoint(double lat_, double long_) + : lat_(lat_) + , long_(long_) +{} + +const std::int32_t decryptedMessageMediaGeoPoint::ID; + +object_ptr decryptedMessageMediaGeoPoint::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaGeoPoint::decryptedMessageMediaGeoPoint(TlParser &p) +#define FAIL(error) p.set_error(error) + : lat_(TlFetchDouble::parse(p)) + , long_(TlFetchDouble::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaGeoPoint::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(lat_, s); + TlStoreBinary::store(long_, s); +} + +void decryptedMessageMediaGeoPoint::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(lat_, s); + TlStoreBinary::store(long_, s); +} + +void decryptedMessageMediaGeoPoint::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaGeoPoint"); + s.store_field("lat", lat_); + s.store_field("long", long_); + s.store_class_end(); + } +} + +decryptedMessageMediaContact::decryptedMessageMediaContact(string const &phone_number_, string const &first_name_, string const &last_name_, int32 user_id_) + : phone_number_(phone_number_) + , first_name_(first_name_) + , last_name_(last_name_) + , user_id_(user_id_) +{} + +const std::int32_t decryptedMessageMediaContact::ID; + +object_ptr decryptedMessageMediaContact::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaContact::decryptedMessageMediaContact(TlParser &p) +#define FAIL(error) p.set_error(error) + : phone_number_(TlFetchString::parse(p)) + , first_name_(TlFetchString::parse(p)) + , last_name_(TlFetchString::parse(p)) + , user_id_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaContact::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(phone_number_, s); + TlStoreString::store(first_name_, s); + TlStoreString::store(last_name_, s); + TlStoreBinary::store(user_id_, s); +} + +void decryptedMessageMediaContact::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(phone_number_, s); + TlStoreString::store(first_name_, s); + TlStoreString::store(last_name_, s); + TlStoreBinary::store(user_id_, s); +} + +void decryptedMessageMediaContact::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaContact"); + s.store_field("phone_number", phone_number_); + s.store_field("first_name", first_name_); + s.store_field("last_name", last_name_); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +decryptedMessageMediaDocument8::decryptedMessageMediaDocument8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &file_name_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , file_name_(file_name_) + , mime_type_(mime_type_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaDocument8::ID; + +object_ptr decryptedMessageMediaDocument8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaDocument8::decryptedMessageMediaDocument8(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , file_name_(TlFetchString::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaDocument8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(file_name_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaDocument8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(file_name_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaDocument8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaDocument8"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("file_name", file_name_); + s.store_field("mime_type", mime_type_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaAudio8::decryptedMessageMediaAudio8(int32 duration_, int32 size_, bytes &&key_, bytes &&iv_) + : duration_(duration_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaAudio8::ID; + +object_ptr decryptedMessageMediaAudio8::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaAudio8::decryptedMessageMediaAudio8(TlParser &p) +#define FAIL(error) p.set_error(error) + : duration_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaAudio8::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaAudio8::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaAudio8::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaAudio8"); + s.store_field("duration", duration_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaVideo23::decryptedMessageMediaVideo23(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, string const &mime_type_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , duration_(duration_) + , mime_type_(mime_type_) + , w_(w_) + , h_(h_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaVideo23::ID; + +object_ptr decryptedMessageMediaVideo23::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaVideo23::decryptedMessageMediaVideo23(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , duration_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaVideo23::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaVideo23::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaVideo23::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaVideo23"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("duration", duration_); + s.store_field("mime_type", mime_type_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaAudio::decryptedMessageMediaAudio(int32 duration_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_) + : duration_(duration_) + , mime_type_(mime_type_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) +{} + +const std::int32_t decryptedMessageMediaAudio::ID; + +object_ptr decryptedMessageMediaAudio::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaAudio::decryptedMessageMediaAudio(TlParser &p) +#define FAIL(error) p.set_error(error) + : duration_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaAudio::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaAudio::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); +} + +void decryptedMessageMediaAudio::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaAudio"); + s.store_field("duration", duration_); + s.store_field("mime_type", mime_type_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_class_end(); + } +} + +decryptedMessageMediaExternalDocument::decryptedMessageMediaExternalDocument(int64 id_, int64 access_hash_, int32 date_, string const &mime_type_, int32 size_, object_ptr &&thumb_, int32 dc_id_, array> &&attributes_) + : id_(id_) + , access_hash_(access_hash_) + , date_(date_) + , mime_type_(mime_type_) + , size_(size_) + , thumb_(std::move(thumb_)) + , dc_id_(dc_id_) + , attributes_(std::move(attributes_)) +{} + +const std::int32_t decryptedMessageMediaExternalDocument::ID; + +object_ptr decryptedMessageMediaExternalDocument::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaExternalDocument::decryptedMessageMediaExternalDocument(TlParser &p) +#define FAIL(error) p.set_error(error) + : id_(TlFetchLong::parse(p)) + , access_hash_(TlFetchLong::parse(p)) + , date_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , size_(TlFetchInt::parse(p)) + , thumb_(TlFetchObject::parse(p)) + , dc_id_(TlFetchInt::parse(p)) + , attributes_(TlFetchBoxed>, 481674261>::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaExternalDocument::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(id_, s); + TlStoreBinary::store(access_hash_, s); + TlStoreBinary::store(date_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreBoxedUnknown::store(thumb_, s); + TlStoreBinary::store(dc_id_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); +} + +void decryptedMessageMediaExternalDocument::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(id_, s); + TlStoreBinary::store(access_hash_, s); + TlStoreBinary::store(date_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreBoxedUnknown::store(thumb_, s); + TlStoreBinary::store(dc_id_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); +} + +void decryptedMessageMediaExternalDocument::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaExternalDocument"); + s.store_field("id", id_); + s.store_field("access_hash", access_hash_); + s.store_field("date", date_); + s.store_field("mime_type", mime_type_); + s.store_field("size", size_); + s.store_object_field("thumb", static_cast(thumb_.get())); + s.store_field("dc_id", dc_id_); + { s.store_vector_begin("attributes", attributes_.size()); for (const auto &_value : attributes_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +decryptedMessageMediaPhoto::decryptedMessageMediaPhoto(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_, string const &caption_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , w_(w_) + , h_(h_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) + , caption_(caption_) +{} + +const std::int32_t decryptedMessageMediaPhoto::ID; + +object_ptr decryptedMessageMediaPhoto::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaPhoto::decryptedMessageMediaPhoto(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) + , caption_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaPhoto::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaPhoto::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaPhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaPhoto"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_field("caption", caption_); + s.store_class_end(); + } +} + +decryptedMessageMediaVideo::decryptedMessageMediaVideo(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, string const &mime_type_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_, string const &caption_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , duration_(duration_) + , mime_type_(mime_type_) + , w_(w_) + , h_(h_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) + , caption_(caption_) +{} + +const std::int32_t decryptedMessageMediaVideo::ID; + +object_ptr decryptedMessageMediaVideo::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaVideo::decryptedMessageMediaVideo(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , duration_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) + , caption_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaVideo::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaVideo::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaVideo"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("duration", duration_); + s.store_field("mime_type", mime_type_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + s.store_field("caption", caption_); + s.store_class_end(); + } +} + +decryptedMessageMediaDocument46::decryptedMessageMediaDocument46(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_, array> &&attributes_, string const &caption_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , mime_type_(mime_type_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) + , attributes_(std::move(attributes_)) + , caption_(caption_) +{} + +const std::int32_t decryptedMessageMediaDocument46::ID; + +object_ptr decryptedMessageMediaDocument46::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaDocument46::decryptedMessageMediaDocument46(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , size_(TlFetchInt::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) + , attributes_(TlFetchBoxed>, 481674261>::parse(p)) + , caption_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaDocument46::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaDocument46::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaDocument46::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaDocument46"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("mime_type", mime_type_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + { s.store_vector_begin("attributes", attributes_.size()); for (const auto &_value : attributes_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("caption", caption_); + s.store_class_end(); + } +} + +decryptedMessageMediaVenue::decryptedMessageMediaVenue(double lat_, double long_, string const &title_, string const &address_, string const &provider_, string const &venue_id_) + : lat_(lat_) + , long_(long_) + , title_(title_) + , address_(address_) + , provider_(provider_) + , venue_id_(venue_id_) +{} + +const std::int32_t decryptedMessageMediaVenue::ID; + +object_ptr decryptedMessageMediaVenue::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaVenue::decryptedMessageMediaVenue(TlParser &p) +#define FAIL(error) p.set_error(error) + : lat_(TlFetchDouble::parse(p)) + , long_(TlFetchDouble::parse(p)) + , title_(TlFetchString::parse(p)) + , address_(TlFetchString::parse(p)) + , provider_(TlFetchString::parse(p)) + , venue_id_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaVenue::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(lat_, s); + TlStoreBinary::store(long_, s); + TlStoreString::store(title_, s); + TlStoreString::store(address_, s); + TlStoreString::store(provider_, s); + TlStoreString::store(venue_id_, s); +} + +void decryptedMessageMediaVenue::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(lat_, s); + TlStoreBinary::store(long_, s); + TlStoreString::store(title_, s); + TlStoreString::store(address_, s); + TlStoreString::store(provider_, s); + TlStoreString::store(venue_id_, s); +} + +void decryptedMessageMediaVenue::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaVenue"); + s.store_field("lat", lat_); + s.store_field("long", long_); + s.store_field("title", title_); + s.store_field("address", address_); + s.store_field("provider", provider_); + s.store_field("venue_id", venue_id_); + s.store_class_end(); + } +} + +decryptedMessageMediaWebPage::decryptedMessageMediaWebPage(string const &url_) + : url_(url_) +{} + +const std::int32_t decryptedMessageMediaWebPage::ID; + +object_ptr decryptedMessageMediaWebPage::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaWebPage::decryptedMessageMediaWebPage(TlParser &p) +#define FAIL(error) p.set_error(error) + : url_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaWebPage::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(url_, s); +} + +void decryptedMessageMediaWebPage::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(url_, s); +} + +void decryptedMessageMediaWebPage::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaWebPage"); + s.store_field("url", url_); + s.store_class_end(); + } +} + +decryptedMessageMediaDocument::decryptedMessageMediaDocument(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &mime_type_, int64 size_, bytes &&key_, bytes &&iv_, array> &&attributes_, string const &caption_) + : thumb_(std::move(thumb_)) + , thumb_w_(thumb_w_) + , thumb_h_(thumb_h_) + , mime_type_(mime_type_) + , size_(size_) + , key_(std::move(key_)) + , iv_(std::move(iv_)) + , attributes_(std::move(attributes_)) + , caption_(caption_) +{} + +const std::int32_t decryptedMessageMediaDocument::ID; + +object_ptr decryptedMessageMediaDocument::fetch(TlParser &p) { + return make_tl_object(p); +} + +decryptedMessageMediaDocument::decryptedMessageMediaDocument(TlParser &p) +#define FAIL(error) p.set_error(error) + : thumb_(TlFetchBytes::parse(p)) + , thumb_w_(TlFetchInt::parse(p)) + , thumb_h_(TlFetchInt::parse(p)) + , mime_type_(TlFetchString::parse(p)) + , size_(TlFetchLong::parse(p)) + , key_(TlFetchBytes::parse(p)) + , iv_(TlFetchBytes::parse(p)) + , attributes_(TlFetchBoxed>, 481674261>::parse(p)) + , caption_(TlFetchString::parse(p)) +#undef FAIL +{} + +void decryptedMessageMediaDocument::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaDocument::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(thumb_, s); + TlStoreBinary::store(thumb_w_, s); + TlStoreBinary::store(thumb_h_, s); + TlStoreString::store(mime_type_, s); + TlStoreBinary::store(size_, s); + TlStoreString::store(key_, s); + TlStoreString::store(iv_, s); + TlStoreBoxed>, 481674261>::store(attributes_, s); + TlStoreString::store(caption_, s); +} + +void decryptedMessageMediaDocument::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "decryptedMessageMediaDocument"); + s.store_bytes_field("thumb", thumb_); + s.store_field("thumb_w", thumb_w_); + s.store_field("thumb_h", thumb_h_); + s.store_field("mime_type", mime_type_); + s.store_field("size", size_); + s.store_bytes_field("key", key_); + s.store_bytes_field("iv", iv_); + { s.store_vector_begin("attributes", attributes_.size()); for (const auto &_value : attributes_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("caption", caption_); + s.store_class_end(); + } +} + +object_ptr DocumentAttribute::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case documentAttributeImageSize::ID: + return documentAttributeImageSize::fetch(p); + case documentAttributeAnimated::ID: + return documentAttributeAnimated::fetch(p); + case documentAttributeSticker23::ID: + return documentAttributeSticker23::fetch(p); + case documentAttributeVideo23::ID: + return documentAttributeVideo23::fetch(p); + case documentAttributeAudio23::ID: + return documentAttributeAudio23::fetch(p); + case documentAttributeFilename::ID: + return documentAttributeFilename::fetch(p); + case documentAttributeAudio45::ID: + return documentAttributeAudio45::fetch(p); + case documentAttributeSticker::ID: + return documentAttributeSticker::fetch(p); + case documentAttributeAudio::ID: + return documentAttributeAudio::fetch(p); + case documentAttributeVideo::ID: + return documentAttributeVideo::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +documentAttributeImageSize::documentAttributeImageSize(int32 w_, int32 h_) + : w_(w_) + , h_(h_) +{} + +const std::int32_t documentAttributeImageSize::ID; + +object_ptr documentAttributeImageSize::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeImageSize::documentAttributeImageSize(TlParser &p) +#define FAIL(error) p.set_error(error) + : w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void documentAttributeImageSize::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeImageSize::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeImageSize::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeImageSize"); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_class_end(); + } +} + +const std::int32_t documentAttributeAnimated::ID; + +object_ptr documentAttributeAnimated::fetch(TlParser &p) { + return make_tl_object(); +} + +void documentAttributeAnimated::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void documentAttributeAnimated::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void documentAttributeAnimated::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeAnimated"); + s.store_class_end(); + } +} + +const std::int32_t documentAttributeSticker23::ID; + +object_ptr documentAttributeSticker23::fetch(TlParser &p) { + return make_tl_object(); +} + +void documentAttributeSticker23::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void documentAttributeSticker23::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void documentAttributeSticker23::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeSticker23"); + s.store_class_end(); + } +} + +documentAttributeVideo23::documentAttributeVideo23(int32 duration_, int32 w_, int32 h_) + : duration_(duration_) + , w_(w_) + , h_(h_) +{} + +const std::int32_t documentAttributeVideo23::ID; + +object_ptr documentAttributeVideo23::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeVideo23::documentAttributeVideo23(TlParser &p) +#define FAIL(error) p.set_error(error) + : duration_(TlFetchInt::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void documentAttributeVideo23::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeVideo23::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeVideo23::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeVideo23"); + s.store_field("duration", duration_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_class_end(); + } +} + +documentAttributeAudio23::documentAttributeAudio23(int32 duration_) + : duration_(duration_) +{} + +const std::int32_t documentAttributeAudio23::ID; + +object_ptr documentAttributeAudio23::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeAudio23::documentAttributeAudio23(TlParser &p) +#define FAIL(error) p.set_error(error) + : duration_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void documentAttributeAudio23::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); +} + +void documentAttributeAudio23::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); +} + +void documentAttributeAudio23::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeAudio23"); + s.store_field("duration", duration_); + s.store_class_end(); + } +} + +documentAttributeFilename::documentAttributeFilename(string const &file_name_) + : file_name_(file_name_) +{} + +const std::int32_t documentAttributeFilename::ID; + +object_ptr documentAttributeFilename::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeFilename::documentAttributeFilename(TlParser &p) +#define FAIL(error) p.set_error(error) + : file_name_(TlFetchString::parse(p)) +#undef FAIL +{} + +void documentAttributeFilename::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(file_name_, s); +} + +void documentAttributeFilename::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(file_name_, s); +} + +void documentAttributeFilename::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeFilename"); + s.store_field("file_name", file_name_); + s.store_class_end(); + } +} + +documentAttributeAudio45::documentAttributeAudio45(int32 duration_, string const &title_, string const &performer_) + : duration_(duration_) + , title_(title_) + , performer_(performer_) +{} + +const std::int32_t documentAttributeAudio45::ID; + +object_ptr documentAttributeAudio45::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeAudio45::documentAttributeAudio45(TlParser &p) +#define FAIL(error) p.set_error(error) + : duration_(TlFetchInt::parse(p)) + , title_(TlFetchString::parse(p)) + , performer_(TlFetchString::parse(p)) +#undef FAIL +{} + +void documentAttributeAudio45::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(title_, s); + TlStoreString::store(performer_, s); +} + +void documentAttributeAudio45::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(duration_, s); + TlStoreString::store(title_, s); + TlStoreString::store(performer_, s); +} + +void documentAttributeAudio45::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeAudio45"); + s.store_field("duration", duration_); + s.store_field("title", title_); + s.store_field("performer", performer_); + s.store_class_end(); + } +} + +documentAttributeSticker::documentAttributeSticker(string const &alt_, object_ptr &&stickerset_) + : alt_(alt_) + , stickerset_(std::move(stickerset_)) +{} + +const std::int32_t documentAttributeSticker::ID; + +object_ptr documentAttributeSticker::fetch(TlParser &p) { + return make_tl_object(p); +} + +documentAttributeSticker::documentAttributeSticker(TlParser &p) +#define FAIL(error) p.set_error(error) + : alt_(TlFetchString::parse(p)) + , stickerset_(TlFetchObject::parse(p)) +#undef FAIL +{} + +void documentAttributeSticker::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(alt_, s); + TlStoreBoxedUnknown::store(stickerset_, s); +} + +void documentAttributeSticker::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(alt_, s); + TlStoreBoxedUnknown::store(stickerset_, s); +} + +void documentAttributeSticker::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeSticker"); + s.store_field("alt", alt_); + s.store_object_field("stickerset", static_cast(stickerset_.get())); + s.store_class_end(); + } +} + +documentAttributeAudio::documentAttributeAudio() + : flags_() + , voice_() + , duration_() + , title_() + , performer_() + , waveform_() +{} + +documentAttributeAudio::documentAttributeAudio(int32 flags_, bool voice_, int32 duration_, string const &title_, string const &performer_, bytes &&waveform_) + : flags_(flags_) + , voice_(voice_) + , duration_(duration_) + , title_(title_) + , performer_(performer_) + , waveform_(std::move(waveform_)) +{} + +const std::int32_t documentAttributeAudio::ID; + +object_ptr documentAttributeAudio::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + object_ptr res = make_tl_object(); + int32 var0; + if ((var0 = res->flags_ = TlFetchInt::parse(p)) < 0) { FAIL("Variable of type # can't be negative"); } + if (var0 & 1024) { res->voice_ = TlFetchTrue::parse(p); } + res->duration_ = TlFetchInt::parse(p); + if (var0 & 1) { res->title_ = TlFetchString::parse(p); } + if (var0 & 2) { res->performer_ = TlFetchString::parse(p); } + if (var0 & 4) { res->waveform_ = TlFetchBytes::parse(p); } + if (p.get_error()) { FAIL(""); } + return std::move(res); +#undef FAIL +} + +void documentAttributeAudio::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(duration_, s); + if (var0 & 1) { TlStoreString::store(title_, s); } + if (var0 & 2) { TlStoreString::store(performer_, s); } + if (var0 & 4) { TlStoreString::store(waveform_, s); } +} + +void documentAttributeAudio::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(duration_, s); + if (var0 & 1) { TlStoreString::store(title_, s); } + if (var0 & 2) { TlStoreString::store(performer_, s); } + if (var0 & 4) { TlStoreString::store(waveform_, s); } +} + +void documentAttributeAudio::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeAudio"); + int32 var0; + s.store_field("flags", (var0 = flags_)); + s.store_field("duration", duration_); + if (var0 & 1) { s.store_field("title", title_); } + if (var0 & 2) { s.store_field("performer", performer_); } + if (var0 & 4) { s.store_bytes_field("waveform", waveform_); } + s.store_class_end(); + } +} + +documentAttributeVideo::documentAttributeVideo() + : flags_() + , round_message_() + , duration_() + , w_() + , h_() +{} + +documentAttributeVideo::documentAttributeVideo(int32 flags_, bool round_message_, int32 duration_, int32 w_, int32 h_) + : flags_(flags_) + , round_message_(round_message_) + , duration_(duration_) + , w_(w_) + , h_(h_) +{} + +const std::int32_t documentAttributeVideo::ID; + +object_ptr documentAttributeVideo::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + object_ptr res = make_tl_object(); + int32 var0; + if ((var0 = res->flags_ = TlFetchInt::parse(p)) < 0) { FAIL("Variable of type # can't be negative"); } + if (var0 & 1) { res->round_message_ = TlFetchTrue::parse(p); } + res->duration_ = TlFetchInt::parse(p); + res->w_ = TlFetchInt::parse(p); + res->h_ = TlFetchInt::parse(p); + if (p.get_error()) { FAIL(""); } + return std::move(res); +#undef FAIL +} + +void documentAttributeVideo::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeVideo::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + int32 var0; + TlStoreBinary::store((var0 = flags_), s); + TlStoreBinary::store(duration_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); +} + +void documentAttributeVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "documentAttributeVideo"); + int32 var0; + s.store_field("flags", (var0 = flags_)); + s.store_field("duration", duration_); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_class_end(); + } +} + +object_ptr FileLocation::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case fileLocationUnavailable::ID: + return fileLocationUnavailable::fetch(p); + case fileLocation::ID: + return fileLocation::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +fileLocationUnavailable::fileLocationUnavailable(int64 volume_id_, int32 local_id_, int64 secret_) + : volume_id_(volume_id_) + , local_id_(local_id_) + , secret_(secret_) +{} + +const std::int32_t fileLocationUnavailable::ID; + +object_ptr fileLocationUnavailable::fetch(TlParser &p) { + return make_tl_object(p); +} + +fileLocationUnavailable::fileLocationUnavailable(TlParser &p) +#define FAIL(error) p.set_error(error) + : volume_id_(TlFetchLong::parse(p)) + , local_id_(TlFetchInt::parse(p)) + , secret_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void fileLocationUnavailable::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(volume_id_, s); + TlStoreBinary::store(local_id_, s); + TlStoreBinary::store(secret_, s); +} + +void fileLocationUnavailable::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(volume_id_, s); + TlStoreBinary::store(local_id_, s); + TlStoreBinary::store(secret_, s); +} + +void fileLocationUnavailable::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileLocationUnavailable"); + s.store_field("volume_id", volume_id_); + s.store_field("local_id", local_id_); + s.store_field("secret", secret_); + s.store_class_end(); + } +} + +fileLocation::fileLocation(int32 dc_id_, int64 volume_id_, int32 local_id_, int64 secret_) + : dc_id_(dc_id_) + , volume_id_(volume_id_) + , local_id_(local_id_) + , secret_(secret_) +{} + +const std::int32_t fileLocation::ID; + +object_ptr fileLocation::fetch(TlParser &p) { + return make_tl_object(p); +} + +fileLocation::fileLocation(TlParser &p) +#define FAIL(error) p.set_error(error) + : dc_id_(TlFetchInt::parse(p)) + , volume_id_(TlFetchLong::parse(p)) + , local_id_(TlFetchInt::parse(p)) + , secret_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void fileLocation::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(dc_id_, s); + TlStoreBinary::store(volume_id_, s); + TlStoreBinary::store(local_id_, s); + TlStoreBinary::store(secret_, s); +} + +void fileLocation::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(dc_id_, s); + TlStoreBinary::store(volume_id_, s); + TlStoreBinary::store(local_id_, s); + TlStoreBinary::store(secret_, s); +} + +void fileLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileLocation"); + s.store_field("dc_id", dc_id_); + s.store_field("volume_id", volume_id_); + s.store_field("local_id", local_id_); + s.store_field("secret", secret_); + s.store_class_end(); + } +} + +object_ptr InputStickerSet::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case inputStickerSetShortName::ID: + return inputStickerSetShortName::fetch(p); + case inputStickerSetEmpty::ID: + return inputStickerSetEmpty::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +inputStickerSetShortName::inputStickerSetShortName(string const &short_name_) + : short_name_(short_name_) +{} + +const std::int32_t inputStickerSetShortName::ID; + +object_ptr inputStickerSetShortName::fetch(TlParser &p) { + return make_tl_object(p); +} + +inputStickerSetShortName::inputStickerSetShortName(TlParser &p) +#define FAIL(error) p.set_error(error) + : short_name_(TlFetchString::parse(p)) +#undef FAIL +{} + +void inputStickerSetShortName::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(short_name_, s); +} + +void inputStickerSetShortName::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(short_name_, s); +} + +void inputStickerSetShortName::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inputStickerSetShortName"); + s.store_field("short_name", short_name_); + s.store_class_end(); + } +} + +const std::int32_t inputStickerSetEmpty::ID; + +object_ptr inputStickerSetEmpty::fetch(TlParser &p) { + return make_tl_object(); +} + +void inputStickerSetEmpty::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void inputStickerSetEmpty::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void inputStickerSetEmpty::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inputStickerSetEmpty"); + s.store_class_end(); + } +} + +object_ptr MessageEntity::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case messageEntityUnknown::ID: + return messageEntityUnknown::fetch(p); + case messageEntityMention::ID: + return messageEntityMention::fetch(p); + case messageEntityHashtag::ID: + return messageEntityHashtag::fetch(p); + case messageEntityBotCommand::ID: + return messageEntityBotCommand::fetch(p); + case messageEntityUrl::ID: + return messageEntityUrl::fetch(p); + case messageEntityEmail::ID: + return messageEntityEmail::fetch(p); + case messageEntityBold::ID: + return messageEntityBold::fetch(p); + case messageEntityItalic::ID: + return messageEntityItalic::fetch(p); + case messageEntityCode::ID: + return messageEntityCode::fetch(p); + case messageEntityPre::ID: + return messageEntityPre::fetch(p); + case messageEntityTextUrl::ID: + return messageEntityTextUrl::fetch(p); + case messageEntityMentionName::ID: + return messageEntityMentionName::fetch(p); + case messageEntityPhone::ID: + return messageEntityPhone::fetch(p); + case messageEntityCashtag::ID: + return messageEntityCashtag::fetch(p); + case messageEntityBankCard::ID: + return messageEntityBankCard::fetch(p); + case messageEntityUnderline::ID: + return messageEntityUnderline::fetch(p); + case messageEntityStrike::ID: + return messageEntityStrike::fetch(p); + case messageEntityBlockquote::ID: + return messageEntityBlockquote::fetch(p); + case messageEntitySpoiler::ID: + return messageEntitySpoiler::fetch(p); + case messageEntityCustomEmoji::ID: + return messageEntityCustomEmoji::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +messageEntityUnknown::messageEntityUnknown(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityUnknown::ID; + +object_ptr messageEntityUnknown::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityUnknown::messageEntityUnknown(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityUnknown::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUnknown::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUnknown::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityUnknown"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityMention::messageEntityMention(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityMention::ID; + +object_ptr messageEntityMention::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityMention::messageEntityMention(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityMention::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityMention::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityMention::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityMention"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityHashtag::messageEntityHashtag(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityHashtag::ID; + +object_ptr messageEntityHashtag::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityHashtag::messageEntityHashtag(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityHashtag::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityHashtag::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityHashtag::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityHashtag"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityBotCommand::messageEntityBotCommand(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityBotCommand::ID; + +object_ptr messageEntityBotCommand::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityBotCommand::messageEntityBotCommand(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityBotCommand::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBotCommand::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBotCommand::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityBotCommand"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityUrl::messageEntityUrl(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityUrl::ID; + +object_ptr messageEntityUrl::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityUrl::messageEntityUrl(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityUrl::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUrl::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityUrl"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityEmail::messageEntityEmail(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityEmail::ID; + +object_ptr messageEntityEmail::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityEmail::messageEntityEmail(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityEmail::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityEmail::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityEmail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityEmail"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityBold::messageEntityBold(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityBold::ID; + +object_ptr messageEntityBold::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityBold::messageEntityBold(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityBold::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBold::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBold::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityBold"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityItalic::messageEntityItalic(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityItalic::ID; + +object_ptr messageEntityItalic::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityItalic::messageEntityItalic(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityItalic::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityItalic::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityItalic::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityItalic"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityCode::messageEntityCode(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityCode::ID; + +object_ptr messageEntityCode::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityCode::messageEntityCode(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityCode::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityCode::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityCode::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityCode"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityPre::messageEntityPre(int32 offset_, int32 length_, string const &language_) + : offset_(offset_) + , length_(length_) + , language_(language_) +{} + +const std::int32_t messageEntityPre::ID; + +object_ptr messageEntityPre::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityPre::messageEntityPre(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) + , language_(TlFetchString::parse(p)) +#undef FAIL +{} + +void messageEntityPre::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreString::store(language_, s); +} + +void messageEntityPre::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreString::store(language_, s); +} + +void messageEntityPre::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityPre"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_field("language", language_); + s.store_class_end(); + } +} + +messageEntityTextUrl::messageEntityTextUrl(int32 offset_, int32 length_, string const &url_) + : offset_(offset_) + , length_(length_) + , url_(url_) +{} + +const std::int32_t messageEntityTextUrl::ID; + +object_ptr messageEntityTextUrl::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityTextUrl::messageEntityTextUrl(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) + , url_(TlFetchString::parse(p)) +#undef FAIL +{} + +void messageEntityTextUrl::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreString::store(url_, s); +} + +void messageEntityTextUrl::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreString::store(url_, s); +} + +void messageEntityTextUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityTextUrl"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_field("url", url_); + s.store_class_end(); + } +} + +messageEntityMentionName::messageEntityMentionName(int32 offset_, int32 length_, int32 user_id_) + : offset_(offset_) + , length_(length_) + , user_id_(user_id_) +{} + +const std::int32_t messageEntityMentionName::ID; + +object_ptr messageEntityMentionName::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityMentionName::messageEntityMentionName(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) + , user_id_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityMentionName::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreBinary::store(user_id_, s); +} + +void messageEntityMentionName::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreBinary::store(user_id_, s); +} + +void messageEntityMentionName::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityMentionName"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +messageEntityPhone::messageEntityPhone(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityPhone::ID; + +object_ptr messageEntityPhone::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityPhone::messageEntityPhone(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityPhone::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityPhone::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityPhone::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityPhone"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityCashtag::messageEntityCashtag(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityCashtag::ID; + +object_ptr messageEntityCashtag::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityCashtag::messageEntityCashtag(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityCashtag::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityCashtag::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityCashtag::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityCashtag"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityBankCard::messageEntityBankCard(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityBankCard::ID; + +object_ptr messageEntityBankCard::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityBankCard::messageEntityBankCard(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityBankCard::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBankCard::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBankCard::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityBankCard"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityUnderline::messageEntityUnderline(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityUnderline::ID; + +object_ptr messageEntityUnderline::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityUnderline::messageEntityUnderline(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityUnderline::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUnderline::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityUnderline::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityUnderline"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityStrike::messageEntityStrike(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityStrike::ID; + +object_ptr messageEntityStrike::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityStrike::messageEntityStrike(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityStrike::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityStrike::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityStrike::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityStrike"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityBlockquote::messageEntityBlockquote(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntityBlockquote::ID; + +object_ptr messageEntityBlockquote::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityBlockquote::messageEntityBlockquote(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntityBlockquote::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBlockquote::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntityBlockquote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityBlockquote"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntitySpoiler::messageEntitySpoiler(int32 offset_, int32 length_) + : offset_(offset_) + , length_(length_) +{} + +const std::int32_t messageEntitySpoiler::ID; + +object_ptr messageEntitySpoiler::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntitySpoiler::messageEntitySpoiler(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void messageEntitySpoiler::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntitySpoiler::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); +} + +void messageEntitySpoiler::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntitySpoiler"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +messageEntityCustomEmoji::messageEntityCustomEmoji(int32 offset_, int32 length_, int64 document_id_) + : offset_(offset_) + , length_(length_) + , document_id_(document_id_) +{} + +const std::int32_t messageEntityCustomEmoji::ID; + +object_ptr messageEntityCustomEmoji::fetch(TlParser &p) { + return make_tl_object(p); +} + +messageEntityCustomEmoji::messageEntityCustomEmoji(TlParser &p) +#define FAIL(error) p.set_error(error) + : offset_(TlFetchInt::parse(p)) + , length_(TlFetchInt::parse(p)) + , document_id_(TlFetchLong::parse(p)) +#undef FAIL +{} + +void messageEntityCustomEmoji::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreBinary::store(document_id_, s); +} + +void messageEntityCustomEmoji::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreBinary::store(offset_, s); + TlStoreBinary::store(length_, s); + TlStoreBinary::store(document_id_, s); +} + +void messageEntityCustomEmoji::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "messageEntityCustomEmoji"); + s.store_field("offset", offset_); + s.store_field("length", length_); + s.store_field("document_id", document_id_); + s.store_class_end(); + } +} + +object_ptr PhotoSize::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case photoSizeEmpty::ID: + return photoSizeEmpty::fetch(p); + case photoSize::ID: + return photoSize::fetch(p); + case photoCachedSize::ID: + return photoCachedSize::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +photoSizeEmpty::photoSizeEmpty(string const &type_) + : type_(type_) +{} + +const std::int32_t photoSizeEmpty::ID; + +object_ptr photoSizeEmpty::fetch(TlParser &p) { + return make_tl_object(p); +} + +photoSizeEmpty::photoSizeEmpty(TlParser &p) +#define FAIL(error) p.set_error(error) + : type_(TlFetchString::parse(p)) +#undef FAIL +{} + +void photoSizeEmpty::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); +} + +void photoSizeEmpty::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); +} + +void photoSizeEmpty::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "photoSizeEmpty"); + s.store_field("type", type_); + s.store_class_end(); + } +} + +photoSize::photoSize(string const &type_, object_ptr &&location_, int32 w_, int32 h_, int32 size_) + : type_(type_) + , location_(std::move(location_)) + , w_(w_) + , h_(h_) + , size_(size_) +{} + +const std::int32_t photoSize::ID; + +object_ptr photoSize::fetch(TlParser &p) { + return make_tl_object(p); +} + +photoSize::photoSize(TlParser &p) +#define FAIL(error) p.set_error(error) + : type_(TlFetchString::parse(p)) + , location_(TlFetchObject::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , size_(TlFetchInt::parse(p)) +#undef FAIL +{} + +void photoSize::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); + TlStoreBoxedUnknown::store(location_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); +} + +void photoSize::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); + TlStoreBoxedUnknown::store(location_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreBinary::store(size_, s); +} + +void photoSize::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "photoSize"); + s.store_field("type", type_); + s.store_object_field("location", static_cast(location_.get())); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_field("size", size_); + s.store_class_end(); + } +} + +photoCachedSize::photoCachedSize(string const &type_, object_ptr &&location_, int32 w_, int32 h_, bytes &&bytes_) + : type_(type_) + , location_(std::move(location_)) + , w_(w_) + , h_(h_) + , bytes_(std::move(bytes_)) +{} + +const std::int32_t photoCachedSize::ID; + +object_ptr photoCachedSize::fetch(TlParser &p) { + return make_tl_object(p); +} + +photoCachedSize::photoCachedSize(TlParser &p) +#define FAIL(error) p.set_error(error) + : type_(TlFetchString::parse(p)) + , location_(TlFetchObject::parse(p)) + , w_(TlFetchInt::parse(p)) + , h_(TlFetchInt::parse(p)) + , bytes_(TlFetchBytes::parse(p)) +#undef FAIL +{} + +void photoCachedSize::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); + TlStoreBoxedUnknown::store(location_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreString::store(bytes_, s); +} + +void photoCachedSize::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + TlStoreString::store(type_, s); + TlStoreBoxedUnknown::store(location_, s); + TlStoreBinary::store(w_, s); + TlStoreBinary::store(h_, s); + TlStoreString::store(bytes_, s); +} + +void photoCachedSize::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "photoCachedSize"); + s.store_field("type", type_); + s.store_object_field("location", static_cast(location_.get())); + s.store_field("w", w_); + s.store_field("h", h_); + s.store_bytes_field("bytes", bytes_); + s.store_class_end(); + } +} + +object_ptr SendMessageAction::fetch(TlParser &p) { +#define FAIL(error) p.set_error(error); return nullptr; + int constructor = p.fetch_int(); + switch (constructor) { + case sendMessageTypingAction::ID: + return sendMessageTypingAction::fetch(p); + case sendMessageCancelAction::ID: + return sendMessageCancelAction::fetch(p); + case sendMessageRecordVideoAction::ID: + return sendMessageRecordVideoAction::fetch(p); + case sendMessageUploadVideoAction::ID: + return sendMessageUploadVideoAction::fetch(p); + case sendMessageRecordAudioAction::ID: + return sendMessageRecordAudioAction::fetch(p); + case sendMessageUploadAudioAction::ID: + return sendMessageUploadAudioAction::fetch(p); + case sendMessageUploadPhotoAction::ID: + return sendMessageUploadPhotoAction::fetch(p); + case sendMessageUploadDocumentAction::ID: + return sendMessageUploadDocumentAction::fetch(p); + case sendMessageGeoLocationAction::ID: + return sendMessageGeoLocationAction::fetch(p); + case sendMessageChooseContactAction::ID: + return sendMessageChooseContactAction::fetch(p); + case sendMessageRecordRoundAction::ID: + return sendMessageRecordRoundAction::fetch(p); + case sendMessageUploadRoundAction::ID: + return sendMessageUploadRoundAction::fetch(p); + default: + FAIL(PSTRING() << "Unknown constructor found " << format::as_hex(constructor)); + } +#undef FAIL +} + +const std::int32_t sendMessageTypingAction::ID; + +object_ptr sendMessageTypingAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageTypingAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageTypingAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageTypingAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageTypingAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageCancelAction::ID; + +object_ptr sendMessageCancelAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageCancelAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageCancelAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageCancelAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageCancelAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageRecordVideoAction::ID; + +object_ptr sendMessageRecordVideoAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageRecordVideoAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageRecordVideoAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageRecordVideoAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageRecordVideoAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageUploadVideoAction::ID; + +object_ptr sendMessageUploadVideoAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageUploadVideoAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageUploadVideoAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageUploadVideoAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageUploadVideoAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageRecordAudioAction::ID; + +object_ptr sendMessageRecordAudioAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageRecordAudioAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageRecordAudioAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageRecordAudioAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageRecordAudioAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageUploadAudioAction::ID; + +object_ptr sendMessageUploadAudioAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageUploadAudioAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageUploadAudioAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageUploadAudioAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageUploadAudioAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageUploadPhotoAction::ID; + +object_ptr sendMessageUploadPhotoAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageUploadPhotoAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageUploadPhotoAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageUploadPhotoAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageUploadPhotoAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageUploadDocumentAction::ID; + +object_ptr sendMessageUploadDocumentAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageUploadDocumentAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageUploadDocumentAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageUploadDocumentAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageUploadDocumentAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageGeoLocationAction::ID; + +object_ptr sendMessageGeoLocationAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageGeoLocationAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageGeoLocationAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageGeoLocationAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageGeoLocationAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageChooseContactAction::ID; + +object_ptr sendMessageChooseContactAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageChooseContactAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageChooseContactAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageChooseContactAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageChooseContactAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageRecordRoundAction::ID; + +object_ptr sendMessageRecordRoundAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageRecordRoundAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageRecordRoundAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageRecordRoundAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageRecordRoundAction"); + s.store_class_end(); + } +} + +const std::int32_t sendMessageUploadRoundAction::ID; + +object_ptr sendMessageUploadRoundAction::fetch(TlParser &p) { + return make_tl_object(); +} + +void sendMessageUploadRoundAction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); +} + +void sendMessageUploadRoundAction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); +} + +void sendMessageUploadRoundAction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "sendMessageUploadRoundAction"); + s.store_class_end(); + } +} + +const std::int32_t test_dummyFunction::ID; + +object_ptr test_dummyFunction::fetch(TlParser &p) { + return make_tl_object(); +} + +void test_dummyFunction::store(TlStorerCalcLength &s) const { + (void)sizeof(s); + s.store_binary(-936020215); +} + +void test_dummyFunction::store(TlStorerUnsafe &s) const { + (void)sizeof(s); + s.store_binary(-936020215); +} + +void test_dummyFunction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "test.dummyFunction"); + s.store_class_end(); + } +} + +test_dummyFunction::ReturnType test_dummyFunction::fetch_result(TlParser &p) { +#define FAIL(error) p.set_error(error); return ReturnType() + return TlFetchBool::parse(p); +#undef FAIL +} +} // namespace secret_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.h b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.h new file mode 100644 index 0000000000..e6da9e2ef2 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.h @@ -0,0 +1,2138 @@ +#pragma once + +#include "td/tl/TlObject.h" + +#include "td/utils/buffer.h" + +#include +#include +#include + +namespace td { +class TlStorerCalcLength; +class TlStorerUnsafe; +class TlStorerToString; +class TlParser; + +namespace secret_api { + +using int32 = std::int32_t; +using int53 = std::int64_t; +using int64 = std::int64_t; + +using string = std::string; + +using bytes = BufferSlice; + +template +using array = std::vector; + +using BaseObject = ::td::TlObject; + +template +using object_ptr = ::td::tl_object_ptr; + +template +object_ptr make_object(Args &&... args) { + return object_ptr(new Type(std::forward(args)...)); +} + +template +object_ptr move_object_as(FromType &&from) { + return object_ptr(static_cast(from.release())); +} + +std::string to_string(const BaseObject &value); + +template +std::string to_string(const object_ptr &value) { + if (value == nullptr) { + return "null"; + } + + return to_string(*value); +} + +template +std::string to_string(const std::vector> &values) { + std::string result = "{\n"; + for (const auto &value : values) { + if (value == nullptr) { + result += "null\n"; + } else { + result += to_string(*value); + } + } + result += "}\n"; + return result; +} + +class DecryptedMessage; + +class DecryptedMessageAction; + +class decryptedMessageLayer; + +class DecryptedMessageMedia; + +class DocumentAttribute; + +class FileLocation; + +class InputStickerSet; + +class MessageEntity; + +class PhotoSize; + +class SendMessageAction; + +class Object; + +class Object: public TlObject { + public: + + static object_ptr fetch(TlParser &p); +}; + +class Function: public TlObject { + public: + + static object_ptr fetch(TlParser &p); +}; + +class DecryptedMessage: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class decryptedMessage8 final : public DecryptedMessage { + public: + int64 random_id_; + bytes random_bytes_; + string message_; + object_ptr media_; + + decryptedMessage8(int64 random_id_, bytes &&random_bytes_, string const &message_, object_ptr &&media_); + + static const std::int32_t ID = 528568095; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessage8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageService8 final : public DecryptedMessage { + public: + int64 random_id_; + bytes random_bytes_; + object_ptr action_; + + decryptedMessageService8(int64 random_id_, bytes &&random_bytes_, object_ptr &&action_); + + static const std::int32_t ID = -1438109059; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageService8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessage23 final : public DecryptedMessage { + public: + int64 random_id_; + int32 ttl_; + string message_; + object_ptr media_; + + decryptedMessage23(int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_); + + static const std::int32_t ID = 541931640; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessage23(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageService final : public DecryptedMessage { + public: + int64 random_id_; + object_ptr action_; + + decryptedMessageService(int64 random_id_, object_ptr &&action_); + + static const std::int32_t ID = 1930838368; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageService(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessage46 final : public DecryptedMessage { + public: + int32 flags_; + int64 random_id_; + int32 ttl_; + string message_; + object_ptr media_; + array> entities_; + string via_bot_name_; + int64 reply_to_random_id_; + enum Flags : std::int32_t { MEDIA_MASK = 512, ENTITIES_MASK = 128, VIA_BOT_NAME_MASK = 2048, REPLY_TO_RANDOM_ID_MASK = 8 }; + + decryptedMessage46(); + + decryptedMessage46(int32 flags_, int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_, array> &&entities_, string const &via_bot_name_, int64 reply_to_random_id_); + + static const std::int32_t ID = 917541342; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessage final : public DecryptedMessage { + public: + int32 flags_; + bool silent_; + int64 random_id_; + int32 ttl_; + string message_; + object_ptr media_; + array> entities_; + string via_bot_name_; + int64 reply_to_random_id_; + int64 grouped_id_; + enum Flags : std::int32_t { SILENT_MASK = 32, MEDIA_MASK = 512, ENTITIES_MASK = 128, VIA_BOT_NAME_MASK = 2048, REPLY_TO_RANDOM_ID_MASK = 8, GROUPED_ID_MASK = 131072 }; + + decryptedMessage(); + + decryptedMessage(int32 flags_, bool silent_, int64 random_id_, int32 ttl_, string const &message_, object_ptr &&media_, array> &&entities_, string const &via_bot_name_, int64 reply_to_random_id_, int64 grouped_id_); + + static const std::int32_t ID = -1848883596; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class DecryptedMessageAction: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class decryptedMessageActionSetMessageTTL final : public DecryptedMessageAction { + public: + int32 ttl_seconds_; + + explicit decryptedMessageActionSetMessageTTL(int32 ttl_seconds_); + + static const std::int32_t ID = -1586283796; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionSetMessageTTL(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionReadMessages final : public DecryptedMessageAction { + public: + array random_ids_; + + explicit decryptedMessageActionReadMessages(array &&random_ids_); + + static const std::int32_t ID = 206520510; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionReadMessages(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionDeleteMessages final : public DecryptedMessageAction { + public: + array random_ids_; + + explicit decryptedMessageActionDeleteMessages(array &&random_ids_); + + static const std::int32_t ID = 1700872964; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionDeleteMessages(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionScreenshotMessages final : public DecryptedMessageAction { + public: + array random_ids_; + + explicit decryptedMessageActionScreenshotMessages(array &&random_ids_); + + static const std::int32_t ID = -1967000459; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionScreenshotMessages(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionFlushHistory final : public DecryptedMessageAction { + public: + + static const std::int32_t ID = 1729750108; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionResend final : public DecryptedMessageAction { + public: + int32 start_seq_no_; + int32 end_seq_no_; + + decryptedMessageActionResend(int32 start_seq_no_, int32 end_seq_no_); + + static const std::int32_t ID = 1360072880; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionResend(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionNotifyLayer final : public DecryptedMessageAction { + public: + int32 layer_; + + explicit decryptedMessageActionNotifyLayer(int32 layer_); + + static const std::int32_t ID = -217806717; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionNotifyLayer(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionTyping final : public DecryptedMessageAction { + public: + object_ptr action_; + + explicit decryptedMessageActionTyping(object_ptr &&action_); + + static const std::int32_t ID = -860719551; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionTyping(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionRequestKey final : public DecryptedMessageAction { + public: + int64 exchange_id_; + bytes g_a_; + + decryptedMessageActionRequestKey(int64 exchange_id_, bytes &&g_a_); + + static const std::int32_t ID = -204906213; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionRequestKey(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionAcceptKey final : public DecryptedMessageAction { + public: + int64 exchange_id_; + bytes g_b_; + int64 key_fingerprint_; + + decryptedMessageActionAcceptKey(int64 exchange_id_, bytes &&g_b_, int64 key_fingerprint_); + + static const std::int32_t ID = 1877046107; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionAcceptKey(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionAbortKey final : public DecryptedMessageAction { + public: + int64 exchange_id_; + + explicit decryptedMessageActionAbortKey(int64 exchange_id_); + + static const std::int32_t ID = -586814357; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionAbortKey(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionCommitKey final : public DecryptedMessageAction { + public: + int64 exchange_id_; + int64 key_fingerprint_; + + decryptedMessageActionCommitKey(int64 exchange_id_, int64 key_fingerprint_); + + static const std::int32_t ID = -332526693; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageActionCommitKey(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageActionNoop final : public DecryptedMessageAction { + public: + + static const std::int32_t ID = -1473258141; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageLayer final : public Object { + public: + bytes random_bytes_; + int32 layer_; + int32 in_seq_no_; + int32 out_seq_no_; + object_ptr message_; + + decryptedMessageLayer(bytes &&random_bytes_, int32 layer_, int32 in_seq_no_, int32 out_seq_no_, object_ptr &&message_); + + static const std::int32_t ID = 467867529; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageLayer(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class DecryptedMessageMedia: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class decryptedMessageMediaEmpty final : public DecryptedMessageMedia { + public: + + static const std::int32_t ID = 144661578; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaPhoto8 final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + int32 w_; + int32 h_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaPhoto8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = 846826124; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaPhoto8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaVideo8 final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + int32 duration_; + int32 w_; + int32 h_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaVideo8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = 1290694387; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaVideo8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaGeoPoint final : public DecryptedMessageMedia { + public: + double lat_; + double long_; + + decryptedMessageMediaGeoPoint(double lat_, double long_); + + static const std::int32_t ID = 893913689; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaGeoPoint(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaContact final : public DecryptedMessageMedia { + public: + string phone_number_; + string first_name_; + string last_name_; + int32 user_id_; + + decryptedMessageMediaContact(string const &phone_number_, string const &first_name_, string const &last_name_, int32 user_id_); + + static const std::int32_t ID = 1485441687; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaContact(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaDocument8 final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + string file_name_; + string mime_type_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaDocument8(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &file_name_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = -1332395189; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaDocument8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaAudio8 final : public DecryptedMessageMedia { + public: + int32 duration_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaAudio8(int32 duration_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = 1619031439; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaAudio8(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaVideo23 final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + int32 duration_; + string mime_type_; + int32 w_; + int32 h_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaVideo23(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, string const &mime_type_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = 1380598109; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaVideo23(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaAudio final : public DecryptedMessageMedia { + public: + int32 duration_; + string mime_type_; + int32 size_; + bytes key_; + bytes iv_; + + decryptedMessageMediaAudio(int32 duration_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_); + + static const std::int32_t ID = 1474341323; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaAudio(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaExternalDocument final : public DecryptedMessageMedia { + public: + int64 id_; + int64 access_hash_; + int32 date_; + string mime_type_; + int32 size_; + object_ptr thumb_; + int32 dc_id_; + array> attributes_; + + decryptedMessageMediaExternalDocument(int64 id_, int64 access_hash_, int32 date_, string const &mime_type_, int32 size_, object_ptr &&thumb_, int32 dc_id_, array> &&attributes_); + + static const std::int32_t ID = -90853155; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaExternalDocument(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaPhoto final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + int32 w_; + int32 h_; + int32 size_; + bytes key_; + bytes iv_; + string caption_; + + decryptedMessageMediaPhoto(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_, string const &caption_); + + static const std::int32_t ID = -235238024; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaPhoto(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaVideo final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + int32 duration_; + string mime_type_; + int32 w_; + int32 h_; + int32 size_; + bytes key_; + bytes iv_; + string caption_; + + decryptedMessageMediaVideo(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, int32 duration_, string const &mime_type_, int32 w_, int32 h_, int32 size_, bytes &&key_, bytes &&iv_, string const &caption_); + + static const std::int32_t ID = -1760785394; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaVideo(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaDocument46 final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + string mime_type_; + int32 size_; + bytes key_; + bytes iv_; + array> attributes_; + string caption_; + + decryptedMessageMediaDocument46(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &mime_type_, int32 size_, bytes &&key_, bytes &&iv_, array> &&attributes_, string const &caption_); + + static const std::int32_t ID = 2063502050; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaDocument46(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaVenue final : public DecryptedMessageMedia { + public: + double lat_; + double long_; + string title_; + string address_; + string provider_; + string venue_id_; + + decryptedMessageMediaVenue(double lat_, double long_, string const &title_, string const &address_, string const &provider_, string const &venue_id_); + + static const std::int32_t ID = -1978796689; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaVenue(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaWebPage final : public DecryptedMessageMedia { + public: + string url_; + + explicit decryptedMessageMediaWebPage(string const &url_); + + static const std::int32_t ID = -452652584; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaWebPage(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class decryptedMessageMediaDocument final : public DecryptedMessageMedia { + public: + bytes thumb_; + int32 thumb_w_; + int32 thumb_h_; + string mime_type_; + int64 size_; + bytes key_; + bytes iv_; + array> attributes_; + string caption_; + + decryptedMessageMediaDocument(bytes &&thumb_, int32 thumb_w_, int32 thumb_h_, string const &mime_type_, int64 size_, bytes &&key_, bytes &&iv_, array> &&attributes_, string const &caption_); + + static const std::int32_t ID = 1790809986; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit decryptedMessageMediaDocument(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class DocumentAttribute: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class documentAttributeImageSize final : public DocumentAttribute { + public: + int32 w_; + int32 h_; + + documentAttributeImageSize(int32 w_, int32 h_); + + static const std::int32_t ID = 1815593308; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeImageSize(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeAnimated final : public DocumentAttribute { + public: + + static const std::int32_t ID = 297109817; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeSticker23 final : public DocumentAttribute { + public: + + static const std::int32_t ID = -83208409; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeVideo23 final : public DocumentAttribute { + public: + int32 duration_; + int32 w_; + int32 h_; + + documentAttributeVideo23(int32 duration_, int32 w_, int32 h_); + + static const std::int32_t ID = 1494273227; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeVideo23(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeAudio23 final : public DocumentAttribute { + public: + int32 duration_; + + explicit documentAttributeAudio23(int32 duration_); + + static const std::int32_t ID = 85215461; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeAudio23(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeFilename final : public DocumentAttribute { + public: + string file_name_; + + explicit documentAttributeFilename(string const &file_name_); + + static const std::int32_t ID = 358154344; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeFilename(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeAudio45 final : public DocumentAttribute { + public: + int32 duration_; + string title_; + string performer_; + + documentAttributeAudio45(int32 duration_, string const &title_, string const &performer_); + + static const std::int32_t ID = -556656416; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeAudio45(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeSticker final : public DocumentAttribute { + public: + string alt_; + object_ptr stickerset_; + + documentAttributeSticker(string const &alt_, object_ptr &&stickerset_); + + static const std::int32_t ID = 978674434; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit documentAttributeSticker(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeAudio final : public DocumentAttribute { + public: + int32 flags_; + bool voice_; + int32 duration_; + string title_; + string performer_; + bytes waveform_; + enum Flags : std::int32_t { VOICE_MASK = 1024, TITLE_MASK = 1, PERFORMER_MASK = 2, WAVEFORM_MASK = 4 }; + + documentAttributeAudio(); + + documentAttributeAudio(int32 flags_, bool voice_, int32 duration_, string const &title_, string const &performer_, bytes &&waveform_); + + static const std::int32_t ID = -1739392570; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class documentAttributeVideo final : public DocumentAttribute { + public: + int32 flags_; + bool round_message_; + int32 duration_; + int32 w_; + int32 h_; + enum Flags : std::int32_t { ROUND_MESSAGE_MASK = 1 }; + + documentAttributeVideo(); + + documentAttributeVideo(int32 flags_, bool round_message_, int32 duration_, int32 w_, int32 h_); + + static const std::int32_t ID = 250621158; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class FileLocation: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class fileLocationUnavailable final : public FileLocation { + public: + int64 volume_id_; + int32 local_id_; + int64 secret_; + + fileLocationUnavailable(int64 volume_id_, int32 local_id_, int64 secret_); + + static const std::int32_t ID = 2086234950; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit fileLocationUnavailable(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class fileLocation final : public FileLocation { + public: + int32 dc_id_; + int64 volume_id_; + int32 local_id_; + int64 secret_; + + fileLocation(int32 dc_id_, int64 volume_id_, int32 local_id_, int64 secret_); + + static const std::int32_t ID = 1406570614; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit fileLocation(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class InputStickerSet: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class inputStickerSetShortName final : public InputStickerSet { + public: + string short_name_; + + explicit inputStickerSetShortName(string const &short_name_); + + static const std::int32_t ID = -2044933984; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit inputStickerSetShortName(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inputStickerSetEmpty final : public InputStickerSet { + public: + + static const std::int32_t ID = -4838507; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class MessageEntity: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class messageEntityUnknown final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityUnknown(int32 offset_, int32 length_); + + static const std::int32_t ID = -1148011883; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityUnknown(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityMention final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityMention(int32 offset_, int32 length_); + + static const std::int32_t ID = -100378723; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityMention(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityHashtag final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityHashtag(int32 offset_, int32 length_); + + static const std::int32_t ID = 1868782349; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityHashtag(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityBotCommand final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityBotCommand(int32 offset_, int32 length_); + + static const std::int32_t ID = 1827637959; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityBotCommand(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityUrl final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityUrl(int32 offset_, int32 length_); + + static const std::int32_t ID = 1859134776; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityUrl(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityEmail final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityEmail(int32 offset_, int32 length_); + + static const std::int32_t ID = 1692693954; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityEmail(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityBold final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityBold(int32 offset_, int32 length_); + + static const std::int32_t ID = -1117713463; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityBold(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityItalic final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityItalic(int32 offset_, int32 length_); + + static const std::int32_t ID = -2106619040; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityItalic(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityCode final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityCode(int32 offset_, int32 length_); + + static const std::int32_t ID = 681706865; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityCode(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityPre final : public MessageEntity { + public: + int32 offset_; + int32 length_; + string language_; + + messageEntityPre(int32 offset_, int32 length_, string const &language_); + + static const std::int32_t ID = 1938967520; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityPre(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityTextUrl final : public MessageEntity { + public: + int32 offset_; + int32 length_; + string url_; + + messageEntityTextUrl(int32 offset_, int32 length_, string const &url_); + + static const std::int32_t ID = 1990644519; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityTextUrl(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityMentionName final : public MessageEntity { + public: + int32 offset_; + int32 length_; + int32 user_id_; + + messageEntityMentionName(int32 offset_, int32 length_, int32 user_id_); + + static const std::int32_t ID = 892193368; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityMentionName(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityPhone final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityPhone(int32 offset_, int32 length_); + + static const std::int32_t ID = -1687559349; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityPhone(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityCashtag final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityCashtag(int32 offset_, int32 length_); + + static const std::int32_t ID = 1280209983; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityCashtag(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityBankCard final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityBankCard(int32 offset_, int32 length_); + + static const std::int32_t ID = 1981704948; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityBankCard(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityUnderline final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityUnderline(int32 offset_, int32 length_); + + static const std::int32_t ID = -1672577397; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityUnderline(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityStrike final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityStrike(int32 offset_, int32 length_); + + static const std::int32_t ID = -1090087980; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityStrike(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityBlockquote final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntityBlockquote(int32 offset_, int32 length_); + + static const std::int32_t ID = 34469328; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityBlockquote(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntitySpoiler final : public MessageEntity { + public: + int32 offset_; + int32 length_; + + messageEntitySpoiler(int32 offset_, int32 length_); + + static const std::int32_t ID = 852137487; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntitySpoiler(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class messageEntityCustomEmoji final : public MessageEntity { + public: + int32 offset_; + int32 length_; + int64 document_id_; + + messageEntityCustomEmoji(int32 offset_, int32 length_, int64 document_id_); + + static const std::int32_t ID = -925956616; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit messageEntityCustomEmoji(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class PhotoSize: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class photoSizeEmpty final : public PhotoSize { + public: + string type_; + + explicit photoSizeEmpty(string const &type_); + + static const std::int32_t ID = 236446268; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit photoSizeEmpty(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class photoSize final : public PhotoSize { + public: + string type_; + object_ptr location_; + int32 w_; + int32 h_; + int32 size_; + + photoSize(string const &type_, object_ptr &&location_, int32 w_, int32 h_, int32 size_); + + static const std::int32_t ID = 2009052699; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit photoSize(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class photoCachedSize final : public PhotoSize { + public: + string type_; + object_ptr location_; + int32 w_; + int32 h_; + bytes bytes_; + + photoCachedSize(string const &type_, object_ptr &&location_, int32 w_, int32 h_, bytes &&bytes_); + + static const std::int32_t ID = -374917894; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + explicit photoCachedSize(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class SendMessageAction: public Object { + public: + + static object_ptr fetch(TlParser &p); +}; + +class sendMessageTypingAction final : public SendMessageAction { + public: + + static const std::int32_t ID = 381645902; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageCancelAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -44119819; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageRecordVideoAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1584933265; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageUploadVideoAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1845219337; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageRecordAudioAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -718310409; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageUploadAudioAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -424899985; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageUploadPhotoAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1727382502; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageUploadDocumentAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1884362354; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageGeoLocationAction final : public SendMessageAction { + public: + + static const std::int32_t ID = 393186209; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageChooseContactAction final : public SendMessageAction { + public: + + static const std::int32_t ID = 1653390447; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageRecordRoundAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1997373508; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class sendMessageUploadRoundAction final : public SendMessageAction { + public: + + static const std::int32_t ID = -1150187996; + std::int32_t get_id() const final { + return ID; + } + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class test_dummyFunction final : public Function { + public: + + static const std::int32_t ID = -936020215; + std::int32_t get_id() const final { + return ID; + } + + using ReturnType = bool; + + static object_ptr fetch(TlParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlParser &p); +}; + +} // namespace secret_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.hpp b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.hpp new file mode 100644 index 0000000000..43795cf6f1 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/secret_api.hpp @@ -0,0 +1,678 @@ +#pragma once + +/** + * \file + * Contains downcast_call methods for calling a function object on downcasted to + * the most derived class TDLib API object. + */ +#include "secret_api.h" + +namespace td { +namespace secret_api { + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(Object &obj, const T &func) { + switch (obj.get_id()) { + case decryptedMessage8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageService8::ID: + func(static_cast(obj)); + return true; + case decryptedMessage23::ID: + func(static_cast(obj)); + return true; + case decryptedMessageService::ID: + func(static_cast(obj)); + return true; + case decryptedMessage46::ID: + func(static_cast(obj)); + return true; + case decryptedMessage::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionSetMessageTTL::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionReadMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionDeleteMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionScreenshotMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionFlushHistory::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionResend::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionNotifyLayer::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionTyping::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionRequestKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionAcceptKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionAbortKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionCommitKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionNoop::ID: + func(static_cast(obj)); + return true; + case decryptedMessageLayer::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaEmpty::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaPhoto8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaGeoPoint::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaContact::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaAudio8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo23::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaAudio::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaExternalDocument::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaPhoto::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument46::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVenue::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaWebPage::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument::ID: + func(static_cast(obj)); + return true; + case documentAttributeImageSize::ID: + func(static_cast(obj)); + return true; + case documentAttributeAnimated::ID: + func(static_cast(obj)); + return true; + case documentAttributeSticker23::ID: + func(static_cast(obj)); + return true; + case documentAttributeVideo23::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio23::ID: + func(static_cast(obj)); + return true; + case documentAttributeFilename::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio45::ID: + func(static_cast(obj)); + return true; + case documentAttributeSticker::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio::ID: + func(static_cast(obj)); + return true; + case documentAttributeVideo::ID: + func(static_cast(obj)); + return true; + case fileLocationUnavailable::ID: + func(static_cast(obj)); + return true; + case fileLocation::ID: + func(static_cast(obj)); + return true; + case inputStickerSetShortName::ID: + func(static_cast(obj)); + return true; + case inputStickerSetEmpty::ID: + func(static_cast(obj)); + return true; + case messageEntityUnknown::ID: + func(static_cast(obj)); + return true; + case messageEntityMention::ID: + func(static_cast(obj)); + return true; + case messageEntityHashtag::ID: + func(static_cast(obj)); + return true; + case messageEntityBotCommand::ID: + func(static_cast(obj)); + return true; + case messageEntityUrl::ID: + func(static_cast(obj)); + return true; + case messageEntityEmail::ID: + func(static_cast(obj)); + return true; + case messageEntityBold::ID: + func(static_cast(obj)); + return true; + case messageEntityItalic::ID: + func(static_cast(obj)); + return true; + case messageEntityCode::ID: + func(static_cast(obj)); + return true; + case messageEntityPre::ID: + func(static_cast(obj)); + return true; + case messageEntityTextUrl::ID: + func(static_cast(obj)); + return true; + case messageEntityMentionName::ID: + func(static_cast(obj)); + return true; + case messageEntityPhone::ID: + func(static_cast(obj)); + return true; + case messageEntityCashtag::ID: + func(static_cast(obj)); + return true; + case messageEntityBankCard::ID: + func(static_cast(obj)); + return true; + case messageEntityUnderline::ID: + func(static_cast(obj)); + return true; + case messageEntityStrike::ID: + func(static_cast(obj)); + return true; + case messageEntityBlockquote::ID: + func(static_cast(obj)); + return true; + case messageEntitySpoiler::ID: + func(static_cast(obj)); + return true; + case messageEntityCustomEmoji::ID: + func(static_cast(obj)); + return true; + case photoSizeEmpty::ID: + func(static_cast(obj)); + return true; + case photoSize::ID: + func(static_cast(obj)); + return true; + case photoCachedSize::ID: + func(static_cast(obj)); + return true; + case sendMessageTypingAction::ID: + func(static_cast(obj)); + return true; + case sendMessageCancelAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordVideoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadVideoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordAudioAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadAudioAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadPhotoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadDocumentAction::ID: + func(static_cast(obj)); + return true; + case sendMessageGeoLocationAction::ID: + func(static_cast(obj)); + return true; + case sendMessageChooseContactAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordRoundAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadRoundAction::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(Function &obj, const T &func) { + switch (obj.get_id()) { + case test_dummyFunction::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(DecryptedMessage &obj, const T &func) { + switch (obj.get_id()) { + case decryptedMessage8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageService8::ID: + func(static_cast(obj)); + return true; + case decryptedMessage23::ID: + func(static_cast(obj)); + return true; + case decryptedMessageService::ID: + func(static_cast(obj)); + return true; + case decryptedMessage46::ID: + func(static_cast(obj)); + return true; + case decryptedMessage::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(DecryptedMessageAction &obj, const T &func) { + switch (obj.get_id()) { + case decryptedMessageActionSetMessageTTL::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionReadMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionDeleteMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionScreenshotMessages::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionFlushHistory::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionResend::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionNotifyLayer::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionTyping::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionRequestKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionAcceptKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionAbortKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionCommitKey::ID: + func(static_cast(obj)); + return true; + case decryptedMessageActionNoop::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(DecryptedMessageMedia &obj, const T &func) { + switch (obj.get_id()) { + case decryptedMessageMediaEmpty::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaPhoto8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaGeoPoint::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaContact::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaAudio8::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo23::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaAudio::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaExternalDocument::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaPhoto::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVideo::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument46::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaVenue::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaWebPage::ID: + func(static_cast(obj)); + return true; + case decryptedMessageMediaDocument::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(DocumentAttribute &obj, const T &func) { + switch (obj.get_id()) { + case documentAttributeImageSize::ID: + func(static_cast(obj)); + return true; + case documentAttributeAnimated::ID: + func(static_cast(obj)); + return true; + case documentAttributeSticker23::ID: + func(static_cast(obj)); + return true; + case documentAttributeVideo23::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio23::ID: + func(static_cast(obj)); + return true; + case documentAttributeFilename::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio45::ID: + func(static_cast(obj)); + return true; + case documentAttributeSticker::ID: + func(static_cast(obj)); + return true; + case documentAttributeAudio::ID: + func(static_cast(obj)); + return true; + case documentAttributeVideo::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(FileLocation &obj, const T &func) { + switch (obj.get_id()) { + case fileLocationUnavailable::ID: + func(static_cast(obj)); + return true; + case fileLocation::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(InputStickerSet &obj, const T &func) { + switch (obj.get_id()) { + case inputStickerSetShortName::ID: + func(static_cast(obj)); + return true; + case inputStickerSetEmpty::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(MessageEntity &obj, const T &func) { + switch (obj.get_id()) { + case messageEntityUnknown::ID: + func(static_cast(obj)); + return true; + case messageEntityMention::ID: + func(static_cast(obj)); + return true; + case messageEntityHashtag::ID: + func(static_cast(obj)); + return true; + case messageEntityBotCommand::ID: + func(static_cast(obj)); + return true; + case messageEntityUrl::ID: + func(static_cast(obj)); + return true; + case messageEntityEmail::ID: + func(static_cast(obj)); + return true; + case messageEntityBold::ID: + func(static_cast(obj)); + return true; + case messageEntityItalic::ID: + func(static_cast(obj)); + return true; + case messageEntityCode::ID: + func(static_cast(obj)); + return true; + case messageEntityPre::ID: + func(static_cast(obj)); + return true; + case messageEntityTextUrl::ID: + func(static_cast(obj)); + return true; + case messageEntityMentionName::ID: + func(static_cast(obj)); + return true; + case messageEntityPhone::ID: + func(static_cast(obj)); + return true; + case messageEntityCashtag::ID: + func(static_cast(obj)); + return true; + case messageEntityBankCard::ID: + func(static_cast(obj)); + return true; + case messageEntityUnderline::ID: + func(static_cast(obj)); + return true; + case messageEntityStrike::ID: + func(static_cast(obj)); + return true; + case messageEntityBlockquote::ID: + func(static_cast(obj)); + return true; + case messageEntitySpoiler::ID: + func(static_cast(obj)); + return true; + case messageEntityCustomEmoji::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(PhotoSize &obj, const T &func) { + switch (obj.get_id()) { + case photoSizeEmpty::ID: + func(static_cast(obj)); + return true; + case photoSize::ID: + func(static_cast(obj)); + return true; + case photoCachedSize::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +/** + * Calls the specified function object with the given object downcasted to its most derived type. + * \param[in] obj Object to pass as an argument to the function object. + * \param[in] func Function object to which the object will be passed. + * \returns Whether function object call has happened. Should always return true for correct parameters. + */ +template +bool downcast_call(SendMessageAction &obj, const T &func) { + switch (obj.get_id()) { + case sendMessageTypingAction::ID: + func(static_cast(obj)); + return true; + case sendMessageCancelAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordVideoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadVideoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordAudioAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadAudioAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadPhotoAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadDocumentAction::ID: + func(static_cast(obj)); + return true; + case sendMessageGeoLocationAction::ID: + func(static_cast(obj)); + return true; + case sendMessageChooseContactAction::ID: + func(static_cast(obj)); + return true; + case sendMessageRecordRoundAction::ID: + func(static_cast(obj)); + return true; + case sendMessageUploadRoundAction::ID: + func(static_cast(obj)); + return true; + default: + return false; + } +} + +} // namespace secret_api +} // namespace td diff --git a/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.cpp b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.cpp new file mode 100644 index 0000000000..5942d45622 --- /dev/null +++ b/protocols/Telegram/tdlib/td/td/generate/auto/td/telegram/td_api.cpp @@ -0,0 +1,33908 @@ +#include "td_api.h" + +#include "td/utils/common.h" +#include "td/utils/format.h" +#include "td/utils/logging.h" +#include "td/utils/SliceBuilder.h" +#include "td/utils/tl_parsers.h" +#include "td/utils/tl_storers.h" +#include "td/utils/TlStorerToString.h" + +namespace td { +namespace td_api { + +std::string to_string(const BaseObject &value) { + TlStorerToString storer; + value.store(storer, ""); + return storer.move_as_string(); +} + +accountTtl::accountTtl() + : days_() +{} + +accountTtl::accountTtl(int32 days_) + : days_(days_) +{} + +const std::int32_t accountTtl::ID; + +void accountTtl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "accountTtl"); + s.store_field("days", days_); + s.store_class_end(); + } +} + +addedReaction::addedReaction() + : type_() + , sender_id_() +{} + +addedReaction::addedReaction(object_ptr &&type_, object_ptr &&sender_id_) + : type_(std::move(type_)) + , sender_id_(std::move(sender_id_)) +{} + +const std::int32_t addedReaction::ID; + +void addedReaction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "addedReaction"); + s.store_object_field("type", static_cast(type_.get())); + s.store_object_field("sender_id", static_cast(sender_id_.get())); + s.store_class_end(); + } +} + +addedReactions::addedReactions() + : total_count_() + , reactions_() + , next_offset_() +{} + +addedReactions::addedReactions(int32 total_count_, array> &&reactions_, string const &next_offset_) + : total_count_(total_count_) + , reactions_(std::move(reactions_)) + , next_offset_(next_offset_) +{} + +const std::int32_t addedReactions::ID; + +void addedReactions::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "addedReactions"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("reactions", reactions_.size()); for (const auto &_value : reactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("next_offset", next_offset_); + s.store_class_end(); + } +} + +address::address() + : country_code_() + , state_() + , city_() + , street_line1_() + , street_line2_() + , postal_code_() +{} + +address::address(string const &country_code_, string const &state_, string const &city_, string const &street_line1_, string const &street_line2_, string const &postal_code_) + : country_code_(country_code_) + , state_(state_) + , city_(city_) + , street_line1_(street_line1_) + , street_line2_(street_line2_) + , postal_code_(postal_code_) +{} + +const std::int32_t address::ID; + +void address::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "address"); + s.store_field("country_code", country_code_); + s.store_field("state", state_); + s.store_field("city", city_); + s.store_field("street_line1", street_line1_); + s.store_field("street_line2", street_line2_); + s.store_field("postal_code", postal_code_); + s.store_class_end(); + } +} + +animatedChatPhoto::animatedChatPhoto() + : length_() + , file_() + , main_frame_timestamp_() +{} + +animatedChatPhoto::animatedChatPhoto(int32 length_, object_ptr &&file_, double main_frame_timestamp_) + : length_(length_) + , file_(std::move(file_)) + , main_frame_timestamp_(main_frame_timestamp_) +{} + +const std::int32_t animatedChatPhoto::ID; + +void animatedChatPhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "animatedChatPhoto"); + s.store_field("length", length_); + s.store_object_field("file", static_cast(file_.get())); + s.store_field("main_frame_timestamp", main_frame_timestamp_); + s.store_class_end(); + } +} + +animatedEmoji::animatedEmoji() + : sticker_() + , sticker_width_() + , sticker_height_() + , fitzpatrick_type_() + , sound_() +{} + +animatedEmoji::animatedEmoji(object_ptr &&sticker_, int32 sticker_width_, int32 sticker_height_, int32 fitzpatrick_type_, object_ptr &&sound_) + : sticker_(std::move(sticker_)) + , sticker_width_(sticker_width_) + , sticker_height_(sticker_height_) + , fitzpatrick_type_(fitzpatrick_type_) + , sound_(std::move(sound_)) +{} + +const std::int32_t animatedEmoji::ID; + +void animatedEmoji::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "animatedEmoji"); + s.store_object_field("sticker", static_cast(sticker_.get())); + s.store_field("sticker_width", sticker_width_); + s.store_field("sticker_height", sticker_height_); + s.store_field("fitzpatrick_type", fitzpatrick_type_); + s.store_object_field("sound", static_cast(sound_.get())); + s.store_class_end(); + } +} + +animation::animation() + : duration_() + , width_() + , height_() + , file_name_() + , mime_type_() + , has_stickers_() + , minithumbnail_() + , thumbnail_() + , animation_() +{} + +animation::animation(int32 duration_, int32 width_, int32 height_, string const &file_name_, string const &mime_type_, bool has_stickers_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&animation_) + : duration_(duration_) + , width_(width_) + , height_(height_) + , file_name_(file_name_) + , mime_type_(mime_type_) + , has_stickers_(has_stickers_) + , minithumbnail_(std::move(minithumbnail_)) + , thumbnail_(std::move(thumbnail_)) + , animation_(std::move(animation_)) +{} + +const std::int32_t animation::ID; + +void animation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "animation"); + s.store_field("duration", duration_); + s.store_field("width", width_); + s.store_field("height", height_); + s.store_field("file_name", file_name_); + s.store_field("mime_type", mime_type_); + s.store_field("has_stickers", has_stickers_); + s.store_object_field("minithumbnail", static_cast(minithumbnail_.get())); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_object_field("animation", static_cast(animation_.get())); + s.store_class_end(); + } +} + +animations::animations() + : animations_() +{} + +animations::animations(array> &&animations_) + : animations_(std::move(animations_)) +{} + +const std::int32_t animations::ID; + +void animations::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "animations"); + { s.store_vector_begin("animations", animations_.size()); for (const auto &_value : animations_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +attachmentMenuBot::attachmentMenuBot() + : bot_user_id_() + , supports_self_chat_() + , supports_user_chats_() + , supports_bot_chats_() + , supports_group_chats_() + , supports_channel_chats_() + , supports_settings_() + , name_() + , name_color_() + , default_icon_() + , ios_static_icon_() + , ios_animated_icon_() + , android_icon_() + , macos_icon_() + , icon_color_() + , web_app_placeholder_() +{} + +attachmentMenuBot::attachmentMenuBot(int53 bot_user_id_, bool supports_self_chat_, bool supports_user_chats_, bool supports_bot_chats_, bool supports_group_chats_, bool supports_channel_chats_, bool supports_settings_, string const &name_, object_ptr &&name_color_, object_ptr &&default_icon_, object_ptr &&ios_static_icon_, object_ptr &&ios_animated_icon_, object_ptr &&android_icon_, object_ptr &&macos_icon_, object_ptr &&icon_color_, object_ptr &&web_app_placeholder_) + : bot_user_id_(bot_user_id_) + , supports_self_chat_(supports_self_chat_) + , supports_user_chats_(supports_user_chats_) + , supports_bot_chats_(supports_bot_chats_) + , supports_group_chats_(supports_group_chats_) + , supports_channel_chats_(supports_channel_chats_) + , supports_settings_(supports_settings_) + , name_(name_) + , name_color_(std::move(name_color_)) + , default_icon_(std::move(default_icon_)) + , ios_static_icon_(std::move(ios_static_icon_)) + , ios_animated_icon_(std::move(ios_animated_icon_)) + , android_icon_(std::move(android_icon_)) + , macos_icon_(std::move(macos_icon_)) + , icon_color_(std::move(icon_color_)) + , web_app_placeholder_(std::move(web_app_placeholder_)) +{} + +const std::int32_t attachmentMenuBot::ID; + +void attachmentMenuBot::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "attachmentMenuBot"); + s.store_field("bot_user_id", bot_user_id_); + s.store_field("supports_self_chat", supports_self_chat_); + s.store_field("supports_user_chats", supports_user_chats_); + s.store_field("supports_bot_chats", supports_bot_chats_); + s.store_field("supports_group_chats", supports_group_chats_); + s.store_field("supports_channel_chats", supports_channel_chats_); + s.store_field("supports_settings", supports_settings_); + s.store_field("name", name_); + s.store_object_field("name_color", static_cast(name_color_.get())); + s.store_object_field("default_icon", static_cast(default_icon_.get())); + s.store_object_field("ios_static_icon", static_cast(ios_static_icon_.get())); + s.store_object_field("ios_animated_icon", static_cast(ios_animated_icon_.get())); + s.store_object_field("android_icon", static_cast(android_icon_.get())); + s.store_object_field("macos_icon", static_cast(macos_icon_.get())); + s.store_object_field("icon_color", static_cast(icon_color_.get())); + s.store_object_field("web_app_placeholder", static_cast(web_app_placeholder_.get())); + s.store_class_end(); + } +} + +attachmentMenuBotColor::attachmentMenuBotColor() + : light_color_() + , dark_color_() +{} + +attachmentMenuBotColor::attachmentMenuBotColor(int32 light_color_, int32 dark_color_) + : light_color_(light_color_) + , dark_color_(dark_color_) +{} + +const std::int32_t attachmentMenuBotColor::ID; + +void attachmentMenuBotColor::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "attachmentMenuBotColor"); + s.store_field("light_color", light_color_); + s.store_field("dark_color", dark_color_); + s.store_class_end(); + } +} + +audio::audio() + : duration_() + , title_() + , performer_() + , file_name_() + , mime_type_() + , album_cover_minithumbnail_() + , album_cover_thumbnail_() + , external_album_covers_() + , audio_() +{} + +audio::audio(int32 duration_, string const &title_, string const &performer_, string const &file_name_, string const &mime_type_, object_ptr &&album_cover_minithumbnail_, object_ptr &&album_cover_thumbnail_, array> &&external_album_covers_, object_ptr &&audio_) + : duration_(duration_) + , title_(title_) + , performer_(performer_) + , file_name_(file_name_) + , mime_type_(mime_type_) + , album_cover_minithumbnail_(std::move(album_cover_minithumbnail_)) + , album_cover_thumbnail_(std::move(album_cover_thumbnail_)) + , external_album_covers_(std::move(external_album_covers_)) + , audio_(std::move(audio_)) +{} + +const std::int32_t audio::ID; + +void audio::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "audio"); + s.store_field("duration", duration_); + s.store_field("title", title_); + s.store_field("performer", performer_); + s.store_field("file_name", file_name_); + s.store_field("mime_type", mime_type_); + s.store_object_field("album_cover_minithumbnail", static_cast(album_cover_minithumbnail_.get())); + s.store_object_field("album_cover_thumbnail", static_cast(album_cover_thumbnail_.get())); + { s.store_vector_begin("external_album_covers", external_album_covers_.size()); for (const auto &_value : external_album_covers_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_object_field("audio", static_cast(audio_.get())); + s.store_class_end(); + } +} + +authenticationCodeInfo::authenticationCodeInfo() + : phone_number_() + , type_() + , next_type_() + , timeout_() +{} + +authenticationCodeInfo::authenticationCodeInfo(string const &phone_number_, object_ptr &&type_, object_ptr &&next_type_, int32 timeout_) + : phone_number_(phone_number_) + , type_(std::move(type_)) + , next_type_(std::move(next_type_)) + , timeout_(timeout_) +{} + +const std::int32_t authenticationCodeInfo::ID; + +void authenticationCodeInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeInfo"); + s.store_field("phone_number", phone_number_); + s.store_object_field("type", static_cast(type_.get())); + s.store_object_field("next_type", static_cast(next_type_.get())); + s.store_field("timeout", timeout_); + s.store_class_end(); + } +} + +authenticationCodeTypeTelegramMessage::authenticationCodeTypeTelegramMessage() + : length_() +{} + +authenticationCodeTypeTelegramMessage::authenticationCodeTypeTelegramMessage(int32 length_) + : length_(length_) +{} + +const std::int32_t authenticationCodeTypeTelegramMessage::ID; + +void authenticationCodeTypeTelegramMessage::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeTypeTelegramMessage"); + s.store_field("length", length_); + s.store_class_end(); + } +} + +authenticationCodeTypeSms::authenticationCodeTypeSms() + : length_() +{} + +authenticationCodeTypeSms::authenticationCodeTypeSms(int32 length_) + : length_(length_) +{} + +const std::int32_t authenticationCodeTypeSms::ID; + +void authenticationCodeTypeSms::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeTypeSms"); + s.store_field("length", length_); + s.store_class_end(); + } +} + +authenticationCodeTypeCall::authenticationCodeTypeCall() + : length_() +{} + +authenticationCodeTypeCall::authenticationCodeTypeCall(int32 length_) + : length_(length_) +{} + +const std::int32_t authenticationCodeTypeCall::ID; + +void authenticationCodeTypeCall::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeTypeCall"); + s.store_field("length", length_); + s.store_class_end(); + } +} + +authenticationCodeTypeFlashCall::authenticationCodeTypeFlashCall() + : pattern_() +{} + +authenticationCodeTypeFlashCall::authenticationCodeTypeFlashCall(string const &pattern_) + : pattern_(pattern_) +{} + +const std::int32_t authenticationCodeTypeFlashCall::ID; + +void authenticationCodeTypeFlashCall::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeTypeFlashCall"); + s.store_field("pattern", pattern_); + s.store_class_end(); + } +} + +authenticationCodeTypeMissedCall::authenticationCodeTypeMissedCall() + : phone_number_prefix_() + , length_() +{} + +authenticationCodeTypeMissedCall::authenticationCodeTypeMissedCall(string const &phone_number_prefix_, int32 length_) + : phone_number_prefix_(phone_number_prefix_) + , length_(length_) +{} + +const std::int32_t authenticationCodeTypeMissedCall::ID; + +void authenticationCodeTypeMissedCall::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authenticationCodeTypeMissedCall"); + s.store_field("phone_number_prefix", phone_number_prefix_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +authorizationStateWaitTdlibParameters::authorizationStateWaitTdlibParameters() { +} + +const std::int32_t authorizationStateWaitTdlibParameters::ID; + +void authorizationStateWaitTdlibParameters::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitTdlibParameters"); + s.store_class_end(); + } +} + +authorizationStateWaitPhoneNumber::authorizationStateWaitPhoneNumber() { +} + +const std::int32_t authorizationStateWaitPhoneNumber::ID; + +void authorizationStateWaitPhoneNumber::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitPhoneNumber"); + s.store_class_end(); + } +} + +authorizationStateWaitEmailAddress::authorizationStateWaitEmailAddress() + : allow_apple_id_() + , allow_google_id_() +{} + +authorizationStateWaitEmailAddress::authorizationStateWaitEmailAddress(bool allow_apple_id_, bool allow_google_id_) + : allow_apple_id_(allow_apple_id_) + , allow_google_id_(allow_google_id_) +{} + +const std::int32_t authorizationStateWaitEmailAddress::ID; + +void authorizationStateWaitEmailAddress::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitEmailAddress"); + s.store_field("allow_apple_id", allow_apple_id_); + s.store_field("allow_google_id", allow_google_id_); + s.store_class_end(); + } +} + +authorizationStateWaitEmailCode::authorizationStateWaitEmailCode() + : allow_apple_id_() + , allow_google_id_() + , code_info_() + , next_phone_number_authorization_date_() +{} + +authorizationStateWaitEmailCode::authorizationStateWaitEmailCode(bool allow_apple_id_, bool allow_google_id_, object_ptr &&code_info_, int32 next_phone_number_authorization_date_) + : allow_apple_id_(allow_apple_id_) + , allow_google_id_(allow_google_id_) + , code_info_(std::move(code_info_)) + , next_phone_number_authorization_date_(next_phone_number_authorization_date_) +{} + +const std::int32_t authorizationStateWaitEmailCode::ID; + +void authorizationStateWaitEmailCode::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitEmailCode"); + s.store_field("allow_apple_id", allow_apple_id_); + s.store_field("allow_google_id", allow_google_id_); + s.store_object_field("code_info", static_cast(code_info_.get())); + s.store_field("next_phone_number_authorization_date", next_phone_number_authorization_date_); + s.store_class_end(); + } +} + +authorizationStateWaitCode::authorizationStateWaitCode() + : code_info_() +{} + +authorizationStateWaitCode::authorizationStateWaitCode(object_ptr &&code_info_) + : code_info_(std::move(code_info_)) +{} + +const std::int32_t authorizationStateWaitCode::ID; + +void authorizationStateWaitCode::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitCode"); + s.store_object_field("code_info", static_cast(code_info_.get())); + s.store_class_end(); + } +} + +authorizationStateWaitOtherDeviceConfirmation::authorizationStateWaitOtherDeviceConfirmation() + : link_() +{} + +authorizationStateWaitOtherDeviceConfirmation::authorizationStateWaitOtherDeviceConfirmation(string const &link_) + : link_(link_) +{} + +const std::int32_t authorizationStateWaitOtherDeviceConfirmation::ID; + +void authorizationStateWaitOtherDeviceConfirmation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitOtherDeviceConfirmation"); + s.store_field("link", link_); + s.store_class_end(); + } +} + +authorizationStateWaitRegistration::authorizationStateWaitRegistration() + : terms_of_service_() +{} + +authorizationStateWaitRegistration::authorizationStateWaitRegistration(object_ptr &&terms_of_service_) + : terms_of_service_(std::move(terms_of_service_)) +{} + +const std::int32_t authorizationStateWaitRegistration::ID; + +void authorizationStateWaitRegistration::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitRegistration"); + s.store_object_field("terms_of_service", static_cast(terms_of_service_.get())); + s.store_class_end(); + } +} + +authorizationStateWaitPassword::authorizationStateWaitPassword() + : password_hint_() + , has_recovery_email_address_() + , recovery_email_address_pattern_() +{} + +authorizationStateWaitPassword::authorizationStateWaitPassword(string const &password_hint_, bool has_recovery_email_address_, string const &recovery_email_address_pattern_) + : password_hint_(password_hint_) + , has_recovery_email_address_(has_recovery_email_address_) + , recovery_email_address_pattern_(recovery_email_address_pattern_) +{} + +const std::int32_t authorizationStateWaitPassword::ID; + +void authorizationStateWaitPassword::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateWaitPassword"); + s.store_field("password_hint", password_hint_); + s.store_field("has_recovery_email_address", has_recovery_email_address_); + s.store_field("recovery_email_address_pattern", recovery_email_address_pattern_); + s.store_class_end(); + } +} + +authorizationStateReady::authorizationStateReady() { +} + +const std::int32_t authorizationStateReady::ID; + +void authorizationStateReady::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateReady"); + s.store_class_end(); + } +} + +authorizationStateLoggingOut::authorizationStateLoggingOut() { +} + +const std::int32_t authorizationStateLoggingOut::ID; + +void authorizationStateLoggingOut::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateLoggingOut"); + s.store_class_end(); + } +} + +authorizationStateClosing::authorizationStateClosing() { +} + +const std::int32_t authorizationStateClosing::ID; + +void authorizationStateClosing::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateClosing"); + s.store_class_end(); + } +} + +authorizationStateClosed::authorizationStateClosed() { +} + +const std::int32_t authorizationStateClosed::ID; + +void authorizationStateClosed::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "authorizationStateClosed"); + s.store_class_end(); + } +} + +autoDownloadSettings::autoDownloadSettings() + : is_auto_download_enabled_() + , max_photo_file_size_() + , max_video_file_size_() + , max_other_file_size_() + , video_upload_bitrate_() + , preload_large_videos_() + , preload_next_audio_() + , use_less_data_for_calls_() +{} + +autoDownloadSettings::autoDownloadSettings(bool is_auto_download_enabled_, int32 max_photo_file_size_, int53 max_video_file_size_, int53 max_other_file_size_, int32 video_upload_bitrate_, bool preload_large_videos_, bool preload_next_audio_, bool use_less_data_for_calls_) + : is_auto_download_enabled_(is_auto_download_enabled_) + , max_photo_file_size_(max_photo_file_size_) + , max_video_file_size_(max_video_file_size_) + , max_other_file_size_(max_other_file_size_) + , video_upload_bitrate_(video_upload_bitrate_) + , preload_large_videos_(preload_large_videos_) + , preload_next_audio_(preload_next_audio_) + , use_less_data_for_calls_(use_less_data_for_calls_) +{} + +const std::int32_t autoDownloadSettings::ID; + +void autoDownloadSettings::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "autoDownloadSettings"); + s.store_field("is_auto_download_enabled", is_auto_download_enabled_); + s.store_field("max_photo_file_size", max_photo_file_size_); + s.store_field("max_video_file_size", max_video_file_size_); + s.store_field("max_other_file_size", max_other_file_size_); + s.store_field("video_upload_bitrate", video_upload_bitrate_); + s.store_field("preload_large_videos", preload_large_videos_); + s.store_field("preload_next_audio", preload_next_audio_); + s.store_field("use_less_data_for_calls", use_less_data_for_calls_); + s.store_class_end(); + } +} + +autoDownloadSettingsPresets::autoDownloadSettingsPresets() + : low_() + , medium_() + , high_() +{} + +autoDownloadSettingsPresets::autoDownloadSettingsPresets(object_ptr &&low_, object_ptr &&medium_, object_ptr &&high_) + : low_(std::move(low_)) + , medium_(std::move(medium_)) + , high_(std::move(high_)) +{} + +const std::int32_t autoDownloadSettingsPresets::ID; + +void autoDownloadSettingsPresets::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "autoDownloadSettingsPresets"); + s.store_object_field("low", static_cast(low_.get())); + s.store_object_field("medium", static_cast(medium_.get())); + s.store_object_field("high", static_cast(high_.get())); + s.store_class_end(); + } +} + +availableReaction::availableReaction() + : type_() + , needs_premium_() +{} + +availableReaction::availableReaction(object_ptr &&type_, bool needs_premium_) + : type_(std::move(type_)) + , needs_premium_(needs_premium_) +{} + +const std::int32_t availableReaction::ID; + +void availableReaction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "availableReaction"); + s.store_object_field("type", static_cast(type_.get())); + s.store_field("needs_premium", needs_premium_); + s.store_class_end(); + } +} + +availableReactions::availableReactions() + : top_reactions_() + , recent_reactions_() + , popular_reactions_() + , allow_custom_emoji_() +{} + +availableReactions::availableReactions(array> &&top_reactions_, array> &&recent_reactions_, array> &&popular_reactions_, bool allow_custom_emoji_) + : top_reactions_(std::move(top_reactions_)) + , recent_reactions_(std::move(recent_reactions_)) + , popular_reactions_(std::move(popular_reactions_)) + , allow_custom_emoji_(allow_custom_emoji_) +{} + +const std::int32_t availableReactions::ID; + +void availableReactions::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "availableReactions"); + { s.store_vector_begin("top_reactions", top_reactions_.size()); for (const auto &_value : top_reactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("recent_reactions", recent_reactions_.size()); for (const auto &_value : recent_reactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("popular_reactions", popular_reactions_.size()); for (const auto &_value : popular_reactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("allow_custom_emoji", allow_custom_emoji_); + s.store_class_end(); + } +} + +background::background() + : id_() + , is_default_() + , is_dark_() + , name_() + , document_() + , type_() +{} + +background::background(int64 id_, bool is_default_, bool is_dark_, string const &name_, object_ptr &&document_, object_ptr &&type_) + : id_(id_) + , is_default_(is_default_) + , is_dark_(is_dark_) + , name_(name_) + , document_(std::move(document_)) + , type_(std::move(type_)) +{} + +const std::int32_t background::ID; + +void background::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "background"); + s.store_field("id", id_); + s.store_field("is_default", is_default_); + s.store_field("is_dark", is_dark_); + s.store_field("name", name_); + s.store_object_field("document", static_cast(document_.get())); + s.store_object_field("type", static_cast(type_.get())); + s.store_class_end(); + } +} + +backgroundFillSolid::backgroundFillSolid() + : color_() +{} + +backgroundFillSolid::backgroundFillSolid(int32 color_) + : color_(color_) +{} + +const std::int32_t backgroundFillSolid::ID; + +void backgroundFillSolid::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundFillSolid"); + s.store_field("color", color_); + s.store_class_end(); + } +} + +backgroundFillGradient::backgroundFillGradient() + : top_color_() + , bottom_color_() + , rotation_angle_() +{} + +backgroundFillGradient::backgroundFillGradient(int32 top_color_, int32 bottom_color_, int32 rotation_angle_) + : top_color_(top_color_) + , bottom_color_(bottom_color_) + , rotation_angle_(rotation_angle_) +{} + +const std::int32_t backgroundFillGradient::ID; + +void backgroundFillGradient::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundFillGradient"); + s.store_field("top_color", top_color_); + s.store_field("bottom_color", bottom_color_); + s.store_field("rotation_angle", rotation_angle_); + s.store_class_end(); + } +} + +backgroundFillFreeformGradient::backgroundFillFreeformGradient() + : colors_() +{} + +backgroundFillFreeformGradient::backgroundFillFreeformGradient(array &&colors_) + : colors_(std::move(colors_)) +{} + +const std::int32_t backgroundFillFreeformGradient::ID; + +void backgroundFillFreeformGradient::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundFillFreeformGradient"); + { s.store_vector_begin("colors", colors_.size()); for (const auto &_value : colors_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +backgroundTypeWallpaper::backgroundTypeWallpaper() + : is_blurred_() + , is_moving_() +{} + +backgroundTypeWallpaper::backgroundTypeWallpaper(bool is_blurred_, bool is_moving_) + : is_blurred_(is_blurred_) + , is_moving_(is_moving_) +{} + +const std::int32_t backgroundTypeWallpaper::ID; + +void backgroundTypeWallpaper::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundTypeWallpaper"); + s.store_field("is_blurred", is_blurred_); + s.store_field("is_moving", is_moving_); + s.store_class_end(); + } +} + +backgroundTypePattern::backgroundTypePattern() + : fill_() + , intensity_() + , is_inverted_() + , is_moving_() +{} + +backgroundTypePattern::backgroundTypePattern(object_ptr &&fill_, int32 intensity_, bool is_inverted_, bool is_moving_) + : fill_(std::move(fill_)) + , intensity_(intensity_) + , is_inverted_(is_inverted_) + , is_moving_(is_moving_) +{} + +const std::int32_t backgroundTypePattern::ID; + +void backgroundTypePattern::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundTypePattern"); + s.store_object_field("fill", static_cast(fill_.get())); + s.store_field("intensity", intensity_); + s.store_field("is_inverted", is_inverted_); + s.store_field("is_moving", is_moving_); + s.store_class_end(); + } +} + +backgroundTypeFill::backgroundTypeFill() + : fill_() +{} + +backgroundTypeFill::backgroundTypeFill(object_ptr &&fill_) + : fill_(std::move(fill_)) +{} + +const std::int32_t backgroundTypeFill::ID; + +void backgroundTypeFill::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgroundTypeFill"); + s.store_object_field("fill", static_cast(fill_.get())); + s.store_class_end(); + } +} + +backgrounds::backgrounds() + : backgrounds_() +{} + +backgrounds::backgrounds(array> &&backgrounds_) + : backgrounds_(std::move(backgrounds_)) +{} + +const std::int32_t backgrounds::ID; + +void backgrounds::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "backgrounds"); + { s.store_vector_begin("backgrounds", backgrounds_.size()); for (const auto &_value : backgrounds_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +bankCardActionOpenUrl::bankCardActionOpenUrl() + : text_() + , url_() +{} + +bankCardActionOpenUrl::bankCardActionOpenUrl(string const &text_, string const &url_) + : text_(text_) + , url_(url_) +{} + +const std::int32_t bankCardActionOpenUrl::ID; + +void bankCardActionOpenUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "bankCardActionOpenUrl"); + s.store_field("text", text_); + s.store_field("url", url_); + s.store_class_end(); + } +} + +bankCardInfo::bankCardInfo() + : title_() + , actions_() +{} + +bankCardInfo::bankCardInfo(string const &title_, array> &&actions_) + : title_(title_) + , actions_(std::move(actions_)) +{} + +const std::int32_t bankCardInfo::ID; + +void bankCardInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "bankCardInfo"); + s.store_field("title", title_); + { s.store_vector_begin("actions", actions_.size()); for (const auto &_value : actions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +basicGroup::basicGroup() + : id_() + , member_count_() + , status_() + , is_active_() + , upgraded_to_supergroup_id_() +{} + +basicGroup::basicGroup(int53 id_, int32 member_count_, object_ptr &&status_, bool is_active_, int53 upgraded_to_supergroup_id_) + : id_(id_) + , member_count_(member_count_) + , status_(std::move(status_)) + , is_active_(is_active_) + , upgraded_to_supergroup_id_(upgraded_to_supergroup_id_) +{} + +const std::int32_t basicGroup::ID; + +void basicGroup::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "basicGroup"); + s.store_field("id", id_); + s.store_field("member_count", member_count_); + s.store_object_field("status", static_cast(status_.get())); + s.store_field("is_active", is_active_); + s.store_field("upgraded_to_supergroup_id", upgraded_to_supergroup_id_); + s.store_class_end(); + } +} + +basicGroupFullInfo::basicGroupFullInfo() + : photo_() + , description_() + , creator_user_id_() + , members_() + , invite_link_() + , bot_commands_() +{} + +basicGroupFullInfo::basicGroupFullInfo(object_ptr &&photo_, string const &description_, int53 creator_user_id_, array> &&members_, object_ptr &&invite_link_, array> &&bot_commands_) + : photo_(std::move(photo_)) + , description_(description_) + , creator_user_id_(creator_user_id_) + , members_(std::move(members_)) + , invite_link_(std::move(invite_link_)) + , bot_commands_(std::move(bot_commands_)) +{} + +const std::int32_t basicGroupFullInfo::ID; + +void basicGroupFullInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "basicGroupFullInfo"); + s.store_object_field("photo", static_cast(photo_.get())); + s.store_field("description", description_); + s.store_field("creator_user_id", creator_user_id_); + { s.store_vector_begin("members", members_.size()); for (const auto &_value : members_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_object_field("invite_link", static_cast(invite_link_.get())); + { s.store_vector_begin("bot_commands", bot_commands_.size()); for (const auto &_value : bot_commands_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +botCommand::botCommand() + : command_() + , description_() +{} + +botCommand::botCommand(string const &command_, string const &description_) + : command_(command_) + , description_(description_) +{} + +const std::int32_t botCommand::ID; + +void botCommand::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommand"); + s.store_field("command", command_); + s.store_field("description", description_); + s.store_class_end(); + } +} + +botCommandScopeDefault::botCommandScopeDefault() { +} + +const std::int32_t botCommandScopeDefault::ID; + +void botCommandScopeDefault::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeDefault"); + s.store_class_end(); + } +} + +botCommandScopeAllPrivateChats::botCommandScopeAllPrivateChats() { +} + +const std::int32_t botCommandScopeAllPrivateChats::ID; + +void botCommandScopeAllPrivateChats::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeAllPrivateChats"); + s.store_class_end(); + } +} + +botCommandScopeAllGroupChats::botCommandScopeAllGroupChats() { +} + +const std::int32_t botCommandScopeAllGroupChats::ID; + +void botCommandScopeAllGroupChats::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeAllGroupChats"); + s.store_class_end(); + } +} + +botCommandScopeAllChatAdministrators::botCommandScopeAllChatAdministrators() { +} + +const std::int32_t botCommandScopeAllChatAdministrators::ID; + +void botCommandScopeAllChatAdministrators::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeAllChatAdministrators"); + s.store_class_end(); + } +} + +botCommandScopeChat::botCommandScopeChat() + : chat_id_() +{} + +botCommandScopeChat::botCommandScopeChat(int53 chat_id_) + : chat_id_(chat_id_) +{} + +const std::int32_t botCommandScopeChat::ID; + +void botCommandScopeChat::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeChat"); + s.store_field("chat_id", chat_id_); + s.store_class_end(); + } +} + +botCommandScopeChatAdministrators::botCommandScopeChatAdministrators() + : chat_id_() +{} + +botCommandScopeChatAdministrators::botCommandScopeChatAdministrators(int53 chat_id_) + : chat_id_(chat_id_) +{} + +const std::int32_t botCommandScopeChatAdministrators::ID; + +void botCommandScopeChatAdministrators::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeChatAdministrators"); + s.store_field("chat_id", chat_id_); + s.store_class_end(); + } +} + +botCommandScopeChatMember::botCommandScopeChatMember() + : chat_id_() + , user_id_() +{} + +botCommandScopeChatMember::botCommandScopeChatMember(int53 chat_id_, int53 user_id_) + : chat_id_(chat_id_) + , user_id_(user_id_) +{} + +const std::int32_t botCommandScopeChatMember::ID; + +void botCommandScopeChatMember::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommandScopeChatMember"); + s.store_field("chat_id", chat_id_); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +botCommands::botCommands() + : bot_user_id_() + , commands_() +{} + +botCommands::botCommands(int53 bot_user_id_, array> &&commands_) + : bot_user_id_(bot_user_id_) + , commands_(std::move(commands_)) +{} + +const std::int32_t botCommands::ID; + +void botCommands::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botCommands"); + s.store_field("bot_user_id", bot_user_id_); + { s.store_vector_begin("commands", commands_.size()); for (const auto &_value : commands_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +botInfo::botInfo() + : share_text_() + , description_() + , photo_() + , animation_() + , menu_button_() + , commands_() + , default_group_administrator_rights_() + , default_channel_administrator_rights_() +{} + +botInfo::botInfo(string const &share_text_, string const &description_, object_ptr &&photo_, object_ptr &&animation_, object_ptr &&menu_button_, array> &&commands_, object_ptr &&default_group_administrator_rights_, object_ptr &&default_channel_administrator_rights_) + : share_text_(share_text_) + , description_(description_) + , photo_(std::move(photo_)) + , animation_(std::move(animation_)) + , menu_button_(std::move(menu_button_)) + , commands_(std::move(commands_)) + , default_group_administrator_rights_(std::move(default_group_administrator_rights_)) + , default_channel_administrator_rights_(std::move(default_channel_administrator_rights_)) +{} + +const std::int32_t botInfo::ID; + +void botInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botInfo"); + s.store_field("share_text", share_text_); + s.store_field("description", description_); + s.store_object_field("photo", static_cast(photo_.get())); + s.store_object_field("animation", static_cast(animation_.get())); + s.store_object_field("menu_button", static_cast(menu_button_.get())); + { s.store_vector_begin("commands", commands_.size()); for (const auto &_value : commands_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_object_field("default_group_administrator_rights", static_cast(default_group_administrator_rights_.get())); + s.store_object_field("default_channel_administrator_rights", static_cast(default_channel_administrator_rights_.get())); + s.store_class_end(); + } +} + +botMenuButton::botMenuButton() + : text_() + , url_() +{} + +botMenuButton::botMenuButton(string const &text_, string const &url_) + : text_(text_) + , url_(url_) +{} + +const std::int32_t botMenuButton::ID; + +void botMenuButton::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "botMenuButton"); + s.store_field("text", text_); + s.store_field("url", url_); + s.store_class_end(); + } +} + +call::call() + : id_() + , user_id_() + , is_outgoing_() + , is_video_() + , state_() +{} + +call::call(int32 id_, int53 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_) + : id_(id_) + , user_id_(user_id_) + , is_outgoing_(is_outgoing_) + , is_video_(is_video_) + , state_(std::move(state_)) +{} + +const std::int32_t call::ID; + +void call::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "call"); + s.store_field("id", id_); + s.store_field("user_id", user_id_); + s.store_field("is_outgoing", is_outgoing_); + s.store_field("is_video", is_video_); + s.store_object_field("state", static_cast(state_.get())); + s.store_class_end(); + } +} + +callDiscardReasonEmpty::callDiscardReasonEmpty() { +} + +const std::int32_t callDiscardReasonEmpty::ID; + +void callDiscardReasonEmpty::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callDiscardReasonEmpty"); + s.store_class_end(); + } +} + +callDiscardReasonMissed::callDiscardReasonMissed() { +} + +const std::int32_t callDiscardReasonMissed::ID; + +void callDiscardReasonMissed::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callDiscardReasonMissed"); + s.store_class_end(); + } +} + +callDiscardReasonDeclined::callDiscardReasonDeclined() { +} + +const std::int32_t callDiscardReasonDeclined::ID; + +void callDiscardReasonDeclined::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callDiscardReasonDeclined"); + s.store_class_end(); + } +} + +callDiscardReasonDisconnected::callDiscardReasonDisconnected() { +} + +const std::int32_t callDiscardReasonDisconnected::ID; + +void callDiscardReasonDisconnected::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callDiscardReasonDisconnected"); + s.store_class_end(); + } +} + +callDiscardReasonHungUp::callDiscardReasonHungUp() { +} + +const std::int32_t callDiscardReasonHungUp::ID; + +void callDiscardReasonHungUp::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callDiscardReasonHungUp"); + s.store_class_end(); + } +} + +callId::callId() + : id_() +{} + +callId::callId(int32 id_) + : id_(id_) +{} + +const std::int32_t callId::ID; + +void callId::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callId"); + s.store_field("id", id_); + s.store_class_end(); + } +} + +callProblemEcho::callProblemEcho() { +} + +const std::int32_t callProblemEcho::ID; + +void callProblemEcho::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemEcho"); + s.store_class_end(); + } +} + +callProblemNoise::callProblemNoise() { +} + +const std::int32_t callProblemNoise::ID; + +void callProblemNoise::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemNoise"); + s.store_class_end(); + } +} + +callProblemInterruptions::callProblemInterruptions() { +} + +const std::int32_t callProblemInterruptions::ID; + +void callProblemInterruptions::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemInterruptions"); + s.store_class_end(); + } +} + +callProblemDistortedSpeech::callProblemDistortedSpeech() { +} + +const std::int32_t callProblemDistortedSpeech::ID; + +void callProblemDistortedSpeech::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemDistortedSpeech"); + s.store_class_end(); + } +} + +callProblemSilentLocal::callProblemSilentLocal() { +} + +const std::int32_t callProblemSilentLocal::ID; + +void callProblemSilentLocal::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemSilentLocal"); + s.store_class_end(); + } +} + +callProblemSilentRemote::callProblemSilentRemote() { +} + +const std::int32_t callProblemSilentRemote::ID; + +void callProblemSilentRemote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemSilentRemote"); + s.store_class_end(); + } +} + +callProblemDropped::callProblemDropped() { +} + +const std::int32_t callProblemDropped::ID; + +void callProblemDropped::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemDropped"); + s.store_class_end(); + } +} + +callProblemDistortedVideo::callProblemDistortedVideo() { +} + +const std::int32_t callProblemDistortedVideo::ID; + +void callProblemDistortedVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemDistortedVideo"); + s.store_class_end(); + } +} + +callProblemPixelatedVideo::callProblemPixelatedVideo() { +} + +const std::int32_t callProblemPixelatedVideo::ID; + +void callProblemPixelatedVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProblemPixelatedVideo"); + s.store_class_end(); + } +} + +callProtocol::callProtocol() + : udp_p2p_() + , udp_reflector_() + , min_layer_() + , max_layer_() + , library_versions_() +{} + +callProtocol::callProtocol(bool udp_p2p_, bool udp_reflector_, int32 min_layer_, int32 max_layer_, array &&library_versions_) + : udp_p2p_(udp_p2p_) + , udp_reflector_(udp_reflector_) + , min_layer_(min_layer_) + , max_layer_(max_layer_) + , library_versions_(std::move(library_versions_)) +{} + +const std::int32_t callProtocol::ID; + +void callProtocol::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callProtocol"); + s.store_field("udp_p2p", udp_p2p_); + s.store_field("udp_reflector", udp_reflector_); + s.store_field("min_layer", min_layer_); + s.store_field("max_layer", max_layer_); + { s.store_vector_begin("library_versions", library_versions_.size()); for (const auto &_value : library_versions_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +callServer::callServer() + : id_() + , ip_address_() + , ipv6_address_() + , port_() + , type_() +{} + +callServer::callServer(int64 id_, string const &ip_address_, string const &ipv6_address_, int32 port_, object_ptr &&type_) + : id_(id_) + , ip_address_(ip_address_) + , ipv6_address_(ipv6_address_) + , port_(port_) + , type_(std::move(type_)) +{} + +const std::int32_t callServer::ID; + +void callServer::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callServer"); + s.store_field("id", id_); + s.store_field("ip_address", ip_address_); + s.store_field("ipv6_address", ipv6_address_); + s.store_field("port", port_); + s.store_object_field("type", static_cast(type_.get())); + s.store_class_end(); + } +} + +callServerTypeTelegramReflector::callServerTypeTelegramReflector() + : peer_tag_() + , is_tcp_() +{} + +callServerTypeTelegramReflector::callServerTypeTelegramReflector(bytes const &peer_tag_, bool is_tcp_) + : peer_tag_(std::move(peer_tag_)) + , is_tcp_(is_tcp_) +{} + +const std::int32_t callServerTypeTelegramReflector::ID; + +void callServerTypeTelegramReflector::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callServerTypeTelegramReflector"); + s.store_bytes_field("peer_tag", peer_tag_); + s.store_field("is_tcp", is_tcp_); + s.store_class_end(); + } +} + +callServerTypeWebrtc::callServerTypeWebrtc() + : username_() + , password_() + , supports_turn_() + , supports_stun_() +{} + +callServerTypeWebrtc::callServerTypeWebrtc(string const &username_, string const &password_, bool supports_turn_, bool supports_stun_) + : username_(username_) + , password_(password_) + , supports_turn_(supports_turn_) + , supports_stun_(supports_stun_) +{} + +const std::int32_t callServerTypeWebrtc::ID; + +void callServerTypeWebrtc::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callServerTypeWebrtc"); + s.store_field("username", username_); + s.store_field("password", password_); + s.store_field("supports_turn", supports_turn_); + s.store_field("supports_stun", supports_stun_); + s.store_class_end(); + } +} + +callStatePending::callStatePending() + : is_created_() + , is_received_() +{} + +callStatePending::callStatePending(bool is_created_, bool is_received_) + : is_created_(is_created_) + , is_received_(is_received_) +{} + +const std::int32_t callStatePending::ID; + +void callStatePending::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStatePending"); + s.store_field("is_created", is_created_); + s.store_field("is_received", is_received_); + s.store_class_end(); + } +} + +callStateExchangingKeys::callStateExchangingKeys() { +} + +const std::int32_t callStateExchangingKeys::ID; + +void callStateExchangingKeys::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStateExchangingKeys"); + s.store_class_end(); + } +} + +callStateReady::callStateReady() + : protocol_() + , servers_() + , config_() + , encryption_key_() + , emojis_() + , allow_p2p_() +{} + +callStateReady::callStateReady(object_ptr &&protocol_, array> &&servers_, string const &config_, bytes const &encryption_key_, array &&emojis_, bool allow_p2p_) + : protocol_(std::move(protocol_)) + , servers_(std::move(servers_)) + , config_(config_) + , encryption_key_(std::move(encryption_key_)) + , emojis_(std::move(emojis_)) + , allow_p2p_(allow_p2p_) +{} + +const std::int32_t callStateReady::ID; + +void callStateReady::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStateReady"); + s.store_object_field("protocol", static_cast(protocol_.get())); + { s.store_vector_begin("servers", servers_.size()); for (const auto &_value : servers_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("config", config_); + s.store_bytes_field("encryption_key", encryption_key_); + { s.store_vector_begin("emojis", emojis_.size()); for (const auto &_value : emojis_) { s.store_field("", _value); } s.store_class_end(); } + s.store_field("allow_p2p", allow_p2p_); + s.store_class_end(); + } +} + +callStateHangingUp::callStateHangingUp() { +} + +const std::int32_t callStateHangingUp::ID; + +void callStateHangingUp::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStateHangingUp"); + s.store_class_end(); + } +} + +callStateDiscarded::callStateDiscarded() + : reason_() + , need_rating_() + , need_debug_information_() + , need_log_() +{} + +callStateDiscarded::callStateDiscarded(object_ptr &&reason_, bool need_rating_, bool need_debug_information_, bool need_log_) + : reason_(std::move(reason_)) + , need_rating_(need_rating_) + , need_debug_information_(need_debug_information_) + , need_log_(need_log_) +{} + +const std::int32_t callStateDiscarded::ID; + +void callStateDiscarded::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStateDiscarded"); + s.store_object_field("reason", static_cast(reason_.get())); + s.store_field("need_rating", need_rating_); + s.store_field("need_debug_information", need_debug_information_); + s.store_field("need_log", need_log_); + s.store_class_end(); + } +} + +callStateError::callStateError() + : error_() +{} + +callStateError::callStateError(object_ptr &&error_) + : error_(std::move(error_)) +{} + +const std::int32_t callStateError::ID; + +void callStateError::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callStateError"); + s.store_object_field("error", static_cast(error_.get())); + s.store_class_end(); + } +} + +callbackQueryAnswer::callbackQueryAnswer() + : text_() + , show_alert_() + , url_() +{} + +callbackQueryAnswer::callbackQueryAnswer(string const &text_, bool show_alert_, string const &url_) + : text_(text_) + , show_alert_(show_alert_) + , url_(url_) +{} + +const std::int32_t callbackQueryAnswer::ID; + +void callbackQueryAnswer::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callbackQueryAnswer"); + s.store_field("text", text_); + s.store_field("show_alert", show_alert_); + s.store_field("url", url_); + s.store_class_end(); + } +} + +callbackQueryPayloadData::callbackQueryPayloadData() + : data_() +{} + +callbackQueryPayloadData::callbackQueryPayloadData(bytes const &data_) + : data_(std::move(data_)) +{} + +const std::int32_t callbackQueryPayloadData::ID; + +void callbackQueryPayloadData::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callbackQueryPayloadData"); + s.store_bytes_field("data", data_); + s.store_class_end(); + } +} + +callbackQueryPayloadDataWithPassword::callbackQueryPayloadDataWithPassword() + : password_() + , data_() +{} + +callbackQueryPayloadDataWithPassword::callbackQueryPayloadDataWithPassword(string const &password_, bytes const &data_) + : password_(password_) + , data_(std::move(data_)) +{} + +const std::int32_t callbackQueryPayloadDataWithPassword::ID; + +void callbackQueryPayloadDataWithPassword::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callbackQueryPayloadDataWithPassword"); + s.store_field("password", password_); + s.store_bytes_field("data", data_); + s.store_class_end(); + } +} + +callbackQueryPayloadGame::callbackQueryPayloadGame() + : game_short_name_() +{} + +callbackQueryPayloadGame::callbackQueryPayloadGame(string const &game_short_name_) + : game_short_name_(game_short_name_) +{} + +const std::int32_t callbackQueryPayloadGame::ID; + +void callbackQueryPayloadGame::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "callbackQueryPayloadGame"); + s.store_field("game_short_name", game_short_name_); + s.store_class_end(); + } +} + +canTransferOwnershipResultOk::canTransferOwnershipResultOk() { +} + +const std::int32_t canTransferOwnershipResultOk::ID; + +void canTransferOwnershipResultOk::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "canTransferOwnershipResultOk"); + s.store_class_end(); + } +} + +canTransferOwnershipResultPasswordNeeded::canTransferOwnershipResultPasswordNeeded() { +} + +const std::int32_t canTransferOwnershipResultPasswordNeeded::ID; + +void canTransferOwnershipResultPasswordNeeded::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "canTransferOwnershipResultPasswordNeeded"); + s.store_class_end(); + } +} + +canTransferOwnershipResultPasswordTooFresh::canTransferOwnershipResultPasswordTooFresh() + : retry_after_() +{} + +canTransferOwnershipResultPasswordTooFresh::canTransferOwnershipResultPasswordTooFresh(int32 retry_after_) + : retry_after_(retry_after_) +{} + +const std::int32_t canTransferOwnershipResultPasswordTooFresh::ID; + +void canTransferOwnershipResultPasswordTooFresh::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "canTransferOwnershipResultPasswordTooFresh"); + s.store_field("retry_after", retry_after_); + s.store_class_end(); + } +} + +canTransferOwnershipResultSessionTooFresh::canTransferOwnershipResultSessionTooFresh() + : retry_after_() +{} + +canTransferOwnershipResultSessionTooFresh::canTransferOwnershipResultSessionTooFresh(int32 retry_after_) + : retry_after_(retry_after_) +{} + +const std::int32_t canTransferOwnershipResultSessionTooFresh::ID; + +void canTransferOwnershipResultSessionTooFresh::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "canTransferOwnershipResultSessionTooFresh"); + s.store_field("retry_after", retry_after_); + s.store_class_end(); + } +} + +chat::chat() + : id_() + , type_() + , title_() + , photo_() + , permissions_() + , last_message_() + , positions_() + , message_sender_id_() + , has_protected_content_() + , is_marked_as_unread_() + , is_blocked_() + , has_scheduled_messages_() + , can_be_deleted_only_for_self_() + , can_be_deleted_for_all_users_() + , can_be_reported_() + , default_disable_notification_() + , unread_count_() + , last_read_inbox_message_id_() + , last_read_outbox_message_id_() + , unread_mention_count_() + , unread_reaction_count_() + , notification_settings_() + , available_reactions_() + , message_ttl_() + , theme_name_() + , action_bar_() + , video_chat_() + , pending_join_requests_() + , reply_markup_message_id_() + , draft_message_() + , client_data_() +{} + +chat::chat(int53 id_, object_ptr &&type_, string const &title_, object_ptr &&photo_, object_ptr &&permissions_, object_ptr &&last_message_, array> &&positions_, object_ptr &&message_sender_id_, bool has_protected_content_, bool is_marked_as_unread_, bool is_blocked_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, int32 unread_reaction_count_, object_ptr &¬ification_settings_, object_ptr &&available_reactions_, int32 message_ttl_, string const &theme_name_, object_ptr &&action_bar_, object_ptr &&video_chat_, object_ptr &&pending_join_requests_, int53 reply_markup_message_id_, object_ptr &&draft_message_, string const &client_data_) + : id_(id_) + , type_(std::move(type_)) + , title_(title_) + , photo_(std::move(photo_)) + , permissions_(std::move(permissions_)) + , last_message_(std::move(last_message_)) + , positions_(std::move(positions_)) + , message_sender_id_(std::move(message_sender_id_)) + , has_protected_content_(has_protected_content_) + , is_marked_as_unread_(is_marked_as_unread_) + , is_blocked_(is_blocked_) + , has_scheduled_messages_(has_scheduled_messages_) + , can_be_deleted_only_for_self_(can_be_deleted_only_for_self_) + , can_be_deleted_for_all_users_(can_be_deleted_for_all_users_) + , can_be_reported_(can_be_reported_) + , default_disable_notification_(default_disable_notification_) + , unread_count_(unread_count_) + , last_read_inbox_message_id_(last_read_inbox_message_id_) + , last_read_outbox_message_id_(last_read_outbox_message_id_) + , unread_mention_count_(unread_mention_count_) + , unread_reaction_count_(unread_reaction_count_) + , notification_settings_(std::move(notification_settings_)) + , available_reactions_(std::move(available_reactions_)) + , message_ttl_(message_ttl_) + , theme_name_(theme_name_) + , action_bar_(std::move(action_bar_)) + , video_chat_(std::move(video_chat_)) + , pending_join_requests_(std::move(pending_join_requests_)) + , reply_markup_message_id_(reply_markup_message_id_) + , draft_message_(std::move(draft_message_)) + , client_data_(client_data_) +{} + +const std::int32_t chat::ID; + +void chat::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chat"); + s.store_field("id", id_); + s.store_object_field("type", static_cast(type_.get())); + s.store_field("title", title_); + s.store_object_field("photo", static_cast(photo_.get())); + s.store_object_field("permissions", static_cast(permissions_.get())); + s.store_object_field("last_message", static_cast(last_message_.get())); + { s.store_vector_begin("positions", positions_.size()); for (const auto &_value : positions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_object_field("message_sender_id", static_cast(message_sender_id_.get())); + s.store_field("has_protected_content", has_protected_content_); + s.store_field("is_marked_as_unread", is_marked_as_unread_); + s.store_field("is_blocked", is_blocked_); + s.store_field("has_scheduled_messages", has_scheduled_messages_); + s.store_field("can_be_deleted_only_for_self", can_be_deleted_only_for_self_); + s.store_field("can_be_deleted_for_all_users", can_be_deleted_for_all_users_); + s.store_field("can_be_reported", can_be_reported_); + s.store_field("default_disable_notification", default_disable_notification_); + s.store_field("unread_count", unread_count_); + s.store_field("last_read_inbox_message_id", last_read_inbox_message_id_); + s.store_field("last_read_outbox_message_id", last_read_outbox_message_id_); + s.store_field("unread_mention_count", unread_mention_count_); + s.store_field("unread_reaction_count", unread_reaction_count_); + s.store_object_field("notification_settings", static_cast(notification_settings_.get())); + s.store_object_field("available_reactions", static_cast(available_reactions_.get())); + s.store_field("message_ttl", message_ttl_); + s.store_field("theme_name", theme_name_); + s.store_object_field("action_bar", static_cast(action_bar_.get())); + s.store_object_field("video_chat", static_cast(video_chat_.get())); + s.store_object_field("pending_join_requests", static_cast(pending_join_requests_.get())); + s.store_field("reply_markup_message_id", reply_markup_message_id_); + s.store_object_field("draft_message", static_cast(draft_message_.get())); + s.store_field("client_data", client_data_); + s.store_class_end(); + } +} + +chatActionTyping::chatActionTyping() { +} + +const std::int32_t chatActionTyping::ID; + +void chatActionTyping::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionTyping"); + s.store_class_end(); + } +} + +chatActionRecordingVideo::chatActionRecordingVideo() { +} + +const std::int32_t chatActionRecordingVideo::ID; + +void chatActionRecordingVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionRecordingVideo"); + s.store_class_end(); + } +} + +chatActionUploadingVideo::chatActionUploadingVideo() + : progress_() +{} + +chatActionUploadingVideo::chatActionUploadingVideo(int32 progress_) + : progress_(progress_) +{} + +const std::int32_t chatActionUploadingVideo::ID; + +void chatActionUploadingVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionUploadingVideo"); + s.store_field("progress", progress_); + s.store_class_end(); + } +} + +chatActionRecordingVoiceNote::chatActionRecordingVoiceNote() { +} + +const std::int32_t chatActionRecordingVoiceNote::ID; + +void chatActionRecordingVoiceNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionRecordingVoiceNote"); + s.store_class_end(); + } +} + +chatActionUploadingVoiceNote::chatActionUploadingVoiceNote() + : progress_() +{} + +chatActionUploadingVoiceNote::chatActionUploadingVoiceNote(int32 progress_) + : progress_(progress_) +{} + +const std::int32_t chatActionUploadingVoiceNote::ID; + +void chatActionUploadingVoiceNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionUploadingVoiceNote"); + s.store_field("progress", progress_); + s.store_class_end(); + } +} + +chatActionUploadingPhoto::chatActionUploadingPhoto() + : progress_() +{} + +chatActionUploadingPhoto::chatActionUploadingPhoto(int32 progress_) + : progress_(progress_) +{} + +const std::int32_t chatActionUploadingPhoto::ID; + +void chatActionUploadingPhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionUploadingPhoto"); + s.store_field("progress", progress_); + s.store_class_end(); + } +} + +chatActionUploadingDocument::chatActionUploadingDocument() + : progress_() +{} + +chatActionUploadingDocument::chatActionUploadingDocument(int32 progress_) + : progress_(progress_) +{} + +const std::int32_t chatActionUploadingDocument::ID; + +void chatActionUploadingDocument::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionUploadingDocument"); + s.store_field("progress", progress_); + s.store_class_end(); + } +} + +chatActionChoosingSticker::chatActionChoosingSticker() { +} + +const std::int32_t chatActionChoosingSticker::ID; + +void chatActionChoosingSticker::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionChoosingSticker"); + s.store_class_end(); + } +} + +chatActionChoosingLocation::chatActionChoosingLocation() { +} + +const std::int32_t chatActionChoosingLocation::ID; + +void chatActionChoosingLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionChoosingLocation"); + s.store_class_end(); + } +} + +chatActionChoosingContact::chatActionChoosingContact() { +} + +const std::int32_t chatActionChoosingContact::ID; + +void chatActionChoosingContact::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionChoosingContact"); + s.store_class_end(); + } +} + +chatActionStartPlayingGame::chatActionStartPlayingGame() { +} + +const std::int32_t chatActionStartPlayingGame::ID; + +void chatActionStartPlayingGame::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionStartPlayingGame"); + s.store_class_end(); + } +} + +chatActionRecordingVideoNote::chatActionRecordingVideoNote() { +} + +const std::int32_t chatActionRecordingVideoNote::ID; + +void chatActionRecordingVideoNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionRecordingVideoNote"); + s.store_class_end(); + } +} + +chatActionUploadingVideoNote::chatActionUploadingVideoNote() + : progress_() +{} + +chatActionUploadingVideoNote::chatActionUploadingVideoNote(int32 progress_) + : progress_(progress_) +{} + +const std::int32_t chatActionUploadingVideoNote::ID; + +void chatActionUploadingVideoNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionUploadingVideoNote"); + s.store_field("progress", progress_); + s.store_class_end(); + } +} + +chatActionWatchingAnimations::chatActionWatchingAnimations() + : emoji_() +{} + +chatActionWatchingAnimations::chatActionWatchingAnimations(string const &emoji_) + : emoji_(emoji_) +{} + +const std::int32_t chatActionWatchingAnimations::ID; + +void chatActionWatchingAnimations::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionWatchingAnimations"); + s.store_field("emoji", emoji_); + s.store_class_end(); + } +} + +chatActionCancel::chatActionCancel() { +} + +const std::int32_t chatActionCancel::ID; + +void chatActionCancel::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionCancel"); + s.store_class_end(); + } +} + +chatActionBarReportSpam::chatActionBarReportSpam() + : can_unarchive_() +{} + +chatActionBarReportSpam::chatActionBarReportSpam(bool can_unarchive_) + : can_unarchive_(can_unarchive_) +{} + +const std::int32_t chatActionBarReportSpam::ID; + +void chatActionBarReportSpam::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarReportSpam"); + s.store_field("can_unarchive", can_unarchive_); + s.store_class_end(); + } +} + +chatActionBarReportUnrelatedLocation::chatActionBarReportUnrelatedLocation() { +} + +const std::int32_t chatActionBarReportUnrelatedLocation::ID; + +void chatActionBarReportUnrelatedLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarReportUnrelatedLocation"); + s.store_class_end(); + } +} + +chatActionBarInviteMembers::chatActionBarInviteMembers() { +} + +const std::int32_t chatActionBarInviteMembers::ID; + +void chatActionBarInviteMembers::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarInviteMembers"); + s.store_class_end(); + } +} + +chatActionBarReportAddBlock::chatActionBarReportAddBlock() + : can_unarchive_() + , distance_() +{} + +chatActionBarReportAddBlock::chatActionBarReportAddBlock(bool can_unarchive_, int32 distance_) + : can_unarchive_(can_unarchive_) + , distance_(distance_) +{} + +const std::int32_t chatActionBarReportAddBlock::ID; + +void chatActionBarReportAddBlock::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarReportAddBlock"); + s.store_field("can_unarchive", can_unarchive_); + s.store_field("distance", distance_); + s.store_class_end(); + } +} + +chatActionBarAddContact::chatActionBarAddContact() { +} + +const std::int32_t chatActionBarAddContact::ID; + +void chatActionBarAddContact::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarAddContact"); + s.store_class_end(); + } +} + +chatActionBarSharePhoneNumber::chatActionBarSharePhoneNumber() { +} + +const std::int32_t chatActionBarSharePhoneNumber::ID; + +void chatActionBarSharePhoneNumber::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarSharePhoneNumber"); + s.store_class_end(); + } +} + +chatActionBarJoinRequest::chatActionBarJoinRequest() + : title_() + , is_channel_() + , request_date_() +{} + +chatActionBarJoinRequest::chatActionBarJoinRequest(string const &title_, bool is_channel_, int32 request_date_) + : title_(title_) + , is_channel_(is_channel_) + , request_date_(request_date_) +{} + +const std::int32_t chatActionBarJoinRequest::ID; + +void chatActionBarJoinRequest::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatActionBarJoinRequest"); + s.store_field("title", title_); + s.store_field("is_channel", is_channel_); + s.store_field("request_date", request_date_); + s.store_class_end(); + } +} + +chatAdministrator::chatAdministrator() + : user_id_() + , custom_title_() + , is_owner_() +{} + +chatAdministrator::chatAdministrator(int53 user_id_, string const &custom_title_, bool is_owner_) + : user_id_(user_id_) + , custom_title_(custom_title_) + , is_owner_(is_owner_) +{} + +const std::int32_t chatAdministrator::ID; + +void chatAdministrator::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatAdministrator"); + s.store_field("user_id", user_id_); + s.store_field("custom_title", custom_title_); + s.store_field("is_owner", is_owner_); + s.store_class_end(); + } +} + +chatAdministratorRights::chatAdministratorRights() + : can_manage_chat_() + , can_change_info_() + , can_post_messages_() + , can_edit_messages_() + , can_delete_messages_() + , can_invite_users_() + , can_restrict_members_() + , can_pin_messages_() + , can_manage_topics_() + , can_promote_members_() + , can_manage_video_chats_() + , is_anonymous_() +{} + +chatAdministratorRights::chatAdministratorRights(bool can_manage_chat_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_manage_topics_, bool can_promote_members_, bool can_manage_video_chats_, bool is_anonymous_) + : can_manage_chat_(can_manage_chat_) + , can_change_info_(can_change_info_) + , can_post_messages_(can_post_messages_) + , can_edit_messages_(can_edit_messages_) + , can_delete_messages_(can_delete_messages_) + , can_invite_users_(can_invite_users_) + , can_restrict_members_(can_restrict_members_) + , can_pin_messages_(can_pin_messages_) + , can_manage_topics_(can_manage_topics_) + , can_promote_members_(can_promote_members_) + , can_manage_video_chats_(can_manage_video_chats_) + , is_anonymous_(is_anonymous_) +{} + +const std::int32_t chatAdministratorRights::ID; + +void chatAdministratorRights::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatAdministratorRights"); + s.store_field("can_manage_chat", can_manage_chat_); + s.store_field("can_change_info", can_change_info_); + s.store_field("can_post_messages", can_post_messages_); + s.store_field("can_edit_messages", can_edit_messages_); + s.store_field("can_delete_messages", can_delete_messages_); + s.store_field("can_invite_users", can_invite_users_); + s.store_field("can_restrict_members", can_restrict_members_); + s.store_field("can_pin_messages", can_pin_messages_); + s.store_field("can_manage_topics", can_manage_topics_); + s.store_field("can_promote_members", can_promote_members_); + s.store_field("can_manage_video_chats", can_manage_video_chats_); + s.store_field("is_anonymous", is_anonymous_); + s.store_class_end(); + } +} + +chatAdministrators::chatAdministrators() + : administrators_() +{} + +chatAdministrators::chatAdministrators(array> &&administrators_) + : administrators_(std::move(administrators_)) +{} + +const std::int32_t chatAdministrators::ID; + +void chatAdministrators::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatAdministrators"); + { s.store_vector_begin("administrators", administrators_.size()); for (const auto &_value : administrators_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatAvailableReactionsAll::chatAvailableReactionsAll() { +} + +const std::int32_t chatAvailableReactionsAll::ID; + +void chatAvailableReactionsAll::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatAvailableReactionsAll"); + s.store_class_end(); + } +} + +chatAvailableReactionsSome::chatAvailableReactionsSome() + : reactions_() +{} + +chatAvailableReactionsSome::chatAvailableReactionsSome(array> &&reactions_) + : reactions_(std::move(reactions_)) +{} + +const std::int32_t chatAvailableReactionsSome::ID; + +void chatAvailableReactionsSome::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatAvailableReactionsSome"); + { s.store_vector_begin("reactions", reactions_.size()); for (const auto &_value : reactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatEvent::chatEvent() + : id_() + , date_() + , member_id_() + , action_() +{} + +chatEvent::chatEvent(int64 id_, int32 date_, object_ptr &&member_id_, object_ptr &&action_) + : id_(id_) + , date_(date_) + , member_id_(std::move(member_id_)) + , action_(std::move(action_)) +{} + +const std::int32_t chatEvent::ID; + +void chatEvent::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEvent"); + s.store_field("id", id_); + s.store_field("date", date_); + s.store_object_field("member_id", static_cast(member_id_.get())); + s.store_object_field("action", static_cast(action_.get())); + s.store_class_end(); + } +} + +chatEventMessageEdited::chatEventMessageEdited() + : old_message_() + , new_message_() +{} + +chatEventMessageEdited::chatEventMessageEdited(object_ptr &&old_message_, object_ptr &&new_message_) + : old_message_(std::move(old_message_)) + , new_message_(std::move(new_message_)) +{} + +const std::int32_t chatEventMessageEdited::ID; + +void chatEventMessageEdited::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMessageEdited"); + s.store_object_field("old_message", static_cast(old_message_.get())); + s.store_object_field("new_message", static_cast(new_message_.get())); + s.store_class_end(); + } +} + +chatEventMessageDeleted::chatEventMessageDeleted() + : message_() +{} + +chatEventMessageDeleted::chatEventMessageDeleted(object_ptr &&message_) + : message_(std::move(message_)) +{} + +const std::int32_t chatEventMessageDeleted::ID; + +void chatEventMessageDeleted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMessageDeleted"); + s.store_object_field("message", static_cast(message_.get())); + s.store_class_end(); + } +} + +chatEventMessagePinned::chatEventMessagePinned() + : message_() +{} + +chatEventMessagePinned::chatEventMessagePinned(object_ptr &&message_) + : message_(std::move(message_)) +{} + +const std::int32_t chatEventMessagePinned::ID; + +void chatEventMessagePinned::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMessagePinned"); + s.store_object_field("message", static_cast(message_.get())); + s.store_class_end(); + } +} + +chatEventMessageUnpinned::chatEventMessageUnpinned() + : message_() +{} + +chatEventMessageUnpinned::chatEventMessageUnpinned(object_ptr &&message_) + : message_(std::move(message_)) +{} + +const std::int32_t chatEventMessageUnpinned::ID; + +void chatEventMessageUnpinned::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMessageUnpinned"); + s.store_object_field("message", static_cast(message_.get())); + s.store_class_end(); + } +} + +chatEventPollStopped::chatEventPollStopped() + : message_() +{} + +chatEventPollStopped::chatEventPollStopped(object_ptr &&message_) + : message_(std::move(message_)) +{} + +const std::int32_t chatEventPollStopped::ID; + +void chatEventPollStopped::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventPollStopped"); + s.store_object_field("message", static_cast(message_.get())); + s.store_class_end(); + } +} + +chatEventMemberJoined::chatEventMemberJoined() { +} + +const std::int32_t chatEventMemberJoined::ID; + +void chatEventMemberJoined::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberJoined"); + s.store_class_end(); + } +} + +chatEventMemberJoinedByInviteLink::chatEventMemberJoinedByInviteLink() + : invite_link_() +{} + +chatEventMemberJoinedByInviteLink::chatEventMemberJoinedByInviteLink(object_ptr &&invite_link_) + : invite_link_(std::move(invite_link_)) +{} + +const std::int32_t chatEventMemberJoinedByInviteLink::ID; + +void chatEventMemberJoinedByInviteLink::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberJoinedByInviteLink"); + s.store_object_field("invite_link", static_cast(invite_link_.get())); + s.store_class_end(); + } +} + +chatEventMemberJoinedByRequest::chatEventMemberJoinedByRequest() + : approver_user_id_() + , invite_link_() +{} + +chatEventMemberJoinedByRequest::chatEventMemberJoinedByRequest(int53 approver_user_id_, object_ptr &&invite_link_) + : approver_user_id_(approver_user_id_) + , invite_link_(std::move(invite_link_)) +{} + +const std::int32_t chatEventMemberJoinedByRequest::ID; + +void chatEventMemberJoinedByRequest::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberJoinedByRequest"); + s.store_field("approver_user_id", approver_user_id_); + s.store_object_field("invite_link", static_cast(invite_link_.get())); + s.store_class_end(); + } +} + +chatEventMemberInvited::chatEventMemberInvited() + : user_id_() + , status_() +{} + +chatEventMemberInvited::chatEventMemberInvited(int53 user_id_, object_ptr &&status_) + : user_id_(user_id_) + , status_(std::move(status_)) +{} + +const std::int32_t chatEventMemberInvited::ID; + +void chatEventMemberInvited::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberInvited"); + s.store_field("user_id", user_id_); + s.store_object_field("status", static_cast(status_.get())); + s.store_class_end(); + } +} + +chatEventMemberLeft::chatEventMemberLeft() { +} + +const std::int32_t chatEventMemberLeft::ID; + +void chatEventMemberLeft::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberLeft"); + s.store_class_end(); + } +} + +chatEventMemberPromoted::chatEventMemberPromoted() + : user_id_() + , old_status_() + , new_status_() +{} + +chatEventMemberPromoted::chatEventMemberPromoted(int53 user_id_, object_ptr &&old_status_, object_ptr &&new_status_) + : user_id_(user_id_) + , old_status_(std::move(old_status_)) + , new_status_(std::move(new_status_)) +{} + +const std::int32_t chatEventMemberPromoted::ID; + +void chatEventMemberPromoted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberPromoted"); + s.store_field("user_id", user_id_); + s.store_object_field("old_status", static_cast(old_status_.get())); + s.store_object_field("new_status", static_cast(new_status_.get())); + s.store_class_end(); + } +} + +chatEventMemberRestricted::chatEventMemberRestricted() + : member_id_() + , old_status_() + , new_status_() +{} + +chatEventMemberRestricted::chatEventMemberRestricted(object_ptr &&member_id_, object_ptr &&old_status_, object_ptr &&new_status_) + : member_id_(std::move(member_id_)) + , old_status_(std::move(old_status_)) + , new_status_(std::move(new_status_)) +{} + +const std::int32_t chatEventMemberRestricted::ID; + +void chatEventMemberRestricted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMemberRestricted"); + s.store_object_field("member_id", static_cast(member_id_.get())); + s.store_object_field("old_status", static_cast(old_status_.get())); + s.store_object_field("new_status", static_cast(new_status_.get())); + s.store_class_end(); + } +} + +chatEventAvailableReactionsChanged::chatEventAvailableReactionsChanged() + : old_available_reactions_() + , new_available_reactions_() +{} + +chatEventAvailableReactionsChanged::chatEventAvailableReactionsChanged(object_ptr &&old_available_reactions_, object_ptr &&new_available_reactions_) + : old_available_reactions_(std::move(old_available_reactions_)) + , new_available_reactions_(std::move(new_available_reactions_)) +{} + +const std::int32_t chatEventAvailableReactionsChanged::ID; + +void chatEventAvailableReactionsChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventAvailableReactionsChanged"); + s.store_object_field("old_available_reactions", static_cast(old_available_reactions_.get())); + s.store_object_field("new_available_reactions", static_cast(new_available_reactions_.get())); + s.store_class_end(); + } +} + +chatEventDescriptionChanged::chatEventDescriptionChanged() + : old_description_() + , new_description_() +{} + +chatEventDescriptionChanged::chatEventDescriptionChanged(string const &old_description_, string const &new_description_) + : old_description_(old_description_) + , new_description_(new_description_) +{} + +const std::int32_t chatEventDescriptionChanged::ID; + +void chatEventDescriptionChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventDescriptionChanged"); + s.store_field("old_description", old_description_); + s.store_field("new_description", new_description_); + s.store_class_end(); + } +} + +chatEventLinkedChatChanged::chatEventLinkedChatChanged() + : old_linked_chat_id_() + , new_linked_chat_id_() +{} + +chatEventLinkedChatChanged::chatEventLinkedChatChanged(int53 old_linked_chat_id_, int53 new_linked_chat_id_) + : old_linked_chat_id_(old_linked_chat_id_) + , new_linked_chat_id_(new_linked_chat_id_) +{} + +const std::int32_t chatEventLinkedChatChanged::ID; + +void chatEventLinkedChatChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventLinkedChatChanged"); + s.store_field("old_linked_chat_id", old_linked_chat_id_); + s.store_field("new_linked_chat_id", new_linked_chat_id_); + s.store_class_end(); + } +} + +chatEventLocationChanged::chatEventLocationChanged() + : old_location_() + , new_location_() +{} + +chatEventLocationChanged::chatEventLocationChanged(object_ptr &&old_location_, object_ptr &&new_location_) + : old_location_(std::move(old_location_)) + , new_location_(std::move(new_location_)) +{} + +const std::int32_t chatEventLocationChanged::ID; + +void chatEventLocationChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventLocationChanged"); + s.store_object_field("old_location", static_cast(old_location_.get())); + s.store_object_field("new_location", static_cast(new_location_.get())); + s.store_class_end(); + } +} + +chatEventMessageTtlChanged::chatEventMessageTtlChanged() + : old_message_ttl_() + , new_message_ttl_() +{} + +chatEventMessageTtlChanged::chatEventMessageTtlChanged(int32 old_message_ttl_, int32 new_message_ttl_) + : old_message_ttl_(old_message_ttl_) + , new_message_ttl_(new_message_ttl_) +{} + +const std::int32_t chatEventMessageTtlChanged::ID; + +void chatEventMessageTtlChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventMessageTtlChanged"); + s.store_field("old_message_ttl", old_message_ttl_); + s.store_field("new_message_ttl", new_message_ttl_); + s.store_class_end(); + } +} + +chatEventPermissionsChanged::chatEventPermissionsChanged() + : old_permissions_() + , new_permissions_() +{} + +chatEventPermissionsChanged::chatEventPermissionsChanged(object_ptr &&old_permissions_, object_ptr &&new_permissions_) + : old_permissions_(std::move(old_permissions_)) + , new_permissions_(std::move(new_permissions_)) +{} + +const std::int32_t chatEventPermissionsChanged::ID; + +void chatEventPermissionsChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventPermissionsChanged"); + s.store_object_field("old_permissions", static_cast(old_permissions_.get())); + s.store_object_field("new_permissions", static_cast(new_permissions_.get())); + s.store_class_end(); + } +} + +chatEventPhotoChanged::chatEventPhotoChanged() + : old_photo_() + , new_photo_() +{} + +chatEventPhotoChanged::chatEventPhotoChanged(object_ptr &&old_photo_, object_ptr &&new_photo_) + : old_photo_(std::move(old_photo_)) + , new_photo_(std::move(new_photo_)) +{} + +const std::int32_t chatEventPhotoChanged::ID; + +void chatEventPhotoChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventPhotoChanged"); + s.store_object_field("old_photo", static_cast(old_photo_.get())); + s.store_object_field("new_photo", static_cast(new_photo_.get())); + s.store_class_end(); + } +} + +chatEventSlowModeDelayChanged::chatEventSlowModeDelayChanged() + : old_slow_mode_delay_() + , new_slow_mode_delay_() +{} + +chatEventSlowModeDelayChanged::chatEventSlowModeDelayChanged(int32 old_slow_mode_delay_, int32 new_slow_mode_delay_) + : old_slow_mode_delay_(old_slow_mode_delay_) + , new_slow_mode_delay_(new_slow_mode_delay_) +{} + +const std::int32_t chatEventSlowModeDelayChanged::ID; + +void chatEventSlowModeDelayChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventSlowModeDelayChanged"); + s.store_field("old_slow_mode_delay", old_slow_mode_delay_); + s.store_field("new_slow_mode_delay", new_slow_mode_delay_); + s.store_class_end(); + } +} + +chatEventStickerSetChanged::chatEventStickerSetChanged() + : old_sticker_set_id_() + , new_sticker_set_id_() +{} + +chatEventStickerSetChanged::chatEventStickerSetChanged(int64 old_sticker_set_id_, int64 new_sticker_set_id_) + : old_sticker_set_id_(old_sticker_set_id_) + , new_sticker_set_id_(new_sticker_set_id_) +{} + +const std::int32_t chatEventStickerSetChanged::ID; + +void chatEventStickerSetChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventStickerSetChanged"); + s.store_field("old_sticker_set_id", old_sticker_set_id_); + s.store_field("new_sticker_set_id", new_sticker_set_id_); + s.store_class_end(); + } +} + +chatEventTitleChanged::chatEventTitleChanged() + : old_title_() + , new_title_() +{} + +chatEventTitleChanged::chatEventTitleChanged(string const &old_title_, string const &new_title_) + : old_title_(old_title_) + , new_title_(new_title_) +{} + +const std::int32_t chatEventTitleChanged::ID; + +void chatEventTitleChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventTitleChanged"); + s.store_field("old_title", old_title_); + s.store_field("new_title", new_title_); + s.store_class_end(); + } +} + +chatEventUsernameChanged::chatEventUsernameChanged() + : old_username_() + , new_username_() +{} + +chatEventUsernameChanged::chatEventUsernameChanged(string const &old_username_, string const &new_username_) + : old_username_(old_username_) + , new_username_(new_username_) +{} + +const std::int32_t chatEventUsernameChanged::ID; + +void chatEventUsernameChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventUsernameChanged"); + s.store_field("old_username", old_username_); + s.store_field("new_username", new_username_); + s.store_class_end(); + } +} + +chatEventActiveUsernamesChanged::chatEventActiveUsernamesChanged() + : old_usernames_() + , new_usernames_() +{} + +chatEventActiveUsernamesChanged::chatEventActiveUsernamesChanged(array &&old_usernames_, array &&new_usernames_) + : old_usernames_(std::move(old_usernames_)) + , new_usernames_(std::move(new_usernames_)) +{} + +const std::int32_t chatEventActiveUsernamesChanged::ID; + +void chatEventActiveUsernamesChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventActiveUsernamesChanged"); + { s.store_vector_begin("old_usernames", old_usernames_.size()); for (const auto &_value : old_usernames_) { s.store_field("", _value); } s.store_class_end(); } + { s.store_vector_begin("new_usernames", new_usernames_.size()); for (const auto &_value : new_usernames_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatEventHasProtectedContentToggled::chatEventHasProtectedContentToggled() + : has_protected_content_() +{} + +chatEventHasProtectedContentToggled::chatEventHasProtectedContentToggled(bool has_protected_content_) + : has_protected_content_(has_protected_content_) +{} + +const std::int32_t chatEventHasProtectedContentToggled::ID; + +void chatEventHasProtectedContentToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventHasProtectedContentToggled"); + s.store_field("has_protected_content", has_protected_content_); + s.store_class_end(); + } +} + +chatEventInvitesToggled::chatEventInvitesToggled() + : can_invite_users_() +{} + +chatEventInvitesToggled::chatEventInvitesToggled(bool can_invite_users_) + : can_invite_users_(can_invite_users_) +{} + +const std::int32_t chatEventInvitesToggled::ID; + +void chatEventInvitesToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventInvitesToggled"); + s.store_field("can_invite_users", can_invite_users_); + s.store_class_end(); + } +} + +chatEventIsAllHistoryAvailableToggled::chatEventIsAllHistoryAvailableToggled() + : is_all_history_available_() +{} + +chatEventIsAllHistoryAvailableToggled::chatEventIsAllHistoryAvailableToggled(bool is_all_history_available_) + : is_all_history_available_(is_all_history_available_) +{} + +const std::int32_t chatEventIsAllHistoryAvailableToggled::ID; + +void chatEventIsAllHistoryAvailableToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventIsAllHistoryAvailableToggled"); + s.store_field("is_all_history_available", is_all_history_available_); + s.store_class_end(); + } +} + +chatEventSignMessagesToggled::chatEventSignMessagesToggled() + : sign_messages_() +{} + +chatEventSignMessagesToggled::chatEventSignMessagesToggled(bool sign_messages_) + : sign_messages_(sign_messages_) +{} + +const std::int32_t chatEventSignMessagesToggled::ID; + +void chatEventSignMessagesToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventSignMessagesToggled"); + s.store_field("sign_messages", sign_messages_); + s.store_class_end(); + } +} + +chatEventInviteLinkEdited::chatEventInviteLinkEdited() + : old_invite_link_() + , new_invite_link_() +{} + +chatEventInviteLinkEdited::chatEventInviteLinkEdited(object_ptr &&old_invite_link_, object_ptr &&new_invite_link_) + : old_invite_link_(std::move(old_invite_link_)) + , new_invite_link_(std::move(new_invite_link_)) +{} + +const std::int32_t chatEventInviteLinkEdited::ID; + +void chatEventInviteLinkEdited::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventInviteLinkEdited"); + s.store_object_field("old_invite_link", static_cast(old_invite_link_.get())); + s.store_object_field("new_invite_link", static_cast(new_invite_link_.get())); + s.store_class_end(); + } +} + +chatEventInviteLinkRevoked::chatEventInviteLinkRevoked() + : invite_link_() +{} + +chatEventInviteLinkRevoked::chatEventInviteLinkRevoked(object_ptr &&invite_link_) + : invite_link_(std::move(invite_link_)) +{} + +const std::int32_t chatEventInviteLinkRevoked::ID; + +void chatEventInviteLinkRevoked::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventInviteLinkRevoked"); + s.store_object_field("invite_link", static_cast(invite_link_.get())); + s.store_class_end(); + } +} + +chatEventInviteLinkDeleted::chatEventInviteLinkDeleted() + : invite_link_() +{} + +chatEventInviteLinkDeleted::chatEventInviteLinkDeleted(object_ptr &&invite_link_) + : invite_link_(std::move(invite_link_)) +{} + +const std::int32_t chatEventInviteLinkDeleted::ID; + +void chatEventInviteLinkDeleted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventInviteLinkDeleted"); + s.store_object_field("invite_link", static_cast(invite_link_.get())); + s.store_class_end(); + } +} + +chatEventVideoChatCreated::chatEventVideoChatCreated() + : group_call_id_() +{} + +chatEventVideoChatCreated::chatEventVideoChatCreated(int32 group_call_id_) + : group_call_id_(group_call_id_) +{} + +const std::int32_t chatEventVideoChatCreated::ID; + +void chatEventVideoChatCreated::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventVideoChatCreated"); + s.store_field("group_call_id", group_call_id_); + s.store_class_end(); + } +} + +chatEventVideoChatEnded::chatEventVideoChatEnded() + : group_call_id_() +{} + +chatEventVideoChatEnded::chatEventVideoChatEnded(int32 group_call_id_) + : group_call_id_(group_call_id_) +{} + +const std::int32_t chatEventVideoChatEnded::ID; + +void chatEventVideoChatEnded::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventVideoChatEnded"); + s.store_field("group_call_id", group_call_id_); + s.store_class_end(); + } +} + +chatEventVideoChatMuteNewParticipantsToggled::chatEventVideoChatMuteNewParticipantsToggled() + : mute_new_participants_() +{} + +chatEventVideoChatMuteNewParticipantsToggled::chatEventVideoChatMuteNewParticipantsToggled(bool mute_new_participants_) + : mute_new_participants_(mute_new_participants_) +{} + +const std::int32_t chatEventVideoChatMuteNewParticipantsToggled::ID; + +void chatEventVideoChatMuteNewParticipantsToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventVideoChatMuteNewParticipantsToggled"); + s.store_field("mute_new_participants", mute_new_participants_); + s.store_class_end(); + } +} + +chatEventVideoChatParticipantIsMutedToggled::chatEventVideoChatParticipantIsMutedToggled() + : participant_id_() + , is_muted_() +{} + +chatEventVideoChatParticipantIsMutedToggled::chatEventVideoChatParticipantIsMutedToggled(object_ptr &&participant_id_, bool is_muted_) + : participant_id_(std::move(participant_id_)) + , is_muted_(is_muted_) +{} + +const std::int32_t chatEventVideoChatParticipantIsMutedToggled::ID; + +void chatEventVideoChatParticipantIsMutedToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventVideoChatParticipantIsMutedToggled"); + s.store_object_field("participant_id", static_cast(participant_id_.get())); + s.store_field("is_muted", is_muted_); + s.store_class_end(); + } +} + +chatEventVideoChatParticipantVolumeLevelChanged::chatEventVideoChatParticipantVolumeLevelChanged() + : participant_id_() + , volume_level_() +{} + +chatEventVideoChatParticipantVolumeLevelChanged::chatEventVideoChatParticipantVolumeLevelChanged(object_ptr &&participant_id_, int32 volume_level_) + : participant_id_(std::move(participant_id_)) + , volume_level_(volume_level_) +{} + +const std::int32_t chatEventVideoChatParticipantVolumeLevelChanged::ID; + +void chatEventVideoChatParticipantVolumeLevelChanged::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventVideoChatParticipantVolumeLevelChanged"); + s.store_object_field("participant_id", static_cast(participant_id_.get())); + s.store_field("volume_level", volume_level_); + s.store_class_end(); + } +} + +chatEventIsForumToggled::chatEventIsForumToggled() + : is_forum_() +{} + +chatEventIsForumToggled::chatEventIsForumToggled(bool is_forum_) + : is_forum_(is_forum_) +{} + +const std::int32_t chatEventIsForumToggled::ID; + +void chatEventIsForumToggled::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventIsForumToggled"); + s.store_field("is_forum", is_forum_); + s.store_class_end(); + } +} + +chatEventForumTopicCreated::chatEventForumTopicCreated() + : topic_info_() +{} + +chatEventForumTopicCreated::chatEventForumTopicCreated(object_ptr &&topic_info_) + : topic_info_(std::move(topic_info_)) +{} + +const std::int32_t chatEventForumTopicCreated::ID; + +void chatEventForumTopicCreated::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventForumTopicCreated"); + s.store_object_field("topic_info", static_cast(topic_info_.get())); + s.store_class_end(); + } +} + +chatEventForumTopicEdited::chatEventForumTopicEdited() + : old_topic_info_() + , new_topic_info_() +{} + +chatEventForumTopicEdited::chatEventForumTopicEdited(object_ptr &&old_topic_info_, object_ptr &&new_topic_info_) + : old_topic_info_(std::move(old_topic_info_)) + , new_topic_info_(std::move(new_topic_info_)) +{} + +const std::int32_t chatEventForumTopicEdited::ID; + +void chatEventForumTopicEdited::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventForumTopicEdited"); + s.store_object_field("old_topic_info", static_cast(old_topic_info_.get())); + s.store_object_field("new_topic_info", static_cast(new_topic_info_.get())); + s.store_class_end(); + } +} + +chatEventForumTopicToggleIsClosed::chatEventForumTopicToggleIsClosed() + : topic_info_() +{} + +chatEventForumTopicToggleIsClosed::chatEventForumTopicToggleIsClosed(object_ptr &&topic_info_) + : topic_info_(std::move(topic_info_)) +{} + +const std::int32_t chatEventForumTopicToggleIsClosed::ID; + +void chatEventForumTopicToggleIsClosed::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventForumTopicToggleIsClosed"); + s.store_object_field("topic_info", static_cast(topic_info_.get())); + s.store_class_end(); + } +} + +chatEventForumTopicDeleted::chatEventForumTopicDeleted() + : topic_info_() +{} + +chatEventForumTopicDeleted::chatEventForumTopicDeleted(object_ptr &&topic_info_) + : topic_info_(std::move(topic_info_)) +{} + +const std::int32_t chatEventForumTopicDeleted::ID; + +void chatEventForumTopicDeleted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventForumTopicDeleted"); + s.store_object_field("topic_info", static_cast(topic_info_.get())); + s.store_class_end(); + } +} + +chatEventForumTopicPinned::chatEventForumTopicPinned() + : old_topic_info_() + , new_topic_info_() +{} + +chatEventForumTopicPinned::chatEventForumTopicPinned(object_ptr &&old_topic_info_, object_ptr &&new_topic_info_) + : old_topic_info_(std::move(old_topic_info_)) + , new_topic_info_(std::move(new_topic_info_)) +{} + +const std::int32_t chatEventForumTopicPinned::ID; + +void chatEventForumTopicPinned::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventForumTopicPinned"); + s.store_object_field("old_topic_info", static_cast(old_topic_info_.get())); + s.store_object_field("new_topic_info", static_cast(new_topic_info_.get())); + s.store_class_end(); + } +} + +chatEventLogFilters::chatEventLogFilters() + : message_edits_() + , message_deletions_() + , message_pins_() + , member_joins_() + , member_leaves_() + , member_invites_() + , member_promotions_() + , member_restrictions_() + , info_changes_() + , setting_changes_() + , invite_link_changes_() + , video_chat_changes_() + , forum_changes_() +{} + +chatEventLogFilters::chatEventLogFilters(bool message_edits_, bool message_deletions_, bool message_pins_, bool member_joins_, bool member_leaves_, bool member_invites_, bool member_promotions_, bool member_restrictions_, bool info_changes_, bool setting_changes_, bool invite_link_changes_, bool video_chat_changes_, bool forum_changes_) + : message_edits_(message_edits_) + , message_deletions_(message_deletions_) + , message_pins_(message_pins_) + , member_joins_(member_joins_) + , member_leaves_(member_leaves_) + , member_invites_(member_invites_) + , member_promotions_(member_promotions_) + , member_restrictions_(member_restrictions_) + , info_changes_(info_changes_) + , setting_changes_(setting_changes_) + , invite_link_changes_(invite_link_changes_) + , video_chat_changes_(video_chat_changes_) + , forum_changes_(forum_changes_) +{} + +const std::int32_t chatEventLogFilters::ID; + +void chatEventLogFilters::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEventLogFilters"); + s.store_field("message_edits", message_edits_); + s.store_field("message_deletions", message_deletions_); + s.store_field("message_pins", message_pins_); + s.store_field("member_joins", member_joins_); + s.store_field("member_leaves", member_leaves_); + s.store_field("member_invites", member_invites_); + s.store_field("member_promotions", member_promotions_); + s.store_field("member_restrictions", member_restrictions_); + s.store_field("info_changes", info_changes_); + s.store_field("setting_changes", setting_changes_); + s.store_field("invite_link_changes", invite_link_changes_); + s.store_field("video_chat_changes", video_chat_changes_); + s.store_field("forum_changes", forum_changes_); + s.store_class_end(); + } +} + +chatEvents::chatEvents() + : events_() +{} + +chatEvents::chatEvents(array> &&events_) + : events_(std::move(events_)) +{} + +const std::int32_t chatEvents::ID; + +void chatEvents::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatEvents"); + { s.store_vector_begin("events", events_.size()); for (const auto &_value : events_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatFilter::chatFilter() + : title_() + , icon_name_() + , pinned_chat_ids_() + , included_chat_ids_() + , excluded_chat_ids_() + , exclude_muted_() + , exclude_read_() + , exclude_archived_() + , include_contacts_() + , include_non_contacts_() + , include_bots_() + , include_groups_() + , include_channels_() +{} + +chatFilter::chatFilter(string const &title_, string const &icon_name_, array &&pinned_chat_ids_, array &&included_chat_ids_, array &&excluded_chat_ids_, bool exclude_muted_, bool exclude_read_, bool exclude_archived_, bool include_contacts_, bool include_non_contacts_, bool include_bots_, bool include_groups_, bool include_channels_) + : title_(title_) + , icon_name_(icon_name_) + , pinned_chat_ids_(std::move(pinned_chat_ids_)) + , included_chat_ids_(std::move(included_chat_ids_)) + , excluded_chat_ids_(std::move(excluded_chat_ids_)) + , exclude_muted_(exclude_muted_) + , exclude_read_(exclude_read_) + , exclude_archived_(exclude_archived_) + , include_contacts_(include_contacts_) + , include_non_contacts_(include_non_contacts_) + , include_bots_(include_bots_) + , include_groups_(include_groups_) + , include_channels_(include_channels_) +{} + +const std::int32_t chatFilter::ID; + +void chatFilter::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatFilter"); + s.store_field("title", title_); + s.store_field("icon_name", icon_name_); + { s.store_vector_begin("pinned_chat_ids", pinned_chat_ids_.size()); for (const auto &_value : pinned_chat_ids_) { s.store_field("", _value); } s.store_class_end(); } + { s.store_vector_begin("included_chat_ids", included_chat_ids_.size()); for (const auto &_value : included_chat_ids_) { s.store_field("", _value); } s.store_class_end(); } + { s.store_vector_begin("excluded_chat_ids", excluded_chat_ids_.size()); for (const auto &_value : excluded_chat_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_field("exclude_muted", exclude_muted_); + s.store_field("exclude_read", exclude_read_); + s.store_field("exclude_archived", exclude_archived_); + s.store_field("include_contacts", include_contacts_); + s.store_field("include_non_contacts", include_non_contacts_); + s.store_field("include_bots", include_bots_); + s.store_field("include_groups", include_groups_); + s.store_field("include_channels", include_channels_); + s.store_class_end(); + } +} + +chatFilterInfo::chatFilterInfo() + : id_() + , title_() + , icon_name_() +{} + +chatFilterInfo::chatFilterInfo(int32 id_, string const &title_, string const &icon_name_) + : id_(id_) + , title_(title_) + , icon_name_(icon_name_) +{} + +const std::int32_t chatFilterInfo::ID; + +void chatFilterInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatFilterInfo"); + s.store_field("id", id_); + s.store_field("title", title_); + s.store_field("icon_name", icon_name_); + s.store_class_end(); + } +} + +chatInviteLink::chatInviteLink() + : invite_link_() + , name_() + , creator_user_id_() + , date_() + , edit_date_() + , expiration_date_() + , member_limit_() + , member_count_() + , pending_join_request_count_() + , creates_join_request_() + , is_primary_() + , is_revoked_() +{} + +chatInviteLink::chatInviteLink(string const &invite_link_, string const &name_, int53 creator_user_id_, int32 date_, int32 edit_date_, int32 expiration_date_, int32 member_limit_, int32 member_count_, int32 pending_join_request_count_, bool creates_join_request_, bool is_primary_, bool is_revoked_) + : invite_link_(invite_link_) + , name_(name_) + , creator_user_id_(creator_user_id_) + , date_(date_) + , edit_date_(edit_date_) + , expiration_date_(expiration_date_) + , member_limit_(member_limit_) + , member_count_(member_count_) + , pending_join_request_count_(pending_join_request_count_) + , creates_join_request_(creates_join_request_) + , is_primary_(is_primary_) + , is_revoked_(is_revoked_) +{} + +const std::int32_t chatInviteLink::ID; + +void chatInviteLink::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLink"); + s.store_field("invite_link", invite_link_); + s.store_field("name", name_); + s.store_field("creator_user_id", creator_user_id_); + s.store_field("date", date_); + s.store_field("edit_date", edit_date_); + s.store_field("expiration_date", expiration_date_); + s.store_field("member_limit", member_limit_); + s.store_field("member_count", member_count_); + s.store_field("pending_join_request_count", pending_join_request_count_); + s.store_field("creates_join_request", creates_join_request_); + s.store_field("is_primary", is_primary_); + s.store_field("is_revoked", is_revoked_); + s.store_class_end(); + } +} + +chatInviteLinkCount::chatInviteLinkCount() + : user_id_() + , invite_link_count_() + , revoked_invite_link_count_() +{} + +chatInviteLinkCount::chatInviteLinkCount(int53 user_id_, int32 invite_link_count_, int32 revoked_invite_link_count_) + : user_id_(user_id_) + , invite_link_count_(invite_link_count_) + , revoked_invite_link_count_(revoked_invite_link_count_) +{} + +const std::int32_t chatInviteLinkCount::ID; + +void chatInviteLinkCount::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinkCount"); + s.store_field("user_id", user_id_); + s.store_field("invite_link_count", invite_link_count_); + s.store_field("revoked_invite_link_count", revoked_invite_link_count_); + s.store_class_end(); + } +} + +chatInviteLinkCounts::chatInviteLinkCounts() + : invite_link_counts_() +{} + +chatInviteLinkCounts::chatInviteLinkCounts(array> &&invite_link_counts_) + : invite_link_counts_(std::move(invite_link_counts_)) +{} + +const std::int32_t chatInviteLinkCounts::ID; + +void chatInviteLinkCounts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinkCounts"); + { s.store_vector_begin("invite_link_counts", invite_link_counts_.size()); for (const auto &_value : invite_link_counts_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatInviteLinkInfo::chatInviteLinkInfo() + : chat_id_() + , accessible_for_() + , type_() + , title_() + , photo_() + , description_() + , member_count_() + , member_user_ids_() + , creates_join_request_() + , is_public_() +{} + +chatInviteLinkInfo::chatInviteLinkInfo(int53 chat_id_, int32 accessible_for_, object_ptr &&type_, string const &title_, object_ptr &&photo_, string const &description_, int32 member_count_, array &&member_user_ids_, bool creates_join_request_, bool is_public_) + : chat_id_(chat_id_) + , accessible_for_(accessible_for_) + , type_(std::move(type_)) + , title_(title_) + , photo_(std::move(photo_)) + , description_(description_) + , member_count_(member_count_) + , member_user_ids_(std::move(member_user_ids_)) + , creates_join_request_(creates_join_request_) + , is_public_(is_public_) +{} + +const std::int32_t chatInviteLinkInfo::ID; + +void chatInviteLinkInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinkInfo"); + s.store_field("chat_id", chat_id_); + s.store_field("accessible_for", accessible_for_); + s.store_object_field("type", static_cast(type_.get())); + s.store_field("title", title_); + s.store_object_field("photo", static_cast(photo_.get())); + s.store_field("description", description_); + s.store_field("member_count", member_count_); + { s.store_vector_begin("member_user_ids", member_user_ids_.size()); for (const auto &_value : member_user_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_field("creates_join_request", creates_join_request_); + s.store_field("is_public", is_public_); + s.store_class_end(); + } +} + +chatInviteLinkMember::chatInviteLinkMember() + : user_id_() + , joined_chat_date_() + , approver_user_id_() +{} + +chatInviteLinkMember::chatInviteLinkMember(int53 user_id_, int32 joined_chat_date_, int53 approver_user_id_) + : user_id_(user_id_) + , joined_chat_date_(joined_chat_date_) + , approver_user_id_(approver_user_id_) +{} + +const std::int32_t chatInviteLinkMember::ID; + +void chatInviteLinkMember::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinkMember"); + s.store_field("user_id", user_id_); + s.store_field("joined_chat_date", joined_chat_date_); + s.store_field("approver_user_id", approver_user_id_); + s.store_class_end(); + } +} + +chatInviteLinkMembers::chatInviteLinkMembers() + : total_count_() + , members_() +{} + +chatInviteLinkMembers::chatInviteLinkMembers(int32 total_count_, array> &&members_) + : total_count_(total_count_) + , members_(std::move(members_)) +{} + +const std::int32_t chatInviteLinkMembers::ID; + +void chatInviteLinkMembers::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinkMembers"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("members", members_.size()); for (const auto &_value : members_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatInviteLinks::chatInviteLinks() + : total_count_() + , invite_links_() +{} + +chatInviteLinks::chatInviteLinks(int32 total_count_, array> &&invite_links_) + : total_count_(total_count_) + , invite_links_(std::move(invite_links_)) +{} + +const std::int32_t chatInviteLinks::ID; + +void chatInviteLinks::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatInviteLinks"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("invite_links", invite_links_.size()); for (const auto &_value : invite_links_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatJoinRequest::chatJoinRequest() + : user_id_() + , date_() + , bio_() +{} + +chatJoinRequest::chatJoinRequest(int53 user_id_, int32 date_, string const &bio_) + : user_id_(user_id_) + , date_(date_) + , bio_(bio_) +{} + +const std::int32_t chatJoinRequest::ID; + +void chatJoinRequest::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatJoinRequest"); + s.store_field("user_id", user_id_); + s.store_field("date", date_); + s.store_field("bio", bio_); + s.store_class_end(); + } +} + +chatJoinRequests::chatJoinRequests() + : total_count_() + , requests_() +{} + +chatJoinRequests::chatJoinRequests(int32 total_count_, array> &&requests_) + : total_count_(total_count_) + , requests_(std::move(requests_)) +{} + +const std::int32_t chatJoinRequests::ID; + +void chatJoinRequests::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatJoinRequests"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("requests", requests_.size()); for (const auto &_value : requests_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatJoinRequestsInfo::chatJoinRequestsInfo() + : total_count_() + , user_ids_() +{} + +chatJoinRequestsInfo::chatJoinRequestsInfo(int32 total_count_, array &&user_ids_) + : total_count_(total_count_) + , user_ids_(std::move(user_ids_)) +{} + +const std::int32_t chatJoinRequestsInfo::ID; + +void chatJoinRequestsInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatJoinRequestsInfo"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("user_ids", user_ids_.size()); for (const auto &_value : user_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatListMain::chatListMain() { +} + +const std::int32_t chatListMain::ID; + +void chatListMain::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatListMain"); + s.store_class_end(); + } +} + +chatListArchive::chatListArchive() { +} + +const std::int32_t chatListArchive::ID; + +void chatListArchive::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatListArchive"); + s.store_class_end(); + } +} + +chatListFilter::chatListFilter() + : chat_filter_id_() +{} + +chatListFilter::chatListFilter(int32 chat_filter_id_) + : chat_filter_id_(chat_filter_id_) +{} + +const std::int32_t chatListFilter::ID; + +void chatListFilter::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatListFilter"); + s.store_field("chat_filter_id", chat_filter_id_); + s.store_class_end(); + } +} + +chatLists::chatLists() + : chat_lists_() +{} + +chatLists::chatLists(array> &&chat_lists_) + : chat_lists_(std::move(chat_lists_)) +{} + +const std::int32_t chatLists::ID; + +void chatLists::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatLists"); + { s.store_vector_begin("chat_lists", chat_lists_.size()); for (const auto &_value : chat_lists_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatLocation::chatLocation() + : location_() + , address_() +{} + +chatLocation::chatLocation(object_ptr &&location_, string const &address_) + : location_(std::move(location_)) + , address_(address_) +{} + +const std::int32_t chatLocation::ID; + +void chatLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatLocation"); + s.store_object_field("location", static_cast(location_.get())); + s.store_field("address", address_); + s.store_class_end(); + } +} + +chatMember::chatMember() + : member_id_() + , inviter_user_id_() + , joined_chat_date_() + , status_() +{} + +chatMember::chatMember(object_ptr &&member_id_, int53 inviter_user_id_, int32 joined_chat_date_, object_ptr &&status_) + : member_id_(std::move(member_id_)) + , inviter_user_id_(inviter_user_id_) + , joined_chat_date_(joined_chat_date_) + , status_(std::move(status_)) +{} + +const std::int32_t chatMember::ID; + +void chatMember::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMember"); + s.store_object_field("member_id", static_cast(member_id_.get())); + s.store_field("inviter_user_id", inviter_user_id_); + s.store_field("joined_chat_date", joined_chat_date_); + s.store_object_field("status", static_cast(status_.get())); + s.store_class_end(); + } +} + +chatMemberStatusCreator::chatMemberStatusCreator() + : custom_title_() + , is_anonymous_() + , is_member_() +{} + +chatMemberStatusCreator::chatMemberStatusCreator(string const &custom_title_, bool is_anonymous_, bool is_member_) + : custom_title_(custom_title_) + , is_anonymous_(is_anonymous_) + , is_member_(is_member_) +{} + +const std::int32_t chatMemberStatusCreator::ID; + +void chatMemberStatusCreator::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusCreator"); + s.store_field("custom_title", custom_title_); + s.store_field("is_anonymous", is_anonymous_); + s.store_field("is_member", is_member_); + s.store_class_end(); + } +} + +chatMemberStatusAdministrator::chatMemberStatusAdministrator() + : custom_title_() + , can_be_edited_() + , rights_() +{} + +chatMemberStatusAdministrator::chatMemberStatusAdministrator(string const &custom_title_, bool can_be_edited_, object_ptr &&rights_) + : custom_title_(custom_title_) + , can_be_edited_(can_be_edited_) + , rights_(std::move(rights_)) +{} + +const std::int32_t chatMemberStatusAdministrator::ID; + +void chatMemberStatusAdministrator::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusAdministrator"); + s.store_field("custom_title", custom_title_); + s.store_field("can_be_edited", can_be_edited_); + s.store_object_field("rights", static_cast(rights_.get())); + s.store_class_end(); + } +} + +chatMemberStatusMember::chatMemberStatusMember() { +} + +const std::int32_t chatMemberStatusMember::ID; + +void chatMemberStatusMember::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusMember"); + s.store_class_end(); + } +} + +chatMemberStatusRestricted::chatMemberStatusRestricted() + : is_member_() + , restricted_until_date_() + , permissions_() +{} + +chatMemberStatusRestricted::chatMemberStatusRestricted(bool is_member_, int32 restricted_until_date_, object_ptr &&permissions_) + : is_member_(is_member_) + , restricted_until_date_(restricted_until_date_) + , permissions_(std::move(permissions_)) +{} + +const std::int32_t chatMemberStatusRestricted::ID; + +void chatMemberStatusRestricted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusRestricted"); + s.store_field("is_member", is_member_); + s.store_field("restricted_until_date", restricted_until_date_); + s.store_object_field("permissions", static_cast(permissions_.get())); + s.store_class_end(); + } +} + +chatMemberStatusLeft::chatMemberStatusLeft() { +} + +const std::int32_t chatMemberStatusLeft::ID; + +void chatMemberStatusLeft::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusLeft"); + s.store_class_end(); + } +} + +chatMemberStatusBanned::chatMemberStatusBanned() + : banned_until_date_() +{} + +chatMemberStatusBanned::chatMemberStatusBanned(int32 banned_until_date_) + : banned_until_date_(banned_until_date_) +{} + +const std::int32_t chatMemberStatusBanned::ID; + +void chatMemberStatusBanned::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMemberStatusBanned"); + s.store_field("banned_until_date", banned_until_date_); + s.store_class_end(); + } +} + +chatMembers::chatMembers() + : total_count_() + , members_() +{} + +chatMembers::chatMembers(int32 total_count_, array> &&members_) + : total_count_(total_count_) + , members_(std::move(members_)) +{} + +const std::int32_t chatMembers::ID; + +void chatMembers::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembers"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("members", members_.size()); for (const auto &_value : members_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatMembersFilterContacts::chatMembersFilterContacts() { +} + +const std::int32_t chatMembersFilterContacts::ID; + +void chatMembersFilterContacts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterContacts"); + s.store_class_end(); + } +} + +chatMembersFilterAdministrators::chatMembersFilterAdministrators() { +} + +const std::int32_t chatMembersFilterAdministrators::ID; + +void chatMembersFilterAdministrators::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterAdministrators"); + s.store_class_end(); + } +} + +chatMembersFilterMembers::chatMembersFilterMembers() { +} + +const std::int32_t chatMembersFilterMembers::ID; + +void chatMembersFilterMembers::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterMembers"); + s.store_class_end(); + } +} + +chatMembersFilterMention::chatMembersFilterMention() + : message_thread_id_() +{} + +chatMembersFilterMention::chatMembersFilterMention(int53 message_thread_id_) + : message_thread_id_(message_thread_id_) +{} + +const std::int32_t chatMembersFilterMention::ID; + +void chatMembersFilterMention::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterMention"); + s.store_field("message_thread_id", message_thread_id_); + s.store_class_end(); + } +} + +chatMembersFilterRestricted::chatMembersFilterRestricted() { +} + +const std::int32_t chatMembersFilterRestricted::ID; + +void chatMembersFilterRestricted::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterRestricted"); + s.store_class_end(); + } +} + +chatMembersFilterBanned::chatMembersFilterBanned() { +} + +const std::int32_t chatMembersFilterBanned::ID; + +void chatMembersFilterBanned::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterBanned"); + s.store_class_end(); + } +} + +chatMembersFilterBots::chatMembersFilterBots() { +} + +const std::int32_t chatMembersFilterBots::ID; + +void chatMembersFilterBots::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMembersFilterBots"); + s.store_class_end(); + } +} + +chatMessageSender::chatMessageSender() + : sender_() + , needs_premium_() +{} + +chatMessageSender::chatMessageSender(object_ptr &&sender_, bool needs_premium_) + : sender_(std::move(sender_)) + , needs_premium_(needs_premium_) +{} + +const std::int32_t chatMessageSender::ID; + +void chatMessageSender::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMessageSender"); + s.store_object_field("sender", static_cast(sender_.get())); + s.store_field("needs_premium", needs_premium_); + s.store_class_end(); + } +} + +chatMessageSenders::chatMessageSenders() + : senders_() +{} + +chatMessageSenders::chatMessageSenders(array> &&senders_) + : senders_(std::move(senders_)) +{} + +const std::int32_t chatMessageSenders::ID; + +void chatMessageSenders::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatMessageSenders"); + { s.store_vector_begin("senders", senders_.size()); for (const auto &_value : senders_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatNearby::chatNearby() + : chat_id_() + , distance_() +{} + +chatNearby::chatNearby(int53 chat_id_, int32 distance_) + : chat_id_(chat_id_) + , distance_(distance_) +{} + +const std::int32_t chatNearby::ID; + +void chatNearby::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatNearby"); + s.store_field("chat_id", chat_id_); + s.store_field("distance", distance_); + s.store_class_end(); + } +} + +chatNotificationSettings::chatNotificationSettings() + : use_default_mute_for_() + , mute_for_() + , use_default_sound_() + , sound_id_() + , use_default_show_preview_() + , show_preview_() + , use_default_disable_pinned_message_notifications_() + , disable_pinned_message_notifications_() + , use_default_disable_mention_notifications_() + , disable_mention_notifications_() +{} + +chatNotificationSettings::chatNotificationSettings(bool use_default_mute_for_, int32 mute_for_, bool use_default_sound_, int64 sound_id_, bool use_default_show_preview_, bool show_preview_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_) + : use_default_mute_for_(use_default_mute_for_) + , mute_for_(mute_for_) + , use_default_sound_(use_default_sound_) + , sound_id_(sound_id_) + , use_default_show_preview_(use_default_show_preview_) + , show_preview_(show_preview_) + , use_default_disable_pinned_message_notifications_(use_default_disable_pinned_message_notifications_) + , disable_pinned_message_notifications_(disable_pinned_message_notifications_) + , use_default_disable_mention_notifications_(use_default_disable_mention_notifications_) + , disable_mention_notifications_(disable_mention_notifications_) +{} + +const std::int32_t chatNotificationSettings::ID; + +void chatNotificationSettings::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatNotificationSettings"); + s.store_field("use_default_mute_for", use_default_mute_for_); + s.store_field("mute_for", mute_for_); + s.store_field("use_default_sound", use_default_sound_); + s.store_field("sound_id", sound_id_); + s.store_field("use_default_show_preview", use_default_show_preview_); + s.store_field("show_preview", show_preview_); + s.store_field("use_default_disable_pinned_message_notifications", use_default_disable_pinned_message_notifications_); + s.store_field("disable_pinned_message_notifications", disable_pinned_message_notifications_); + s.store_field("use_default_disable_mention_notifications", use_default_disable_mention_notifications_); + s.store_field("disable_mention_notifications", disable_mention_notifications_); + s.store_class_end(); + } +} + +chatPermissions::chatPermissions() + : can_send_messages_() + , can_send_media_messages_() + , can_send_polls_() + , can_send_other_messages_() + , can_add_web_page_previews_() + , can_change_info_() + , can_invite_users_() + , can_pin_messages_() + , can_manage_topics_() +{} + +chatPermissions::chatPermissions(bool can_send_messages_, bool can_send_media_messages_, bool can_send_polls_, bool can_send_other_messages_, bool can_add_web_page_previews_, bool can_change_info_, bool can_invite_users_, bool can_pin_messages_, bool can_manage_topics_) + : can_send_messages_(can_send_messages_) + , can_send_media_messages_(can_send_media_messages_) + , can_send_polls_(can_send_polls_) + , can_send_other_messages_(can_send_other_messages_) + , can_add_web_page_previews_(can_add_web_page_previews_) + , can_change_info_(can_change_info_) + , can_invite_users_(can_invite_users_) + , can_pin_messages_(can_pin_messages_) + , can_manage_topics_(can_manage_topics_) +{} + +const std::int32_t chatPermissions::ID; + +void chatPermissions::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatPermissions"); + s.store_field("can_send_messages", can_send_messages_); + s.store_field("can_send_media_messages", can_send_media_messages_); + s.store_field("can_send_polls", can_send_polls_); + s.store_field("can_send_other_messages", can_send_other_messages_); + s.store_field("can_add_web_page_previews", can_add_web_page_previews_); + s.store_field("can_change_info", can_change_info_); + s.store_field("can_invite_users", can_invite_users_); + s.store_field("can_pin_messages", can_pin_messages_); + s.store_field("can_manage_topics", can_manage_topics_); + s.store_class_end(); + } +} + +chatPhoto::chatPhoto() + : id_() + , added_date_() + , minithumbnail_() + , sizes_() + , animation_() + , small_animation_() +{} + +chatPhoto::chatPhoto(int64 id_, int32 added_date_, object_ptr &&minithumbnail_, array> &&sizes_, object_ptr &&animation_, object_ptr &&small_animation_) + : id_(id_) + , added_date_(added_date_) + , minithumbnail_(std::move(minithumbnail_)) + , sizes_(std::move(sizes_)) + , animation_(std::move(animation_)) + , small_animation_(std::move(small_animation_)) +{} + +const std::int32_t chatPhoto::ID; + +void chatPhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatPhoto"); + s.store_field("id", id_); + s.store_field("added_date", added_date_); + s.store_object_field("minithumbnail", static_cast(minithumbnail_.get())); + { s.store_vector_begin("sizes", sizes_.size()); for (const auto &_value : sizes_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_object_field("animation", static_cast(animation_.get())); + s.store_object_field("small_animation", static_cast(small_animation_.get())); + s.store_class_end(); + } +} + +chatPhotoInfo::chatPhotoInfo() + : small_() + , big_() + , minithumbnail_() + , has_animation_() +{} + +chatPhotoInfo::chatPhotoInfo(object_ptr &&small_, object_ptr &&big_, object_ptr &&minithumbnail_, bool has_animation_) + : small_(std::move(small_)) + , big_(std::move(big_)) + , minithumbnail_(std::move(minithumbnail_)) + , has_animation_(has_animation_) +{} + +const std::int32_t chatPhotoInfo::ID; + +void chatPhotoInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatPhotoInfo"); + s.store_object_field("small", static_cast(small_.get())); + s.store_object_field("big", static_cast(big_.get())); + s.store_object_field("minithumbnail", static_cast(minithumbnail_.get())); + s.store_field("has_animation", has_animation_); + s.store_class_end(); + } +} + +chatPhotos::chatPhotos() + : total_count_() + , photos_() +{} + +chatPhotos::chatPhotos(int32 total_count_, array> &&photos_) + : total_count_(total_count_) + , photos_(std::move(photos_)) +{} + +const std::int32_t chatPhotos::ID; + +void chatPhotos::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatPhotos"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("photos", photos_.size()); for (const auto &_value : photos_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatPosition::chatPosition() + : list_() + , order_() + , is_pinned_() + , source_() +{} + +chatPosition::chatPosition(object_ptr &&list_, int64 order_, bool is_pinned_, object_ptr &&source_) + : list_(std::move(list_)) + , order_(order_) + , is_pinned_(is_pinned_) + , source_(std::move(source_)) +{} + +const std::int32_t chatPosition::ID; + +void chatPosition::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatPosition"); + s.store_object_field("list", static_cast(list_.get())); + s.store_field("order", order_); + s.store_field("is_pinned", is_pinned_); + s.store_object_field("source", static_cast(source_.get())); + s.store_class_end(); + } +} + +chatReportReasonSpam::chatReportReasonSpam() { +} + +const std::int32_t chatReportReasonSpam::ID; + +void chatReportReasonSpam::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonSpam"); + s.store_class_end(); + } +} + +chatReportReasonViolence::chatReportReasonViolence() { +} + +const std::int32_t chatReportReasonViolence::ID; + +void chatReportReasonViolence::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonViolence"); + s.store_class_end(); + } +} + +chatReportReasonPornography::chatReportReasonPornography() { +} + +const std::int32_t chatReportReasonPornography::ID; + +void chatReportReasonPornography::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonPornography"); + s.store_class_end(); + } +} + +chatReportReasonChildAbuse::chatReportReasonChildAbuse() { +} + +const std::int32_t chatReportReasonChildAbuse::ID; + +void chatReportReasonChildAbuse::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonChildAbuse"); + s.store_class_end(); + } +} + +chatReportReasonCopyright::chatReportReasonCopyright() { +} + +const std::int32_t chatReportReasonCopyright::ID; + +void chatReportReasonCopyright::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonCopyright"); + s.store_class_end(); + } +} + +chatReportReasonUnrelatedLocation::chatReportReasonUnrelatedLocation() { +} + +const std::int32_t chatReportReasonUnrelatedLocation::ID; + +void chatReportReasonUnrelatedLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonUnrelatedLocation"); + s.store_class_end(); + } +} + +chatReportReasonFake::chatReportReasonFake() { +} + +const std::int32_t chatReportReasonFake::ID; + +void chatReportReasonFake::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonFake"); + s.store_class_end(); + } +} + +chatReportReasonIllegalDrugs::chatReportReasonIllegalDrugs() { +} + +const std::int32_t chatReportReasonIllegalDrugs::ID; + +void chatReportReasonIllegalDrugs::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonIllegalDrugs"); + s.store_class_end(); + } +} + +chatReportReasonPersonalDetails::chatReportReasonPersonalDetails() { +} + +const std::int32_t chatReportReasonPersonalDetails::ID; + +void chatReportReasonPersonalDetails::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonPersonalDetails"); + s.store_class_end(); + } +} + +chatReportReasonCustom::chatReportReasonCustom() { +} + +const std::int32_t chatReportReasonCustom::ID; + +void chatReportReasonCustom::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatReportReasonCustom"); + s.store_class_end(); + } +} + +chatSourceMtprotoProxy::chatSourceMtprotoProxy() { +} + +const std::int32_t chatSourceMtprotoProxy::ID; + +void chatSourceMtprotoProxy::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatSourceMtprotoProxy"); + s.store_class_end(); + } +} + +chatSourcePublicServiceAnnouncement::chatSourcePublicServiceAnnouncement() + : type_() + , text_() +{} + +chatSourcePublicServiceAnnouncement::chatSourcePublicServiceAnnouncement(string const &type_, string const &text_) + : type_(type_) + , text_(text_) +{} + +const std::int32_t chatSourcePublicServiceAnnouncement::ID; + +void chatSourcePublicServiceAnnouncement::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatSourcePublicServiceAnnouncement"); + s.store_field("type", type_); + s.store_field("text", text_); + s.store_class_end(); + } +} + +chatStatisticsSupergroup::chatStatisticsSupergroup() + : period_() + , member_count_() + , message_count_() + , viewer_count_() + , sender_count_() + , member_count_graph_() + , join_graph_() + , join_by_source_graph_() + , language_graph_() + , message_content_graph_() + , action_graph_() + , day_graph_() + , week_graph_() + , top_senders_() + , top_administrators_() + , top_inviters_() +{} + +chatStatisticsSupergroup::chatStatisticsSupergroup(object_ptr &&period_, object_ptr &&member_count_, object_ptr &&message_count_, object_ptr &&viewer_count_, object_ptr &&sender_count_, object_ptr &&member_count_graph_, object_ptr &&join_graph_, object_ptr &&join_by_source_graph_, object_ptr &&language_graph_, object_ptr &&message_content_graph_, object_ptr &&action_graph_, object_ptr &&day_graph_, object_ptr &&week_graph_, array> &&top_senders_, array> &&top_administrators_, array> &&top_inviters_) + : period_(std::move(period_)) + , member_count_(std::move(member_count_)) + , message_count_(std::move(message_count_)) + , viewer_count_(std::move(viewer_count_)) + , sender_count_(std::move(sender_count_)) + , member_count_graph_(std::move(member_count_graph_)) + , join_graph_(std::move(join_graph_)) + , join_by_source_graph_(std::move(join_by_source_graph_)) + , language_graph_(std::move(language_graph_)) + , message_content_graph_(std::move(message_content_graph_)) + , action_graph_(std::move(action_graph_)) + , day_graph_(std::move(day_graph_)) + , week_graph_(std::move(week_graph_)) + , top_senders_(std::move(top_senders_)) + , top_administrators_(std::move(top_administrators_)) + , top_inviters_(std::move(top_inviters_)) +{} + +const std::int32_t chatStatisticsSupergroup::ID; + +void chatStatisticsSupergroup::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsSupergroup"); + s.store_object_field("period", static_cast(period_.get())); + s.store_object_field("member_count", static_cast(member_count_.get())); + s.store_object_field("message_count", static_cast(message_count_.get())); + s.store_object_field("viewer_count", static_cast(viewer_count_.get())); + s.store_object_field("sender_count", static_cast(sender_count_.get())); + s.store_object_field("member_count_graph", static_cast(member_count_graph_.get())); + s.store_object_field("join_graph", static_cast(join_graph_.get())); + s.store_object_field("join_by_source_graph", static_cast(join_by_source_graph_.get())); + s.store_object_field("language_graph", static_cast(language_graph_.get())); + s.store_object_field("message_content_graph", static_cast(message_content_graph_.get())); + s.store_object_field("action_graph", static_cast(action_graph_.get())); + s.store_object_field("day_graph", static_cast(day_graph_.get())); + s.store_object_field("week_graph", static_cast(week_graph_.get())); + { s.store_vector_begin("top_senders", top_senders_.size()); for (const auto &_value : top_senders_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("top_administrators", top_administrators_.size()); for (const auto &_value : top_administrators_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("top_inviters", top_inviters_.size()); for (const auto &_value : top_inviters_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatStatisticsChannel::chatStatisticsChannel() + : period_() + , member_count_() + , mean_view_count_() + , mean_share_count_() + , enabled_notifications_percentage_() + , member_count_graph_() + , join_graph_() + , mute_graph_() + , view_count_by_hour_graph_() + , view_count_by_source_graph_() + , join_by_source_graph_() + , language_graph_() + , message_interaction_graph_() + , instant_view_interaction_graph_() + , recent_message_interactions_() +{} + +chatStatisticsChannel::chatStatisticsChannel(object_ptr &&period_, object_ptr &&member_count_, object_ptr &&mean_view_count_, object_ptr &&mean_share_count_, double enabled_notifications_percentage_, object_ptr &&member_count_graph_, object_ptr &&join_graph_, object_ptr &&mute_graph_, object_ptr &&view_count_by_hour_graph_, object_ptr &&view_count_by_source_graph_, object_ptr &&join_by_source_graph_, object_ptr &&language_graph_, object_ptr &&message_interaction_graph_, object_ptr &&instant_view_interaction_graph_, array> &&recent_message_interactions_) + : period_(std::move(period_)) + , member_count_(std::move(member_count_)) + , mean_view_count_(std::move(mean_view_count_)) + , mean_share_count_(std::move(mean_share_count_)) + , enabled_notifications_percentage_(enabled_notifications_percentage_) + , member_count_graph_(std::move(member_count_graph_)) + , join_graph_(std::move(join_graph_)) + , mute_graph_(std::move(mute_graph_)) + , view_count_by_hour_graph_(std::move(view_count_by_hour_graph_)) + , view_count_by_source_graph_(std::move(view_count_by_source_graph_)) + , join_by_source_graph_(std::move(join_by_source_graph_)) + , language_graph_(std::move(language_graph_)) + , message_interaction_graph_(std::move(message_interaction_graph_)) + , instant_view_interaction_graph_(std::move(instant_view_interaction_graph_)) + , recent_message_interactions_(std::move(recent_message_interactions_)) +{} + +const std::int32_t chatStatisticsChannel::ID; + +void chatStatisticsChannel::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsChannel"); + s.store_object_field("period", static_cast(period_.get())); + s.store_object_field("member_count", static_cast(member_count_.get())); + s.store_object_field("mean_view_count", static_cast(mean_view_count_.get())); + s.store_object_field("mean_share_count", static_cast(mean_share_count_.get())); + s.store_field("enabled_notifications_percentage", enabled_notifications_percentage_); + s.store_object_field("member_count_graph", static_cast(member_count_graph_.get())); + s.store_object_field("join_graph", static_cast(join_graph_.get())); + s.store_object_field("mute_graph", static_cast(mute_graph_.get())); + s.store_object_field("view_count_by_hour_graph", static_cast(view_count_by_hour_graph_.get())); + s.store_object_field("view_count_by_source_graph", static_cast(view_count_by_source_graph_.get())); + s.store_object_field("join_by_source_graph", static_cast(join_by_source_graph_.get())); + s.store_object_field("language_graph", static_cast(language_graph_.get())); + s.store_object_field("message_interaction_graph", static_cast(message_interaction_graph_.get())); + s.store_object_field("instant_view_interaction_graph", static_cast(instant_view_interaction_graph_.get())); + { s.store_vector_begin("recent_message_interactions", recent_message_interactions_.size()); for (const auto &_value : recent_message_interactions_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatStatisticsAdministratorActionsInfo::chatStatisticsAdministratorActionsInfo() + : user_id_() + , deleted_message_count_() + , banned_user_count_() + , restricted_user_count_() +{} + +chatStatisticsAdministratorActionsInfo::chatStatisticsAdministratorActionsInfo(int53 user_id_, int32 deleted_message_count_, int32 banned_user_count_, int32 restricted_user_count_) + : user_id_(user_id_) + , deleted_message_count_(deleted_message_count_) + , banned_user_count_(banned_user_count_) + , restricted_user_count_(restricted_user_count_) +{} + +const std::int32_t chatStatisticsAdministratorActionsInfo::ID; + +void chatStatisticsAdministratorActionsInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsAdministratorActionsInfo"); + s.store_field("user_id", user_id_); + s.store_field("deleted_message_count", deleted_message_count_); + s.store_field("banned_user_count", banned_user_count_); + s.store_field("restricted_user_count", restricted_user_count_); + s.store_class_end(); + } +} + +chatStatisticsInviterInfo::chatStatisticsInviterInfo() + : user_id_() + , added_member_count_() +{} + +chatStatisticsInviterInfo::chatStatisticsInviterInfo(int53 user_id_, int32 added_member_count_) + : user_id_(user_id_) + , added_member_count_(added_member_count_) +{} + +const std::int32_t chatStatisticsInviterInfo::ID; + +void chatStatisticsInviterInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsInviterInfo"); + s.store_field("user_id", user_id_); + s.store_field("added_member_count", added_member_count_); + s.store_class_end(); + } +} + +chatStatisticsMessageInteractionInfo::chatStatisticsMessageInteractionInfo() + : message_id_() + , view_count_() + , forward_count_() +{} + +chatStatisticsMessageInteractionInfo::chatStatisticsMessageInteractionInfo(int53 message_id_, int32 view_count_, int32 forward_count_) + : message_id_(message_id_) + , view_count_(view_count_) + , forward_count_(forward_count_) +{} + +const std::int32_t chatStatisticsMessageInteractionInfo::ID; + +void chatStatisticsMessageInteractionInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsMessageInteractionInfo"); + s.store_field("message_id", message_id_); + s.store_field("view_count", view_count_); + s.store_field("forward_count", forward_count_); + s.store_class_end(); + } +} + +chatStatisticsMessageSenderInfo::chatStatisticsMessageSenderInfo() + : user_id_() + , sent_message_count_() + , average_character_count_() +{} + +chatStatisticsMessageSenderInfo::chatStatisticsMessageSenderInfo(int53 user_id_, int32 sent_message_count_, int32 average_character_count_) + : user_id_(user_id_) + , sent_message_count_(sent_message_count_) + , average_character_count_(average_character_count_) +{} + +const std::int32_t chatStatisticsMessageSenderInfo::ID; + +void chatStatisticsMessageSenderInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatStatisticsMessageSenderInfo"); + s.store_field("user_id", user_id_); + s.store_field("sent_message_count", sent_message_count_); + s.store_field("average_character_count", average_character_count_); + s.store_class_end(); + } +} + +chatTheme::chatTheme() + : name_() + , light_settings_() + , dark_settings_() +{} + +chatTheme::chatTheme(string const &name_, object_ptr &&light_settings_, object_ptr &&dark_settings_) + : name_(name_) + , light_settings_(std::move(light_settings_)) + , dark_settings_(std::move(dark_settings_)) +{} + +const std::int32_t chatTheme::ID; + +void chatTheme::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatTheme"); + s.store_field("name", name_); + s.store_object_field("light_settings", static_cast(light_settings_.get())); + s.store_object_field("dark_settings", static_cast(dark_settings_.get())); + s.store_class_end(); + } +} + +chatTypePrivate::chatTypePrivate() + : user_id_() +{} + +chatTypePrivate::chatTypePrivate(int53 user_id_) + : user_id_(user_id_) +{} + +const std::int32_t chatTypePrivate::ID; + +void chatTypePrivate::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatTypePrivate"); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +chatTypeBasicGroup::chatTypeBasicGroup() + : basic_group_id_() +{} + +chatTypeBasicGroup::chatTypeBasicGroup(int53 basic_group_id_) + : basic_group_id_(basic_group_id_) +{} + +const std::int32_t chatTypeBasicGroup::ID; + +void chatTypeBasicGroup::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatTypeBasicGroup"); + s.store_field("basic_group_id", basic_group_id_); + s.store_class_end(); + } +} + +chatTypeSupergroup::chatTypeSupergroup() + : supergroup_id_() + , is_channel_() +{} + +chatTypeSupergroup::chatTypeSupergroup(int53 supergroup_id_, bool is_channel_) + : supergroup_id_(supergroup_id_) + , is_channel_(is_channel_) +{} + +const std::int32_t chatTypeSupergroup::ID; + +void chatTypeSupergroup::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatTypeSupergroup"); + s.store_field("supergroup_id", supergroup_id_); + s.store_field("is_channel", is_channel_); + s.store_class_end(); + } +} + +chatTypeSecret::chatTypeSecret() + : secret_chat_id_() + , user_id_() +{} + +chatTypeSecret::chatTypeSecret(int32 secret_chat_id_, int53 user_id_) + : secret_chat_id_(secret_chat_id_) + , user_id_(user_id_) +{} + +const std::int32_t chatTypeSecret::ID; + +void chatTypeSecret::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatTypeSecret"); + s.store_field("secret_chat_id", secret_chat_id_); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +chats::chats() + : total_count_() + , chat_ids_() +{} + +chats::chats(int32 total_count_, array &&chat_ids_) + : total_count_(total_count_) + , chat_ids_(std::move(chat_ids_)) +{} + +const std::int32_t chats::ID; + +void chats::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chats"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("chat_ids", chat_ids_.size()); for (const auto &_value : chat_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +chatsNearby::chatsNearby() + : users_nearby_() + , supergroups_nearby_() +{} + +chatsNearby::chatsNearby(array> &&users_nearby_, array> &&supergroups_nearby_) + : users_nearby_(std::move(users_nearby_)) + , supergroups_nearby_(std::move(supergroups_nearby_)) +{} + +const std::int32_t chatsNearby::ID; + +void chatsNearby::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "chatsNearby"); + { s.store_vector_begin("users_nearby", users_nearby_.size()); for (const auto &_value : users_nearby_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("supergroups_nearby", supergroups_nearby_.size()); for (const auto &_value : supergroups_nearby_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +checkChatUsernameResultOk::checkChatUsernameResultOk() { +} + +const std::int32_t checkChatUsernameResultOk::ID; + +void checkChatUsernameResultOk::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkChatUsernameResultOk"); + s.store_class_end(); + } +} + +checkChatUsernameResultUsernameInvalid::checkChatUsernameResultUsernameInvalid() { +} + +const std::int32_t checkChatUsernameResultUsernameInvalid::ID; + +void checkChatUsernameResultUsernameInvalid::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkChatUsernameResultUsernameInvalid"); + s.store_class_end(); + } +} + +checkChatUsernameResultUsernameOccupied::checkChatUsernameResultUsernameOccupied() { +} + +const std::int32_t checkChatUsernameResultUsernameOccupied::ID; + +void checkChatUsernameResultUsernameOccupied::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkChatUsernameResultUsernameOccupied"); + s.store_class_end(); + } +} + +checkChatUsernameResultPublicChatsTooMuch::checkChatUsernameResultPublicChatsTooMuch() { +} + +const std::int32_t checkChatUsernameResultPublicChatsTooMuch::ID; + +void checkChatUsernameResultPublicChatsTooMuch::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkChatUsernameResultPublicChatsTooMuch"); + s.store_class_end(); + } +} + +checkChatUsernameResultPublicGroupsUnavailable::checkChatUsernameResultPublicGroupsUnavailable() { +} + +const std::int32_t checkChatUsernameResultPublicGroupsUnavailable::ID; + +void checkChatUsernameResultPublicGroupsUnavailable::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkChatUsernameResultPublicGroupsUnavailable"); + s.store_class_end(); + } +} + +checkStickerSetNameResultOk::checkStickerSetNameResultOk() { +} + +const std::int32_t checkStickerSetNameResultOk::ID; + +void checkStickerSetNameResultOk::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkStickerSetNameResultOk"); + s.store_class_end(); + } +} + +checkStickerSetNameResultNameInvalid::checkStickerSetNameResultNameInvalid() { +} + +const std::int32_t checkStickerSetNameResultNameInvalid::ID; + +void checkStickerSetNameResultNameInvalid::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkStickerSetNameResultNameInvalid"); + s.store_class_end(); + } +} + +checkStickerSetNameResultNameOccupied::checkStickerSetNameResultNameOccupied() { +} + +const std::int32_t checkStickerSetNameResultNameOccupied::ID; + +void checkStickerSetNameResultNameOccupied::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "checkStickerSetNameResultNameOccupied"); + s.store_class_end(); + } +} + +closedVectorPath::closedVectorPath() + : commands_() +{} + +closedVectorPath::closedVectorPath(array> &&commands_) + : commands_(std::move(commands_)) +{} + +const std::int32_t closedVectorPath::ID; + +void closedVectorPath::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "closedVectorPath"); + { s.store_vector_begin("commands", commands_.size()); for (const auto &_value : commands_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +connectedWebsite::connectedWebsite() + : id_() + , domain_name_() + , bot_user_id_() + , browser_() + , platform_() + , log_in_date_() + , last_active_date_() + , ip_() + , location_() +{} + +connectedWebsite::connectedWebsite(int64 id_, string const &domain_name_, int53 bot_user_id_, string const &browser_, string const &platform_, int32 log_in_date_, int32 last_active_date_, string const &ip_, string const &location_) + : id_(id_) + , domain_name_(domain_name_) + , bot_user_id_(bot_user_id_) + , browser_(browser_) + , platform_(platform_) + , log_in_date_(log_in_date_) + , last_active_date_(last_active_date_) + , ip_(ip_) + , location_(location_) +{} + +const std::int32_t connectedWebsite::ID; + +void connectedWebsite::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectedWebsite"); + s.store_field("id", id_); + s.store_field("domain_name", domain_name_); + s.store_field("bot_user_id", bot_user_id_); + s.store_field("browser", browser_); + s.store_field("platform", platform_); + s.store_field("log_in_date", log_in_date_); + s.store_field("last_active_date", last_active_date_); + s.store_field("ip", ip_); + s.store_field("location", location_); + s.store_class_end(); + } +} + +connectedWebsites::connectedWebsites() + : websites_() +{} + +connectedWebsites::connectedWebsites(array> &&websites_) + : websites_(std::move(websites_)) +{} + +const std::int32_t connectedWebsites::ID; + +void connectedWebsites::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectedWebsites"); + { s.store_vector_begin("websites", websites_.size()); for (const auto &_value : websites_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +connectionStateWaitingForNetwork::connectionStateWaitingForNetwork() { +} + +const std::int32_t connectionStateWaitingForNetwork::ID; + +void connectionStateWaitingForNetwork::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectionStateWaitingForNetwork"); + s.store_class_end(); + } +} + +connectionStateConnectingToProxy::connectionStateConnectingToProxy() { +} + +const std::int32_t connectionStateConnectingToProxy::ID; + +void connectionStateConnectingToProxy::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectionStateConnectingToProxy"); + s.store_class_end(); + } +} + +connectionStateConnecting::connectionStateConnecting() { +} + +const std::int32_t connectionStateConnecting::ID; + +void connectionStateConnecting::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectionStateConnecting"); + s.store_class_end(); + } +} + +connectionStateUpdating::connectionStateUpdating() { +} + +const std::int32_t connectionStateUpdating::ID; + +void connectionStateUpdating::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectionStateUpdating"); + s.store_class_end(); + } +} + +connectionStateReady::connectionStateReady() { +} + +const std::int32_t connectionStateReady::ID; + +void connectionStateReady::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "connectionStateReady"); + s.store_class_end(); + } +} + +contact::contact() + : phone_number_() + , first_name_() + , last_name_() + , vcard_() + , user_id_() +{} + +contact::contact(string const &phone_number_, string const &first_name_, string const &last_name_, string const &vcard_, int53 user_id_) + : phone_number_(phone_number_) + , first_name_(first_name_) + , last_name_(last_name_) + , vcard_(vcard_) + , user_id_(user_id_) +{} + +const std::int32_t contact::ID; + +void contact::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "contact"); + s.store_field("phone_number", phone_number_); + s.store_field("first_name", first_name_); + s.store_field("last_name", last_name_); + s.store_field("vcard", vcard_); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +count::count() + : count_() +{} + +count::count(int32 count_) + : count_(count_) +{} + +const std::int32_t count::ID; + +void count::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "count"); + s.store_field("count", count_); + s.store_class_end(); + } +} + +countries::countries() + : countries_() +{} + +countries::countries(array> &&countries_) + : countries_(std::move(countries_)) +{} + +const std::int32_t countries::ID; + +void countries::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "countries"); + { s.store_vector_begin("countries", countries_.size()); for (const auto &_value : countries_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +countryInfo::countryInfo() + : country_code_() + , name_() + , english_name_() + , is_hidden_() + , calling_codes_() +{} + +countryInfo::countryInfo(string const &country_code_, string const &name_, string const &english_name_, bool is_hidden_, array &&calling_codes_) + : country_code_(country_code_) + , name_(name_) + , english_name_(english_name_) + , is_hidden_(is_hidden_) + , calling_codes_(std::move(calling_codes_)) +{} + +const std::int32_t countryInfo::ID; + +void countryInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "countryInfo"); + s.store_field("country_code", country_code_); + s.store_field("name", name_); + s.store_field("english_name", english_name_); + s.store_field("is_hidden", is_hidden_); + { s.store_vector_begin("calling_codes", calling_codes_.size()); for (const auto &_value : calling_codes_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +customRequestResult::customRequestResult() + : result_() +{} + +customRequestResult::customRequestResult(string const &result_) + : result_(result_) +{} + +const std::int32_t customRequestResult::ID; + +void customRequestResult::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "customRequestResult"); + s.store_field("result", result_); + s.store_class_end(); + } +} + +databaseStatistics::databaseStatistics() + : statistics_() +{} + +databaseStatistics::databaseStatistics(string const &statistics_) + : statistics_(statistics_) +{} + +const std::int32_t databaseStatistics::ID; + +void databaseStatistics::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "databaseStatistics"); + s.store_field("statistics", statistics_); + s.store_class_end(); + } +} + +date::date() + : day_() + , month_() + , year_() +{} + +date::date(int32 day_, int32 month_, int32 year_) + : day_(day_) + , month_(month_) + , year_(year_) +{} + +const std::int32_t date::ID; + +void date::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "date"); + s.store_field("day", day_); + s.store_field("month", month_); + s.store_field("year", year_); + s.store_class_end(); + } +} + +dateRange::dateRange() + : start_date_() + , end_date_() +{} + +dateRange::dateRange(int32 start_date_, int32 end_date_) + : start_date_(start_date_) + , end_date_(end_date_) +{} + +const std::int32_t dateRange::ID; + +void dateRange::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "dateRange"); + s.store_field("start_date", start_date_); + s.store_field("end_date", end_date_); + s.store_class_end(); + } +} + +datedFile::datedFile() + : file_() + , date_() +{} + +datedFile::datedFile(object_ptr &&file_, int32 date_) + : file_(std::move(file_)) + , date_(date_) +{} + +const std::int32_t datedFile::ID; + +void datedFile::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "datedFile"); + s.store_object_field("file", static_cast(file_.get())); + s.store_field("date", date_); + s.store_class_end(); + } +} + +deepLinkInfo::deepLinkInfo() + : text_() + , need_update_application_() +{} + +deepLinkInfo::deepLinkInfo(object_ptr &&text_, bool need_update_application_) + : text_(std::move(text_)) + , need_update_application_(need_update_application_) +{} + +const std::int32_t deepLinkInfo::ID; + +void deepLinkInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deepLinkInfo"); + s.store_object_field("text", static_cast(text_.get())); + s.store_field("need_update_application", need_update_application_); + s.store_class_end(); + } +} + +deviceTokenFirebaseCloudMessaging::deviceTokenFirebaseCloudMessaging() + : token_() + , encrypt_() +{} + +deviceTokenFirebaseCloudMessaging::deviceTokenFirebaseCloudMessaging(string const &token_, bool encrypt_) + : token_(token_) + , encrypt_(encrypt_) +{} + +const std::int32_t deviceTokenFirebaseCloudMessaging::ID; + +void deviceTokenFirebaseCloudMessaging::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenFirebaseCloudMessaging"); + s.store_field("token", token_); + s.store_field("encrypt", encrypt_); + s.store_class_end(); + } +} + +deviceTokenApplePush::deviceTokenApplePush() + : device_token_() + , is_app_sandbox_() +{} + +deviceTokenApplePush::deviceTokenApplePush(string const &device_token_, bool is_app_sandbox_) + : device_token_(device_token_) + , is_app_sandbox_(is_app_sandbox_) +{} + +const std::int32_t deviceTokenApplePush::ID; + +void deviceTokenApplePush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenApplePush"); + s.store_field("device_token", device_token_); + s.store_field("is_app_sandbox", is_app_sandbox_); + s.store_class_end(); + } +} + +deviceTokenApplePushVoIP::deviceTokenApplePushVoIP() + : device_token_() + , is_app_sandbox_() + , encrypt_() +{} + +deviceTokenApplePushVoIP::deviceTokenApplePushVoIP(string const &device_token_, bool is_app_sandbox_, bool encrypt_) + : device_token_(device_token_) + , is_app_sandbox_(is_app_sandbox_) + , encrypt_(encrypt_) +{} + +const std::int32_t deviceTokenApplePushVoIP::ID; + +void deviceTokenApplePushVoIP::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenApplePushVoIP"); + s.store_field("device_token", device_token_); + s.store_field("is_app_sandbox", is_app_sandbox_); + s.store_field("encrypt", encrypt_); + s.store_class_end(); + } +} + +deviceTokenWindowsPush::deviceTokenWindowsPush() + : access_token_() +{} + +deviceTokenWindowsPush::deviceTokenWindowsPush(string const &access_token_) + : access_token_(access_token_) +{} + +const std::int32_t deviceTokenWindowsPush::ID; + +void deviceTokenWindowsPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenWindowsPush"); + s.store_field("access_token", access_token_); + s.store_class_end(); + } +} + +deviceTokenMicrosoftPush::deviceTokenMicrosoftPush() + : channel_uri_() +{} + +deviceTokenMicrosoftPush::deviceTokenMicrosoftPush(string const &channel_uri_) + : channel_uri_(channel_uri_) +{} + +const std::int32_t deviceTokenMicrosoftPush::ID; + +void deviceTokenMicrosoftPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenMicrosoftPush"); + s.store_field("channel_uri", channel_uri_); + s.store_class_end(); + } +} + +deviceTokenMicrosoftPushVoIP::deviceTokenMicrosoftPushVoIP() + : channel_uri_() +{} + +deviceTokenMicrosoftPushVoIP::deviceTokenMicrosoftPushVoIP(string const &channel_uri_) + : channel_uri_(channel_uri_) +{} + +const std::int32_t deviceTokenMicrosoftPushVoIP::ID; + +void deviceTokenMicrosoftPushVoIP::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenMicrosoftPushVoIP"); + s.store_field("channel_uri", channel_uri_); + s.store_class_end(); + } +} + +deviceTokenWebPush::deviceTokenWebPush() + : endpoint_() + , p256dh_base64url_() + , auth_base64url_() +{} + +deviceTokenWebPush::deviceTokenWebPush(string const &endpoint_, string const &p256dh_base64url_, string const &auth_base64url_) + : endpoint_(endpoint_) + , p256dh_base64url_(p256dh_base64url_) + , auth_base64url_(auth_base64url_) +{} + +const std::int32_t deviceTokenWebPush::ID; + +void deviceTokenWebPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenWebPush"); + s.store_field("endpoint", endpoint_); + s.store_field("p256dh_base64url", p256dh_base64url_); + s.store_field("auth_base64url", auth_base64url_); + s.store_class_end(); + } +} + +deviceTokenSimplePush::deviceTokenSimplePush() + : endpoint_() +{} + +deviceTokenSimplePush::deviceTokenSimplePush(string const &endpoint_) + : endpoint_(endpoint_) +{} + +const std::int32_t deviceTokenSimplePush::ID; + +void deviceTokenSimplePush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenSimplePush"); + s.store_field("endpoint", endpoint_); + s.store_class_end(); + } +} + +deviceTokenUbuntuPush::deviceTokenUbuntuPush() + : token_() +{} + +deviceTokenUbuntuPush::deviceTokenUbuntuPush(string const &token_) + : token_(token_) +{} + +const std::int32_t deviceTokenUbuntuPush::ID; + +void deviceTokenUbuntuPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenUbuntuPush"); + s.store_field("token", token_); + s.store_class_end(); + } +} + +deviceTokenBlackBerryPush::deviceTokenBlackBerryPush() + : token_() +{} + +deviceTokenBlackBerryPush::deviceTokenBlackBerryPush(string const &token_) + : token_(token_) +{} + +const std::int32_t deviceTokenBlackBerryPush::ID; + +void deviceTokenBlackBerryPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenBlackBerryPush"); + s.store_field("token", token_); + s.store_class_end(); + } +} + +deviceTokenTizenPush::deviceTokenTizenPush() + : reg_id_() +{} + +deviceTokenTizenPush::deviceTokenTizenPush(string const ®_id_) + : reg_id_(reg_id_) +{} + +const std::int32_t deviceTokenTizenPush::ID; + +void deviceTokenTizenPush::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "deviceTokenTizenPush"); + s.store_field("reg_id", reg_id_); + s.store_class_end(); + } +} + +diceStickersRegular::diceStickersRegular() + : sticker_() +{} + +diceStickersRegular::diceStickersRegular(object_ptr &&sticker_) + : sticker_(std::move(sticker_)) +{} + +const std::int32_t diceStickersRegular::ID; + +void diceStickersRegular::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "diceStickersRegular"); + s.store_object_field("sticker", static_cast(sticker_.get())); + s.store_class_end(); + } +} + +diceStickersSlotMachine::diceStickersSlotMachine() + : background_() + , lever_() + , left_reel_() + , center_reel_() + , right_reel_() +{} + +diceStickersSlotMachine::diceStickersSlotMachine(object_ptr &&background_, object_ptr &&lever_, object_ptr &&left_reel_, object_ptr &¢er_reel_, object_ptr &&right_reel_) + : background_(std::move(background_)) + , lever_(std::move(lever_)) + , left_reel_(std::move(left_reel_)) + , center_reel_(std::move(center_reel_)) + , right_reel_(std::move(right_reel_)) +{} + +const std::int32_t diceStickersSlotMachine::ID; + +void diceStickersSlotMachine::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "diceStickersSlotMachine"); + s.store_object_field("background", static_cast(background_.get())); + s.store_object_field("lever", static_cast(lever_.get())); + s.store_object_field("left_reel", static_cast(left_reel_.get())); + s.store_object_field("center_reel", static_cast(center_reel_.get())); + s.store_object_field("right_reel", static_cast(right_reel_.get())); + s.store_class_end(); + } +} + +document::document() + : file_name_() + , mime_type_() + , minithumbnail_() + , thumbnail_() + , document_() +{} + +document::document(string const &file_name_, string const &mime_type_, object_ptr &&minithumbnail_, object_ptr &&thumbnail_, object_ptr &&document_) + : file_name_(file_name_) + , mime_type_(mime_type_) + , minithumbnail_(std::move(minithumbnail_)) + , thumbnail_(std::move(thumbnail_)) + , document_(std::move(document_)) +{} + +const std::int32_t document::ID; + +void document::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "document"); + s.store_field("file_name", file_name_); + s.store_field("mime_type", mime_type_); + s.store_object_field("minithumbnail", static_cast(minithumbnail_.get())); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_object_field("document", static_cast(document_.get())); + s.store_class_end(); + } +} + +downloadedFileCounts::downloadedFileCounts() + : active_count_() + , paused_count_() + , completed_count_() +{} + +downloadedFileCounts::downloadedFileCounts(int32 active_count_, int32 paused_count_, int32 completed_count_) + : active_count_(active_count_) + , paused_count_(paused_count_) + , completed_count_(completed_count_) +{} + +const std::int32_t downloadedFileCounts::ID; + +void downloadedFileCounts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "downloadedFileCounts"); + s.store_field("active_count", active_count_); + s.store_field("paused_count", paused_count_); + s.store_field("completed_count", completed_count_); + s.store_class_end(); + } +} + +draftMessage::draftMessage() + : reply_to_message_id_() + , date_() + , input_message_text_() +{} + +draftMessage::draftMessage(int53 reply_to_message_id_, int32 date_, object_ptr &&input_message_text_) + : reply_to_message_id_(reply_to_message_id_) + , date_(date_) + , input_message_text_(std::move(input_message_text_)) +{} + +const std::int32_t draftMessage::ID; + +void draftMessage::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "draftMessage"); + s.store_field("reply_to_message_id", reply_to_message_id_); + s.store_field("date", date_); + s.store_object_field("input_message_text", static_cast(input_message_text_.get())); + s.store_class_end(); + } +} + +emailAddressAuthenticationCode::emailAddressAuthenticationCode() + : code_() +{} + +emailAddressAuthenticationCode::emailAddressAuthenticationCode(string const &code_) + : code_(code_) +{} + +const std::int32_t emailAddressAuthenticationCode::ID; + +void emailAddressAuthenticationCode::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emailAddressAuthenticationCode"); + s.store_field("code", code_); + s.store_class_end(); + } +} + +emailAddressAuthenticationAppleId::emailAddressAuthenticationAppleId() + : token_() +{} + +emailAddressAuthenticationAppleId::emailAddressAuthenticationAppleId(string const &token_) + : token_(token_) +{} + +const std::int32_t emailAddressAuthenticationAppleId::ID; + +void emailAddressAuthenticationAppleId::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emailAddressAuthenticationAppleId"); + s.store_field("token", token_); + s.store_class_end(); + } +} + +emailAddressAuthenticationGoogleId::emailAddressAuthenticationGoogleId() + : token_() +{} + +emailAddressAuthenticationGoogleId::emailAddressAuthenticationGoogleId(string const &token_) + : token_(token_) +{} + +const std::int32_t emailAddressAuthenticationGoogleId::ID; + +void emailAddressAuthenticationGoogleId::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emailAddressAuthenticationGoogleId"); + s.store_field("token", token_); + s.store_class_end(); + } +} + +emailAddressAuthenticationCodeInfo::emailAddressAuthenticationCodeInfo() + : email_address_pattern_() + , length_() +{} + +emailAddressAuthenticationCodeInfo::emailAddressAuthenticationCodeInfo(string const &email_address_pattern_, int32 length_) + : email_address_pattern_(email_address_pattern_) + , length_(length_) +{} + +const std::int32_t emailAddressAuthenticationCodeInfo::ID; + +void emailAddressAuthenticationCodeInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emailAddressAuthenticationCodeInfo"); + s.store_field("email_address_pattern", email_address_pattern_); + s.store_field("length", length_); + s.store_class_end(); + } +} + +emojiReaction::emojiReaction() + : emoji_() + , title_() + , is_active_() + , static_icon_() + , appear_animation_() + , select_animation_() + , activate_animation_() + , effect_animation_() + , around_animation_() + , center_animation_() +{} + +emojiReaction::emojiReaction(string const &emoji_, string const &title_, bool is_active_, object_ptr &&static_icon_, object_ptr &&appear_animation_, object_ptr &&select_animation_, object_ptr &&activate_animation_, object_ptr &&effect_animation_, object_ptr &&around_animation_, object_ptr &¢er_animation_) + : emoji_(emoji_) + , title_(title_) + , is_active_(is_active_) + , static_icon_(std::move(static_icon_)) + , appear_animation_(std::move(appear_animation_)) + , select_animation_(std::move(select_animation_)) + , activate_animation_(std::move(activate_animation_)) + , effect_animation_(std::move(effect_animation_)) + , around_animation_(std::move(around_animation_)) + , center_animation_(std::move(center_animation_)) +{} + +const std::int32_t emojiReaction::ID; + +void emojiReaction::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emojiReaction"); + s.store_field("emoji", emoji_); + s.store_field("title", title_); + s.store_field("is_active", is_active_); + s.store_object_field("static_icon", static_cast(static_icon_.get())); + s.store_object_field("appear_animation", static_cast(appear_animation_.get())); + s.store_object_field("select_animation", static_cast(select_animation_.get())); + s.store_object_field("activate_animation", static_cast(activate_animation_.get())); + s.store_object_field("effect_animation", static_cast(effect_animation_.get())); + s.store_object_field("around_animation", static_cast(around_animation_.get())); + s.store_object_field("center_animation", static_cast(center_animation_.get())); + s.store_class_end(); + } +} + +emojiStatus::emojiStatus() + : custom_emoji_id_() +{} + +emojiStatus::emojiStatus(int64 custom_emoji_id_) + : custom_emoji_id_(custom_emoji_id_) +{} + +const std::int32_t emojiStatus::ID; + +void emojiStatus::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emojiStatus"); + s.store_field("custom_emoji_id", custom_emoji_id_); + s.store_class_end(); + } +} + +emojiStatuses::emojiStatuses() + : emoji_statuses_() +{} + +emojiStatuses::emojiStatuses(array> &&emoji_statuses_) + : emoji_statuses_(std::move(emoji_statuses_)) +{} + +const std::int32_t emojiStatuses::ID; + +void emojiStatuses::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emojiStatuses"); + { s.store_vector_begin("emoji_statuses", emoji_statuses_.size()); for (const auto &_value : emoji_statuses_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +emojis::emojis() + : emojis_() +{} + +emojis::emojis(array &&emojis_) + : emojis_(std::move(emojis_)) +{} + +const std::int32_t emojis::ID; + +void emojis::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "emojis"); + { s.store_vector_begin("emojis", emojis_.size()); for (const auto &_value : emojis_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +encryptedCredentials::encryptedCredentials() + : data_() + , hash_() + , secret_() +{} + +encryptedCredentials::encryptedCredentials(bytes const &data_, bytes const &hash_, bytes const &secret_) + : data_(std::move(data_)) + , hash_(std::move(hash_)) + , secret_(std::move(secret_)) +{} + +const std::int32_t encryptedCredentials::ID; + +void encryptedCredentials::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "encryptedCredentials"); + s.store_bytes_field("data", data_); + s.store_bytes_field("hash", hash_); + s.store_bytes_field("secret", secret_); + s.store_class_end(); + } +} + +encryptedPassportElement::encryptedPassportElement() + : type_() + , data_() + , front_side_() + , reverse_side_() + , selfie_() + , translation_() + , files_() + , value_() + , hash_() +{} + +encryptedPassportElement::encryptedPassportElement(object_ptr &&type_, bytes const &data_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, array> &&translation_, array> &&files_, string const &value_, string const &hash_) + : type_(std::move(type_)) + , data_(std::move(data_)) + , front_side_(std::move(front_side_)) + , reverse_side_(std::move(reverse_side_)) + , selfie_(std::move(selfie_)) + , translation_(std::move(translation_)) + , files_(std::move(files_)) + , value_(value_) + , hash_(hash_) +{} + +const std::int32_t encryptedPassportElement::ID; + +void encryptedPassportElement::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "encryptedPassportElement"); + s.store_object_field("type", static_cast(type_.get())); + s.store_bytes_field("data", data_); + s.store_object_field("front_side", static_cast(front_side_.get())); + s.store_object_field("reverse_side", static_cast(reverse_side_.get())); + s.store_object_field("selfie", static_cast(selfie_.get())); + { s.store_vector_begin("translation", translation_.size()); for (const auto &_value : translation_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + { s.store_vector_begin("files", files_.size()); for (const auto &_value : files_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("value", value_); + s.store_field("hash", hash_); + s.store_class_end(); + } +} + +error::error() + : code_() + , message_() +{} + +error::error(int32 code_, string const &message_) + : code_(code_) + , message_(message_) +{} + +const std::int32_t error::ID; + +void error::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "error"); + s.store_field("code", code_); + s.store_field("message", message_); + s.store_class_end(); + } +} + +file::file() + : id_() + , size_() + , expected_size_() + , local_() + , remote_() +{} + +file::file(int32 id_, int53 size_, int53 expected_size_, object_ptr &&local_, object_ptr &&remote_) + : id_(id_) + , size_(size_) + , expected_size_(expected_size_) + , local_(std::move(local_)) + , remote_(std::move(remote_)) +{} + +const std::int32_t file::ID; + +void file::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "file"); + s.store_field("id", id_); + s.store_field("size", size_); + s.store_field("expected_size", expected_size_); + s.store_object_field("local", static_cast(local_.get())); + s.store_object_field("remote", static_cast(remote_.get())); + s.store_class_end(); + } +} + +fileDownload::fileDownload() + : file_id_() + , message_() + , add_date_() + , complete_date_() + , is_paused_() +{} + +fileDownload::fileDownload(int32 file_id_, object_ptr &&message_, int32 add_date_, int32 complete_date_, bool is_paused_) + : file_id_(file_id_) + , message_(std::move(message_)) + , add_date_(add_date_) + , complete_date_(complete_date_) + , is_paused_(is_paused_) +{} + +const std::int32_t fileDownload::ID; + +void fileDownload::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileDownload"); + s.store_field("file_id", file_id_); + s.store_object_field("message", static_cast(message_.get())); + s.store_field("add_date", add_date_); + s.store_field("complete_date", complete_date_); + s.store_field("is_paused", is_paused_); + s.store_class_end(); + } +} + +fileDownloadedPrefixSize::fileDownloadedPrefixSize() + : size_() +{} + +fileDownloadedPrefixSize::fileDownloadedPrefixSize(int53 size_) + : size_(size_) +{} + +const std::int32_t fileDownloadedPrefixSize::ID; + +void fileDownloadedPrefixSize::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileDownloadedPrefixSize"); + s.store_field("size", size_); + s.store_class_end(); + } +} + +filePart::filePart() + : data_() +{} + +filePart::filePart(bytes const &data_) + : data_(std::move(data_)) +{} + +const std::int32_t filePart::ID; + +void filePart::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "filePart"); + s.store_bytes_field("data", data_); + s.store_class_end(); + } +} + +fileTypeNone::fileTypeNone() { +} + +const std::int32_t fileTypeNone::ID; + +void fileTypeNone::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeNone"); + s.store_class_end(); + } +} + +fileTypeAnimation::fileTypeAnimation() { +} + +const std::int32_t fileTypeAnimation::ID; + +void fileTypeAnimation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeAnimation"); + s.store_class_end(); + } +} + +fileTypeAudio::fileTypeAudio() { +} + +const std::int32_t fileTypeAudio::ID; + +void fileTypeAudio::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeAudio"); + s.store_class_end(); + } +} + +fileTypeDocument::fileTypeDocument() { +} + +const std::int32_t fileTypeDocument::ID; + +void fileTypeDocument::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeDocument"); + s.store_class_end(); + } +} + +fileTypeNotificationSound::fileTypeNotificationSound() { +} + +const std::int32_t fileTypeNotificationSound::ID; + +void fileTypeNotificationSound::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeNotificationSound"); + s.store_class_end(); + } +} + +fileTypePhoto::fileTypePhoto() { +} + +const std::int32_t fileTypePhoto::ID; + +void fileTypePhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypePhoto"); + s.store_class_end(); + } +} + +fileTypeProfilePhoto::fileTypeProfilePhoto() { +} + +const std::int32_t fileTypeProfilePhoto::ID; + +void fileTypeProfilePhoto::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeProfilePhoto"); + s.store_class_end(); + } +} + +fileTypeSecret::fileTypeSecret() { +} + +const std::int32_t fileTypeSecret::ID; + +void fileTypeSecret::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeSecret"); + s.store_class_end(); + } +} + +fileTypeSecretThumbnail::fileTypeSecretThumbnail() { +} + +const std::int32_t fileTypeSecretThumbnail::ID; + +void fileTypeSecretThumbnail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeSecretThumbnail"); + s.store_class_end(); + } +} + +fileTypeSecure::fileTypeSecure() { +} + +const std::int32_t fileTypeSecure::ID; + +void fileTypeSecure::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeSecure"); + s.store_class_end(); + } +} + +fileTypeSticker::fileTypeSticker() { +} + +const std::int32_t fileTypeSticker::ID; + +void fileTypeSticker::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeSticker"); + s.store_class_end(); + } +} + +fileTypeThumbnail::fileTypeThumbnail() { +} + +const std::int32_t fileTypeThumbnail::ID; + +void fileTypeThumbnail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeThumbnail"); + s.store_class_end(); + } +} + +fileTypeUnknown::fileTypeUnknown() { +} + +const std::int32_t fileTypeUnknown::ID; + +void fileTypeUnknown::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeUnknown"); + s.store_class_end(); + } +} + +fileTypeVideo::fileTypeVideo() { +} + +const std::int32_t fileTypeVideo::ID; + +void fileTypeVideo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeVideo"); + s.store_class_end(); + } +} + +fileTypeVideoNote::fileTypeVideoNote() { +} + +const std::int32_t fileTypeVideoNote::ID; + +void fileTypeVideoNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeVideoNote"); + s.store_class_end(); + } +} + +fileTypeVoiceNote::fileTypeVoiceNote() { +} + +const std::int32_t fileTypeVoiceNote::ID; + +void fileTypeVoiceNote::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeVoiceNote"); + s.store_class_end(); + } +} + +fileTypeWallpaper::fileTypeWallpaper() { +} + +const std::int32_t fileTypeWallpaper::ID; + +void fileTypeWallpaper::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "fileTypeWallpaper"); + s.store_class_end(); + } +} + +formattedText::formattedText() + : text_() + , entities_() +{} + +formattedText::formattedText(string const &text_, array> &&entities_) + : text_(text_) + , entities_(std::move(entities_)) +{} + +const std::int32_t formattedText::ID; + +void formattedText::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "formattedText"); + s.store_field("text", text_); + { s.store_vector_begin("entities", entities_.size()); for (const auto &_value : entities_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +forumTopic::forumTopic() + : info_() + , last_message_() + , is_pinned_() + , unread_count_() + , last_read_inbox_message_id_() + , last_read_outbox_message_id_() + , unread_mention_count_() + , unread_reaction_count_() + , notification_settings_() + , draft_message_() +{} + +forumTopic::forumTopic(object_ptr &&info_, object_ptr &&last_message_, bool is_pinned_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, int32 unread_reaction_count_, object_ptr &¬ification_settings_, object_ptr &&draft_message_) + : info_(std::move(info_)) + , last_message_(std::move(last_message_)) + , is_pinned_(is_pinned_) + , unread_count_(unread_count_) + , last_read_inbox_message_id_(last_read_inbox_message_id_) + , last_read_outbox_message_id_(last_read_outbox_message_id_) + , unread_mention_count_(unread_mention_count_) + , unread_reaction_count_(unread_reaction_count_) + , notification_settings_(std::move(notification_settings_)) + , draft_message_(std::move(draft_message_)) +{} + +const std::int32_t forumTopic::ID; + +void forumTopic::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "forumTopic"); + s.store_object_field("info", static_cast(info_.get())); + s.store_object_field("last_message", static_cast(last_message_.get())); + s.store_field("is_pinned", is_pinned_); + s.store_field("unread_count", unread_count_); + s.store_field("last_read_inbox_message_id", last_read_inbox_message_id_); + s.store_field("last_read_outbox_message_id", last_read_outbox_message_id_); + s.store_field("unread_mention_count", unread_mention_count_); + s.store_field("unread_reaction_count", unread_reaction_count_); + s.store_object_field("notification_settings", static_cast(notification_settings_.get())); + s.store_object_field("draft_message", static_cast(draft_message_.get())); + s.store_class_end(); + } +} + +forumTopicIcon::forumTopicIcon() + : color_() + , custom_emoji_id_() +{} + +forumTopicIcon::forumTopicIcon(int32 color_, int64 custom_emoji_id_) + : color_(color_) + , custom_emoji_id_(custom_emoji_id_) +{} + +const std::int32_t forumTopicIcon::ID; + +void forumTopicIcon::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "forumTopicIcon"); + s.store_field("color", color_); + s.store_field("custom_emoji_id", custom_emoji_id_); + s.store_class_end(); + } +} + +forumTopicInfo::forumTopicInfo() + : message_thread_id_() + , name_() + , icon_() + , creation_date_() + , creator_id_() + , is_outgoing_() + , is_closed_() +{} + +forumTopicInfo::forumTopicInfo(int53 message_thread_id_, string const &name_, object_ptr &&icon_, int32 creation_date_, object_ptr &&creator_id_, bool is_outgoing_, bool is_closed_) + : message_thread_id_(message_thread_id_) + , name_(name_) + , icon_(std::move(icon_)) + , creation_date_(creation_date_) + , creator_id_(std::move(creator_id_)) + , is_outgoing_(is_outgoing_) + , is_closed_(is_closed_) +{} + +const std::int32_t forumTopicInfo::ID; + +void forumTopicInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "forumTopicInfo"); + s.store_field("message_thread_id", message_thread_id_); + s.store_field("name", name_); + s.store_object_field("icon", static_cast(icon_.get())); + s.store_field("creation_date", creation_date_); + s.store_object_field("creator_id", static_cast(creator_id_.get())); + s.store_field("is_outgoing", is_outgoing_); + s.store_field("is_closed", is_closed_); + s.store_class_end(); + } +} + +foundFileDownloads::foundFileDownloads() + : total_counts_() + , files_() + , next_offset_() +{} + +foundFileDownloads::foundFileDownloads(object_ptr &&total_counts_, array> &&files_, string const &next_offset_) + : total_counts_(std::move(total_counts_)) + , files_(std::move(files_)) + , next_offset_(next_offset_) +{} + +const std::int32_t foundFileDownloads::ID; + +void foundFileDownloads::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "foundFileDownloads"); + s.store_object_field("total_counts", static_cast(total_counts_.get())); + { s.store_vector_begin("files", files_.size()); for (const auto &_value : files_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("next_offset", next_offset_); + s.store_class_end(); + } +} + +foundMessages::foundMessages() + : total_count_() + , messages_() + , next_offset_() +{} + +foundMessages::foundMessages(int32 total_count_, array> &&messages_, string const &next_offset_) + : total_count_(total_count_) + , messages_(std::move(messages_)) + , next_offset_(next_offset_) +{} + +const std::int32_t foundMessages::ID; + +void foundMessages::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "foundMessages"); + s.store_field("total_count", total_count_); + { s.store_vector_begin("messages", messages_.size()); for (const auto &_value : messages_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("next_offset", next_offset_); + s.store_class_end(); + } +} + +game::game() + : id_() + , short_name_() + , title_() + , text_() + , description_() + , photo_() + , animation_() +{} + +game::game(int64 id_, string const &short_name_, string const &title_, object_ptr &&text_, string const &description_, object_ptr &&photo_, object_ptr &&animation_) + : id_(id_) + , short_name_(short_name_) + , title_(title_) + , text_(std::move(text_)) + , description_(description_) + , photo_(std::move(photo_)) + , animation_(std::move(animation_)) +{} + +const std::int32_t game::ID; + +void game::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "game"); + s.store_field("id", id_); + s.store_field("short_name", short_name_); + s.store_field("title", title_); + s.store_object_field("text", static_cast(text_.get())); + s.store_field("description", description_); + s.store_object_field("photo", static_cast(photo_.get())); + s.store_object_field("animation", static_cast(animation_.get())); + s.store_class_end(); + } +} + +gameHighScore::gameHighScore() + : position_() + , user_id_() + , score_() +{} + +gameHighScore::gameHighScore(int32 position_, int53 user_id_, int32 score_) + : position_(position_) + , user_id_(user_id_) + , score_(score_) +{} + +const std::int32_t gameHighScore::ID; + +void gameHighScore::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "gameHighScore"); + s.store_field("position", position_); + s.store_field("user_id", user_id_); + s.store_field("score", score_); + s.store_class_end(); + } +} + +gameHighScores::gameHighScores() + : scores_() +{} + +gameHighScores::gameHighScores(array> &&scores_) + : scores_(std::move(scores_)) +{} + +const std::int32_t gameHighScores::ID; + +void gameHighScores::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "gameHighScores"); + { s.store_vector_begin("scores", scores_.size()); for (const auto &_value : scores_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +groupCall::groupCall() + : id_() + , title_() + , scheduled_start_date_() + , enabled_start_notification_() + , is_active_() + , is_rtmp_stream_() + , is_joined_() + , need_rejoin_() + , can_be_managed_() + , participant_count_() + , has_hidden_listeners_() + , loaded_all_participants_() + , recent_speakers_() + , is_my_video_enabled_() + , is_my_video_paused_() + , can_enable_video_() + , mute_new_participants_() + , can_toggle_mute_new_participants_() + , record_duration_() + , is_video_recorded_() + , duration_() +{} + +groupCall::groupCall(int32 id_, string const &title_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_rtmp_stream_, bool is_joined_, bool need_rejoin_, bool can_be_managed_, int32 participant_count_, bool has_hidden_listeners_, bool loaded_all_participants_, array> &&recent_speakers_, bool is_my_video_enabled_, bool is_my_video_paused_, bool can_enable_video_, bool mute_new_participants_, bool can_toggle_mute_new_participants_, int32 record_duration_, bool is_video_recorded_, int32 duration_) + : id_(id_) + , title_(title_) + , scheduled_start_date_(scheduled_start_date_) + , enabled_start_notification_(enabled_start_notification_) + , is_active_(is_active_) + , is_rtmp_stream_(is_rtmp_stream_) + , is_joined_(is_joined_) + , need_rejoin_(need_rejoin_) + , can_be_managed_(can_be_managed_) + , participant_count_(participant_count_) + , has_hidden_listeners_(has_hidden_listeners_) + , loaded_all_participants_(loaded_all_participants_) + , recent_speakers_(std::move(recent_speakers_)) + , is_my_video_enabled_(is_my_video_enabled_) + , is_my_video_paused_(is_my_video_paused_) + , can_enable_video_(can_enable_video_) + , mute_new_participants_(mute_new_participants_) + , can_toggle_mute_new_participants_(can_toggle_mute_new_participants_) + , record_duration_(record_duration_) + , is_video_recorded_(is_video_recorded_) + , duration_(duration_) +{} + +const std::int32_t groupCall::ID; + +void groupCall::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCall"); + s.store_field("id", id_); + s.store_field("title", title_); + s.store_field("scheduled_start_date", scheduled_start_date_); + s.store_field("enabled_start_notification", enabled_start_notification_); + s.store_field("is_active", is_active_); + s.store_field("is_rtmp_stream", is_rtmp_stream_); + s.store_field("is_joined", is_joined_); + s.store_field("need_rejoin", need_rejoin_); + s.store_field("can_be_managed", can_be_managed_); + s.store_field("participant_count", participant_count_); + s.store_field("has_hidden_listeners", has_hidden_listeners_); + s.store_field("loaded_all_participants", loaded_all_participants_); + { s.store_vector_begin("recent_speakers", recent_speakers_.size()); for (const auto &_value : recent_speakers_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("is_my_video_enabled", is_my_video_enabled_); + s.store_field("is_my_video_paused", is_my_video_paused_); + s.store_field("can_enable_video", can_enable_video_); + s.store_field("mute_new_participants", mute_new_participants_); + s.store_field("can_toggle_mute_new_participants", can_toggle_mute_new_participants_); + s.store_field("record_duration", record_duration_); + s.store_field("is_video_recorded", is_video_recorded_); + s.store_field("duration", duration_); + s.store_class_end(); + } +} + +groupCallId::groupCallId() + : id_() +{} + +groupCallId::groupCallId(int32 id_) + : id_(id_) +{} + +const std::int32_t groupCallId::ID; + +void groupCallId::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallId"); + s.store_field("id", id_); + s.store_class_end(); + } +} + +groupCallParticipant::groupCallParticipant() + : participant_id_() + , audio_source_id_() + , screen_sharing_audio_source_id_() + , video_info_() + , screen_sharing_video_info_() + , bio_() + , is_current_user_() + , is_speaking_() + , is_hand_raised_() + , can_be_muted_for_all_users_() + , can_be_unmuted_for_all_users_() + , can_be_muted_for_current_user_() + , can_be_unmuted_for_current_user_() + , is_muted_for_all_users_() + , is_muted_for_current_user_() + , can_unmute_self_() + , volume_level_() + , order_() +{} + +groupCallParticipant::groupCallParticipant(object_ptr &&participant_id_, int32 audio_source_id_, int32 screen_sharing_audio_source_id_, object_ptr &&video_info_, object_ptr &&screen_sharing_video_info_, string const &bio_, bool is_current_user_, bool is_speaking_, bool is_hand_raised_, bool can_be_muted_for_all_users_, bool can_be_unmuted_for_all_users_, bool can_be_muted_for_current_user_, bool can_be_unmuted_for_current_user_, bool is_muted_for_all_users_, bool is_muted_for_current_user_, bool can_unmute_self_, int32 volume_level_, string const &order_) + : participant_id_(std::move(participant_id_)) + , audio_source_id_(audio_source_id_) + , screen_sharing_audio_source_id_(screen_sharing_audio_source_id_) + , video_info_(std::move(video_info_)) + , screen_sharing_video_info_(std::move(screen_sharing_video_info_)) + , bio_(bio_) + , is_current_user_(is_current_user_) + , is_speaking_(is_speaking_) + , is_hand_raised_(is_hand_raised_) + , can_be_muted_for_all_users_(can_be_muted_for_all_users_) + , can_be_unmuted_for_all_users_(can_be_unmuted_for_all_users_) + , can_be_muted_for_current_user_(can_be_muted_for_current_user_) + , can_be_unmuted_for_current_user_(can_be_unmuted_for_current_user_) + , is_muted_for_all_users_(is_muted_for_all_users_) + , is_muted_for_current_user_(is_muted_for_current_user_) + , can_unmute_self_(can_unmute_self_) + , volume_level_(volume_level_) + , order_(order_) +{} + +const std::int32_t groupCallParticipant::ID; + +void groupCallParticipant::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallParticipant"); + s.store_object_field("participant_id", static_cast(participant_id_.get())); + s.store_field("audio_source_id", audio_source_id_); + s.store_field("screen_sharing_audio_source_id", screen_sharing_audio_source_id_); + s.store_object_field("video_info", static_cast(video_info_.get())); + s.store_object_field("screen_sharing_video_info", static_cast(screen_sharing_video_info_.get())); + s.store_field("bio", bio_); + s.store_field("is_current_user", is_current_user_); + s.store_field("is_speaking", is_speaking_); + s.store_field("is_hand_raised", is_hand_raised_); + s.store_field("can_be_muted_for_all_users", can_be_muted_for_all_users_); + s.store_field("can_be_unmuted_for_all_users", can_be_unmuted_for_all_users_); + s.store_field("can_be_muted_for_current_user", can_be_muted_for_current_user_); + s.store_field("can_be_unmuted_for_current_user", can_be_unmuted_for_current_user_); + s.store_field("is_muted_for_all_users", is_muted_for_all_users_); + s.store_field("is_muted_for_current_user", is_muted_for_current_user_); + s.store_field("can_unmute_self", can_unmute_self_); + s.store_field("volume_level", volume_level_); + s.store_field("order", order_); + s.store_class_end(); + } +} + +groupCallParticipantVideoInfo::groupCallParticipantVideoInfo() + : source_groups_() + , endpoint_id_() + , is_paused_() +{} + +groupCallParticipantVideoInfo::groupCallParticipantVideoInfo(array> &&source_groups_, string const &endpoint_id_, bool is_paused_) + : source_groups_(std::move(source_groups_)) + , endpoint_id_(endpoint_id_) + , is_paused_(is_paused_) +{} + +const std::int32_t groupCallParticipantVideoInfo::ID; + +void groupCallParticipantVideoInfo::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallParticipantVideoInfo"); + { s.store_vector_begin("source_groups", source_groups_.size()); for (const auto &_value : source_groups_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_field("endpoint_id", endpoint_id_); + s.store_field("is_paused", is_paused_); + s.store_class_end(); + } +} + +groupCallRecentSpeaker::groupCallRecentSpeaker() + : participant_id_() + , is_speaking_() +{} + +groupCallRecentSpeaker::groupCallRecentSpeaker(object_ptr &&participant_id_, bool is_speaking_) + : participant_id_(std::move(participant_id_)) + , is_speaking_(is_speaking_) +{} + +const std::int32_t groupCallRecentSpeaker::ID; + +void groupCallRecentSpeaker::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallRecentSpeaker"); + s.store_object_field("participant_id", static_cast(participant_id_.get())); + s.store_field("is_speaking", is_speaking_); + s.store_class_end(); + } +} + +groupCallStream::groupCallStream() + : channel_id_() + , scale_() + , time_offset_() +{} + +groupCallStream::groupCallStream(int32 channel_id_, int32 scale_, int53 time_offset_) + : channel_id_(channel_id_) + , scale_(scale_) + , time_offset_(time_offset_) +{} + +const std::int32_t groupCallStream::ID; + +void groupCallStream::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallStream"); + s.store_field("channel_id", channel_id_); + s.store_field("scale", scale_); + s.store_field("time_offset", time_offset_); + s.store_class_end(); + } +} + +groupCallStreams::groupCallStreams() + : streams_() +{} + +groupCallStreams::groupCallStreams(array> &&streams_) + : streams_(std::move(streams_)) +{} + +const std::int32_t groupCallStreams::ID; + +void groupCallStreams::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallStreams"); + { s.store_vector_begin("streams", streams_.size()); for (const auto &_value : streams_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +groupCallVideoQualityThumbnail::groupCallVideoQualityThumbnail() { +} + +const std::int32_t groupCallVideoQualityThumbnail::ID; + +void groupCallVideoQualityThumbnail::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallVideoQualityThumbnail"); + s.store_class_end(); + } +} + +groupCallVideoQualityMedium::groupCallVideoQualityMedium() { +} + +const std::int32_t groupCallVideoQualityMedium::ID; + +void groupCallVideoQualityMedium::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallVideoQualityMedium"); + s.store_class_end(); + } +} + +groupCallVideoQualityFull::groupCallVideoQualityFull() { +} + +const std::int32_t groupCallVideoQualityFull::ID; + +void groupCallVideoQualityFull::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallVideoQualityFull"); + s.store_class_end(); + } +} + +groupCallVideoSourceGroup::groupCallVideoSourceGroup() + : semantics_() + , source_ids_() +{} + +groupCallVideoSourceGroup::groupCallVideoSourceGroup(string const &semantics_, array &&source_ids_) + : semantics_(semantics_) + , source_ids_(std::move(source_ids_)) +{} + +const std::int32_t groupCallVideoSourceGroup::ID; + +void groupCallVideoSourceGroup::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "groupCallVideoSourceGroup"); + s.store_field("semantics", semantics_); + { s.store_vector_begin("source_ids", source_ids_.size()); for (const auto &_value : source_ids_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +hashtags::hashtags() + : hashtags_() +{} + +hashtags::hashtags(array &&hashtags_) + : hashtags_(std::move(hashtags_)) +{} + +const std::int32_t hashtags::ID; + +void hashtags::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "hashtags"); + { s.store_vector_begin("hashtags", hashtags_.size()); for (const auto &_value : hashtags_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +httpUrl::httpUrl() + : url_() +{} + +httpUrl::httpUrl(string const &url_) + : url_(url_) +{} + +const std::int32_t httpUrl::ID; + +void httpUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "httpUrl"); + s.store_field("url", url_); + s.store_class_end(); + } +} + +identityDocument::identityDocument() + : number_() + , expiry_date_() + , front_side_() + , reverse_side_() + , selfie_() + , translation_() +{} + +identityDocument::identityDocument(string const &number_, object_ptr &&expiry_date_, object_ptr &&front_side_, object_ptr &&reverse_side_, object_ptr &&selfie_, array> &&translation_) + : number_(number_) + , expiry_date_(std::move(expiry_date_)) + , front_side_(std::move(front_side_)) + , reverse_side_(std::move(reverse_side_)) + , selfie_(std::move(selfie_)) + , translation_(std::move(translation_)) +{} + +const std::int32_t identityDocument::ID; + +void identityDocument::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "identityDocument"); + s.store_field("number", number_); + s.store_object_field("expiry_date", static_cast(expiry_date_.get())); + s.store_object_field("front_side", static_cast(front_side_.get())); + s.store_object_field("reverse_side", static_cast(reverse_side_.get())); + s.store_object_field("selfie", static_cast(selfie_.get())); + { s.store_vector_begin("translation", translation_.size()); for (const auto &_value : translation_) { s.store_object_field("", static_cast(_value.get())); } s.store_class_end(); } + s.store_class_end(); + } +} + +importedContacts::importedContacts() + : user_ids_() + , importer_count_() +{} + +importedContacts::importedContacts(array &&user_ids_, array &&importer_count_) + : user_ids_(std::move(user_ids_)) + , importer_count_(std::move(importer_count_)) +{} + +const std::int32_t importedContacts::ID; + +void importedContacts::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "importedContacts"); + { s.store_vector_begin("user_ids", user_ids_.size()); for (const auto &_value : user_ids_) { s.store_field("", _value); } s.store_class_end(); } + { s.store_vector_begin("importer_count", importer_count_.size()); for (const auto &_value : importer_count_) { s.store_field("", _value); } s.store_class_end(); } + s.store_class_end(); + } +} + +inlineKeyboardButton::inlineKeyboardButton() + : text_() + , type_() +{} + +inlineKeyboardButton::inlineKeyboardButton(string const &text_, object_ptr &&type_) + : text_(text_) + , type_(std::move(type_)) +{} + +const std::int32_t inlineKeyboardButton::ID; + +void inlineKeyboardButton::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButton"); + s.store_field("text", text_); + s.store_object_field("type", static_cast(type_.get())); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeUrl::inlineKeyboardButtonTypeUrl() + : url_() +{} + +inlineKeyboardButtonTypeUrl::inlineKeyboardButtonTypeUrl(string const &url_) + : url_(url_) +{} + +const std::int32_t inlineKeyboardButtonTypeUrl::ID; + +void inlineKeyboardButtonTypeUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeUrl"); + s.store_field("url", url_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeLoginUrl::inlineKeyboardButtonTypeLoginUrl() + : url_() + , id_() + , forward_text_() +{} + +inlineKeyboardButtonTypeLoginUrl::inlineKeyboardButtonTypeLoginUrl(string const &url_, int53 id_, string const &forward_text_) + : url_(url_) + , id_(id_) + , forward_text_(forward_text_) +{} + +const std::int32_t inlineKeyboardButtonTypeLoginUrl::ID; + +void inlineKeyboardButtonTypeLoginUrl::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeLoginUrl"); + s.store_field("url", url_); + s.store_field("id", id_); + s.store_field("forward_text", forward_text_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeWebApp::inlineKeyboardButtonTypeWebApp() + : url_() +{} + +inlineKeyboardButtonTypeWebApp::inlineKeyboardButtonTypeWebApp(string const &url_) + : url_(url_) +{} + +const std::int32_t inlineKeyboardButtonTypeWebApp::ID; + +void inlineKeyboardButtonTypeWebApp::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeWebApp"); + s.store_field("url", url_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeCallback::inlineKeyboardButtonTypeCallback() + : data_() +{} + +inlineKeyboardButtonTypeCallback::inlineKeyboardButtonTypeCallback(bytes const &data_) + : data_(std::move(data_)) +{} + +const std::int32_t inlineKeyboardButtonTypeCallback::ID; + +void inlineKeyboardButtonTypeCallback::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeCallback"); + s.store_bytes_field("data", data_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeCallbackWithPassword::inlineKeyboardButtonTypeCallbackWithPassword() + : data_() +{} + +inlineKeyboardButtonTypeCallbackWithPassword::inlineKeyboardButtonTypeCallbackWithPassword(bytes const &data_) + : data_(std::move(data_)) +{} + +const std::int32_t inlineKeyboardButtonTypeCallbackWithPassword::ID; + +void inlineKeyboardButtonTypeCallbackWithPassword::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeCallbackWithPassword"); + s.store_bytes_field("data", data_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeCallbackGame::inlineKeyboardButtonTypeCallbackGame() { +} + +const std::int32_t inlineKeyboardButtonTypeCallbackGame::ID; + +void inlineKeyboardButtonTypeCallbackGame::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeCallbackGame"); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeSwitchInline::inlineKeyboardButtonTypeSwitchInline() + : query_() + , in_current_chat_() +{} + +inlineKeyboardButtonTypeSwitchInline::inlineKeyboardButtonTypeSwitchInline(string const &query_, bool in_current_chat_) + : query_(query_) + , in_current_chat_(in_current_chat_) +{} + +const std::int32_t inlineKeyboardButtonTypeSwitchInline::ID; + +void inlineKeyboardButtonTypeSwitchInline::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeSwitchInline"); + s.store_field("query", query_); + s.store_field("in_current_chat", in_current_chat_); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeBuy::inlineKeyboardButtonTypeBuy() { +} + +const std::int32_t inlineKeyboardButtonTypeBuy::ID; + +void inlineKeyboardButtonTypeBuy::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeBuy"); + s.store_class_end(); + } +} + +inlineKeyboardButtonTypeUser::inlineKeyboardButtonTypeUser() + : user_id_() +{} + +inlineKeyboardButtonTypeUser::inlineKeyboardButtonTypeUser(int53 user_id_) + : user_id_(user_id_) +{} + +const std::int32_t inlineKeyboardButtonTypeUser::ID; + +void inlineKeyboardButtonTypeUser::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineKeyboardButtonTypeUser"); + s.store_field("user_id", user_id_); + s.store_class_end(); + } +} + +inlineQueryResultArticle::inlineQueryResultArticle() + : id_() + , url_() + , hide_url_() + , title_() + , description_() + , thumbnail_() +{} + +inlineQueryResultArticle::inlineQueryResultArticle(string const &id_, string const &url_, bool hide_url_, string const &title_, string const &description_, object_ptr &&thumbnail_) + : id_(id_) + , url_(url_) + , hide_url_(hide_url_) + , title_(title_) + , description_(description_) + , thumbnail_(std::move(thumbnail_)) +{} + +const std::int32_t inlineQueryResultArticle::ID; + +void inlineQueryResultArticle::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultArticle"); + s.store_field("id", id_); + s.store_field("url", url_); + s.store_field("hide_url", hide_url_); + s.store_field("title", title_); + s.store_field("description", description_); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_class_end(); + } +} + +inlineQueryResultContact::inlineQueryResultContact() + : id_() + , contact_() + , thumbnail_() +{} + +inlineQueryResultContact::inlineQueryResultContact(string const &id_, object_ptr &&contact_, object_ptr &&thumbnail_) + : id_(id_) + , contact_(std::move(contact_)) + , thumbnail_(std::move(thumbnail_)) +{} + +const std::int32_t inlineQueryResultContact::ID; + +void inlineQueryResultContact::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultContact"); + s.store_field("id", id_); + s.store_object_field("contact", static_cast(contact_.get())); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_class_end(); + } +} + +inlineQueryResultLocation::inlineQueryResultLocation() + : id_() + , location_() + , title_() + , thumbnail_() +{} + +inlineQueryResultLocation::inlineQueryResultLocation(string const &id_, object_ptr &&location_, string const &title_, object_ptr &&thumbnail_) + : id_(id_) + , location_(std::move(location_)) + , title_(title_) + , thumbnail_(std::move(thumbnail_)) +{} + +const std::int32_t inlineQueryResultLocation::ID; + +void inlineQueryResultLocation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultLocation"); + s.store_field("id", id_); + s.store_object_field("location", static_cast(location_.get())); + s.store_field("title", title_); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_class_end(); + } +} + +inlineQueryResultVenue::inlineQueryResultVenue() + : id_() + , venue_() + , thumbnail_() +{} + +inlineQueryResultVenue::inlineQueryResultVenue(string const &id_, object_ptr &&venue_, object_ptr &&thumbnail_) + : id_(id_) + , venue_(std::move(venue_)) + , thumbnail_(std::move(thumbnail_)) +{} + +const std::int32_t inlineQueryResultVenue::ID; + +void inlineQueryResultVenue::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultVenue"); + s.store_field("id", id_); + s.store_object_field("venue", static_cast(venue_.get())); + s.store_object_field("thumbnail", static_cast(thumbnail_.get())); + s.store_class_end(); + } +} + +inlineQueryResultGame::inlineQueryResultGame() + : id_() + , game_() +{} + +inlineQueryResultGame::inlineQueryResultGame(string const &id_, object_ptr &&game_) + : id_(id_) + , game_(std::move(game_)) +{} + +const std::int32_t inlineQueryResultGame::ID; + +void inlineQueryResultGame::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultGame"); + s.store_field("id", id_); + s.store_object_field("game", static_cast(game_.get())); + s.store_class_end(); + } +} + +inlineQueryResultAnimation::inlineQueryResultAnimation() + : id_() + , animation_() + , title_() +{} + +inlineQueryResultAnimation::inlineQueryResultAnimation(string const &id_, object_ptr &&animation_, string const &title_) + : id_(id_) + , animation_(std::move(animation_)) + , title_(title_) +{} + +const std::int32_t inlineQueryResultAnimation::ID; + +void inlineQueryResultAnimation::store(TlStorerToString &s, const char *field_name) const { + if (!LOG_IS_STRIPPED(ERROR)) { + s.store_class_begin(field_name, "inlineQueryResultAnimation"); + s.store_field("id", id_); + s.store_object_field("animation", static_cast(animation_.get())); + s.store_field("title", title_); + s.store_class_end(); + } +} + +inlineQueryResultAudio::inlineQueryResultAudio() + : id_() + , audio_() +{} + +inlineQueryResultAudio::inlineQueryResultAudio(string const &id_, object_ptr