def read(data: BytesIO, *args: Any) -> "MsgResendReq": # No flags msg_ids = TLObject.read(data, Long) return MsgResendReq(msg_ids=msg_ids)
def read(data: BytesIO, *args: Any) -> "PageBlockHeader": # No flags text = TLObject.read(data) return PageBlockHeader(text=text)
def read(data: BytesIO, *args: Any) -> "Block": # No flags id = TLObject.read(data) return Block(id=id)
def read(data: BytesIO, *args: Any) -> "NotifyPeer": # No flags peer = TLObject.read(data) return NotifyPeer(peer=peer)
def read(data: BytesIO, *args: Any) -> "ChannelFull": flags = Int.read(data) can_view_participants = True if flags & (1 << 3) else False can_set_username = True if flags & (1 << 6) else False can_set_stickers = True if flags & (1 << 7) else False hidden_prehistory = True if flags & (1 << 10) else False can_set_location = True if flags & (1 << 16) else False has_scheduled = True if flags & (1 << 19) else False can_view_stats = True if flags & (1 << 20) else False blocked = True if flags & (1 << 22) else False id = Int.read(data) about = String.read(data) participants_count = Int.read(data) if flags & (1 << 0) else None admins_count = Int.read(data) if flags & (1 << 1) else None kicked_count = Int.read(data) if flags & (1 << 2) else None banned_count = Int.read(data) if flags & (1 << 2) else None online_count = Int.read(data) if flags & (1 << 13) else None read_inbox_max_id = Int.read(data) read_outbox_max_id = Int.read(data) unread_count = Int.read(data) chat_photo = TLObject.read(data) notify_settings = TLObject.read(data) exported_invite = TLObject.read(data) bot_info = TLObject.read(data) migrated_from_chat_id = Int.read(data) if flags & (1 << 4) else None migrated_from_max_id = Int.read(data) if flags & (1 << 4) else None pinned_msg_id = Int.read(data) if flags & (1 << 5) else None stickerset = TLObject.read(data) if flags & (1 << 8) else None available_min_id = Int.read(data) if flags & (1 << 9) else None folder_id = Int.read(data) if flags & (1 << 11) else None linked_chat_id = Int.read(data) if flags & (1 << 14) else None location = TLObject.read(data) if flags & (1 << 15) else None slowmode_seconds = Int.read(data) if flags & (1 << 17) else None slowmode_next_send_date = Int.read(data) if flags & (1 << 18) else None stats_dc = Int.read(data) if flags & (1 << 12) else None pts = Int.read(data) call = TLObject.read(data) if flags & (1 << 21) else None return ChannelFull(id=id, about=about, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id, unread_count=unread_count, chat_photo=chat_photo, notify_settings=notify_settings, exported_invite=exported_invite, bot_info=bot_info, pts=pts, can_view_participants=can_view_participants, can_set_username=can_set_username, can_set_stickers=can_set_stickers, hidden_prehistory=hidden_prehistory, can_set_location=can_set_location, has_scheduled=has_scheduled, can_view_stats=can_view_stats, blocked=blocked, participants_count=participants_count, admins_count=admins_count, kicked_count=kicked_count, banned_count=banned_count, online_count=online_count, migrated_from_chat_id=migrated_from_chat_id, migrated_from_max_id=migrated_from_max_id, pinned_msg_id=pinned_msg_id, stickerset=stickerset, available_min_id=available_min_id, folder_id=folder_id, linked_chat_id=linked_chat_id, location=location, slowmode_seconds=slowmode_seconds, slowmode_next_send_date=slowmode_next_send_date, stats_dc=stats_dc, call=call)
def read(data: BytesIO, *args: Any) -> "GetPeerSettings": # No flags peer = TLObject.read(data) return GetPeerSettings(peer=peer)
def read(data: BytesIO, *args: Any) -> "GetPeerDialogs": # No flags peers = TLObject.read(data) return GetPeerDialogs(peers=peers)
def read(data: BytesIO, *args: Any) -> "GetMultiWallPapers": # No flags wallpapers = TLObject.read(data) return GetMultiWallPapers(wallpapers=wallpapers)
def read(data: BytesIO, *args: Any) -> "GetPrivacy": # No flags key = TLObject.read(data) return GetPrivacy(key=key)
def read(data: BytesIO, *args: Any) -> "DeleteByPhones": # No flags phones = TLObject.read(data, String) return DeleteByPhones(phones=phones)
def read(data: BytesIO, *args: Any) -> "SetAccountTTL": # No flags ttl = TLObject.read(data) return SetAccountTTL(ttl=ttl)
def read(data: BytesIO, *args: Any) -> "HidePromoData": # No flags peer = TLObject.read(data) return HidePromoData(peer=peer)
def read(data: BytesIO, *args: Any) -> "LoginTokenSuccess": # No flags authorization = TLObject.read(data) return LoginTokenSuccess(authorization=authorization)
def read(data: BytesIO, *args: Any) -> "Config": flags = Int.read(data) phonecalls_enabled = True if flags & (1 << 1) else False default_p2p_contacts = True if flags & (1 << 3) else False preload_featured_stickers = True if flags & (1 << 4) else False ignore_phone_entities = True if flags & (1 << 5) else False revoke_pm_inbox = True if flags & (1 << 6) else False blocked_mode = True if flags & (1 << 8) else False pfs_enabled = True if flags & (1 << 13) else False date = Int.read(data) expires = Int.read(data) test_mode = Bool.read(data) this_dc = Int.read(data) dc_options = TLObject.read(data) dc_txt_domain_name = String.read(data) chat_size_max = Int.read(data) megagroup_size_max = Int.read(data) forwarded_count_max = Int.read(data) online_update_period_ms = Int.read(data) offline_blur_timeout_ms = Int.read(data) offline_idle_timeout_ms = Int.read(data) online_cloud_timeout_ms = Int.read(data) notify_cloud_delay_ms = Int.read(data) notify_default_delay_ms = Int.read(data) push_chat_period_ms = Int.read(data) push_chat_limit = Int.read(data) saved_gifs_limit = Int.read(data) edit_time_limit = Int.read(data) revoke_time_limit = Int.read(data) revoke_pm_time_limit = Int.read(data) rating_e_decay = Int.read(data) stickers_recent_limit = Int.read(data) stickers_faved_limit = Int.read(data) channels_read_media_period = Int.read(data) tmp_sessions = Int.read(data) if flags & (1 << 0) else None pinned_dialogs_count_max = Int.read(data) pinned_infolder_count_max = Int.read(data) call_receive_timeout_ms = Int.read(data) call_ring_timeout_ms = Int.read(data) call_connect_timeout_ms = Int.read(data) call_packet_timeout_ms = Int.read(data) me_url_prefix = String.read(data) autoupdate_url_prefix = String.read(data) if flags & (1 << 7) else None gif_search_username = String.read(data) if flags & (1 << 9) else None venue_search_username = String.read( data) if flags & (1 << 10) else None img_search_username = String.read(data) if flags & (1 << 11) else None static_maps_provider = String.read(data) if flags & (1 << 12) else None caption_length_max = Int.read(data) message_length_max = Int.read(data) webfile_dc_id = Int.read(data) suggested_lang_code = String.read(data) if flags & (1 << 2) else None lang_pack_version = Int.read(data) if flags & (1 << 2) else None base_lang_pack_version = Int.read(data) if flags & (1 << 2) else None return Config(date=date, expires=expires, test_mode=test_mode, this_dc=this_dc, dc_options=dc_options, dc_txt_domain_name=dc_txt_domain_name, chat_size_max=chat_size_max, megagroup_size_max=megagroup_size_max, forwarded_count_max=forwarded_count_max, online_update_period_ms=online_update_period_ms, offline_blur_timeout_ms=offline_blur_timeout_ms, offline_idle_timeout_ms=offline_idle_timeout_ms, online_cloud_timeout_ms=online_cloud_timeout_ms, notify_cloud_delay_ms=notify_cloud_delay_ms, notify_default_delay_ms=notify_default_delay_ms, push_chat_period_ms=push_chat_period_ms, push_chat_limit=push_chat_limit, saved_gifs_limit=saved_gifs_limit, edit_time_limit=edit_time_limit, revoke_time_limit=revoke_time_limit, revoke_pm_time_limit=revoke_pm_time_limit, rating_e_decay=rating_e_decay, stickers_recent_limit=stickers_recent_limit, stickers_faved_limit=stickers_faved_limit, channels_read_media_period=channels_read_media_period, pinned_dialogs_count_max=pinned_dialogs_count_max, pinned_infolder_count_max=pinned_infolder_count_max, call_receive_timeout_ms=call_receive_timeout_ms, call_ring_timeout_ms=call_ring_timeout_ms, call_connect_timeout_ms=call_connect_timeout_ms, call_packet_timeout_ms=call_packet_timeout_ms, me_url_prefix=me_url_prefix, caption_length_max=caption_length_max, message_length_max=message_length_max, webfile_dc_id=webfile_dc_id, phonecalls_enabled=phonecalls_enabled, default_p2p_contacts=default_p2p_contacts, preload_featured_stickers=preload_featured_stickers, ignore_phone_entities=ignore_phone_entities, revoke_pm_inbox=revoke_pm_inbox, blocked_mode=blocked_mode, pfs_enabled=pfs_enabled, tmp_sessions=tmp_sessions, autoupdate_url_prefix=autoupdate_url_prefix, gif_search_username=gif_search_username, venue_search_username=venue_search_username, img_search_username=img_search_username, static_maps_provider=static_maps_provider, suggested_lang_code=suggested_lang_code, lang_pack_version=lang_pack_version, base_lang_pack_version=base_lang_pack_version)
def read(data: BytesIO, *args: Any) -> "JsonObject": # No flags value = TLObject.read(data) return JsonObject(value=value)
def read(data: BytesIO, *args: Any) -> "UpdateProfilePhoto": # No flags id = TLObject.read(data) return UpdateProfilePhoto(id=id)
def read(data: BytesIO, *args: Any) -> "UpdateNewStickerSet": # No flags stickerset = TLObject.read(data) return UpdateNewStickerSet(stickerset=stickerset)
def read(data: BytesIO, *args: Any) -> "GetAttachedStickers": # No flags media = TLObject.read(data) return GetAttachedStickers(media=media)
def read(data: BytesIO, *args: Any) -> "TextSuperscript": # No flags text = TLObject.read(data) return TextSuperscript(text=text)
def read(data: BytesIO, *args: Any) -> "GetChats": # No flags id = TLObject.read(data, Int) return GetChats(id=id)
def read(data: BytesIO, *args: Any) -> "GetChannels": # No flags id = TLObject.read(data) return GetChannels(id=id)
def read(data: BytesIO, *args: Any) -> "ConvertToGigagroup": # No flags channel = TLObject.read(data) return ConvertToGigagroup(channel=channel)
def read(data: BytesIO, *args: Any) -> "HidePeerSettingsBar": # No flags peer = TLObject.read(data) return HidePeerSettingsBar(peer=peer)
def read(data: BytesIO, *args: Any) -> "RemoveStickerFromSet": # No flags sticker = TLObject.read(data) return RemoveStickerFromSet(sticker=sticker)
def read(data: BytesIO, *args: Any) -> "UpdateChatParticipants": # No flags participants = TLObject.read(data) return UpdateChatParticipants(participants=participants)
def read(data: BytesIO, *args: Any) -> "PageTableRow": # No flags cells = TLObject.read(data) return PageTableRow(cells=cells)
def read(data: BytesIO, *args: Any) -> "GetPasswordSettings": # No flags password = TLObject.read(data) return GetPasswordSettings(password=password)
def read(data: BytesIO, *args: Any) -> "GetFullUser": # No flags id = TLObject.read(data) return GetFullUser(id=id)
def read(data: BytesIO, *args: Any) -> "UpdateBotWebhookJSON": # No flags data = TLObject.read(data) return UpdateBotWebhookJSON(data=data)
def read(data: BytesIO, *args: Any) -> "ReadMessageContents": # No flags id = TLObject.read(data, Int) return ReadMessageContents(id=id)