NekoX/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java

52258 lines
1.8 MiB

/*
* This is the source code of Telegram for Android v. 5.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2018.
*/
package org.telegram.tgnet;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.text.TextUtils;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.ImageLoader;
import org.telegram.messenger.Utilities;
import java.util.ArrayList;
import java.util.HashMap;
@SuppressWarnings("unchecked")
public class TLRPC {
public static final int USER_FLAG_ACCESS_HASH = 0x00000001;
public static final int USER_FLAG_FIRST_NAME = 0x00000002;
public static final int USER_FLAG_LAST_NAME = 0x00000004;
public static final int USER_FLAG_USERNAME = 0x00000008;
public static final int USER_FLAG_PHONE = 0x00000010;
public static final int USER_FLAG_PHOTO = 0x00000020;
public static final int USER_FLAG_STATUS = 0x00000040;
public static final int USER_FLAG_UNUSED = 0x00000080;
public static final int USER_FLAG_UNUSED2 = 0x00000100;
public static final int USER_FLAG_UNUSED3 = 0x00000200;
//public static final int USER_FLAG_SELF = 0x00000400;
//public static final int USER_FLAG_CONTACT = 0x00000800;
//public static final int USER_FLAG_MUTUAL_CONTACT = 0x00001000;
//public static final int USER_FLAG_DELETED = 0x00002000;
//public static final int USER_FLAG_BOT = 0x00004000;
//public static final int USER_FLAG_BOT_READING_HISTORY = 0x00008000;
//public static final int USER_FLAG_BOT_CANT_JOIN_GROUP = 0x00010000;
//public static final int USER_FLAG_VERIFIED = 0x00020000;
//public static final int CHAT_FLAG_CREATOR = 0x00000001;
//public static final int CHAT_FLAG_USER_KICKED = 0x00000002;
//public static final int CHAT_FLAG_USER_LEFT = 0x00000004;
//public static final int CHAT_FLAG_USER_IS_EDITOR = 0x00000008;
//public static final int CHAT_FLAG_USER_IS_MODERATOR = 0x00000010;
//public static final int CHAT_FLAG_IS_BROADCAST = 0x00000020;
public static final int CHAT_FLAG_IS_PUBLIC = 0x00000040;
//public static final int CHAT_FLAG_IS_VERIFIED = 0x00000080;
//public static final int MESSAGE_FLAG_UNREAD = 0x00000001;
//public static final int MESSAGE_FLAG_OUT = 0x00000002;
public static final int MESSAGE_FLAG_FWD = 0x00000004;
public static final int MESSAGE_FLAG_REPLY = 0x00000008;
//public static final int MESSAGE_FLAG_MENTION = 0x00000010;
//public static final int MESSAGE_FLAG_CONTENT_UNREAD = 0x00000020;
public static final int MESSAGE_FLAG_HAS_MARKUP = 0x00000040;
public static final int MESSAGE_FLAG_HAS_ENTITIES = 0x00000080;
public static final int MESSAGE_FLAG_HAS_FROM_ID = 0x00000100;
public static final int MESSAGE_FLAG_HAS_MEDIA = 0x00000200;
public static final int MESSAGE_FLAG_HAS_VIEWS = 0x00000400;
public static final int MESSAGE_FLAG_HAS_BOT_ID = 0x00000800;
public static final int MESSAGE_FLAG_EDITED = 0x00008000;
public static final int LAYER = 132;
public static class TL_stats_megagroupStats extends TLObject {
public static int constructor = 0xef7ff916;
public TL_statsDateRangeDays period;
public TL_statsAbsValueAndPrev members;
public TL_statsAbsValueAndPrev messages;
public TL_statsAbsValueAndPrev viewers;
public TL_statsAbsValueAndPrev posters;
public StatsGraph growth_graph;
public StatsGraph members_graph;
public StatsGraph new_members_by_source_graph;
public StatsGraph languages_graph;
public StatsGraph messages_graph;
public StatsGraph actions_graph;
public StatsGraph top_hours_graph;
public StatsGraph weekdays_graph;
public ArrayList<TL_statsGroupTopPoster> top_posters = new ArrayList<>();
public ArrayList<TL_statsGroupTopAdmin> top_admins = new ArrayList<>();
public ArrayList<TL_statsGroupTopInviter> top_inviters = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_stats_megagroupStats TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_stats_megagroupStats.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_stats_megagroupStats", constructor));
} else {
return null;
}
}
TL_stats_megagroupStats result = new TL_stats_megagroupStats();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
period = TL_statsDateRangeDays.TLdeserialize(stream, stream.readInt32(exception), exception);
members = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
messages = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
viewers = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
posters = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
growth_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
members_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
new_members_by_source_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
languages_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
messages_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
actions_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
top_hours_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
weekdays_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_statsGroupTopPoster object = TL_statsGroupTopPoster.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
top_posters.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_statsGroupTopAdmin object = TL_statsGroupTopAdmin.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
top_admins.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_statsGroupTopInviter object = TL_statsGroupTopInviter.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
top_inviters.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
period.serializeToStream(stream);
members.serializeToStream(stream);
messages.serializeToStream(stream);
viewers.serializeToStream(stream);
posters.serializeToStream(stream);
growth_graph.serializeToStream(stream);
members_graph.serializeToStream(stream);
new_members_by_source_graph.serializeToStream(stream);
languages_graph.serializeToStream(stream);
messages_graph.serializeToStream(stream);
actions_graph.serializeToStream(stream);
top_hours_graph.serializeToStream(stream);
weekdays_graph.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = top_posters.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
top_posters.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = top_admins.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
top_admins.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = top_inviters.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
top_inviters.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_chatBannedRights extends TLObject {
public static int constructor = 0x9f120418;
public int flags;
public boolean view_messages;
public boolean send_messages;
public boolean send_media;
public boolean send_stickers;
public boolean send_gifs;
public boolean send_games;
public boolean send_inline;
public boolean embed_links;
public boolean send_polls;
public boolean change_info;
public boolean invite_users;
public boolean pin_messages;
public int until_date;
public static TL_chatBannedRights TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatBannedRights.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatBannedRights", constructor));
} else {
return null;
}
}
TL_chatBannedRights result = new TL_chatBannedRights();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
view_messages = (flags & 1) != 0;
send_messages = (flags & 2) != 0;
send_media = (flags & 4) != 0;
send_stickers = (flags & 8) != 0;
send_gifs = (flags & 16) != 0;
send_games = (flags & 32) != 0;
send_inline = (flags & 64) != 0;
embed_links = (flags & 128) != 0;
send_polls = (flags & 256) != 0;
change_info = (flags & 1024) != 0;
invite_users = (flags & 32768) != 0;
pin_messages = (flags & 131072) != 0;
until_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = view_messages ? (flags | 1) : (flags &~ 1);
flags = send_messages ? (flags | 2) : (flags &~ 2);
flags = send_media ? (flags | 4) : (flags &~ 4);
flags = send_stickers ? (flags | 8) : (flags &~ 8);
flags = send_gifs ? (flags | 16) : (flags &~ 16);
flags = send_games ? (flags | 32) : (flags &~ 32);
flags = send_inline ? (flags | 64) : (flags &~ 64);
flags = embed_links ? (flags | 128) : (flags &~ 128);
flags = send_polls ? (flags | 256) : (flags &~ 256);
flags = change_info ? (flags | 1024) : (flags &~ 1024);
flags = invite_users ? (flags | 32768) : (flags &~ 32768);
flags = pin_messages ? (flags | 131072) : (flags &~ 131072);
stream.writeInt32(flags);
stream.writeInt32(until_date);
}
}
public static class TL_stickers_suggestedShortName extends TLObject {
public static int constructor = 0x85fea03f;
public String short_name;
public static TL_stickers_suggestedShortName TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_stickers_suggestedShortName.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_stickers_suggestedShortName", constructor));
} else {
return null;
}
}
TL_stickers_suggestedShortName result = new TL_stickers_suggestedShortName();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
short_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(short_name);
}
}
public static abstract class DraftMessage extends TLObject {
public int flags;
public boolean no_webpage;
public int reply_to_msg_id;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public int date;
public static DraftMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DraftMessage result = null;
switch (constructor) {
case 0x1b0c841a:
result = new TL_draftMessageEmpty();
break;
case 0xba4baec5:
result = new TL_draftMessageEmpty_layer81();
break;
case 0xfd8e711f:
result = new TL_draftMessage();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DraftMessage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_draftMessageEmpty extends DraftMessage {
public static int constructor = 0x1b0c841a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(date);
}
}
}
public static class TL_draftMessageEmpty_layer81 extends TL_draftMessageEmpty {
public static int constructor = 0xba4baec5;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_draftMessage extends DraftMessage {
public static int constructor = 0xfd8e711f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
no_webpage = (flags & 2) != 0;
if ((flags & 1) != 0) {
reply_to_msg_id = stream.readInt32(exception);
}
message = stream.readString(exception);
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_webpage ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
stream.writeString(message);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
stream.writeInt32(date);
}
}
public static abstract class ChatPhoto extends TLObject {
public int flags;
public boolean has_video;
public FileLocation photo_small;
public FileLocation photo_big;
public byte[] stripped_thumb;
public int dc_id;
public long photo_id;
public BitmapDrawable strippedBitmap;
public static ChatPhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChatPhoto result = null;
switch (constructor) {
case 0x1c6e1c11:
result = new TL_chatPhoto();
break;
case 0x475cdbd5:
result = new TL_chatPhoto_layer115();
break;
case 0x37c1011c:
result = new TL_chatPhotoEmpty();
break;
case 0x6153276a:
result = new TL_chatPhoto_layer97();
break;
case 0xd20b9f3c:
result = new TL_chatPhoto_layer126();
break;
case 0x4790ee05:
result = new TL_chatPhoto_layer127();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChatPhoto", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_chatPhoto extends ChatPhoto {
public static int constructor = 0x1c6e1c11;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_id = stream.readInt64(exception);
if ((flags & 2) != 0) {
stripped_thumb = stream.readByteArray(exception);
}
dc_id = stream.readInt32(exception);
photo_small = new TL_fileLocationToBeDeprecated();
photo_small.volume_id = -photo_id;
photo_small.local_id = 'a';
photo_big = new TL_fileLocationToBeDeprecated();
photo_big.volume_id = -photo_id;
photo_big.local_id = 'c';
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(photo_id);
if ((flags & 2) != 0) {
stream.writeByteArray(stripped_thumb);
}
stream.writeInt32(dc_id);
}
}
public static class TL_chatPhoto_layer115 extends TL_chatPhoto {
public static int constructor = 0x475cdbd5;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
stream.writeInt32(dc_id);
}
}
public static class TL_chatPhotoEmpty extends ChatPhoto {
public static int constructor = 0x37c1011c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_chatPhoto_layer97 extends TL_chatPhoto {
public static int constructor = 0x6153276a;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
}
}
public static class TL_chatPhoto_layer126 extends TL_chatPhoto {
public static int constructor = 0xd20b9f3c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
stream.writeInt32(dc_id);
}
}
public static class TL_chatPhoto_layer127 extends TL_chatPhoto {
public static int constructor = 0x4790ee05;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
stripped_thumb = stream.readByteArray(exception);
if (Build.VERSION.SDK_INT >= 21) {
try {
strippedBitmap = new BitmapDrawable(ImageLoader.getStrippedPhotoBitmap(stripped_thumb, "b"));
} catch (Throwable e) {
FileLog.e(e);
}
}
}
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeByteArray(stripped_thumb);
}
stream.writeInt32(dc_id);
}
}
public static class TL_help_termsOfService extends TLObject {
public static int constructor = 0x780a0310;
public int flags;
public boolean popup;
public TL_dataJSON id;
public String text;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public int min_age_confirm;
public static TL_help_termsOfService TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_termsOfService.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_termsOfService", constructor));
} else {
return null;
}
}
TL_help_termsOfService result = new TL_help_termsOfService();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
popup = (flags & 1) != 0;
id = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
text = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
if ((flags & 2) != 0) {
min_age_confirm = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = popup ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
id.serializeToStream(stream);
stream.writeString(text);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(min_age_confirm);
}
}
}
public static class TL_payments_paymentReceipt extends TLObject {
public static int constructor = 0x10b555d0;
public int flags;
public int date;
public int bot_id;
public int provider_id;
public String title;
public String description;
public WebDocument photo;
public TL_invoice invoice;
public TL_paymentRequestedInfo info;
public TL_shippingOption shipping;
public long tip_amount;
public String currency;
public long total_amount;
public String credentials_title;
public ArrayList<User> users = new ArrayList<>();
public static TL_payments_paymentReceipt TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_payments_paymentReceipt.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentReceipt", constructor));
} else {
return null;
}
}
TL_payments_paymentReceipt result = new TL_payments_paymentReceipt();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
date = stream.readInt32(exception);
bot_id = stream.readInt32(exception);
provider_id = stream.readInt32(exception);
title = stream.readString(exception);
description = stream.readString(exception);
if ((flags & 4) != 0) {
photo = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
shipping = TL_shippingOption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
tip_amount = stream.readInt64(exception);
}
currency = stream.readString(exception);
total_amount = stream.readInt64(exception);
credentials_title = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(date);
stream.writeInt32(bot_id);
stream.writeInt32(provider_id);
stream.writeString(title);
stream.writeString(description);
if ((flags & 4) != 0) {
photo.serializeToStream(stream);
}
invoice.serializeToStream(stream);
if ((flags & 1) != 0) {
info.serializeToStream(stream);
}
if ((flags & 2) != 0) {
shipping.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt64(tip_amount);
}
stream.writeString(currency);
stream.writeInt64(total_amount);
stream.writeString(credentials_title);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class NotifyPeer extends TLObject {
public static NotifyPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
NotifyPeer result = null;
switch (constructor) {
case 0xd612e8ef:
result = new TL_notifyBroadcasts();
break;
case 0xc007cec3:
result = new TL_notifyChats();
break;
case 0xb4c83b4c:
result = new TL_notifyUsers();
break;
case 0x9fd40bd8:
result = new TL_notifyPeer();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in NotifyPeer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_notifyBroadcasts extends NotifyPeer {
public static int constructor = 0xd612e8ef;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_notifyChats extends NotifyPeer {
public static int constructor = 0xc007cec3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_notifyUsers extends NotifyPeer {
public static int constructor = 0xb4c83b4c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_notifyPeer extends NotifyPeer {
public static int constructor = 0x9fd40bd8;
public Peer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_phone_joinAsPeers extends TLObject {
public static int constructor = 0xafe5623f;
public ArrayList<Peer> peers = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_phone_joinAsPeers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_phone_joinAsPeers.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_phone_joinAsPeers", constructor));
} else {
return null;
}
}
TL_phone_joinAsPeers result = new TL_phone_joinAsPeers();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Peer object = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
peers.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
peers.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_emojiKeywordsDifference extends TLObject {
public static int constructor = 0x5cc761bd;
public String lang_code;
public int from_version;
public int version;
public ArrayList<EmojiKeyword> keywords = new ArrayList<>();
public static TL_emojiKeywordsDifference TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_emojiKeywordsDifference.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_emojiKeywordsDifference", constructor));
} else {
return null;
}
}
TL_emojiKeywordsDifference result = new TL_emojiKeywordsDifference();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
lang_code = stream.readString(exception);
from_version = stream.readInt32(exception);
version = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
EmojiKeyword object = EmojiKeyword.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
keywords.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
stream.writeInt32(from_version);
stream.writeInt32(version);
stream.writeInt32(0x1cb5c415);
int count = keywords.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
keywords.get(a).serializeToStream(stream);
}
}
}
public static abstract class messages_SentEncryptedMessage extends TLObject {
public int date;
public EncryptedFile file;
public static messages_SentEncryptedMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_SentEncryptedMessage result = null;
switch (constructor) {
case 0x560f8935:
result = new TL_messages_sentEncryptedMessage();
break;
case 0x9493ff32:
result = new TL_messages_sentEncryptedFile();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_SentEncryptedMessage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_sentEncryptedMessage extends messages_SentEncryptedMessage {
public static int constructor = 0x560f8935;
public void readParams(AbstractSerializedData stream, boolean exception) {
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(date);
}
}
public static class TL_messages_sentEncryptedFile extends messages_SentEncryptedMessage {
public static int constructor = 0x9493ff32;
public void readParams(AbstractSerializedData stream, boolean exception) {
date = stream.readInt32(exception);
file = EncryptedFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(date);
file.serializeToStream(stream);
}
}
public static class TL_error extends TLObject {
public static int constructor = 0xc4b9f9bb;
public int code;
public String text;
public static TL_error TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_error.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_error", constructor));
} else {
return null;
}
}
TL_error result = new TL_error();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
code = stream.readInt32(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(code);
stream.writeString(text);
}
}
public static abstract class UrlAuthResult extends TLObject {
public static UrlAuthResult TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
UrlAuthResult result = null;
switch (constructor) {
case 0xa9d6db1f:
result = new TL_urlAuthResultDefault();
break;
case 0x92d33a0e:
result = new TL_urlAuthResultRequest();
break;
case 0x8f8c0e4e:
result = new TL_urlAuthResultAccepted();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in UrlAuthResult", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_urlAuthResultDefault extends UrlAuthResult {
public static int constructor = 0xa9d6db1f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_urlAuthResultRequest extends UrlAuthResult {
public static int constructor = 0x92d33a0e;
public int flags;
public boolean request_write_access;
public User bot;
public String domain;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
request_write_access = (flags & 1) != 0;
bot = User.TLdeserialize(stream, stream.readInt32(exception), exception);
domain = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = request_write_access ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
bot.serializeToStream(stream);
stream.writeString(domain);
}
}
public static class TL_urlAuthResultAccepted extends UrlAuthResult {
public static int constructor = 0x8f8c0e4e;
public String url;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_messages_chatFull extends TLObject {
public static int constructor = 0xe5d7d19c;
public ChatFull full_chat;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_chatFull TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_chatFull.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_chatFull", constructor));
} else {
return null;
}
}
TL_messages_chatFull result = new TL_messages_chatFull();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
full_chat = ChatFull.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
full_chat.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_passwordSettings extends TLObject {
public static int constructor = 0x9a5c33e5;
public int flags;
public String email;
public TL_secureSecretSettings secure_settings;
public static TL_account_passwordSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_passwordSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_passwordSettings", constructor));
} else {
return null;
}
}
TL_account_passwordSettings result = new TL_account_passwordSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
email = stream.readString(exception);
}
if ((flags & 2) != 0) {
secure_settings = TL_secureSecretSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(email);
}
if ((flags & 2) != 0) {
secure_settings.serializeToStream(stream);
}
}
}
public static abstract class DocumentAttribute extends TLObject {
public String alt;
public InputStickerSet stickerset;
public int duration;
public int flags;
public TL_maskCoords mask_coords;
public boolean round_message;
public boolean supports_streaming;
public String file_name;
public int w;
public int h;
public boolean mask;
public String title;
public String performer;
public boolean voice;
public byte[] waveform;
public static DocumentAttribute TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DocumentAttribute result = null;
switch (constructor) {
case 0x3a556302:
result = new TL_documentAttributeSticker_layer55();
break;
case 0x51448e5:
result = new TL_documentAttributeAudio_old();
break;
case 0x6319d612:
result = new TL_documentAttributeSticker();
break;
case 0x11b58939:
result = new TL_documentAttributeAnimated();
break;
case 0x15590068:
result = new TL_documentAttributeFilename();
break;
case 0xef02ce6:
result = new TL_documentAttributeVideo();
break;
case 0x5910cccb:
result = new TL_documentAttributeVideo_layer65();
break;
case 0xded218e0:
result = new TL_documentAttributeAudio_layer45();
break;
case 0xfb0a5727:
result = new TL_documentAttributeSticker_old();
break;
case 0x9801d2f7:
result = new TL_documentAttributeHasStickers();
break;
case 0x994c9882:
result = new TL_documentAttributeSticker_old2();
break;
case 0x6c37c15c:
result = new TL_documentAttributeImageSize();
break;
case 0x9852f9c6:
result = new TL_documentAttributeAudio();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DocumentAttribute", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_documentAttributeSticker_layer55 extends TL_documentAttributeSticker {
public static int constructor = 0x3a556302;
public void readParams(AbstractSerializedData stream, boolean exception) {
alt = stream.readString(exception);
stickerset = InputStickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(alt);
stickerset.serializeToStream(stream);
}
}
public static class TL_documentAttributeAudio_old extends TL_documentAttributeAudio {
public static int constructor = 0x51448e5;
public void readParams(AbstractSerializedData stream, boolean exception) {
duration = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(duration);
}
}
public static class TL_documentAttributeSticker extends DocumentAttribute {
public static int constructor = 0x6319d612;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
mask = (flags & 2) != 0;
alt = stream.readString(exception);
stickerset = InputStickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
mask_coords = TL_maskCoords.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = mask ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeString(alt);
stickerset.serializeToStream(stream);
if ((flags & 1) != 0) {
mask_coords.serializeToStream(stream);
}
}
}
public static class TL_documentAttributeAnimated extends DocumentAttribute {
public static int constructor = 0x11b58939;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_documentAttributeFilename extends DocumentAttribute {
public static int constructor = 0x15590068;
public void readParams(AbstractSerializedData stream, boolean exception) {
file_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(file_name);
}
}
public static class TL_documentAttributeVideo extends DocumentAttribute {
public static int constructor = 0xef02ce6;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
round_message = (flags & 1) != 0;
supports_streaming = (flags & 2) != 0;
duration = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = round_message ? (flags | 1) : (flags &~ 1);
flags = supports_streaming ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(duration);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_documentAttributeVideo_layer65 extends TL_documentAttributeVideo {
public static int constructor = 0x5910cccb;
public void readParams(AbstractSerializedData stream, boolean exception) {
duration = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(duration);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_documentAttributeAudio_layer45 extends TL_documentAttributeAudio {
public static int constructor = 0xded218e0;
public void readParams(AbstractSerializedData stream, boolean exception) {
duration = stream.readInt32(exception);
title = stream.readString(exception);
performer = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(duration);
stream.writeString(title);
stream.writeString(performer);
}
}
public static class TL_documentAttributeSticker_old extends TL_documentAttributeSticker {
public static int constructor = 0xfb0a5727;
public void readParams(AbstractSerializedData stream, boolean exception) {
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_documentAttributeHasStickers extends DocumentAttribute {
public static int constructor = 0x9801d2f7;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_documentAttributeSticker_old2 extends TL_documentAttributeSticker {
public static int constructor = 0x994c9882;
public void readParams(AbstractSerializedData stream, boolean exception) {
alt = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(alt);
}
}
public static class TL_documentAttributeImageSize extends DocumentAttribute {
public static int constructor = 0x6c37c15c;
public void readParams(AbstractSerializedData stream, boolean exception) {
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_documentAttributeAudio extends DocumentAttribute {
public static int constructor = 0x9852f9c6;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
voice = (flags & 1024) != 0;
duration = stream.readInt32(exception);
if ((flags & 1) != 0) {
title = stream.readString(exception);
}
if ((flags & 2) != 0) {
performer = stream.readString(exception);
}
if ((flags & 4) != 0) {
waveform = stream.readByteArray(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = voice ? (flags | 1024) : (flags &~ 1024);
stream.writeInt32(flags);
stream.writeInt32(duration);
if ((flags & 1) != 0) {
stream.writeString(title);
}
if ((flags & 2) != 0) {
stream.writeString(performer);
}
if ((flags & 4) != 0) {
stream.writeByteArray(waveform);
}
}
}
public static class TL_textPhone extends RichText {
public static int constructor = 0x1ccb966a;
public RichText text;
public String phone;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
phone = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
stream.writeString(phone);
}
}
public static class TL_textSuperscript extends RichText {
public static int constructor = 0xc7fb5e01;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textImage extends RichText {
public static int constructor = 0x81ccf4f;
public long document_id;
public int w;
public int h;
public void readParams(AbstractSerializedData stream, boolean exception) {
document_id = stream.readInt64(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(document_id);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_textEmpty extends RichText {
public static int constructor = 0xdc3d824f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_textUrl extends RichText {
public static int constructor = 0x3c2884c1;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
url = stream.readString(exception);
webpage_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
stream.writeString(url);
stream.writeInt64(webpage_id);
}
}
public static class TL_textAnchor extends RichText {
public static int constructor = 0x35553762;
public RichText text;
public String name;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
stream.writeString(name);
}
}
public static class TL_textStrike extends RichText {
public static int constructor = 0x9bf8bb95;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textMarked extends RichText {
public static int constructor = 0x34b8621;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textFixed extends RichText {
public static int constructor = 0x6c3f19b9;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textEmail extends RichText {
public static int constructor = 0xde5a0dd6;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
email = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
stream.writeString(email);
}
}
public static class TL_textPlain extends RichText {
public static int constructor = 0x744694e0;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static class TL_textConcat extends RichText {
public static int constructor = 0x7e6260d7;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
RichText object = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
texts.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = texts.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
texts.get(a).serializeToStream(stream);
}
}
}
public static class TL_textBold extends RichText {
public static int constructor = 0x6724abc4;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textItalic extends RichText {
public static int constructor = 0xd912a59c;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textUnderline extends RichText {
public static int constructor = 0xc12622c4;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_textSubscript extends RichText {
public static int constructor = 0xed6a8504;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_statsURL extends TLObject {
public static int constructor = 0x47a971e0;
public String url;
public static TL_statsURL TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsURL.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsURL", constructor));
} else {
return null;
}
}
TL_statsURL result = new TL_statsURL();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_popularContact extends TLObject {
public static int constructor = 0x5ce14175;
public long client_id;
public int importers;
public static TL_popularContact TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_popularContact.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_popularContact", constructor));
} else {
return null;
}
}
TL_popularContact result = new TL_popularContact();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
client_id = stream.readInt64(exception);
importers = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(client_id);
stream.writeInt32(importers);
}
}
public static class TL_messages_botCallbackAnswer extends TLObject {
public static int constructor = 0x36585ea4;
public int flags;
public boolean alert;
public boolean has_url;
public boolean native_ui;
public String message;
public String url;
public int cache_time;
public static TL_messages_botCallbackAnswer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_botCallbackAnswer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_botCallbackAnswer", constructor));
} else {
return null;
}
}
TL_messages_botCallbackAnswer result = new TL_messages_botCallbackAnswer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
alert = (flags & 2) != 0;
has_url = (flags & 8) != 0;
native_ui = (flags & 16) != 0;
if ((flags & 1) != 0) {
message = stream.readString(exception);
}
if ((flags & 4) != 0) {
url = stream.readString(exception);
}
cache_time = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = alert ? (flags | 2) : (flags &~ 2);
flags = has_url ? (flags | 8) : (flags &~ 8);
flags = native_ui ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(message);
}
if ((flags & 4) != 0) {
stream.writeString(url);
}
stream.writeInt32(cache_time);
}
}
public static class TL_dataJSON extends TLObject {
public static int constructor = 0x7d748d04;
public String data;
public static TL_dataJSON TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_dataJSON.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_dataJSON", constructor));
} else {
return null;
}
}
TL_dataJSON result = new TL_dataJSON();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
data = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(data);
}
}
public static class TL_contactStatus extends TLObject {
public static int constructor = 0xd3680c61;
public int user_id;
public UserStatus status;
public static TL_contactStatus TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contactStatus.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contactStatus", constructor));
} else {
return null;
}
}
TL_contactStatus result = new TL_contactStatus();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
status.serializeToStream(stream);
}
}
public static abstract class GroupCall extends TLObject {
public int flags;
public boolean join_muted;
public boolean can_change_join_muted;
public boolean join_date_asc;
public boolean schedule_start_subscribed;
public boolean can_start_video;
public boolean record_video_active;
public long id;
public long access_hash;
public int participants_count;
public String title;
public int stream_dc_id;
public int record_start_date;
public int schedule_date;
public int unmuted_video_count;
public int unmuted_video_limit;
public int version;
public int duration;
public static GroupCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
GroupCall result = null;
switch (constructor) {
case 0x7780bcb4:
result = new TL_groupCallDiscarded();
break;
case 0xd597650c:
result = new TL_groupCall();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in GroupCall", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_groupCallDiscarded extends GroupCall {
public static int constructor = 0x7780bcb4;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
duration = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(duration);
}
}
public static class TL_groupCall extends GroupCall {
public static int constructor = 0xd597650c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
join_muted = (flags & 2) != 0;
can_change_join_muted = (flags & 4) != 0;
join_date_asc = (flags & 64) != 0;
schedule_start_subscribed = (flags & 256) != 0;
can_start_video = (flags & 512) != 0;
record_video_active = (flags & 2048) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
participants_count = stream.readInt32(exception);
if ((flags & 8) != 0) {
title = stream.readString(exception);
}
if ((flags & 16) != 0) {
stream_dc_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
record_start_date = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
schedule_date = stream.readInt32(exception);
}
if ((flags & 1024) != 0) {
unmuted_video_count = stream.readInt32(exception);
}
unmuted_video_limit = stream.readInt32(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = join_muted ? (flags | 2) : (flags &~ 2);
flags = can_change_join_muted ? (flags | 4) : (flags &~ 4);
flags = join_date_asc ? (flags | 64) : (flags &~ 64);
flags = schedule_start_subscribed ? (flags | 256) : (flags &~ 256);
flags = can_start_video ? (flags | 512) : (flags &~ 512);
flags = record_video_active ? (flags | 2048) : (flags &~ 2048);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(participants_count);
if ((flags & 8) != 0) {
stream.writeString(title);
}
if ((flags & 16) != 0) {
stream.writeInt32(stream_dc_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(record_start_date);
}
if ((flags & 128) != 0) {
stream.writeInt32(schedule_date);
}
if ((flags & 1024) != 0) {
stream.writeInt32(unmuted_video_count);
}
stream.writeInt32(unmuted_video_limit);
stream.writeInt32(version);
}
}
public static class TL_channelBannedRights_layer92 extends TLObject {
public static int constructor = 0x58cf4249;
public int flags;
public boolean view_messages;
public boolean send_messages;
public boolean send_media;
public boolean send_stickers;
public boolean send_gifs;
public boolean send_games;
public boolean send_inline;
public boolean embed_links;
public int until_date;
public static TL_channelBannedRights_layer92 TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channelBannedRights_layer92.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channelBannedRights_layer92", constructor));
} else {
return null;
}
}
TL_channelBannedRights_layer92 result = new TL_channelBannedRights_layer92();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
view_messages = (flags & 1) != 0;
send_messages = (flags & 2) != 0;
send_media = (flags & 4) != 0;
send_stickers = (flags & 8) != 0;
send_gifs = (flags & 16) != 0;
send_games = (flags & 32) != 0;
send_inline = (flags & 64) != 0;
embed_links = (flags & 128) != 0;
until_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = view_messages ? (flags | 1) : (flags &~ 1);
flags = send_messages ? (flags | 2) : (flags &~ 2);
flags = send_media ? (flags | 4) : (flags &~ 4);
flags = send_stickers ? (flags | 8) : (flags &~ 8);
flags = send_gifs ? (flags | 16) : (flags &~ 16);
flags = send_games ? (flags | 32) : (flags &~ 32);
flags = send_inline ? (flags | 64) : (flags &~ 64);
flags = embed_links ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
stream.writeInt32(until_date);
}
}
public static abstract class DialogPeer extends TLObject {
public static DialogPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DialogPeer result = null;
switch (constructor) {
case 0xe56dbf05:
result = new TL_dialogPeer();
break;
case 0x514519e2:
result = new TL_dialogPeerFolder();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DialogPeer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_dialogPeer extends DialogPeer {
public static int constructor = 0xe56dbf05;
public Peer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_dialogPeerFolder extends DialogPeer {
public static int constructor = 0x514519e2;
public int folder_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
folder_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(folder_id);
}
}
public static class TL_messageUserReaction extends TLObject {
public static int constructor = 0xd267dcbc;
public int user_id;
public String reaction;
public static TL_messageUserReaction TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageUserReaction.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageUserReaction", constructor));
} else {
return null;
}
}
TL_messageUserReaction result = new TL_messageUserReaction();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
reaction = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeString(reaction);
}
}
public static abstract class auth_Authorization extends TLObject {
public static auth_Authorization TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
auth_Authorization result = null;
switch (constructor) {
case 0x44747e9a:
result = new TL_auth_authorizationSignUpRequired();
break;
case 0xcd050916:
result = new TL_auth_authorization();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in auth_Authorization", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_auth_authorizationSignUpRequired extends auth_Authorization {
public static int constructor = 0x44747e9a;
public int flags;
public TL_help_termsOfService terms_of_service;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
terms_of_service = TL_help_termsOfService.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
terms_of_service.serializeToStream(stream);
}
}
}
public static class TL_auth_authorization extends auth_Authorization {
public static int constructor = 0xcd050916;
public int flags;
public int tmp_sessions;
public User user;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
tmp_sessions = stream.readInt32(exception);
}
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(tmp_sessions);
}
user.serializeToStream(stream);
}
}
public static class TL_pollAnswer extends TLObject {
public static int constructor = 0x6ca9c2e9;
public String text;
public byte[] option;
public static TL_pollAnswer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pollAnswer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pollAnswer", constructor));
} else {
return null;
}
}
TL_pollAnswer result = new TL_pollAnswer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
option = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
stream.writeByteArray(option);
}
}
public static abstract class JSONValue extends TLObject {
public static JSONValue TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
JSONValue result = null;
switch (constructor) {
case 0xc7345e6a:
result = new TL_jsonBool();
break;
case 0x3f6d7b68:
result = new TL_jsonNull();
break;
case 0xb71e767a:
result = new TL_jsonString();
break;
case 0xf7444763:
result = new TL_jsonArray();
break;
case 0x99c1d49d:
result = new TL_jsonObject();
break;
case 0x2be0dfa4:
result = new TL_jsonNumber();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in JSONValue", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_jsonBool extends JSONValue {
public static int constructor = 0xc7345e6a;
public boolean value;
public void readParams(AbstractSerializedData stream, boolean exception) {
value = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(value);
}
}
public static class TL_jsonNull extends JSONValue {
public static int constructor = 0x3f6d7b68;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_jsonString extends JSONValue {
public static int constructor = 0xb71e767a;
public String value;
public void readParams(AbstractSerializedData stream, boolean exception) {
value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(value);
}
}
public static class TL_jsonArray extends JSONValue {
public static int constructor = 0xf7444763;
public ArrayList<JSONValue> value = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
JSONValue object = JSONValue.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
value.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = value.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
value.get(a).serializeToStream(stream);
}
}
}
public static class TL_jsonObject extends JSONValue {
public static int constructor = 0x99c1d49d;
public ArrayList<TL_jsonObjectValue> value = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_jsonObjectValue object = TL_jsonObjectValue.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
value.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = value.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
value.get(a).serializeToStream(stream);
}
}
}
public static class TL_jsonNumber extends JSONValue {
public static int constructor = 0x2be0dfa4;
public double value;
public void readParams(AbstractSerializedData stream, boolean exception) {
value = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(value);
}
}
public static abstract class InputWallPaper extends TLObject {
public static InputWallPaper TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputWallPaper result = null;
switch (constructor) {
case 0xe630b979:
result = new TL_inputWallPaper();
break;
case 0x967a462e:
result = new TL_inputWallPaperNoFile();
break;
case 0x72091c80:
result = new TL_inputWallPaperSlug();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputWallPaper", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputWallPaper extends InputWallPaper {
public static int constructor = 0xe630b979;
public long id;
public long access_hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputWallPaperNoFile extends InputWallPaper {
public static int constructor = 0x967a462e;
public long id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_inputWallPaperSlug extends InputWallPaper {
public static int constructor = 0x72091c80;
public String slug;
public void readParams(AbstractSerializedData stream, boolean exception) {
slug = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(slug);
}
}
public static class TL_messages_historyImportParsed extends TLObject {
public static int constructor = 0x5e0fb7b9;
public int flags;
public boolean pm;
public boolean group;
public String title;
public static TL_messages_historyImportParsed TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_historyImportParsed.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_historyImportParsed", constructor));
} else {
return null;
}
}
TL_messages_historyImportParsed result = new TL_messages_historyImportParsed();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pm = (flags & 1) != 0;
group = (flags & 2) != 0;
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pm ? (flags | 1) : (flags &~ 1);
flags = group ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
if ((flags & 4) != 0) {
stream.writeString(title);
}
}
}
public static class TL_folder extends TLObject {
public static int constructor = 0xff544e65;
public int flags;
public boolean autofill_new_broadcasts;
public boolean autofill_public_groups;
public boolean autofill_new_correspondents;
public int id;
public String title;
public ChatPhoto photo;
public static TL_folder TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_folder.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_folder", constructor));
} else {
return null;
}
}
TL_folder result = new TL_folder();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
autofill_new_broadcasts = (flags & 1) != 0;
autofill_public_groups = (flags & 2) != 0;
autofill_new_correspondents = (flags & 4) != 0;
id = stream.readInt32(exception);
title = stream.readString(exception);
if ((flags & 8) != 0) {
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = autofill_new_broadcasts ? (flags | 1) : (flags &~ 1);
flags = autofill_public_groups ? (flags | 2) : (flags &~ 2);
flags = autofill_new_correspondents ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(title);
if ((flags & 8) != 0) {
photo.serializeToStream(stream);
}
}
}
public static abstract class messages_Messages extends TLObject {
public ArrayList<Message> messages = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public int flags;
public boolean inexact;
public int pts;
public int count;
public int next_rate;
public int offset_id_offset;
public static messages_Messages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_Messages result = null;
switch (constructor) {
case 0x3a54685e:
result = new TL_messages_messagesSlice();
break;
case 0x8c718e87:
result = new TL_messages_messages();
break;
case 0x64479808:
result = new TL_messages_channelMessages();
break;
case 0x74535f21:
result = new TL_messages_messagesNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_Messages", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_messagesSlice extends messages_Messages {
public static int constructor = 0x3a54685e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
inexact = (flags & 2) != 0;
count = stream.readInt32(exception);
if ((flags & 1) != 0) {
next_rate = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
offset_id_offset = stream.readInt32(exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = inexact ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(count);
if ((flags & 1) != 0) {
stream.writeInt32(next_rate);
}
if ((flags & 4) != 0) {
stream.writeInt32(offset_id_offset);
}
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_messages extends messages_Messages {
public static int constructor = 0x8c718e87;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_channelMessages extends messages_Messages {
public static int constructor = 0x64479808;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
inexact = (flags & 2) != 0;
pts = stream.readInt32(exception);
count = stream.readInt32(exception);
if ((flags & 4) != 0) {
offset_id_offset = stream.readInt32(exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = inexact ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(pts);
stream.writeInt32(count);
if ((flags & 4) != 0) {
stream.writeInt32(offset_id_offset);
}
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_messagesNotModified extends messages_Messages {
public static int constructor = 0x74535f21;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
}
}
public static class TL_statsGroupTopAdmin extends TLObject {
public static int constructor = 0x6014f412;
public int user_id;
public int deleted;
public int kicked;
public int banned;
public static TL_statsGroupTopAdmin TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsGroupTopAdmin.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsGroupTopAdmin", constructor));
} else {
return null;
}
}
TL_statsGroupTopAdmin result = new TL_statsGroupTopAdmin();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
deleted = stream.readInt32(exception);
kicked = stream.readInt32(exception);
banned = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(deleted);
stream.writeInt32(kicked);
stream.writeInt32(banned);
}
}
public static class TL_payments_paymentForm extends TLObject {
public static int constructor = 0x8d0b2415;
public int flags;
public boolean can_save_credentials;
public boolean password_missing;
public long form_id;
public int bot_id;
public TL_invoice invoice;
public int provider_id;
public String url;
public String native_provider;
public TL_dataJSON native_params;
public TL_paymentRequestedInfo saved_info;
public TL_paymentSavedCredentialsCard saved_credentials;
public ArrayList<User> users = new ArrayList<>();
public static TL_payments_paymentForm TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_payments_paymentForm.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_payments_paymentForm", constructor));
} else {
return null;
}
}
TL_payments_paymentForm result = new TL_payments_paymentForm();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_save_credentials = (flags & 4) != 0;
password_missing = (flags & 8) != 0;
form_id = stream.readInt64(exception);
bot_id = stream.readInt32(exception);
invoice = TL_invoice.TLdeserialize(stream, stream.readInt32(exception), exception);
provider_id = stream.readInt32(exception);
url = stream.readString(exception);
if ((flags & 16) != 0) {
native_provider = stream.readString(exception);
}
if ((flags & 16) != 0) {
native_params = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 1) != 0) {
saved_info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
saved_credentials = TL_paymentSavedCredentialsCard.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_save_credentials ? (flags | 4) : (flags &~ 4);
flags = password_missing ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeInt64(form_id);
stream.writeInt32(bot_id);
invoice.serializeToStream(stream);
stream.writeInt32(provider_id);
stream.writeString(url);
if ((flags & 16) != 0) {
stream.writeString(native_provider);
}
if ((flags & 16) != 0) {
native_params.serializeToStream(stream);
}
if ((flags & 1) != 0) {
saved_info.serializeToStream(stream);
}
if ((flags & 2) != 0) {
saved_credentials.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ContactLink_layer101 extends TLObject {
public static ContactLink_layer101 TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ContactLink_layer101 result = null;
switch (constructor) {
case 0xfeedd3ad:
result = new TL_contactLinkNone();
break;
case 0xd502c2d0:
result = new TL_contactLinkContact();
break;
case 0x5f4f9247:
result = new TL_contactLinkUnknown();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ContactLink", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_contactLinkNone extends ContactLink_layer101 {
public static int constructor = 0xfeedd3ad;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contactLinkContact extends ContactLink_layer101 {
public static int constructor = 0xd502c2d0;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contactLinkUnknown extends ContactLink_layer101 {
public static int constructor = 0x5f4f9247;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_link_layer101 extends TLObject {
public static int constructor = 0x3ace484c;
public ContactLink_layer101 my_link;
public ContactLink_layer101 foreign_link;
public User user;
public static TL_contacts_link_layer101 TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contacts_link_layer101.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contacts_link", constructor));
} else {
return null;
}
}
TL_contacts_link_layer101 result = new TL_contacts_link_layer101();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
my_link = ContactLink_layer101.TLdeserialize(stream, stream.readInt32(exception), exception);
foreign_link = ContactLink_layer101.TLdeserialize(stream, stream.readInt32(exception), exception);
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
my_link.serializeToStream(stream);
foreign_link.serializeToStream(stream);
user.serializeToStream(stream);
}
}
public static abstract class EncryptedFile extends TLObject {
public long id;
public long access_hash;
public int size;
public int dc_id;
public int key_fingerprint;
public static EncryptedFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
EncryptedFile result = null;
switch (constructor) {
case 0x4a70994c:
result = new TL_encryptedFile();
break;
case 0xc21f497e:
result = new TL_encryptedFileEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in EncryptedFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_encryptedFile extends EncryptedFile {
public static int constructor = 0x4a70994c;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
key_fingerprint = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(size);
stream.writeInt32(dc_id);
stream.writeInt32(key_fingerprint);
}
}
public static class TL_encryptedFileEmpty extends EncryptedFile {
public static int constructor = 0xc21f497e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class Peer extends TLObject {
public int channel_id;
public int user_id;
public int chat_id;
public static Peer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Peer result = null;
switch (constructor) {
case 0xbddde532:
result = new TL_peerChannel();
break;
case 0x9db1bc6d:
result = new TL_peerUser();
break;
case 0xbad0e5bb:
result = new TL_peerChat();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Peer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_peerChannel extends Peer {
public static int constructor = 0xbddde532;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
}
}
public static class TL_peerUser extends Peer {
public static int constructor = 0x9db1bc6d;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
}
}
public static class TL_peerChat extends Peer {
public static int constructor = 0xbad0e5bb;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_labeledPrice extends TLObject {
public static int constructor = 0xcb296bf8;
public String label;
public long amount;
public static TL_labeledPrice TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_labeledPrice.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_labeledPrice", constructor));
} else {
return null;
}
}
TL_labeledPrice result = new TL_labeledPrice();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
label = stream.readString(exception);
amount = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(label);
stream.writeInt64(amount);
}
}
public static class TL_messages_exportedChatInvites extends TLObject {
public static int constructor = 0xbdc62dcc;
public int count;
public ArrayList<ExportedChatInvite> invites = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_exportedChatInvites TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_exportedChatInvites.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_exportedChatInvites", constructor));
} else {
return null;
}
}
TL_messages_exportedChatInvites result = new TL_messages_exportedChatInvites();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
ExportedChatInvite object = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
invites.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = invites.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
invites.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputStickerSetItem extends TLObject {
public static int constructor = 0xffa0a496;
public int flags;
public InputDocument document;
public String emoji;
public TL_maskCoords mask_coords;
public static TL_inputStickerSetItem TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputStickerSetItem.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputStickerSetItem", constructor));
} else {
return null;
}
}
TL_inputStickerSetItem result = new TL_inputStickerSetItem();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
document = InputDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
emoji = stream.readString(exception);
if ((flags & 1) != 0) {
mask_coords = TL_maskCoords.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
document.serializeToStream(stream);
stream.writeString(emoji);
if ((flags & 1) != 0) {
mask_coords.serializeToStream(stream);
}
}
}
public static class TL_langPackDifference extends TLObject {
public static int constructor = 0xf385c1f6;
public String lang_code;
public int from_version;
public int version;
public ArrayList<LangPackString> strings = new ArrayList<>();
public static TL_langPackDifference TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_langPackDifference.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_langPackDifference", constructor));
} else {
return null;
}
}
TL_langPackDifference result = new TL_langPackDifference();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
lang_code = stream.readString(exception);
from_version = stream.readInt32(exception);
version = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
LangPackString object = LangPackString.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
strings.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
stream.writeInt32(from_version);
stream.writeInt32(version);
stream.writeInt32(0x1cb5c415);
int count = strings.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
strings.get(a).serializeToStream(stream);
}
}
}
public static abstract class help_DeepLinkInfo extends TLObject {
public static help_DeepLinkInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_DeepLinkInfo result = null;
switch (constructor) {
case 0x66afa166:
result = new TL_help_deepLinkInfoEmpty();
break;
case 0x6a4ee832:
result = new TL_help_deepLinkInfo();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_DeepLinkInfo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_deepLinkInfoEmpty extends help_DeepLinkInfo {
public static int constructor = 0x66afa166;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_deepLinkInfo extends help_DeepLinkInfo {
public static int constructor = 0x6a4ee832;
public int flags;
public boolean update_app;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
update_app = (flags & 1) != 0;
message = stream.readString(exception);
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = update_app ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(message);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_chatAdminRights extends TLObject {
public static int constructor = 0x5fb224d5;
public int flags;
public boolean change_info;
public boolean post_messages;
public boolean edit_messages;
public boolean delete_messages;
public boolean ban_users;
public boolean invite_users;
public boolean pin_messages;
public boolean add_admins;
public boolean anonymous;
public boolean manage_call;
public boolean other;
public static TL_chatAdminRights TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatAdminRights.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatAdminRights", constructor));
} else {
return null;
}
}
TL_chatAdminRights result = new TL_chatAdminRights();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
change_info = (flags & 1) != 0;
post_messages = (flags & 2) != 0;
edit_messages = (flags & 4) != 0;
delete_messages = (flags & 8) != 0;
ban_users = (flags & 16) != 0;
invite_users = (flags & 32) != 0;
pin_messages = (flags & 128) != 0;
add_admins = (flags & 512) != 0;
anonymous = (flags & 1024) != 0;
manage_call = (flags & 2048) != 0;
other = (flags & 4096) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = change_info ? (flags | 1) : (flags &~ 1);
flags = post_messages ? (flags | 2) : (flags &~ 2);
flags = edit_messages ? (flags | 4) : (flags &~ 4);
flags = delete_messages ? (flags | 8) : (flags &~ 8);
flags = ban_users ? (flags | 16) : (flags &~ 16);
flags = invite_users ? (flags | 32) : (flags &~ 32);
flags = pin_messages ? (flags | 128) : (flags &~ 128);
flags = add_admins ? (flags | 512) : (flags &~ 512);
flags = anonymous ? (flags | 1024) : (flags &~ 1024);
flags = manage_call ? (flags | 2048) : (flags &~ 2048);
flags = other ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
}
}
public static class TL_statsAbsValueAndPrev extends TLObject {
public static int constructor = 0xcb43acde;
public double current;
public double previous;
public static TL_statsAbsValueAndPrev TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsAbsValueAndPrev.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsAbsValueAndPrev", constructor));
} else {
return null;
}
}
TL_statsAbsValueAndPrev result = new TL_statsAbsValueAndPrev();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
current = stream.readDouble(exception);
previous = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(current);
stream.writeDouble(previous);
}
}
public static abstract class PollResults extends TLObject {
public int flags;
public boolean min;
public ArrayList<TL_pollAnswerVoters> results = new ArrayList<>();
public int total_voters;
public ArrayList<Integer> recent_voters = new ArrayList<>();
public String solution;
public ArrayList<MessageEntity> solution_entities = new ArrayList<>();
public static PollResults TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PollResults result = null;
switch (constructor) {
case 0x5755785a:
result = new TL_pollResults_layer108();
break;
case 0xc87024a2:
result = new TL_pollResults_layer111();
break;
case 0xbadcc1a3:
result = new TL_pollResults();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PollResults", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pollResults_layer108 extends TL_pollResults {
public static int constructor = 0x5755785a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
min = (flags & 1) != 0;
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswerVoters object = TL_pollAnswerVoters.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
}
if ((flags & 4) != 0) {
total_voters = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = min ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
}
if ((flags & 4) != 0) {
stream.writeInt32(total_voters);
}
}
}
public static class TL_pollResults_layer111 extends PollResults {
public static int constructor = 0xc87024a2;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
min = (flags & 1) != 0;
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswerVoters object = TL_pollAnswerVoters.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
}
if ((flags & 4) != 0) {
total_voters = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
recent_voters.add(stream.readInt32(exception));
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = min ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
}
if ((flags & 4) != 0) {
stream.writeInt32(total_voters);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = recent_voters.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(recent_voters.get(a));
}
}
}
}
public static class TL_pollResults extends PollResults {
public static int constructor = 0xbadcc1a3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
min = (flags & 1) != 0;
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswerVoters object = TL_pollAnswerVoters.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
}
if ((flags & 4) != 0) {
total_voters = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
recent_voters.add(stream.readInt32(exception));
}
}
if ((flags & 16) != 0) {
solution = stream.readString(exception);
}
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
solution_entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = min ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
}
if ((flags & 4) != 0) {
stream.writeInt32(total_voters);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = recent_voters.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(recent_voters.get(a));
}
}
if ((flags & 16) != 0) {
stream.writeString(solution);
}
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = solution_entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
solution_entities.get(a).serializeToStream(stream);
}
}
}
}
public static abstract class SecureFile extends TLObject {
public static SecureFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecureFile result = null;
switch (constructor) {
case 0x64199744:
result = new TL_secureFileEmpty();
break;
case 0xe0277a62:
result = new TL_secureFile();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecureFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_secureFileEmpty extends SecureFile {
public static int constructor = 0x64199744;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureFile extends SecureFile {
public static int constructor = 0xe0277a62;
public long id;
public long access_hash;
public int size;
public int dc_id;
public int date;
public byte[] file_hash;
public byte[] secret;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
date = stream.readInt32(exception);
file_hash = stream.readByteArray(exception);
secret = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(size);
stream.writeInt32(dc_id);
stream.writeInt32(date);
stream.writeByteArray(file_hash);
stream.writeByteArray(secret);
}
}
public static class TL_messages_affectedMessages extends TLObject {
public static int constructor = 0x84d19185;
public int pts;
public int pts_count;
public static TL_messages_affectedMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_affectedMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_affectedMessages", constructor));
} else {
return null;
}
}
TL_messages_affectedMessages result = new TL_messages_affectedMessages();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_messages_chatInviteImporters extends TLObject {
public static int constructor = 0x81b6b00a;
public int count;
public ArrayList<TL_chatInviteImporter> importers = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_chatInviteImporters TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_chatInviteImporters.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_chatInviteImporters", constructor));
} else {
return null;
}
}
TL_messages_chatInviteImporters result = new TL_messages_chatInviteImporters();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_chatInviteImporter object = TL_chatInviteImporter.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
importers.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = importers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
importers.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_pollAnswerVoters extends TLObject {
public static int constructor = 0x3b6ddad2;
public int flags;
public boolean chosen;
public boolean correct;
public byte[] option;
public int voters;
public static TL_pollAnswerVoters TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pollAnswerVoters.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pollAnswerVoters", constructor));
} else {
return null;
}
}
TL_pollAnswerVoters result = new TL_pollAnswerVoters();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
chosen = (flags & 1) != 0;
correct = (flags & 2) != 0;
option = stream.readByteArray(exception);
voters = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = chosen ? (flags | 1) : (flags &~ 1);
flags = correct ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeByteArray(option);
stream.writeInt32(voters);
}
}
public static class TL_channels_channelParticipant extends TLObject {
public static int constructor = 0xdfb80317;
public ChannelParticipant participant;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_channels_channelParticipant TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channels_channelParticipant.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channels_channelParticipant", constructor));
} else {
return null;
}
}
TL_channels_channelParticipant result = new TL_channels_channelParticipant();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participant.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_authorization extends TLObject {
public static int constructor = 0xad01d61d;
public int flags;
public boolean current;
public boolean official_app;
public boolean password_pending;
public long hash;
public String device_model;
public String platform;
public String system_version;
public int api_id;
public String app_name;
public String app_version;
public int date_created;
public int date_active;
public String ip;
public String country;
public String region;
public static TL_authorization TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_authorization.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_authorization", constructor));
} else {
return null;
}
}
TL_authorization result = new TL_authorization();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
current = (flags & 1) != 0;
official_app = (flags & 2) != 0;
password_pending = (flags & 4) != 0;
hash = stream.readInt64(exception);
device_model = stream.readString(exception);
platform = stream.readString(exception);
system_version = stream.readString(exception);
api_id = stream.readInt32(exception);
app_name = stream.readString(exception);
app_version = stream.readString(exception);
date_created = stream.readInt32(exception);
date_active = stream.readInt32(exception);
ip = stream.readString(exception);
country = stream.readString(exception);
region = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = current ? (flags | 1) : (flags &~ 1);
flags = official_app ? (flags | 2) : (flags &~ 2);
flags = password_pending ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt64(hash);
stream.writeString(device_model);
stream.writeString(platform);
stream.writeString(system_version);
stream.writeInt32(api_id);
stream.writeString(app_name);
stream.writeString(app_version);
stream.writeInt32(date_created);
stream.writeInt32(date_active);
stream.writeString(ip);
stream.writeString(country);
stream.writeString(region);
}
}
public static abstract class StatsGraph extends TLObject {
public static StatsGraph TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
StatsGraph result = null;
switch (constructor) {
case 0x8ea464b6:
result = new TL_statsGraph();
break;
case 0x4a27eb2d:
result = new TL_statsGraphAsync();
break;
case 0xbedc9822:
result = new TL_statsGraphError();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in StatsGraph", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_statsGraph extends StatsGraph {
public static int constructor = 0x8ea464b6;
public int flags;
public TL_dataJSON json;
public String zoom_token;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
json = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
zoom_token = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
json.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeString(zoom_token);
}
}
}
public static class TL_statsGraphAsync extends StatsGraph {
public static int constructor = 0x4a27eb2d;
public String token;
public void readParams(AbstractSerializedData stream, boolean exception) {
token = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(token);
}
}
public static class TL_statsGraphError extends StatsGraph {
public static int constructor = 0xbedc9822;
public String error;
public void readParams(AbstractSerializedData stream, boolean exception) {
error = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(error);
}
}
public static class TL_messageInteractionCounters extends TLObject {
public static int constructor = 0xad4fc9bd;
public int msg_id;
public int views;
public int forwards;
public static TL_messageInteractionCounters TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageInteractionCounters.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageInteractionCounters", constructor));
} else {
return null;
}
}
TL_messageInteractionCounters result = new TL_messageInteractionCounters();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
msg_id = stream.readInt32(exception);
views = stream.readInt32(exception);
forwards = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(msg_id);
stream.writeInt32(views);
stream.writeInt32(forwards);
}
}
public static abstract class updates_Difference extends TLObject {
public ArrayList<Message> new_messages = new ArrayList<>();
public ArrayList<EncryptedMessage> new_encrypted_messages = new ArrayList<>();
public ArrayList<Update> other_updates = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public TL_updates_state state;
public TL_updates_state intermediate_state;
public int pts;
public int date;
public int seq;
public static updates_Difference TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
updates_Difference result = null;
switch (constructor) {
case 0xf49ca0:
result = new TL_updates_difference();
break;
case 0xa8fb1981:
result = new TL_updates_differenceSlice();
break;
case 0x4afe8f6d:
result = new TL_updates_differenceTooLong();
break;
case 0x5d75a138:
result = new TL_updates_differenceEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in updates_Difference", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_updates_difference extends updates_Difference {
public static int constructor = 0xf49ca0;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
new_messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
EncryptedMessage object = EncryptedMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
new_encrypted_messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Update object = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
other_updates.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
state = TL_updates_state.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = new_messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
new_messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = new_encrypted_messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
new_encrypted_messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = other_updates.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
other_updates.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
state.serializeToStream(stream);
}
}
public static class TL_updates_differenceSlice extends updates_Difference {
public static int constructor = 0xa8fb1981;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
new_messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
EncryptedMessage object = EncryptedMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
new_encrypted_messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Update object = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
other_updates.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
intermediate_state = TL_updates_state.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = new_messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
new_messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = new_encrypted_messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
new_encrypted_messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = other_updates.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
other_updates.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
intermediate_state.serializeToStream(stream);
}
}
public static class TL_updates_differenceTooLong extends updates_Difference {
public static int constructor = 0x4afe8f6d;
public void readParams(AbstractSerializedData stream, boolean exception) {
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pts);
}
}
public static class TL_updates_differenceEmpty extends updates_Difference {
public static int constructor = 0x5d75a138;
public void readParams(AbstractSerializedData stream, boolean exception) {
date = stream.readInt32(exception);
seq = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(date);
stream.writeInt32(seq);
}
}
public static abstract class PrivacyKey extends TLObject {
public static PrivacyKey TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PrivacyKey result = null;
switch (constructor) {
case 0xbc2eab30:
result = new TL_privacyKeyStatusTimestamp();
break;
case 0x39491cc8:
result = new TL_privacyKeyPhoneP2P();
break;
case 0x500e6dfa:
result = new TL_privacyKeyChatInvite();
break;
case 0x42ffd42b:
result = new TL_privacyKeyAddedByPhone();
break;
case 0x3d662b7b:
result = new TL_privacyKeyPhoneCall();
break;
case 0x69ec56a3:
result = new TL_privacyKeyForwards();
break;
case 0xd19ae46d:
result = new TL_privacyKeyPhoneNumber();
break;
case 0x96151fed:
result = new TL_privacyKeyProfilePhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PrivacyKey", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_privacyKeyStatusTimestamp extends PrivacyKey {
public static int constructor = 0xbc2eab30;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyPhoneP2P extends PrivacyKey {
public static int constructor = 0x39491cc8;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyChatInvite extends PrivacyKey {
public static int constructor = 0x500e6dfa;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyPhoneCall extends PrivacyKey {
public static int constructor = 0x3d662b7b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyAddedByPhone extends PrivacyKey {
public static int constructor = 0x42ffd42b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyForwards extends PrivacyKey {
public static int constructor = 0x69ec56a3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyPhoneNumber extends PrivacyKey {
public static int constructor = 0xd19ae46d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyKeyProfilePhoto extends PrivacyKey {
public static int constructor = 0x96151fed;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class GeoPoint extends TLObject {
public int flags;
public double _long;
public double lat;
public int accuracy_radius;
public long access_hash;
public static GeoPoint TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
GeoPoint result = null;
switch (constructor) {
case 0x296f104:
result = new TL_geoPoint_layer119();
break;
case 0x2049d70c:
result = new TL_geoPoint_layer81();
break;
case 0x1117dd5f:
result = new TL_geoPointEmpty();
break;
case 0xb2a2f663:
result = new TL_geoPoint();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in GeoPoint", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_geoPoint_layer119 extends TL_geoPoint {
public static int constructor = 0x296f104;
public void readParams(AbstractSerializedData stream, boolean exception) {
_long = stream.readDouble(exception);
lat = stream.readDouble(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(_long);
stream.writeDouble(lat);
stream.writeInt64(access_hash);
}
}
public static class TL_geoPoint_layer81 extends TL_geoPoint {
public static int constructor = 0x2049d70c;
public void readParams(AbstractSerializedData stream, boolean exception) {
_long = stream.readDouble(exception);
lat = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(_long);
stream.writeDouble(lat);
}
}
public static class TL_geoPointEmpty extends GeoPoint {
public static int constructor = 0x1117dd5f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_geoPoint extends GeoPoint {
public static int constructor = 0xb2a2f663;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
_long = stream.readDouble(exception);
lat = stream.readDouble(exception);
access_hash = stream.readInt64(exception);
if ((flags & 1) != 0) {
accuracy_radius = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeDouble(_long);
stream.writeDouble(lat);
stream.writeInt64(access_hash);
if ((flags & 1) != 0) {
stream.writeInt32(accuracy_radius);
}
}
}
public static class TL_account_privacyRules extends TLObject {
public static int constructor = 0x50a04e45;
public ArrayList<PrivacyRule> rules = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_account_privacyRules TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_privacyRules.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_privacyRules", constructor));
} else {
return null;
}
}
TL_account_privacyRules result = new TL_account_privacyRules();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PrivacyRule object = PrivacyRule.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rules.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = rules.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rules.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ChatInvite extends TLObject {
public int flags;
public boolean channel;
public boolean broadcast;
public boolean isPublic;
public boolean megagroup;
public String title;
public Photo photo;
public int participants_count;
public ArrayList<User> participants = new ArrayList<>();
public Chat chat;
public int expires;
public static ChatInvite TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChatInvite result = null;
switch (constructor) {
case 0xdfc2f58e:
result = new TL_chatInvite();
break;
case 0x61695cb0:
result = new TL_chatInvitePeek();
break;
case 0x5a686d7c:
result = new TL_chatInviteAlready();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChatInvite", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_chatInvite extends ChatInvite {
public static int constructor = 0xdfc2f58e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
channel = (flags & 1) != 0;
broadcast = (flags & 2) != 0;
isPublic = (flags & 4) != 0;
megagroup = (flags & 8) != 0;
title = stream.readString(exception);
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
participants_count = stream.readInt32(exception);
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = channel ? (flags | 1) : (flags &~ 1);
flags = broadcast ? (flags | 2) : (flags &~ 2);
flags = isPublic ? (flags | 4) : (flags &~ 4);
flags = megagroup ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(title);
photo.serializeToStream(stream);
stream.writeInt32(participants_count);
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_chatInvitePeek extends ChatInvite {
public static int constructor = 0x61695cb0;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
chat.serializeToStream(stream);
stream.writeInt32(expires);
}
}
public static class TL_chatInviteAlready extends ChatInvite {
public static int constructor = 0x5a686d7c;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
chat.serializeToStream(stream);
}
}
public static class TL_inputGroupCall extends TLObject {
public static int constructor = 0xd8aa840f;
public long id;
public long access_hash;
public static TL_inputGroupCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputGroupCall.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputGroupCall", constructor));
} else {
return null;
}
}
TL_inputGroupCall result = new TL_inputGroupCall();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static abstract class help_AppUpdate extends TLObject {
public static help_AppUpdate TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_AppUpdate result = null;
switch (constructor) {
case 0xccbbce30:
result = new TL_help_appUpdate();
break;
case 0xc45a6536:
result = new TL_help_noAppUpdate();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_AppUpdate", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_appUpdate extends help_AppUpdate {
public static int constructor = 0xccbbce30;
public int flags;
public boolean can_not_skip;
public int id;
public String version;
public String text;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public Document document;
public String url;
public Document sticker;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_not_skip = (flags & 1) != 0;
id = stream.readInt32(exception);
version = stream.readString(exception);
text = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
if ((flags & 2) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
url = stream.readString(exception);
}
if ((flags & 8) != 0) {
sticker = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_not_skip ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(version);
stream.writeString(text);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
if ((flags & 2) != 0) {
document.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeString(url);
}
if ((flags & 8) != 0) {
sticker.serializeToStream(stream);
}
}
}
public static class TL_help_noAppUpdate extends help_AppUpdate {
public static int constructor = 0xc45a6536;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_affectedFoundMessages extends TLObject {
public static int constructor = 0xef8d3e6c;
public int pts;
public int pts_count;
public int offset;
public ArrayList<Integer> messages = new ArrayList<>();
public static TL_messages_affectedFoundMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_affectedFoundMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_affectedFoundMessages", constructor));
} else {
return null;
}
}
TL_messages_affectedFoundMessages result = new TL_messages_affectedFoundMessages();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
offset = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
stream.writeInt32(offset);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
}
}
public static class TL_channelAdminLogEvent extends TLObject {
public static int constructor = 0x3b5a3e40;
public long id;
public int date;
public int user_id;
public ChannelAdminLogEventAction action;
public static TL_channelAdminLogEvent TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channelAdminLogEvent.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channelAdminLogEvent", constructor));
} else {
return null;
}
}
TL_channelAdminLogEvent result = new TL_channelAdminLogEvent();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
date = stream.readInt32(exception);
user_id = stream.readInt32(exception);
action = ChannelAdminLogEventAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(date);
stream.writeInt32(user_id);
action.serializeToStream(stream);
}
}
public static abstract class messages_FavedStickers extends TLObject {
public int hash;
public ArrayList<TL_stickerPack> packs = new ArrayList<>();
public ArrayList<Document> stickers = new ArrayList<>();
public static messages_FavedStickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_FavedStickers result = null;
switch (constructor) {
case 0x9e8fa6d3:
result = new TL_messages_favedStickersNotModified();
break;
case 0xf37f2f16:
result = new TL_messages_favedStickers();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_FavedStickers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_favedStickersNotModified extends messages_FavedStickers {
public static int constructor = 0x9e8fa6d3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_favedStickers extends messages_FavedStickers {
public static int constructor = 0xf37f2f16;
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_stickerPack object = TL_stickerPack.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
packs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
stickers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = packs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
packs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
}
}
public static class TL_langPackLanguage extends TLObject {
public static int constructor = 0xeeca5ce3;
public int flags;
public boolean official;
public boolean rtl;
public String name;
public String native_name;
public String lang_code;
public String base_lang_code;
public String plural_code;
public int strings_count;
public int translated_count;
public String translations_url;
public static TL_langPackLanguage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_langPackLanguage.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_langPackLanguage", constructor));
} else {
return null;
}
}
TL_langPackLanguage result = new TL_langPackLanguage();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
official = (flags & 1) != 0;
rtl = (flags & 4) != 0;
name = stream.readString(exception);
native_name = stream.readString(exception);
lang_code = stream.readString(exception);
if ((flags & 2) != 0) {
base_lang_code = stream.readString(exception);
}
plural_code = stream.readString(exception);
strings_count = stream.readInt32(exception);
translated_count = stream.readInt32(exception);
translations_url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = official ? (flags | 1) : (flags &~ 1);
flags = rtl ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeString(name);
stream.writeString(native_name);
stream.writeString(lang_code);
if ((flags & 2) != 0) {
stream.writeString(base_lang_code);
}
stream.writeString(plural_code);
stream.writeInt32(strings_count);
stream.writeInt32(translated_count);
stream.writeString(translations_url);
}
}
public static class TL_chatInviteImporter extends TLObject {
public static int constructor = 0x1e3e6680;
public int user_id;
public int date;
public static TL_chatInviteImporter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatInviteImporter.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatInviteImporter", constructor));
} else {
return null;
}
}
TL_chatInviteImporter result = new TL_chatInviteImporter();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(date);
}
}
public static abstract class SendMessageAction extends TLObject {
public int progress;
public static SendMessageAction TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SendMessageAction result = null;
switch (constructor) {
case 0xdd6a8f48:
result = new TL_sendMessageGamePlayAction();
break;
case 0xd52f73f7:
result = new TL_sendMessageRecordAudioAction();
break;
case 0x92042ff7:
result = new TL_sendMessageUploadVideoAction_old();
break;
case 0xe6ac8a6f:
result = new TL_sendMessageUploadAudioAction_old();
break;
case 0xf351d7ab:
result = new TL_sendMessageUploadAudioAction();
break;
case 0xd1d34a26:
result = new TL_sendMessageUploadPhotoAction();
break;
case 0x8faee98e:
result = new TL_sendMessageUploadDocumentAction_old();
break;
case 0xe9763aec:
result = new TL_sendMessageUploadVideoAction();
break;
case 0xfd5ec8f5:
result = new TL_sendMessageCancelAction();
break;
case 0x176f8ba1:
result = new TL_sendMessageGeoLocationAction();
break;
case 0x628cbc6f:
result = new TL_sendMessageChooseContactAction();
break;
case 0xb05ac6b1:
result = new TL_sendMessageChooseStickerAction();
break;
case 0x88f27fbc:
result = new TL_sendMessageRecordRoundAction();
break;
case 0x243e1c66:
result = new TL_sendMessageUploadRoundAction();
break;
case 0x16bf744e:
result = new TL_sendMessageTypingAction();
break;
case 0xdbda9246:
result = new TL_sendMessageHistoryImportAction();
break;
case 0x990a3c1a:
result = new TL_sendMessageUploadPhotoAction_old();
break;
case 0xaa0cd9e4:
result = new TL_sendMessageUploadDocumentAction();
break;
case 0xd92c2285:
result = new TL_speakingInGroupCallAction();
break;
case 0xa187d66f:
result = new TL_sendMessageRecordVideoAction();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SendMessageAction", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_sendMessageGamePlayAction extends SendMessageAction {
public static int constructor = 0xdd6a8f48;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageRecordAudioAction extends SendMessageAction {
public static int constructor = 0xd52f73f7;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadVideoAction_old extends TL_sendMessageUploadVideoAction {
public static int constructor = 0x92042ff7;
public void readParams(AbstractSerializedData stream, boolean exception) {
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadAudioAction_old extends TL_sendMessageUploadAudioAction {
public static int constructor = 0xe6ac8a6f;
public void readParams(AbstractSerializedData stream, boolean exception) {
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadAudioAction extends SendMessageAction {
public static int constructor = 0xf351d7ab;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_sendMessageUploadPhotoAction extends SendMessageAction {
public static int constructor = 0xd1d34a26;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_sendMessageUploadDocumentAction_old extends TL_sendMessageUploadDocumentAction {
public static int constructor = 0x8faee98e;
public void readParams(AbstractSerializedData stream, boolean exception) {
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadVideoAction extends SendMessageAction {
public static int constructor = 0xe9763aec;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_sendMessageCancelAction extends SendMessageAction {
public static int constructor = 0xfd5ec8f5;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageGeoLocationAction extends SendMessageAction {
public static int constructor = 0x176f8ba1;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageChooseContactAction extends SendMessageAction {
public static int constructor = 0x628cbc6f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageChooseStickerAction extends SendMessageAction {
public static int constructor = 0xb05ac6b1;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageRecordRoundAction extends SendMessageAction {
public static int constructor = 0x88f27fbc;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadRoundAction extends SendMessageAction {
public static int constructor = 0x243e1c66;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_sendMessageTypingAction extends SendMessageAction {
public static int constructor = 0x16bf744e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageHistoryImportAction extends SendMessageAction {
public static int constructor = 0xdbda9246;
public int progress;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_sendMessageUploadPhotoAction_old extends TL_sendMessageUploadPhotoAction {
public static int constructor = 0x990a3c1a;
public void readParams(AbstractSerializedData stream, boolean exception) {
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageUploadDocumentAction extends SendMessageAction {
public static int constructor = 0xaa0cd9e4;
public void readParams(AbstractSerializedData stream, boolean exception) {
progress = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(progress);
}
}
public static class TL_speakingInGroupCallAction extends SendMessageAction {
public static int constructor = 0xd92c2285;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_sendMessageRecordVideoAction extends SendMessageAction {
public static int constructor = 0xa187d66f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class auth_SentCodeType extends TLObject {
public int length;
public String pattern;
public static auth_SentCodeType TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
auth_SentCodeType result = null;
switch (constructor) {
case 0x3dbb5986:
result = new TL_auth_sentCodeTypeApp();
break;
case 0x5353e5a7:
result = new TL_auth_sentCodeTypeCall();
break;
case 0xab03c6d9:
result = new TL_auth_sentCodeTypeFlashCall();
break;
case 0xc000bba2:
result = new TL_auth_sentCodeTypeSms();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in auth_SentCodeType", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_auth_sentCodeTypeApp extends auth_SentCodeType {
public static int constructor = 0x3dbb5986;
public void readParams(AbstractSerializedData stream, boolean exception) {
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(length);
}
}
public static class TL_auth_sentCodeTypeCall extends auth_SentCodeType {
public static int constructor = 0x5353e5a7;
public void readParams(AbstractSerializedData stream, boolean exception) {
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(length);
}
}
public static class TL_auth_sentCodeTypeFlashCall extends auth_SentCodeType {
public static int constructor = 0xab03c6d9;
public void readParams(AbstractSerializedData stream, boolean exception) {
pattern = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(pattern);
}
}
public static class TL_auth_sentCodeTypeSms extends auth_SentCodeType {
public static int constructor = 0xc000bba2;
public void readParams(AbstractSerializedData stream, boolean exception) {
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(length);
}
}
public static abstract class messages_StickerSetInstallResult extends TLObject {
public ArrayList<StickerSetCovered> sets = new ArrayList<>();
public static messages_StickerSetInstallResult TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_StickerSetInstallResult result = null;
switch (constructor) {
case 0x38641628:
result = new TL_messages_stickerSetInstallResultSuccess();
break;
case 0x35e410a8:
result = new TL_messages_stickerSetInstallResultArchive();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_StickerSetInstallResult", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_stickerSetInstallResultSuccess extends messages_StickerSetInstallResult {
public static int constructor = 0x38641628;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_stickerSetInstallResultArchive extends messages_StickerSetInstallResult {
public static int constructor = 0x35e410a8;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
StickerSetCovered object = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sets.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = sets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sets.get(a).serializeToStream(stream);
}
}
}
public static class TL_peerSettings extends TLObject {
public static int constructor = 0x733f2961;
public int flags;
public boolean report_spam;
public boolean add_contact;
public boolean block_contact;
public boolean share_contact;
public boolean need_contacts_exception;
public boolean report_geo;
public boolean autoarchived;
public boolean invite_members;
public int geo_distance;
public static TL_peerSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_peerSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_peerSettings", constructor));
} else {
return null;
}
}
TL_peerSettings result = new TL_peerSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
report_spam = (flags & 1) != 0;
add_contact = (flags & 2) != 0;
block_contact = (flags & 4) != 0;
share_contact = (flags & 8) != 0;
need_contacts_exception = (flags & 16) != 0;
report_geo = (flags & 32) != 0;
autoarchived = (flags & 128) != 0;
invite_members = (flags & 256) != 0;
if ((flags & 64) != 0) {
geo_distance = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = report_spam ? (flags | 1) : (flags &~ 1);
flags = add_contact ? (flags | 2) : (flags &~ 2);
flags = block_contact ? (flags | 4) : (flags &~ 4);
flags = share_contact ? (flags | 8) : (flags &~ 8);
flags = need_contacts_exception ? (flags | 16) : (flags &~ 16);
flags = report_geo ? (flags | 32) : (flags &~ 32);
flags = autoarchived ? (flags | 128) : (flags &~ 128);
flags = invite_members ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
if ((flags & 64) != 0) {
stream.writeInt32(geo_distance);
}
}
}
public static class TL_statsGroupTopInviter extends TLObject {
public static int constructor = 0x31962a4c;
public int user_id;
public int invitations;
public static TL_statsGroupTopInviter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsGroupTopInviter.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsGroupTopInviter", constructor));
} else {
return null;
}
}
TL_statsGroupTopInviter result = new TL_statsGroupTopInviter();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
invitations = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(invitations);
}
}
public static abstract class InputDialogPeer extends TLObject {
public static InputDialogPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputDialogPeer result = null;
switch (constructor) {
case 0xfcaafeb7:
result = new TL_inputDialogPeer();
break;
case 0x64600527:
result = new TL_inputDialogPeerFolder();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputDialogPeer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputDialogPeer extends InputDialogPeer {
public static int constructor = 0xfcaafeb7;
public InputPeer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_inputDialogPeerFolder extends InputDialogPeer {
public static int constructor = 0x64600527;
public int folder_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
folder_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(folder_id);
}
}
public static abstract class payments_PaymentResult extends TLObject {
public static payments_PaymentResult TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
payments_PaymentResult result = null;
switch (constructor) {
case 0xd8411139:
result = new TL_payments_paymentVerificationNeeded();
break;
case 0x4e5f810d:
result = new TL_payments_paymentResult();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in payments_PaymentResult", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_payments_paymentVerificationNeeded extends payments_PaymentResult {
public static int constructor = 0xd8411139;
public String url;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_payments_paymentResult extends payments_PaymentResult {
public static int constructor = 0x4e5f810d;
public Updates updates;
public void readParams(AbstractSerializedData stream, boolean exception) {
updates = Updates.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
updates.serializeToStream(stream);
}
}
public static class TL_channels_adminLogResults extends TLObject {
public static int constructor = 0xed8af74d;
public ArrayList<TL_channelAdminLogEvent> events = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_channels_adminLogResults TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channels_adminLogResults.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channels_adminLogResults", constructor));
} else {
return null;
}
}
TL_channels_adminLogResults result = new TL_channels_adminLogResults();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_channelAdminLogEvent object = TL_channelAdminLogEvent.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
events.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = events.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
events.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputPhoneContact extends TLObject {
public static int constructor = 0xf392b7f4;
public long client_id;
public String phone;
public String first_name;
public String last_name;
public static TL_inputPhoneContact TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputPhoneContact.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputPhoneContact", constructor));
} else {
return null;
}
}
TL_inputPhoneContact result = new TL_inputPhoneContact();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
client_id = stream.readInt64(exception);
phone = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(client_id);
stream.writeString(phone);
stream.writeString(first_name);
stream.writeString(last_name);
}
}
public static class TL_themeSettings extends TLObject {
public static int constructor = 0x8db4e76c;
public int flags;
public boolean message_colors_animated;
public BaseTheme base_theme;
public int accent_color;
public ArrayList<Integer> message_colors = new ArrayList<>();
public WallPaper wallpaper;
public static TL_themeSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_themeSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_themeSettings", constructor));
} else {
return null;
}
}
TL_themeSettings result = new TL_themeSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
message_colors_animated = (flags & 4) != 0;
base_theme = BaseTheme.TLdeserialize(stream, stream.readInt32(exception), exception);
accent_color = stream.readInt32(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
message_colors.add(stream.readInt32(exception));
}
}
if ((flags & 2) != 0) {
wallpaper = WallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = message_colors_animated ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
base_theme.serializeToStream(stream);
stream.writeInt32(accent_color);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = message_colors.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(message_colors.get(a));
}
}
if ((flags & 2) != 0) {
wallpaper.serializeToStream(stream);
}
}
}
public static class TL_pageCaption extends TLObject {
public static int constructor = 0x6f747657;
public RichText text;
public RichText credit;
public static TL_pageCaption TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pageCaption.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pageCaption", constructor));
} else {
return null;
}
}
TL_pageCaption result = new TL_pageCaption();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
credit = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
credit.serializeToStream(stream);
}
}
public static abstract class PrivacyRule extends TLObject {
public static PrivacyRule TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PrivacyRule result = null;
switch (constructor) {
case 0xf888fa1a:
result = new TL_privacyValueDisallowContacts();
break;
case 0xc7f49b7:
result = new TL_privacyValueDisallowUsers();
break;
case 0x18be796b:
result = new TL_privacyValueAllowChatParticipants();
break;
case 0xacae0690:
result = new TL_privacyValueDisallowChatParticipants();
break;
case 0x65427b82:
result = new TL_privacyValueAllowAll();
break;
case 0x8b73e763:
result = new TL_privacyValueDisallowAll();
break;
case 0x4d5bbe0c:
result = new TL_privacyValueAllowUsers();
break;
case 0xfffe1bac:
result = new TL_privacyValueAllowContacts();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PrivacyRule", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_privacyValueDisallowContacts extends PrivacyRule {
public static int constructor = 0xf888fa1a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyValueDisallowUsers extends PrivacyRule {
public static int constructor = 0xc7f49b7;
public ArrayList<Integer> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
users.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(users.get(a));
}
}
}
public static class TL_privacyValueAllowChatParticipants extends PrivacyRule {
public static int constructor = 0x18be796b;
public ArrayList<Integer> chats = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
chats.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(chats.get(a));
}
}
}
public static class TL_privacyValueDisallowChatParticipants extends PrivacyRule {
public static int constructor = 0xacae0690;
public ArrayList<Integer> chats = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
chats.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(chats.get(a));
}
}
}
public static class TL_privacyValueAllowAll extends PrivacyRule {
public static int constructor = 0x65427b82;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyValueDisallowAll extends PrivacyRule {
public static int constructor = 0x8b73e763;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_privacyValueAllowUsers extends PrivacyRule {
public static int constructor = 0x4d5bbe0c;
public ArrayList<Integer> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
users.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(users.get(a));
}
}
}
public static class TL_privacyValueAllowContacts extends PrivacyRule {
public static int constructor = 0xfffe1bac;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_pageTableCell extends TLObject {
public static int constructor = 0x34566b6a;
public int flags;
public boolean header;
public boolean align_center;
public boolean align_right;
public boolean valign_middle;
public boolean valign_bottom;
public RichText text;
public int colspan;
public int rowspan;
public static TL_pageTableCell TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pageTableCell.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pageTableCell", constructor));
} else {
return null;
}
}
TL_pageTableCell result = new TL_pageTableCell();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
header = (flags & 1) != 0;
align_center = (flags & 8) != 0;
align_right = (flags & 16) != 0;
valign_middle = (flags & 32) != 0;
valign_bottom = (flags & 64) != 0;
if ((flags & 128) != 0) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
colspan = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
rowspan = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = header ? (flags | 1) : (flags &~ 1);
flags = align_center ? (flags | 8) : (flags &~ 8);
flags = align_right ? (flags | 16) : (flags &~ 16);
flags = valign_middle ? (flags | 32) : (flags &~ 32);
flags = valign_bottom ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
if ((flags & 128) != 0) {
text.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(colspan);
}
if ((flags & 4) != 0) {
stream.writeInt32(rowspan);
}
}
}
public static class TL_messageMediaUnsupported_old extends TL_messageMediaUnsupported {
public static int constructor = 0x29632a36;
public void readParams(AbstractSerializedData stream, boolean exception) {
bytes = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(bytes);
}
}
public static class TL_messageMediaAudio_layer45 extends MessageMedia {
public static int constructor = 0xc6b68300;
public void readParams(AbstractSerializedData stream, boolean exception) {
audio_unused = Audio.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
audio_unused.serializeToStream(stream);
}
}
public static class TL_messageMediaPhoto_old extends TL_messageMediaPhoto {
public static int constructor = 0xc8c45a2a;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo.serializeToStream(stream);
}
}
public static class TL_messageMediaInvoice extends MessageMedia {
public static int constructor = 0x84551347;
public WebDocument photo;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
shipping_address_requested = (flags & 2) != 0;
test = (flags & 8) != 0;
title = stream.readString(exception);
description = stream.readString(exception);
if ((flags & 1) != 0) {
photo = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
receipt_msg_id = stream.readInt32(exception);
}
currency = stream.readString(exception);
total_amount = stream.readInt64(exception);
start_param = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = shipping_address_requested ? (flags | 2) : (flags &~ 2);
flags = test ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(title);
stream.writeString(description);
if ((flags & 1) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeInt32(receipt_msg_id);
}
stream.writeString(currency);
stream.writeInt64(total_amount);
stream.writeString(start_param);
}
}
public static class TL_messageMediaUnsupported extends MessageMedia {
public static int constructor = 0x9f84f49e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageMediaEmpty extends MessageMedia {
public static int constructor = 0x3ded6320;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageMediaVenue extends MessageMedia {
public static int constructor = 0x2ec0533f;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
venue_type = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo.serializeToStream(stream);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
stream.writeString(venue_type);
}
}
public static class TL_messageMediaVenue_layer71 extends MessageMedia {
public static int constructor = 0x7912b71f;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo.serializeToStream(stream);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
}
}
public static class TL_messageMediaVideo_old extends TL_messageMediaVideo_layer45 {
public static int constructor = 0xa2d24290;
public void readParams(AbstractSerializedData stream, boolean exception) {
video_unused = Video.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
video_unused.serializeToStream(stream);
}
}
public static class TL_messageMediaDocument extends MessageMedia {
public static int constructor = 0x9cb070d7;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
} else {
document = new TL_documentEmpty();
}
if ((flags & 4) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
document.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_messageMediaDocument_layer74 extends TL_messageMediaDocument {
public static int constructor = 0x7c4414d3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
} else {
document = new TL_documentEmpty();
}
if ((flags & 2) != 0) {
captionLegacy = stream.readString(exception);
}
if ((flags & 4) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
document.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeString(captionLegacy);
}
if ((flags & 4) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_messageMediaDocument_old extends TL_messageMediaDocument {
public static int constructor = 0x2fda2204;
public void readParams(AbstractSerializedData stream, boolean exception) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
document.serializeToStream(stream);
}
}
public static class TL_messageMediaDocument_layer68 extends TL_messageMediaDocument {
public static int constructor = 0xf3e02ea8;
public void readParams(AbstractSerializedData stream, boolean exception) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
captionLegacy = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
document.serializeToStream(stream);
stream.writeString(captionLegacy);
}
}
public static class TL_messageMediaPhoto extends MessageMedia {
public static int constructor = 0x695150d7;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
} else {
photo = new TL_photoEmpty();
}
if ((flags & 4) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_messageMediaPoll extends MessageMedia {
public static int constructor = 0x4bd6e798;
public Poll poll;
public PollResults results;
public void readParams(AbstractSerializedData stream, boolean exception) {
poll = Poll.TLdeserialize(stream, stream.readInt32(exception), exception);
results = PollResults.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
poll.serializeToStream(stream);
results.serializeToStream(stream);
}
}
public static class TL_messageMediaPhoto_layer74 extends TL_messageMediaPhoto {
public static int constructor = 0xb5223b0f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
} else {
photo = new TL_photoEmpty();
}
if ((flags & 2) != 0) {
captionLegacy = stream.readString(exception);
}
if ((flags & 4) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeString(captionLegacy);
}
if ((flags & 4) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_messageMediaGeoLive extends MessageMedia {
public static int constructor = 0xb940c666;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
heading = stream.readInt32(exception);
}
period = stream.readInt32(exception);
if ((flags & 2) != 0) {
proximity_notification_radius = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(heading);
}
stream.writeInt32(period);
if ((flags & 2) != 0) {
stream.writeInt32(proximity_notification_radius);
}
}
}
public static class TL_messageMediaGeoLive_layer119 extends TL_messageMediaGeoLive {
public static int constructor = 0x7c3c2609;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
period = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo.serializeToStream(stream);
stream.writeInt32(period);
}
}
public static class TL_messageMediaGame extends MessageMedia {
public static int constructor = 0xfdb19008;
public void readParams(AbstractSerializedData stream, boolean exception) {
game = TL_game.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
game.serializeToStream(stream);
}
}
public static class TL_messageMediaContact_layer81 extends TL_messageMediaContact {
public static int constructor = 0x5e7d2f39;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeInt32(user_id);
}
}
public static class TL_messageMediaPhoto_layer68 extends TL_messageMediaPhoto {
public static int constructor = 0x3d8ce53d;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
captionLegacy = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo.serializeToStream(stream);
stream.writeString(captionLegacy);
}
}
public static class TL_messageMediaVideo_layer45 extends MessageMedia {
public static int constructor = 0x5bcf1675;
public void readParams(AbstractSerializedData stream, boolean exception) {
video_unused = Video.TLdeserialize(stream, stream.readInt32(exception), exception);
captionLegacy = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
video_unused.serializeToStream(stream);
stream.writeString(captionLegacy);
}
}
public static class TL_messageMediaContact extends MessageMedia {
public static int constructor = 0xcbf24940;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
vcard = stream.readString(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(vcard);
stream.writeInt32(user_id);
}
}
public static class TL_messageMediaDice extends MessageMedia {
public static int constructor = 0x3f7ee58b;
public int value;
public String emoticon;
public void readParams(AbstractSerializedData stream, boolean exception) {
value = stream.readInt32(exception);
emoticon = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(value);
stream.writeString(emoticon);
}
}
public static class TL_messageMediaDice_layer111 extends TL_messageMediaDice {
public static int constructor = 0x638fe46b;
public void readParams(AbstractSerializedData stream, boolean exception) {
value = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(value);
}
}
public static class TL_messageMediaGeo extends MessageMedia {
public static int constructor = 0x56e0d474;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo.serializeToStream(stream);
}
}
public static class TL_messageMediaWebPage extends MessageMedia {
public static int constructor = 0xa32dd600;
public void readParams(AbstractSerializedData stream, boolean exception) {
webpage = WebPage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
webpage.serializeToStream(stream);
}
}
public static abstract class LangPackString extends TLObject {
public int flags;
public String key;
public String zero_value;
public String one_value;
public String two_value;
public String few_value;
public String many_value;
public String other_value;
public String value;
public static LangPackString TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
LangPackString result = null;
switch (constructor) {
case 0x6c47ac9f:
result = new TL_langPackStringPluralized();
break;
case 0xcad181f6:
result = new TL_langPackString();
break;
case 0x2979eeb2:
result = new TL_langPackStringDeleted();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in LangPackString", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_langPackStringPluralized extends LangPackString {
public static int constructor = 0x6c47ac9f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
key = stream.readString(exception);
if ((flags & 1) != 0) {
zero_value = stream.readString(exception);
}
if ((flags & 2) != 0) {
one_value = stream.readString(exception);
}
if ((flags & 4) != 0) {
two_value = stream.readString(exception);
}
if ((flags & 8) != 0) {
few_value = stream.readString(exception);
}
if ((flags & 16) != 0) {
many_value = stream.readString(exception);
}
other_value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(key);
if ((flags & 1) != 0) {
stream.writeString(zero_value);
}
if ((flags & 2) != 0) {
stream.writeString(one_value);
}
if ((flags & 4) != 0) {
stream.writeString(two_value);
}
if ((flags & 8) != 0) {
stream.writeString(few_value);
}
if ((flags & 16) != 0) {
stream.writeString(many_value);
}
stream.writeString(other_value);
}
}
public static class TL_langPackString extends LangPackString {
public static int constructor = 0xcad181f6;
public void readParams(AbstractSerializedData stream, boolean exception) {
key = stream.readString(exception);
value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(key);
stream.writeString(value);
}
}
public static class TL_langPackStringDeleted extends LangPackString {
public static int constructor = 0x2979eeb2;
public void readParams(AbstractSerializedData stream, boolean exception) {
key = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(key);
}
}
public static class TL_auth_sentCode extends TLObject {
public static int constructor = 0x5e002502;
public int flags;
public auth_SentCodeType type;
public String phone_code_hash;
public auth_CodeType next_type;
public int timeout;
public static TL_auth_sentCode TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_auth_sentCode.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_auth_sentCode", constructor));
} else {
return null;
}
}
TL_auth_sentCode result = new TL_auth_sentCode();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
type = auth_SentCodeType.TLdeserialize(stream, stream.readInt32(exception), exception);
phone_code_hash = stream.readString(exception);
if ((flags & 2) != 0) {
next_type = auth_CodeType.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
timeout = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
type.serializeToStream(stream);
stream.writeString(phone_code_hash);
if ((flags & 2) != 0) {
next_type.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeInt32(timeout);
}
}
}
public static abstract class BotInlineResult extends TLObject {
public int flags;
public String id;
public String type;
public Photo photo;
public Document document;
public String title;
public String description;
public String url;
public WebDocument thumb;
public WebDocument content;
public BotInlineMessage send_message;
public long query_id;
public static BotInlineResult TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
BotInlineResult result = null;
switch (constructor) {
case 0x11965f3a:
result = new TL_botInlineResult();
break;
case 0x17db940b:
result = new TL_botInlineMediaResult();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in BotInlineResult", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_botInlineResult extends BotInlineResult {
public static int constructor = 0x11965f3a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readString(exception);
type = stream.readString(exception);
if ((flags & 2) != 0) {
title = stream.readString(exception);
}
if ((flags & 4) != 0) {
description = stream.readString(exception);
}
if ((flags & 8) != 0) {
url = stream.readString(exception);
}
if ((flags & 16) != 0) {
thumb = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
content = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
send_message = BotInlineMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(id);
stream.writeString(type);
if ((flags & 2) != 0) {
stream.writeString(title);
}
if ((flags & 4) != 0) {
stream.writeString(description);
}
if ((flags & 8) != 0) {
stream.writeString(url);
}
if ((flags & 16) != 0) {
thumb.serializeToStream(stream);
}
if ((flags & 32) != 0) {
content.serializeToStream(stream);
}
send_message.serializeToStream(stream);
}
}
public static class TL_botInlineMediaResult extends BotInlineResult {
public static int constructor = 0x17db940b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readString(exception);
type = stream.readString(exception);
if ((flags & 1) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
send_message = BotInlineMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(id);
stream.writeString(type);
if ((flags & 1) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 2) != 0) {
document.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
send_message.serializeToStream(stream);
}
}
public static abstract class PeerNotifySettings extends TLObject {
public int flags;
public int mute_until;
public String sound;
public boolean show_previews;
public int events_mask;
public boolean silent;
public static PeerNotifySettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PeerNotifySettings result = null;
switch (constructor) {
case 0x9acda4c0:
result = new TL_peerNotifySettings_layer77();
break;
case 0xaf509d20:
result = new TL_peerNotifySettings();
break;
case 0x8d5e11ee:
result = new TL_peerNotifySettings_layer47();
break;
case 0x70a68512:
result = new TL_peerNotifySettingsEmpty_layer77();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PeerNotifySettings", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_peerNotifySettings_layer77 extends TL_peerNotifySettings {
public static int constructor = 0x9acda4c0;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
show_previews = (flags & 1) != 0;
silent = (flags & 2) != 0;
mute_until = stream.readInt32(exception);
sound = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = show_previews ? (flags | 1) : (flags &~ 1);
flags = silent ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(mute_until);
stream.writeString(sound);
}
}
public static class TL_peerNotifySettings extends PeerNotifySettings {
public static int constructor = 0xaf509d20;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
show_previews = stream.readBool(exception);
}
if ((flags & 2) != 0) {
silent = stream.readBool(exception);
}
if ((flags & 4) != 0) {
mute_until = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
sound = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeBool(show_previews);
}
if ((flags & 2) != 0) {
stream.writeBool(silent);
}
if ((flags & 4) != 0) {
stream.writeInt32(mute_until);
}
if ((flags & 8) != 0) {
stream.writeString(sound);
}
}
}
public static class TL_peerNotifySettings_layer47 extends TL_peerNotifySettings {
public static int constructor = 0x8d5e11ee;
public void readParams(AbstractSerializedData stream, boolean exception) {
mute_until = stream.readInt32(exception);
sound = stream.readString(exception);
show_previews = stream.readBool(exception);
events_mask = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(mute_until);
stream.writeString(sound);
stream.writeBool(show_previews);
stream.writeInt32(events_mask);
}
}
public static class TL_peerNotifySettingsEmpty_layer77 extends PeerNotifySettings {
public static int constructor = 0x70a68512;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class contacts_Blocked extends TLObject {
public ArrayList<TL_peerBlocked> blocked = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public int count;
public static contacts_Blocked TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
contacts_Blocked result = null;
switch (constructor) {
case 0xade1591:
result = new TL_contacts_blocked();
break;
case 0xe1664194:
result = new TL_contacts_blockedSlice();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in contacts_Blocked", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_contacts_blocked extends contacts_Blocked {
public static int constructor = 0xade1591;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_peerBlocked object = TL_peerBlocked.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocked.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocked.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocked.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_contacts_blockedSlice extends contacts_Blocked {
public static int constructor = 0xe1664194;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_peerBlocked object = TL_peerBlocked.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocked.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = blocked.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocked.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputSecureValue extends TLObject {
public static int constructor = 0xdb21d0a7;
public int flags;
public SecureValueType type;
public TL_secureData data;
public InputSecureFile front_side;
public InputSecureFile reverse_side;
public InputSecureFile selfie;
public ArrayList<InputSecureFile> translation = new ArrayList<>();
public ArrayList<InputSecureFile> files = new ArrayList<>();
public SecurePlainData plain_data;
public static TL_inputSecureValue TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputSecureValue.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputSecureValue", constructor));
} else {
return null;
}
}
TL_inputSecureValue result = new TL_inputSecureValue();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
data = TL_secureData.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
front_side = InputSecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
reverse_side = InputSecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
selfie = InputSecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputSecureFile object = InputSecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
translation.add(object);
}
}
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputSecureFile object = InputSecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
files.add(object);
}
}
if ((flags & 32) != 0) {
plain_data = SecurePlainData.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
type.serializeToStream(stream);
if ((flags & 1) != 0) {
data.serializeToStream(stream);
}
if ((flags & 2) != 0) {
front_side.serializeToStream(stream);
}
if ((flags & 4) != 0) {
reverse_side.serializeToStream(stream);
}
if ((flags & 8) != 0) {
selfie.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(0x1cb5c415);
int count = translation.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
translation.get(a).serializeToStream(stream);
}
}
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = files.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
files.get(a).serializeToStream(stream);
}
}
if ((flags & 32) != 0) {
plain_data.serializeToStream(stream);
}
}
}
public static class TL_chatTheme extends TLObject {
public static int constructor = 0xed0b5c33;
public String emoticon;
public Theme theme;
public Theme dark_theme;
public static TL_chatTheme TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatTheme.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatTheme", constructor));
} else {
return null;
}
}
TL_chatTheme result = new TL_chatTheme();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
emoticon = stream.readString(exception);
theme = Theme.TLdeserialize(stream, stream.readInt32(exception), exception);
dark_theme = Theme.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
theme.serializeToStream(stream);
dark_theme.serializeToStream(stream);
}
}
public static abstract class messages_DhConfig extends TLObject {
public byte[] random;
public int g;
public byte[] p;
public int version;
public static messages_DhConfig TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_DhConfig result = null;
switch (constructor) {
case 0xc0e24635:
result = new TL_messages_dhConfigNotModified();
break;
case 0x2c221edd:
result = new TL_messages_dhConfig();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_DhConfig", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_dhConfigNotModified extends messages_DhConfig {
public static int constructor = 0xc0e24635;
public void readParams(AbstractSerializedData stream, boolean exception) {
random = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(random);
}
}
public static class TL_messages_dhConfig extends messages_DhConfig {
public static int constructor = 0x2c221edd;
public void readParams(AbstractSerializedData stream, boolean exception) {
g = stream.readInt32(exception);
p = stream.readByteArray(exception);
version = stream.readInt32(exception);
random = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(g);
stream.writeByteArray(p);
stream.writeInt32(version);
stream.writeByteArray(random);
}
}
public static class TL_globalPrivacySettings extends TLObject {
public static int constructor = 0xbea2f424;
public int flags;
public boolean archive_and_mute_new_noncontact_peers;
public static TL_globalPrivacySettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_globalPrivacySettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_globalPrivacySettings", constructor));
} else {
return null;
}
}
TL_globalPrivacySettings result = new TL_globalPrivacySettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
archive_and_mute_new_noncontact_peers = stream.readBool(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeBool(archive_and_mute_new_noncontact_peers);
}
}
}
public static abstract class help_UserInfo extends TLObject {
public static help_UserInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_UserInfo result = null;
switch (constructor) {
case 0xf3ae2eed:
result = new TL_help_userInfoEmpty();
break;
case 0x1eb3758:
result = new TL_help_userInfo();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_UserInfo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_userInfoEmpty extends help_UserInfo {
public static int constructor = 0xf3ae2eed;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_userInfo extends help_UserInfo {
public static int constructor = 0x1eb3758;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public String author;
public int date;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
author = stream.readString(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(message);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
stream.writeString(author);
stream.writeInt32(date);
}
}
public static class TL_secureValueHash extends TLObject {
public static int constructor = 0xed1ecdb0;
public SecureValueType type;
public byte[] hash;
public static TL_secureValueHash TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_secureValueHash.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_secureValueHash", constructor));
} else {
return null;
}
}
TL_secureValueHash result = new TL_secureValueHash();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
hash = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(hash);
}
}
public static class TL_messageReactionsList extends TLObject {
public static int constructor = 0xe3ae6108;
public int flags;
public int count;
public ArrayList<TL_messageUserReaction> reactions = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public String next_offset;
public static TL_messageReactionsList TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageReactionsList.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageReactionsList", constructor));
} else {
return null;
}
}
TL_messageReactionsList result = new TL_messageReactionsList();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_messageUserReaction object = TL_messageUserReaction.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
reactions.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
if ((flags & 1) != 0) {
next_offset = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = reactions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
reactions.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeString(next_offset);
}
}
}
public static class TL_messages_stickerSet extends TLObject {
public static int constructor = 0xb60a24a6;
public StickerSet set;
public ArrayList<TL_stickerPack> packs = new ArrayList<>();
public ArrayList<Document> documents = new ArrayList<>();
public static TL_messages_stickerSet TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_stickerSet.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_stickerSet", constructor));
} else {
return null;
}
}
TL_messages_stickerSet result = new TL_messages_stickerSet();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
set = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_stickerPack object = TL_stickerPack.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
packs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
set.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = packs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
packs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputGeoPoint extends TLObject {
public int flags;
public double lat;
public double _long;
public int accuracy_radius;
public static InputGeoPoint TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputGeoPoint result = null;
switch (constructor) {
case 0x48222faf:
result = new TL_inputGeoPoint();
break;
case 0xe4c123d6:
result = new TL_inputGeoPointEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputGeoPoint", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputGeoPoint extends InputGeoPoint {
public static int constructor = 0x48222faf;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
lat = stream.readDouble(exception);
_long = stream.readDouble(exception);
if ((flags & 1) != 0) {
accuracy_radius = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeDouble(lat);
stream.writeDouble(_long);
if ((flags & 1) != 0) {
stream.writeInt32(accuracy_radius);
}
}
}
public static class TL_inputGeoPointEmpty extends InputGeoPoint {
public static int constructor = 0xe4c123d6;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_inviteText extends TLObject {
public static int constructor = 0x18cb9f78;
public String message;
public static TL_help_inviteText TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_inviteText.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_inviteText", constructor));
} else {
return null;
}
}
TL_help_inviteText result = new TL_help_inviteText();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
message = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(message);
}
}
public static abstract class Audio extends TLObject {
public long id;
public long access_hash;
public int date;
public int duration;
public String mime_type;
public int size;
public int dc_id;
public int user_id;
public byte[] key;
public byte[] iv;
public static Audio TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Audio result = null;
switch (constructor) {
case 0x586988d8:
result = new TL_audioEmpty_layer45();
break;
case 0xf9e35055:
result = new TL_audio_layer45();
break;
case 0x427425e7:
result = new TL_audio_old();
break;
case 0x555555F6:
result = new TL_audioEncrypted();
break;
case 0xc7ac6496:
result = new TL_audio_old2();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Audio", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_audioEmpty_layer45 extends Audio {
public static int constructor = 0x586988d8;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_audio_layer45 extends Audio {
public static int constructor = 0xf9e35055;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(size);
stream.writeInt32(dc_id);
}
}
public static class TL_audio_old extends TL_audio_layer45 {
public static int constructor = 0x427425e7;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeInt32(size);
stream.writeInt32(dc_id);
}
}
public static class TL_audioEncrypted extends TL_audio_layer45 {
public static int constructor = 0x555555F6;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeInt32(size);
stream.writeInt32(dc_id);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_audio_old2 extends TL_audio_layer45 {
public static int constructor = 0xc7ac6496;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(size);
stream.writeInt32(dc_id);
}
}
public static class TL_help_country extends TLObject {
public static int constructor = 0xc3878e23;
public int flags;
public boolean hidden;
public String iso2;
public String default_name;
public String name;
public ArrayList<TL_help_countryCode> country_codes = new ArrayList<>();
public static TL_help_country TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_country.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_country", constructor));
} else {
return null;
}
}
TL_help_country result = new TL_help_country();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
hidden = (flags & 1) != 0;
iso2 = stream.readString(exception);
default_name = stream.readString(exception);
if ((flags & 2) != 0) {
name = stream.readString(exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_help_countryCode object = TL_help_countryCode.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
country_codes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = hidden ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(iso2);
stream.writeString(default_name);
if ((flags & 2) != 0) {
stream.writeString(name);
}
stream.writeInt32(0x1cb5c415);
int count = country_codes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
country_codes.get(a).serializeToStream(stream);
}
}
}
public static abstract class SecurePasswordKdfAlgo extends TLObject {
public static SecurePasswordKdfAlgo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecurePasswordKdfAlgo result = null;
switch (constructor) {
case 0xbbf2dda0:
result = new TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000();
break;
case 0x86471d92:
result = new TL_securePasswordKdfAlgoSHA512();
break;
case 0x4a8537:
result = new TL_securePasswordKdfAlgoUnknown();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecurePasswordKdfAlgo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 extends SecurePasswordKdfAlgo {
public static int constructor = 0xbbf2dda0;
public byte[] salt;
public void readParams(AbstractSerializedData stream, boolean exception) {
salt = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(salt);
}
}
public static class TL_securePasswordKdfAlgoSHA512 extends SecurePasswordKdfAlgo {
public static int constructor = 0x86471d92;
public byte[] salt;
public void readParams(AbstractSerializedData stream, boolean exception) {
salt = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(salt);
}
}
public static class TL_securePasswordKdfAlgoUnknown extends SecurePasswordKdfAlgo {
public static int constructor = 0x4a8537;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_historyImport extends TLObject {
public static int constructor = 0x1662af0b;
public long id;
public static TL_messages_historyImport TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_historyImport.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_historyImport", constructor));
} else {
return null;
}
}
TL_messages_historyImport result = new TL_messages_historyImport();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static abstract class BotInfo extends TLObject {
public int user_id;
public String description;
public ArrayList<TL_botCommand> commands = new ArrayList<>();
public int version;
public static BotInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
BotInfo result = null;
switch (constructor) {
case 0xbb2e37ce:
result = new TL_botInfoEmpty_layer48();
break;
case 0x98e81d3a:
result = new TL_botInfo();
break;
case 0x9cf585d:
result = new TL_botInfo_layer48();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in BotInfo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_botInfoEmpty_layer48 extends TL_botInfo {
public static int constructor = 0xbb2e37ce;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_botInfo extends BotInfo {
public static int constructor = 0x98e81d3a;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
description = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_botCommand object = TL_botCommand.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
commands.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeString(description);
stream.writeInt32(0x1cb5c415);
int count = commands.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
commands.get(a).serializeToStream(stream);
}
}
}
public static class TL_botInfo_layer48 extends TL_botInfo {
public static int constructor = 0x9cf585d;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
version = stream.readInt32(exception);
stream.readString(exception);
description = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_botCommand object = TL_botCommand.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
commands.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(version);
stream.writeString("");
stream.writeString(description);
stream.writeInt32(0x1cb5c415);
int count = commands.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
commands.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputGame extends TLObject {
public InputUser bot_id;
public String short_name;
public long id;
public long access_hash;
public static InputGame TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputGame result = null;
switch (constructor) {
case 0xc331e80a:
result = new TL_inputGameShortName();
break;
case 0x32c3e77:
result = new TL_inputGameID();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputGame", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputGameShortName extends InputGame {
public static int constructor = 0xc331e80a;
public void readParams(AbstractSerializedData stream, boolean exception) {
bot_id = InputUser.TLdeserialize(stream, stream.readInt32(exception), exception);
short_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
bot_id.serializeToStream(stream);
stream.writeString(short_name);
}
}
public static class TL_inputGameID extends InputGame {
public static int constructor = 0x32c3e77;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_messageReplies extends TLObject {
public static int constructor = 0x4128faac;
public int flags;
public boolean comments;
public int replies;
public int replies_pts;
public ArrayList<Peer> recent_repliers = new ArrayList<>();
public int channel_id;
public int max_id;
public int read_max_id;
public static TL_messageReplies TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageReplies.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageReplies", constructor));
} else {
return null;
}
}
TL_messageReplies result = new TL_messageReplies();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
comments = (flags & 1) != 0;
replies = stream.readInt32(exception);
replies_pts = stream.readInt32(exception);
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Peer object = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
recent_repliers.add(object);
}
}
if ((flags & 1) != 0) {
channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
max_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
read_max_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = comments ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(replies);
stream.writeInt32(replies_pts);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = recent_repliers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
recent_repliers.get(a).serializeToStream(stream);
}
}
if ((flags & 1) != 0) {
stream.writeInt32(channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(max_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(read_max_id);
}
}
}
public static class TL_messages_sponsoredMessages extends TLObject {
public static int constructor = 0x65a4c7d5;
public ArrayList<TL_sponsoredMessage> messages = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_sponsoredMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_sponsoredMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_sponsoredMessages", constructor));
} else {
return null;
}
}
TL_messages_sponsoredMessages result = new TL_messages_sponsoredMessages();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_sponsoredMessage object = TL_sponsoredMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messageViews extends TLObject {
public static int constructor = 0x455b853d;
public int flags;
public int views;
public int forwards;
public TL_messageReplies replies;
public static TL_messageViews TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageViews.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageViews", constructor));
} else {
return null;
}
}
TL_messageViews result = new TL_messageViews();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
forwards = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
replies = TL_messageReplies.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(views);
}
if ((flags & 2) != 0) {
stream.writeInt32(forwards);
}
if ((flags & 4) != 0) {
replies.serializeToStream(stream);
}
}
}
public static abstract class ReplyMarkup extends TLObject {
public int flags;
public boolean resize;
public boolean single_use;
public boolean selective;
public String placeholder;
public ArrayList<TL_keyboardButtonRow> rows = new ArrayList<>();
public static ReplyMarkup TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ReplyMarkup result = null;
switch (constructor) {
case 0x85dd99d1:
result = new TL_replyKeyboardMarkup();
break;
case 0xa03e5b85:
result = new TL_replyKeyboardHide();
break;
case 0x86b40b08:
result = new TL_replyKeyboardForceReply();
break;
case 0x3502758c:
result = new TL_replyKeyboardMarkup_layer129();
break;
case 0xf4108aa0:
result = new TL_replyKeyboardForceReply_layer129();
break;
case 0x48a30254:
result = new TL_replyInlineMarkup();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ReplyMarkup", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_replyKeyboardMarkup extends ReplyMarkup {
public static int constructor = 0x85dd99d1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
resize = (flags & 1) != 0;
single_use = (flags & 2) != 0;
selective = (flags & 4) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_keyboardButtonRow object = TL_keyboardButtonRow.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rows.add(object);
}
if ((flags & 8) != 0) {
placeholder = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = resize ? (flags | 1) : (flags &~ 1);
flags = single_use ? (flags | 2) : (flags &~ 2);
flags = selective ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = rows.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rows.get(a).serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeString(placeholder);
}
}
}
public static class TL_replyKeyboardHide extends ReplyMarkup {
public static int constructor = 0xa03e5b85;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
selective = (flags & 4) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = selective ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
}
}
public static class TL_replyKeyboardForceReply extends ReplyMarkup {
public static int constructor = 0x86b40b08;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
single_use = (flags & 2) != 0;
selective = (flags & 4) != 0;
if ((flags & 8) != 0) {
placeholder = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = single_use ? (flags | 2) : (flags &~ 2);
flags = selective ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 8) != 0) {
stream.writeString(placeholder);
}
}
}
public static class TL_replyKeyboardMarkup_layer129 extends TL_replyKeyboardMarkup {
public static int constructor = 0x3502758c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
resize = (flags & 1) != 0;
single_use = (flags & 2) != 0;
selective = (flags & 4) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_keyboardButtonRow object = TL_keyboardButtonRow.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rows.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = resize ? (flags | 1) : (flags &~ 1);
flags = single_use ? (flags | 2) : (flags &~ 2);
flags = selective ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = rows.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rows.get(a).serializeToStream(stream);
}
}
}
public static class TL_replyKeyboardForceReply_layer129 extends TL_replyKeyboardForceReply {
public static int constructor = 0xf4108aa0;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
single_use = (flags & 2) != 0;
selective = (flags & 4) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = single_use ? (flags | 2) : (flags &~ 2);
flags = selective ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
}
}
public static class TL_replyInlineMarkup extends ReplyMarkup {
public static int constructor = 0x48a30254;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_keyboardButtonRow object = TL_keyboardButtonRow.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rows.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = rows.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rows.get(a).serializeToStream(stream);
}
}
}
public static class TL_webPageAttributeTheme extends TLObject {
public static int constructor = 0x54b56617;
public int flags;
public ArrayList<Document> documents = new ArrayList<>();
public TL_themeSettings settings;
public static TL_webPageAttributeTheme TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_webPageAttributeTheme.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_webPageAttributeTheme", constructor));
} else {
return null;
}
}
TL_webPageAttributeTheme result = new TL_webPageAttributeTheme();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
if ((flags & 2) != 0) {
settings = TL_themeSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
if ((flags & 2) != 0) {
settings.serializeToStream(stream);
}
}
}
public static abstract class contacts_Contacts extends TLObject {
public ArrayList<TL_contact> contacts = new ArrayList<>();
public int saved_count;
public ArrayList<User> users = new ArrayList<>();
public static contacts_Contacts TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
contacts_Contacts result = null;
switch (constructor) {
case 0xb74ba9d2:
result = new TL_contacts_contactsNotModified();
break;
case 0xeae87e42:
result = new TL_contacts_contacts();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in contacts_Contacts", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_contacts_contactsNotModified extends contacts_Contacts {
public static int constructor = 0xb74ba9d2;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_contacts extends contacts_Contacts {
public static int constructor = 0xeae87e42;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_contact object = TL_contact.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
contacts.add(object);
}
saved_count = stream.readInt32(exception);
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = contacts.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
contacts.get(a).serializeToStream(stream);
}
stream.writeInt32(saved_count);
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class SecureRequiredType extends TLObject {
public static SecureRequiredType TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecureRequiredType result = null;
switch (constructor) {
case 0x829d99da:
result = new TL_secureRequiredType();
break;
case 0x27477b4:
result = new TL_secureRequiredTypeOneOf();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecureRequiredType", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_secureRequiredType extends SecureRequiredType {
public static int constructor = 0x829d99da;
public int flags;
public boolean native_names;
public boolean selfie_required;
public boolean translation_required;
public SecureValueType type;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
native_names = (flags & 1) != 0;
selfie_required = (flags & 2) != 0;
translation_required = (flags & 4) != 0;
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = native_names ? (flags | 1) : (flags &~ 1);
flags = selfie_required ? (flags | 2) : (flags &~ 2);
flags = translation_required ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
type.serializeToStream(stream);
}
}
public static class TL_secureRequiredTypeOneOf extends SecureRequiredType {
public static int constructor = 0x27477b4;
public ArrayList<SecureRequiredType> types = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureRequiredType object = SecureRequiredType.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
types.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = types.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
types.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputPrivacyKey extends TLObject {
public static InputPrivacyKey TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputPrivacyKey result = null;
switch (constructor) {
case 0x4f96cb18:
result = new TL_inputPrivacyKeyStatusTimestamp();
break;
case 0xbdfb0426:
result = new TL_inputPrivacyKeyChatInvite();
break;
case 0xfabadc5f:
result = new TL_inputPrivacyKeyPhoneCall();
break;
case 0xa4dd4c08:
result = new TL_inputPrivacyKeyForwards();
break;
case 0x5719bacc:
result = new TL_inputPrivacyKeyProfilePhoto();
break;
case 0x352dafa:
result = new TL_inputPrivacyKeyPhoneNumber();
break;
case 0xd1219bdd:
result = new TL_inputPrivacyKeyAddedByPhone();
break;
case 0xdb9e70d2:
result = new TL_inputPrivacyKeyPhoneP2P();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputPrivacyKey", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPrivacyKeyStatusTimestamp extends InputPrivacyKey {
public static int constructor = 0x4f96cb18;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyChatInvite extends InputPrivacyKey {
public static int constructor = 0xbdfb0426;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyPhoneCall extends InputPrivacyKey {
public static int constructor = 0xfabadc5f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyForwards extends InputPrivacyKey {
public static int constructor = 0xa4dd4c08;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyPhoneNumber extends InputPrivacyKey {
public static int constructor = 0x352dafa;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyAddedByPhone extends InputPrivacyKey {
public static int constructor = 0xd1219bdd;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyProfilePhoto extends InputPrivacyKey {
public static int constructor = 0x5719bacc;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyKeyPhoneP2P extends InputPrivacyKey {
public static int constructor = 0xdb9e70d2;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class messages_ExportedChatInvite extends TLObject {
public ExportedChatInvite invite;
public ArrayList<User> users = new ArrayList<>();
public static messages_ExportedChatInvite TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_ExportedChatInvite result = null;
switch (constructor) {
case 0x222600ef:
result = new TL_messages_exportedChatInviteReplaced();
break;
case 0x1871be50:
result = new TL_messages_exportedChatInvite();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_ExportedChatInvite", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_exportedChatInviteReplaced extends messages_ExportedChatInvite {
public static int constructor = 0x222600ef;
public ExportedChatInvite new_invite;
public void readParams(AbstractSerializedData stream, boolean exception) {
invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
new_invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
invite.serializeToStream(stream);
new_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_exportedChatInvite extends messages_ExportedChatInvite {
public static int constructor = 0x1871be50;
public void readParams(AbstractSerializedData stream, boolean exception) {
invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputTheme extends TLObject {
public static InputTheme TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputTheme result = null;
switch (constructor) {
case 0xf5890df1:
result = new TL_inputThemeSlug();
break;
case 0x3c5693e9:
result = new TL_inputTheme();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputTheme", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputThemeSlug extends InputTheme {
public static int constructor = 0xf5890df1;
public String slug;
public void readParams(AbstractSerializedData stream, boolean exception) {
slug = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(slug);
}
}
public static class TL_inputTheme extends InputTheme {
public static int constructor = 0x3c5693e9;
public long id;
public long access_hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static abstract class photos_Photos extends TLObject {
public ArrayList<Photo> photos = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public int count;
public static photos_Photos TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
photos_Photos result = null;
switch (constructor) {
case 0x8dca6aa5:
result = new TL_photos_photos();
break;
case 0x15051f54:
result = new TL_photos_photosSlice();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in photos_Photos", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_photos_photos extends photos_Photos {
public static int constructor = 0x8dca6aa5;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_photos_photosSlice extends photos_Photos {
public static int constructor = 0x15051f54;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ChatFull extends TLObject {
public int id;
public ChatParticipants participants;
public Photo chat_photo;
public PeerNotifySettings notify_settings;
public TL_chatInviteExported exported_invite;
public ArrayList<BotInfo> bot_info = new ArrayList<>();
public int flags;
public boolean can_view_participants;
public boolean can_set_username;
public boolean has_scheduled;
public String about;
public int participants_count;
public int admins_count;
public int read_inbox_max_id;
public int read_outbox_max_id;
public int unread_count;
public int migrated_from_chat_id;
public int migrated_from_max_id;
public int pinned_msg_id;
public int kicked_count;
public int unread_important_count;
public int folder_id;
public boolean can_set_stickers;
public boolean hidden_prehistory;
public boolean can_view_stats;
public boolean can_set_location;
public boolean blocked;
public int banned_count;
public int online_count;
public StickerSet stickerset;
public int available_min_id;
public int call_msg_id;
public int linked_chat_id;
public ChannelLocation location;
public int slowmode_seconds;
public int slowmode_next_send_date;
public int stats_dc;
public int pts;
public TL_inputGroupCall call;
public int ttl_period;
public ArrayList<String> pending_suggestions = new ArrayList<>();
public Peer groupcall_default_join_as;
public String theme_emoticon;
public int inviterId; //custom
public int invitesCount; //custom
public static ChatFull TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChatFull result = null;
switch (constructor) {
case 0x1c87a71a:
result = new TL_channelFull_layer98();
break;
case 0x3648977:
result = new TL_channelFull_layer99();
break;
case 0x2e02a614:
result = new TL_chatFull_layer87();
break;
case 0xef3a6acd:
result = new TL_channelFull_layer122();
break;
case 0xf0e6672a:
result = new TL_channelFull_layer121();
break;
case 0x2d895c74:
result = new TL_channelFull_layer110();
break;
case 0x10916653:
result = new TL_channelFull_layer103();
break;
case 0x9882e516:
result = new TL_channelFull_layer101();
break;
case 0x17f45fcf:
result = new TL_channelFull_layer71();
break;
case 0x76af5481:
result = new TL_channelFull_layer72();
break;
case 0x97bee562:
result = new TL_channelFull_layer52();
break;
case 0xc3d5512f:
result = new TL_channelFull_layer67();
break;
case 0x9e341ddf:
result = new TL_channelFull_layer48();
break;
case 0xdc8c181:
result = new TL_chatFull_layer122();
break;
case 0xf3474af6:
result = new TL_chatFull_layer123();
break;
case 0x7a7de4f7:
result = new TL_channelFull_layer123();
break;
case 0xf06c4018:
result = new TL_chatFull_layer124();
break;
case 0x2548c037:
result = new TL_channelFull_layer124();
break;
case 0x8a1e2983:
result = new TL_chatFull_layer131();
break;
case 0x548c3f93:
result = new TL_channelFull_layer131();
break;
case 0x49a0a5d9:
result = new TL_chatFull();
break;
case 0x2f532f3c:
result = new TL_channelFull();
break;
case 0x1b7c9db3:
result = new TL_chatFull_layer121();
break;
case 0x22a235da:
result = new TL_chatFull_layer98();
break;
case 0xedd2a791:
result = new TL_chatFull_layer92();
break;
case 0xfab31aa3:
result = new TL_channelFull_old();
break;
case 0x95cb5f57:
result = new TL_channelFull_layer70();
break;
case 0xcbb62890:
result = new TL_channelFull_layer89();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChatFull", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channelFull_layer110 extends ChatFull {
public static int constructor = 0x2d895c74;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_view_stats = (flags & 4096) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_view_stats ? (flags | 4096) : (flags &~ 4096);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
stream.writeInt32(pts);
}
}
public static class TL_chatFull_layer124 extends TL_chatFull {
public static int constructor = 0xf06c4018;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8192) != 0) {
exported_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
ttl_period = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8192) != 0) {
exported_invite.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 4096) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(ttl_period);
}
}
}
public static class TL_channelFull_layer124 extends TL_channelFull {
public static int constructor = 0x2548c037;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8388608) != 0) {
exported_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
if ((flags & 2097152) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16777216) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 33554432) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
pending_suggestions.add(stream.readString(exception));
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
if ((flags & 8388608) != 0) {
exported_invite.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
if ((flags & 2097152) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16777216) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 33554432) != 0) {
stream.writeInt32(0x1cb5c415);
count = pending_suggestions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(pending_suggestions.get(a));
}
}
}
}
public static class TL_chatFull_layer123 extends TL_chatFull {
public static int constructor = 0xf3474af6;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8192) != 0) {
exported_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8192) != 0) {
exported_invite.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 4096) != 0) {
call.serializeToStream(stream);
}
}
}
public static class TL_channelFull_layer123 extends TL_channelFull {
public static int constructor = 0x7a7de4f7;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8388608) != 0) {
exported_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
if ((flags & 2097152) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
if ((flags & 8388608) != 0) {
exported_invite.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
if ((flags & 2097152) != 0) {
call.serializeToStream(stream);
}
}
}
public static class TL_chatFull_layer131 extends TL_chatFull {
public static int constructor = 0x8a1e2983;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8192) != 0) {
exported_invite = (TLRPC.TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
groupcall_default_join_as = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8192) != 0) {
exported_invite.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 4096) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 32768) != 0) {
groupcall_default_join_as.serializeToStream(stream);
}
}
}
public static class TL_channelFull_layer131 extends TL_channelFull {
public static int constructor = 0x548c3f93;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8388608) != 0) {
exported_invite = (TLRPC.TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
if ((flags & 2097152) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16777216) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 33554432) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
pending_suggestions.add(stream.readString(exception));
}
}
if ((flags & 67108864) != 0) {
groupcall_default_join_as = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
if ((flags & 8388608) != 0) {
exported_invite.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
if ((flags & 2097152) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16777216) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 33554432) != 0) {
stream.writeInt32(0x1cb5c415);
count = pending_suggestions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(pending_suggestions.get(a));
}
}
if ((flags & 67108864) != 0) {
groupcall_default_join_as.serializeToStream(stream);
}
}
}
public static class TL_chatFull extends ChatFull {
public static int constructor = 0x49a0a5d9;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8192) != 0) {
exported_invite = (TLRPC.TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
groupcall_default_join_as = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 65536) != 0) {
theme_emoticon = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8192) != 0) {
exported_invite.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 4096) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 32768) != 0) {
groupcall_default_join_as.serializeToStream(stream);
}
if ((flags & 65536) != 0) {
stream.writeString(theme_emoticon);
}
}
}
public static class TL_channelFull extends ChatFull {
public static int constructor = 0x2f532f3c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8388608) != 0) {
exported_invite = (TLRPC.TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
if ((flags & 2097152) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16777216) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 33554432) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
pending_suggestions.add(stream.readString(exception));
}
}
if ((flags & 67108864) != 0) {
groupcall_default_join_as = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 134217728) != 0) {
theme_emoticon = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
if ((flags & 8388608) != 0) {
exported_invite.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
if ((flags & 2097152) != 0) {
call.serializeToStream(stream);
}
if ((flags & 16777216) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 33554432) != 0) {
stream.writeInt32(0x1cb5c415);
count = pending_suggestions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(pending_suggestions.get(a));
}
}
if ((flags & 67108864) != 0) {
groupcall_default_join_as.serializeToStream(stream);
}
if ((flags & 134217728) != 0) {
stream.writeString(theme_emoticon);
}
}
}
public static class TL_channelFull_layer122 extends TL_channelFull {
public static int constructor = 0xef3a6acd;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
if ((flags & 2097152) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
if (exported_invite != null) {
exported_invite.serializeToStream(stream);
} else {
new TLRPC.TL_chatInviteEmpty_layer122().serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
if ((flags & 2097152) != 0) {
call.serializeToStream(stream);
}
}
}
public static class TL_channelFull_layer121 extends TL_channelFull {
public static int constructor = 0xf0e6672a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_set_location = (flags & 65536) != 0;
has_scheduled = (flags & 524288) != 0;
can_view_stats = (flags & 1048576) != 0;
blocked = (flags & 4194304) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
slowmode_seconds = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
slowmode_next_send_date = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
stats_dc = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
flags = has_scheduled ? (flags | 524288) : (flags &~ 524288);
flags = can_view_stats ? (flags | 1048576) : (flags &~ 1048576);
flags = blocked ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(slowmode_seconds);
}
if ((flags & 262144) != 0) {
stream.writeInt32(slowmode_next_send_date);
}
if ((flags & 4096) != 0) {
stream.writeInt32(stats_dc);
}
stream.writeInt32(pts);
}
}
public static class TL_channelFull_layer103 extends TL_channelFull {
public static int constructor = 0x10916653;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_view_stats = (flags & 4096) != 0;
can_set_location = (flags & 65536) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
linked_chat_id = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
location = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_view_stats ? (flags | 4096) : (flags &~ 4096);
flags = can_set_location ? (flags | 65536) : (flags &~ 65536);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(linked_chat_id);
}
if ((flags & 32768) != 0) {
location.serializeToStream(stream);
}
stream.writeInt32(pts);
}
}
public static class TL_channelFull_layer101 extends TL_channelFull {
public static int constructor = 0x9882e516;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_view_stats = (flags & 4096) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
linked_chat_id = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_view_stats ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 8192) != 0) {
stream.writeInt32(linked_chat_id);
}
stream.writeInt32(pts);
}
}
public static class TL_channelFull_layer99 extends TL_channelFull {
public static int constructor = 0x3648977;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_view_stats = (flags & 4096) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_view_stats ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
stream.writeInt32(pts);
}
}
public static class TL_channelFull_layer98 extends TL_channelFull {
public static int constructor = 0x1c87a71a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
can_view_stats = (flags & 4096) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
if ((flags & 8192) != 0) {
online_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
flags = can_view_stats ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
if ((flags & 8192) != 0) {
stream.writeInt32(online_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
}
}
public static class TL_chatFull_layer87 extends TL_chatFull {
public static int constructor = 0x2e02a614;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
participants.serializeToStream(stream);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
}
public static class TL_channelFull_layer89 extends TL_channelFull {
public static int constructor = 0xcbb62890;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
call_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(call_msg_id);
}
}
}
public static class TL_channelFull_layer72 extends TL_channelFull {
public static int constructor = 0x76af5481;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
hidden_prehistory = (flags & 1024) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 512) != 0) {
available_min_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
flags = hidden_prehistory ? (flags | 1024) : (flags &~ 1024);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
if ((flags & 512) != 0) {
stream.writeInt32(available_min_id);
}
}
}
public static class TL_channelFull_layer71 extends TL_channelFull {
public static int constructor = 0x17f45fcf;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
can_set_stickers = (flags & 128) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
stickerset = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
flags = can_set_stickers ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 256) != 0) {
stickerset.serializeToStream(stream);
}
}
}
public static class TL_chatFull_layer122 extends TL_chatFull {
public static int constructor = 0xdc8c181;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 4096) != 0) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 4096) != 0) {
call.serializeToStream(stream);
}
}
}
public static class TL_chatFull_layer121 extends TL_chatFull {
public static int constructor = 0x1b7c9db3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
has_scheduled = (flags & 256) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
}
}
public static class TL_chatFull_layer98 extends TL_chatFull {
public static int constructor = 0x22a235da;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_set_username = (flags & 128) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_set_username ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
}
}
public static class TL_chatFull_layer92 extends TL_chatFull {
public static int constructor = 0xedd2a791;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt32(exception);
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
if ((flags & 8) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(id);
participants.serializeToStream(stream);
if ((flags & 4) != 0) {
chat_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
}
}
public static class TL_channelFull_layer70 extends TL_channelFull {
public static int constructor = 0x95cb5f57;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
banned_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(banned_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
}
}
public static class TL_channelFull_layer52 extends TL_channelFull {
public static int constructor = 0x97bee562;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
unread_important_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(unread_count);
stream.writeInt32(unread_important_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
}
}
public static class TL_channelFull_layer67 extends TL_channelFull {
public static int constructor = 0xc3d5512f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
can_set_username = (flags & 64) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
flags = can_set_username ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(pinned_msg_id);
}
}
}
public static class TL_channelFull_layer48 extends TL_channelFull {
public static int constructor = 0x9e341ddf;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
unread_important_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInfo object = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
bot_info.add(object);
}
if ((flags & 16) != 0) {
migrated_from_chat_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
migrated_from_max_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(unread_count);
stream.writeInt32(unread_important_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = bot_info.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
bot_info.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_chat_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(migrated_from_max_id);
}
}
}
public static class TL_channelFull_old extends TL_channelFull {
public static int constructor = 0xfab31aa3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_view_participants = (flags & 8) != 0;
id = stream.readInt32(exception);
about = stream.readString(exception);
if ((flags & 1) != 0) {
participants_count = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
admins_count = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
kicked_count = stream.readInt32(exception);
}
read_inbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
unread_important_count = stream.readInt32(exception);
chat_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
ExportedChatInvite invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
if (invite instanceof TL_chatInviteExported) {
exported_invite = (TL_chatInviteExported) invite;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_view_participants ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(about);
if ((flags & 1) != 0) {
stream.writeInt32(participants_count);
}
if ((flags & 2) != 0) {
stream.writeInt32(admins_count);
}
if ((flags & 4) != 0) {
stream.writeInt32(kicked_count);
}
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(unread_count);
stream.writeInt32(unread_important_count);
chat_photo.serializeToStream(stream);
notify_settings.serializeToStream(stream);
exported_invite.serializeToStream(stream);
}
}
public static class TL_inputPeerNotifySettings extends TLObject {
public static int constructor = 0x9c3d198e;
public int flags;
public boolean show_previews;
public boolean silent;
public int mute_until;
public String sound;
public static TL_inputPeerNotifySettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputPeerNotifySettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputPeerNotifySettings", constructor));
} else {
return null;
}
}
TL_inputPeerNotifySettings result = new TL_inputPeerNotifySettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
show_previews = stream.readBool(exception);
}
if ((flags & 2) != 0) {
silent = stream.readBool(exception);
}
if ((flags & 4) != 0) {
mute_until = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
sound = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeBool(show_previews);
}
if ((flags & 2) != 0) {
stream.writeBool(silent);
}
if ((flags & 4) != 0) {
stream.writeInt32(mute_until);
}
if ((flags & 8) != 0) {
stream.writeString(sound);
}
}
}
public static abstract class auth_LoginToken extends TLObject {
public static auth_LoginToken TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
auth_LoginToken result = null;
switch (constructor) {
case 0x629f1980:
result = new TL_auth_loginToken();
break;
case 0x68e9916:
result = new TL_auth_loginTokenMigrateTo();
break;
case 0x390d5c5e:
result = new TL_auth_loginTokenSuccess();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in auth_LoginToken", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_auth_loginToken extends auth_LoginToken {
public static int constructor = 0x629f1980;
public int expires;
public byte[] token;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
token = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
stream.writeByteArray(token);
}
}
public static class TL_auth_loginTokenMigrateTo extends auth_LoginToken {
public static int constructor = 0x68e9916;
public int dc_id;
public byte[] token;
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
token = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeByteArray(token);
}
}
public static class TL_auth_loginTokenSuccess extends auth_LoginToken {
public static int constructor = 0x390d5c5e;
public auth_Authorization authorization;
public void readParams(AbstractSerializedData stream, boolean exception) {
authorization = auth_Authorization.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
authorization.serializeToStream(stream);
}
}
public static class TL_codeSettings extends TLObject {
public static int constructor = 0xdebebe83;
public int flags;
public boolean allow_flashcall;
public boolean current_number;
public boolean allow_app_hash;
public static TL_codeSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_codeSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_codeSettings", constructor));
} else {
return null;
}
}
TL_codeSettings result = new TL_codeSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
allow_flashcall = (flags & 1) != 0;
current_number = (flags & 2) != 0;
allow_app_hash = (flags & 16) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = allow_flashcall ? (flags | 1) : (flags &~ 1);
flags = current_number ? (flags | 2) : (flags &~ 2);
flags = allow_app_hash ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
}
}
public static class TL_stats_messageStats extends TLObject {
public static int constructor = 0x8999f295;
public StatsGraph views_graph;
public static TL_stats_messageStats TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_stats_messageStats.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_stats_messageStats", constructor));
} else {
return null;
}
}
TL_stats_messageStats result = new TL_stats_messageStats();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
views_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
views_graph.serializeToStream(stream);
}
}
public static abstract class BaseTheme extends TLObject {
public static BaseTheme TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
BaseTheme result = null;
switch (constructor) {
case 0x5b11125a:
result = new TL_baseThemeArctic();
break;
case 0xb7b31ea8:
result = new TL_baseThemeNight();
break;
case 0xc3a12462:
result = new TL_baseThemeClassic();
break;
case 0x6d5f77ee:
result = new TL_baseThemeTinted();
break;
case 0xfbd81688:
result = new TL_baseThemeDay();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in BaseTheme", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_baseThemeArctic extends BaseTheme {
public static int constructor = 0x5b11125a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_baseThemeNight extends BaseTheme {
public static int constructor = 0xb7b31ea8;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_baseThemeClassic extends BaseTheme {
public static int constructor = 0xc3a12462;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_baseThemeTinted extends BaseTheme {
public static int constructor = 0x6d5f77ee;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_baseThemeDay extends BaseTheme {
public static int constructor = 0xfbd81688;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_null extends TLObject {
public static int constructor = 0x56730bcc;
public static TL_null TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_null.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_null", constructor));
} else {
return null;
}
}
TL_null result = new TL_null();
result.readParams(stream, exception);
return result;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class Page extends TLObject {
public int flags;
public boolean part;
public boolean rtl;
public String url;
public ArrayList<PageBlock> blocks = new ArrayList<>();
public ArrayList<Photo> photos = new ArrayList<>();
public ArrayList<Document> documents = new ArrayList<>();
public boolean v2;
public int views;
public static Page TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Page result = null;
switch (constructor) {
case 0x8dee6c44:
result = new TL_pagePart_layer67();
break;
case 0x8e3f9ebe:
result = new TL_pagePart_layer82();
break;
case 0xd7a19d69:
result = new TL_pageFull_layer67();
break;
case 0x556ec7aa:
result = new TL_pageFull_layer82();
break;
case 0xae891bec:
result = new TL_page_layer110();
break;
case 0x98657f0d:
result = new TL_page();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Page", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pagePart_layer67 extends TL_pagePart_layer82 {
public static int constructor = 0x8dee6c44;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static class TL_pagePart_layer82 extends Page {
public static int constructor = 0x8e3f9ebe;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageFull_layer67 extends TL_page {
public static int constructor = 0xd7a19d69;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageFull_layer82 extends TL_page {
public static int constructor = 0x556ec7aa;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static class TL_page_layer110 extends TL_page {
public static int constructor = 0xae891bec;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
part = (flags & 1) != 0;
rtl = (flags & 2) != 0;
url = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = part ? (flags | 1) : (flags &~ 1);
flags = rtl ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeString(url);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
}
}
public static class TL_page extends Page {
public static int constructor = 0x98657f0d;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
part = (flags & 1) != 0;
rtl = (flags & 2) != 0;
v2 = (flags & 4) != 0;
url = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Photo object = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
photos.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
documents.add(object);
}
if ((flags & 8) != 0) {
views = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = part ? (flags | 1) : (flags &~ 1);
flags = rtl ? (flags | 2) : (flags &~ 2);
flags = v2 ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeString(url);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = photos.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
photos.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
documents.get(a).serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(views);
}
}
}
public static class TL_topPeerCategoryPeers extends TLObject {
public static int constructor = 0xfb834291;
public TopPeerCategory category;
public int count;
public ArrayList<TL_topPeer> peers = new ArrayList<>();
public static TL_topPeerCategoryPeers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_topPeerCategoryPeers.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_topPeerCategoryPeers", constructor));
} else {
return null;
}
}
TL_topPeerCategoryPeers result = new TL_topPeerCategoryPeers();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
category = TopPeerCategory.TLdeserialize(stream, stream.readInt32(exception), exception);
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_topPeer object = TL_topPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
peers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
category.serializeToStream(stream);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
peers.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputUser extends TLObject {
public int user_id;
public long access_hash;
public static InputUser TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputUser result = null;
switch (constructor) {
case 0xf7c1b13f:
result = new TL_inputUserSelf();
break;
case 0xd8292816:
result = new TL_inputUser();
break;
case 0xb98886cf:
result = new TL_inputUserEmpty();
break;
case 0x2d117597:
result = new TL_inputUserFromMessage();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputUser", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputUserSelf extends InputUser {
public static int constructor = 0xf7c1b13f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputUser extends InputUser {
public static int constructor = 0xd8292816;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputUserEmpty extends InputUser {
public static int constructor = 0xb98886cf;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputUserFromMessage extends InputUser {
public static int constructor = 0x2d117597;
public InputPeer peer;
public int msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(user_id);
}
}
public static abstract class KeyboardButton extends TLObject {
public String text;
public String url;
public int flags;
public boolean same_peer;
public String query;
public byte[] data;
public int button_id;
public boolean request_write_access;
public InputUser bot;
public String fwd_text;
public boolean quiz;
public boolean requires_password;
public static KeyboardButton TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
KeyboardButton result = null;
switch (constructor) {
case 0xb16a6c29:
result = new TL_keyboardButtonRequestPhone();
break;
case 0x50f41ccf:
result = new TL_keyboardButtonGame();
break;
case 0x258aff05:
result = new TL_keyboardButtonUrl();
break;
case 0x568a748:
result = new TL_keyboardButtonSwitchInline();
break;
case 0xfc796b3f:
result = new TL_keyboardButtonRequestGeoLocation();
break;
case 0x10b78d29:
result = new TL_keyboardButtonUrlAuth();
break;
case 0xd02e7fd4:
result = new TL_inputKeyboardButtonUrlAuth();
break;
case 0xbbc7515d:
result = new TL_keyboardButtonRequestPoll();
break;
case 0xafd93fbb:
result = new TL_keyboardButtonBuy();
break;
case 0x683a5e46:
result = new TL_keyboardButtonCallback_layer117();
break;
case 0xa2fa4880:
result = new TL_keyboardButton();
break;
case 0x35bbdb6b:
result = new TL_keyboardButtonCallback();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in KeyboardButton", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_keyboardButtonRequestPhone extends KeyboardButton {
public static int constructor = 0xb16a6c29;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static class TL_keyboardButtonGame extends KeyboardButton {
public static int constructor = 0x50f41ccf;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static class TL_keyboardButtonUrl extends KeyboardButton {
public static int constructor = 0x258aff05;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
stream.writeString(url);
}
}
public static class TL_keyboardButtonSwitchInline extends KeyboardButton {
public static int constructor = 0x568a748;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
same_peer = (flags & 1) != 0;
text = stream.readString(exception);
query = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = same_peer ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(text);
stream.writeString(query);
}
}
public static class TL_keyboardButtonRequestGeoLocation extends KeyboardButton {
public static int constructor = 0xfc796b3f;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static class TL_keyboardButtonUrlAuth extends KeyboardButton {
public static int constructor = 0x10b78d29;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
text = stream.readString(exception);
if ((flags & 1) != 0) {
fwd_text = stream.readString(exception);
}
url = stream.readString(exception);
button_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(text);
if ((flags & 1) != 0) {
stream.writeString(fwd_text);
}
stream.writeString(url);
stream.writeInt32(button_id);
}
}
public static class TL_inputKeyboardButtonUrlAuth extends KeyboardButton {
public static int constructor = 0xd02e7fd4;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
request_write_access = (flags & 1) != 0;
text = stream.readString(exception);
if ((flags & 2) != 0) {
fwd_text = stream.readString(exception);
}
url = stream.readString(exception);
bot = InputUser.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = request_write_access ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(text);
if ((flags & 2) != 0) {
stream.writeString(fwd_text);
}
stream.writeString(url);
bot.serializeToStream(stream);
}
}
public static class TL_keyboardButtonRequestPoll extends KeyboardButton {
public static int constructor = 0xbbc7515d;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
quiz = stream.readBool(exception);
}
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeBool(quiz);
}
stream.writeString(text);
}
}
public static class TL_keyboardButtonBuy extends KeyboardButton {
public static int constructor = 0xafd93fbb;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static class TL_keyboardButtonCallback extends KeyboardButton {
public static int constructor = 0x35bbdb6b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
requires_password = (flags & 1) != 0;
text = stream.readString(exception);
data = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = requires_password ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(text);
stream.writeByteArray(data);
}
}
public static class TL_keyboardButtonCallback_layer117 extends TL_keyboardButtonCallback {
public static int constructor = 0x683a5e46;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
data = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
stream.writeByteArray(data);
}
}
public static class TL_keyboardButton extends KeyboardButton {
public static int constructor = 0xa2fa4880;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
}
}
public static abstract class VideoSize extends TLObject {
public int flags;
public String type;
public FileLocation location;
public int w;
public int h;
public int size;
public double video_start_ts;
public static VideoSize TLdeserialize(long photo_id, long document_id, AbstractSerializedData stream, int constructor, boolean exception) {
VideoSize result = null;
switch (constructor) {
case 0x435bb987:
result = new TL_videoSize_layer115();
break;
case 0xe831c556:
result = new TL_videoSize_layer127();
break;
case 0xde33b094:
result = new TL_videoSize();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in VideoSize", constructor));
}
if (result != null) {
result.readParams(stream, exception);
if (result.location == null) {
if (!TextUtils.isEmpty(result.type) && (photo_id != 0 || document_id != 0)) {
result.location = new TL_fileLocationToBeDeprecated();
if (photo_id != 0) {
result.location.volume_id = -photo_id;
result.location.local_id = result.type.charAt(0);
} else {
result.location.volume_id = -document_id;
result.location.local_id = 1000 + result.type.charAt(0);
}
} else {
result.location = new TL_fileLocationUnavailable();
}
}
}
return result;
}
}
public static class TL_videoSize_layer115 extends TL_videoSize {
public static int constructor = 0x435bb987;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
location = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
location.serializeToStream(stream);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
}
}
public static class TL_videoSize_layer127 extends TL_videoSize {
public static int constructor = 0xe831c556;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
type = stream.readString(exception);
location = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
if ((flags & 1) != 0) {
video_start_ts = stream.readDouble(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(type);
location.serializeToStream(stream);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
if ((flags & 1) != 0) {
stream.writeDouble(video_start_ts);
}
}
}
public static class TL_videoSize extends VideoSize {
public static int constructor = 0xde33b094;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
if ((flags & 1) != 0) {
video_start_ts = stream.readDouble(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
if ((flags & 1) != 0) {
stream.writeDouble(video_start_ts);
}
}
}
public static abstract class BotInlineMessage extends TLObject {
public int flags;
public GeoPoint geo;
public String title;
public String address;
public String provider;
public String venue_id;
public String venue_type;
public ReplyMarkup reply_markup;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public String phone_number;
public String first_name;
public String last_name;
public String vcard;
public boolean no_webpage;
public int period;
public int heading;
public int proximity_notification_radius;
public static BotInlineMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
BotInlineMessage result = null;
switch (constructor) {
case 0x4366232e:
result = new TL_botInlineMessageMediaVenue_layer77();
break;
case 0x8a86659c:
result = new TL_botInlineMessageMediaVenue();
break;
case 0x3a8fd8b8:
result = new TL_botInlineMessageMediaGeo_layer71();
break;
case 0x764cf810:
result = new TL_botInlineMessageMediaAuto();
break;
case 0xa74b15b:
result = new TL_botInlineMessageMediaAuto_layer74();
break;
case 0x35edb4d4:
result = new TL_botInlineMessageMediaContact_layer81();
break;
case 0x18d1cdc2:
result = new TL_botInlineMessageMediaContact();
break;
case 0x8c7f65e2:
result = new TL_botInlineMessageText();
break;
case 0xb722de65:
result = new TL_botInlineMessageMediaGeo_layer119();
break;
case 0x51846fd:
result = new TL_botInlineMessageMediaGeo();
break;
case 0x354a9b09:
result = new TL_botInlineMessageMediaInvoice();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in BotInlineMessage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_botInlineMessageMediaVenue_layer77 extends TL_botInlineMessageMediaVenue {
public static int constructor = 0x4366232e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaVenue extends BotInlineMessage {
public static int constructor = 0x8a86659c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
venue_type = stream.readString(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
stream.writeString(venue_type);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaGeo_layer71 extends TL_botInlineMessageMediaGeo {
public static int constructor = 0x3a8fd8b8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaAuto extends BotInlineMessage {
public static int constructor = 0x764cf810;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(message);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaAuto_layer74 extends TL_botInlineMessageMediaAuto {
public static int constructor = 0xa74b15b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(message);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaContact_layer81 extends TL_botInlineMessageMediaContact {
public static int constructor = 0x35edb4d4;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaContact extends BotInlineMessage {
public static int constructor = 0x18d1cdc2;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
vcard = stream.readString(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(vcard);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageText extends BotInlineMessage {
public static int constructor = 0x8c7f65e2;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
no_webpage = (flags & 1) != 0;
message = stream.readString(exception);
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_webpage ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(message);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaGeo extends BotInlineMessage {
public static int constructor = 0x51846fd;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
heading = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
period = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
proximity_notification_radius = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(heading);
}
if ((flags & 2) != 0) {
stream.writeInt32(period);
}
if ((flags & 8) != 0) {
stream.writeInt32(proximity_notification_radius);
}
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaGeo_layer119 extends TL_botInlineMessageMediaGeo {
public static int constructor = 0xb722de65;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
period = stream.readInt32(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
geo.serializeToStream(stream);
stream.writeInt32(period);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_botInlineMessageMediaInvoice extends BotInlineMessage {
public static int constructor = 0x354a9b09;
public boolean shipping_address_requested;
public boolean test;
public String description;
public WebDocument photo;
public String currency;
public long total_amount;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
shipping_address_requested = (flags & 2) != 0;
test = (flags & 8) != 0;
title = stream.readString(exception);
description = stream.readString(exception);
if ((flags & 1) != 0) {
photo = WebDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
currency = stream.readString(exception);
total_amount = stream.readInt64(exception);
if ((flags & 4) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = shipping_address_requested ? (flags | 2) : (flags &~ 2);
flags = test ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(title);
stream.writeString(description);
if ((flags & 1) != 0) {
photo.serializeToStream(stream);
}
stream.writeString(currency);
stream.writeInt64(total_amount);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
}
}
public static class TL_keyboardButtonRow extends TLObject {
public static int constructor = 0x77608b83;
public ArrayList<KeyboardButton> buttons = new ArrayList<>();
public static TL_keyboardButtonRow TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_keyboardButtonRow.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_keyboardButtonRow", constructor));
} else {
return null;
}
}
TL_keyboardButtonRow result = new TL_keyboardButtonRow();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
KeyboardButton object = KeyboardButton.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
buttons.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = buttons.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
buttons.get(a).serializeToStream(stream);
}
}
}
public static abstract class Bool extends TLObject {
public static Bool TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Bool result = null;
switch (constructor) {
case 0x997275b5:
result = new TL_boolTrue();
break;
case 0xbc799737:
result = new TL_boolFalse();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Bool", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_boolTrue extends Bool {
public static int constructor = 0x997275b5;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_boolFalse extends Bool {
public static int constructor = 0xbc799737;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_discussionMessage extends TLObject {
public static int constructor = 0xa6341782;
public int flags;
public ArrayList<Message> messages = new ArrayList<>();
public int max_id;
public int read_inbox_max_id;
public int read_outbox_max_id;
public int unread_count;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_discussionMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_discussionMessage.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_discussionMessage", constructor));
} else {
return null;
}
}
TL_messages_discussionMessage result = new TL_messages_discussionMessage();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
if ((flags & 1) != 0) {
max_id = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
read_inbox_max_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
read_outbox_max_id = stream.readInt32(exception);
}
unread_count = stream.readInt32(exception);
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeInt32(max_id);
}
if ((flags & 2) != 0) {
stream.writeInt32(read_inbox_max_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(read_outbox_max_id);
}
stream.writeInt32(unread_count);
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_searchCounter extends TLObject {
public static int constructor = 0xe844ebff;
public int flags;
public boolean inexact;
public MessagesFilter filter;
public int count;
public static TL_messages_searchCounter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_searchCounter.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_searchCounter", constructor));
} else {
return null;
}
}
TL_messages_searchCounter result = new TL_messages_searchCounter();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
inexact = (flags & 2) != 0;
filter = MessagesFilter.TLdeserialize(stream, stream.readInt32(exception), exception);
count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = inexact ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
filter.serializeToStream(stream);
stream.writeInt32(count);
}
}
public static class TL_inputAppEvent extends TLObject {
public static int constructor = 0x1d1b1245;
public double time;
public String type;
public long peer;
public JSONValue data;
public static TL_inputAppEvent TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputAppEvent.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputAppEvent", constructor));
} else {
return null;
}
}
TL_inputAppEvent result = new TL_inputAppEvent();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
time = stream.readDouble(exception);
type = stream.readString(exception);
peer = stream.readInt64(exception);
data = JSONValue.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(time);
stream.writeString(type);
stream.writeInt64(peer);
data.serializeToStream(stream);
}
}
public static class TL_auth_exportedAuthorization extends TLObject {
public static int constructor = 0xdf969c2d;
public int id;
public byte[] bytes;
public static TL_auth_exportedAuthorization TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_auth_exportedAuthorization.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_auth_exportedAuthorization", constructor));
} else {
return null;
}
}
TL_auth_exportedAuthorization result = new TL_auth_exportedAuthorization();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
bytes = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeByteArray(bytes);
}
}
public static abstract class WebPage extends TLObject {
public int flags;
public long id;
public String url;
public String display_url;
public int hash;
public String type;
public String site_name;
public String title;
public String description;
public Photo photo;
public String embed_url;
public String embed_type;
public int embed_width;
public int embed_height;
public int duration;
public String author;
public Document document;
public Page cached_page;
public int date;
public ArrayList<TL_webPageAttributeTheme> attributes = new ArrayList<>();
public static WebPage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
WebPage result = null;
switch (constructor) {
case 0xe89c45b2:
result = new TL_webPage();
break;
case 0xfa64e172:
result = new TL_webPage_layer107();
break;
case 0x5f07b4bc:
result = new TL_webPage_layer104();
break;
case 0xa31ea0b5:
result = new TL_webPage_old();
break;
case 0xeb1477e8:
result = new TL_webPageEmpty();
break;
case 0xd41a5167:
result = new TL_webPageUrlPending();
break;
case 0x7311ca11:
result = new TL_webPageNotModified();
break;
case 0xc586da1c:
result = new TL_webPagePending();
break;
case 0x85849473:
result = new TL_webPageNotModified_layer110();
break;
case 0xca820ed7:
result = new TL_webPage_layer58();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in WebPage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_webPage extends WebPage {
public static int constructor = 0xe89c45b2;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
url = stream.readString(exception);
display_url = stream.readString(exception);
hash = stream.readInt32(exception);
if ((flags & 1) != 0) {
type = stream.readString(exception);
}
if ((flags & 2) != 0) {
site_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
if ((flags & 16) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
embed_url = stream.readString(exception);
}
if ((flags & 32) != 0) {
embed_type = stream.readString(exception);
}
if ((flags & 64) != 0) {
embed_width = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
embed_height = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
duration = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
author = stream.readString(exception);
}
if ((flags & 512) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 1024) != 0) {
cached_page = Page.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4096) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_webPageAttributeTheme object = TL_webPageAttributeTheme.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(url);
stream.writeString(display_url);
stream.writeInt32(hash);
if ((flags & 1) != 0) {
stream.writeString(type);
}
if ((flags & 2) != 0) {
stream.writeString(site_name);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
if ((flags & 16) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(embed_url);
}
if ((flags & 32) != 0) {
stream.writeString(embed_type);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_width);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_height);
}
if ((flags & 128) != 0) {
stream.writeInt32(duration);
}
if ((flags & 256) != 0) {
stream.writeString(author);
}
if ((flags & 512) != 0) {
document.serializeToStream(stream);
}
if ((flags & 1024) != 0) {
cached_page.serializeToStream(stream);
}
if ((flags & 4096) != 0) {
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_webPage_layer107 extends TL_webPage {
public static int constructor = 0xfa64e172;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
url = stream.readString(exception);
display_url = stream.readString(exception);
hash = stream.readInt32(exception);
if ((flags & 1) != 0) {
type = stream.readString(exception);
}
if ((flags & 2) != 0) {
site_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
if ((flags & 16) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
embed_url = stream.readString(exception);
}
if ((flags & 32) != 0) {
embed_type = stream.readString(exception);
}
if ((flags & 64) != 0) {
embed_width = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
embed_height = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
duration = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
author = stream.readString(exception);
}
if ((flags & 512) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
TL_webPageAttributeTheme attribute = new TL_webPageAttributeTheme();
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attribute.documents.add(object);
}
attributes.add(attribute);
}
if ((flags & 1024) != 0) {
cached_page = Page.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(url);
stream.writeString(display_url);
stream.writeInt32(hash);
if ((flags & 1) != 0) {
stream.writeString(type);
}
if ((flags & 2) != 0) {
stream.writeString(site_name);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
if ((flags & 16) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(embed_url);
}
if ((flags & 32) != 0) {
stream.writeString(embed_type);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_width);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_height);
}
if ((flags & 128) != 0) {
stream.writeInt32(duration);
}
if ((flags & 256) != 0) {
stream.writeString(author);
}
if ((flags & 512) != 0) {
document.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(0x1cb5c415);
stream.writeInt32(0);
}
if ((flags & 1024) != 0) {
cached_page.serializeToStream(stream);
}
}
}
public static class TL_webPage_layer104 extends TL_webPage {
public static int constructor = 0x5f07b4bc;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
url = stream.readString(exception);
display_url = stream.readString(exception);
hash = stream.readInt32(exception);
if ((flags & 1) != 0) {
type = stream.readString(exception);
}
if ((flags & 2) != 0) {
site_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
if ((flags & 16) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
embed_url = stream.readString(exception);
}
if ((flags & 32) != 0) {
embed_type = stream.readString(exception);
}
if ((flags & 64) != 0) {
embed_width = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
embed_height = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
duration = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
author = stream.readString(exception);
}
if ((flags & 512) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 1024) != 0) {
cached_page = Page.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(url);
stream.writeString(display_url);
stream.writeInt32(hash);
if ((flags & 1) != 0) {
stream.writeString(type);
}
if ((flags & 2) != 0) {
stream.writeString(site_name);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
if ((flags & 16) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(embed_url);
}
if ((flags & 32) != 0) {
stream.writeString(embed_type);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_width);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_height);
}
if ((flags & 128) != 0) {
stream.writeInt32(duration);
}
if ((flags & 256) != 0) {
stream.writeString(author);
}
if ((flags & 512) != 0) {
document.serializeToStream(stream);
}
if ((flags & 1024) != 0) {
cached_page.serializeToStream(stream);
}
}
}
public static class TL_webPage_old extends TL_webPage {
public static int constructor = 0xa31ea0b5;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
url = stream.readString(exception);
display_url = stream.readString(exception);
if ((flags & 1) != 0) {
type = stream.readString(exception);
}
if ((flags & 2) != 0) {
site_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
if ((flags & 16) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
embed_url = stream.readString(exception);
}
if ((flags & 32) != 0) {
embed_type = stream.readString(exception);
}
if ((flags & 64) != 0) {
embed_width = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
embed_height = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
duration = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
author = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(url);
stream.writeString(display_url);
if ((flags & 1) != 0) {
stream.writeString(type);
}
if ((flags & 2) != 0) {
stream.writeString(site_name);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
if ((flags & 16) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(embed_url);
}
if ((flags & 32) != 0) {
stream.writeString(embed_type);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_width);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_height);
}
if ((flags & 128) != 0) {
stream.writeInt32(duration);
}
if ((flags & 256) != 0) {
stream.writeString(author);
}
}
}
public static class TL_webPageEmpty extends WebPage {
public static int constructor = 0xeb1477e8;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_webPageUrlPending extends WebPage {
public static int constructor = 0xd41a5167;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_webPagePending extends WebPage {
public static int constructor = 0xc586da1c;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(date);
}
}
public static class TL_webPageNotModified_layer110 extends TL_webPageNotModified {
public static int constructor = 0x85849473;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_webPageNotModified extends WebPage {
public static int constructor = 0x7311ca11;
public int cached_page_views;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
cached_page_views = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(cached_page_views);
}
}
}
public static class TL_webPage_layer58 extends TL_webPage {
public static int constructor = 0xca820ed7;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
url = stream.readString(exception);
display_url = stream.readString(exception);
if ((flags & 1) != 0) {
type = stream.readString(exception);
}
if ((flags & 2) != 0) {
site_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
title = stream.readString(exception);
}
if ((flags & 8) != 0) {
description = stream.readString(exception);
}
if ((flags & 16) != 0) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
embed_url = stream.readString(exception);
}
if ((flags & 32) != 0) {
embed_type = stream.readString(exception);
}
if ((flags & 64) != 0) {
embed_width = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
embed_height = stream.readInt32(exception);
}
if ((flags & 128) != 0) {
duration = stream.readInt32(exception);
}
if ((flags & 256) != 0) {
author = stream.readString(exception);
}
if ((flags & 512) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(url);
stream.writeString(display_url);
if ((flags & 1) != 0) {
stream.writeString(type);
}
if ((flags & 2) != 0) {
stream.writeString(site_name);
}
if ((flags & 4) != 0) {
stream.writeString(title);
}
if ((flags & 8) != 0) {
stream.writeString(description);
}
if ((flags & 16) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(embed_url);
}
if ((flags & 32) != 0) {
stream.writeString(embed_type);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_width);
}
if ((flags & 64) != 0) {
stream.writeInt32(embed_height);
}
if ((flags & 128) != 0) {
stream.writeInt32(duration);
}
if ((flags & 256) != 0) {
stream.writeString(author);
}
if ((flags & 512) != 0) {
document.serializeToStream(stream);
}
}
}
public static abstract class messages_FeaturedStickers extends TLObject {
public static messages_FeaturedStickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_FeaturedStickers result = null;
switch (constructor) {
case 0xb6abc341:
result = new TL_messages_featuredStickers();
break;
case 0xc6dc0c66:
result = new TL_messages_featuredStickersNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_FeaturedStickers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_featuredStickers extends messages_FeaturedStickers {
public static int constructor = 0xb6abc341;
public int hash;
public int count;
public ArrayList<StickerSetCovered> sets = new ArrayList<>();
public ArrayList<Long> unread = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
StickerSetCovered object = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sets.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
unread.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = sets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sets.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = unread.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(unread.get(a));
}
}
}
public static class TL_messages_featuredStickersNotModified extends messages_FeaturedStickers {
public static int constructor = 0xc6dc0c66;
public int count;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
}
}
public static abstract class SecureValueError extends TLObject {
public static SecureValueError TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecureValueError result = null;
switch (constructor) {
case 0x7a700873:
result = new TL_secureValueErrorFile();
break;
case 0xbe3dfa:
result = new TL_secureValueErrorFrontSide();
break;
case 0x666220e9:
result = new TL_secureValueErrorFiles();
break;
case 0x868a2aa5:
result = new TL_secureValueErrorReverseSide();
break;
case 0xa1144770:
result = new TL_secureValueErrorTranslationFile();
break;
case 0x869d758f:
result = new TL_secureValueError();
break;
case 0xe8a40bd9:
result = new TL_secureValueErrorData();
break;
case 0x34636dd8:
result = new TL_secureValueErrorTranslationFiles();
break;
case 0xe537ced6:
result = new TL_secureValueErrorSelfie();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecureValueError", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_secureValueErrorFile extends SecureValueError {
public static int constructor = 0x7a700873;
public SecureValueType type;
public byte[] file_hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
file_hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(file_hash);
stream.writeString(text);
}
}
public static class TL_secureValueErrorFrontSide extends SecureValueError {
public static int constructor = 0xbe3dfa;
public SecureValueType type;
public byte[] file_hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
file_hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(file_hash);
stream.writeString(text);
}
}
public static class TL_secureValueErrorFiles extends SecureValueError {
public static int constructor = 0x666220e9;
public SecureValueType type;
public ArrayList<byte[]> file_hash = new ArrayList<>();
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
file_hash.add(stream.readByteArray(exception));
}
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = file_hash.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeByteArray(file_hash.get(a));
}
stream.writeString(text);
}
}
public static class TL_secureValueErrorReverseSide extends SecureValueError {
public static int constructor = 0x868a2aa5;
public SecureValueType type;
public byte[] file_hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
file_hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(file_hash);
stream.writeString(text);
}
}
public static class TL_secureValueErrorTranslationFile extends SecureValueError {
public static int constructor = 0xa1144770;
public SecureValueType type;
public byte[] file_hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
file_hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(file_hash);
stream.writeString(text);
}
}
public static class TL_secureValueError extends SecureValueError {
public static int constructor = 0x869d758f;
public SecureValueType type;
public byte[] hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(hash);
stream.writeString(text);
}
}
public static class TL_secureValueErrorData extends SecureValueError {
public static int constructor = 0xe8a40bd9;
public SecureValueType type;
public byte[] data_hash;
public String field;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
data_hash = stream.readByteArray(exception);
field = stream.readString(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(data_hash);
stream.writeString(field);
stream.writeString(text);
}
}
public static class TL_secureValueErrorTranslationFiles extends SecureValueError {
public static int constructor = 0x34636dd8;
public SecureValueType type;
public ArrayList<byte[]> file_hash = new ArrayList<>();
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
file_hash.add(stream.readByteArray(exception));
}
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = file_hash.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeByteArray(file_hash.get(a));
}
stream.writeString(text);
}
}
public static class TL_secureValueErrorSelfie extends SecureValueError {
public static int constructor = 0xe537ced6;
public SecureValueType type;
public byte[] file_hash;
public String text;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
file_hash = stream.readByteArray(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeByteArray(file_hash);
stream.writeString(text);
}
}
public static class TL_secureValue extends TLObject {
public static int constructor = 0x187fa0ca;
public int flags;
public SecureValueType type;
public TL_secureData data;
public SecureFile front_side;
public SecureFile reverse_side;
public SecureFile selfie;
public ArrayList<SecureFile> translation = new ArrayList<>();
public ArrayList<SecureFile> files = new ArrayList<>();
public SecurePlainData plain_data;
public byte[] hash;
public static TL_secureValue TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_secureValue.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_secureValue", constructor));
} else {
return null;
}
}
TL_secureValue result = new TL_secureValue();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
type = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
data = TL_secureData.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
front_side = SecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
reverse_side = SecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
selfie = SecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureFile object = SecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
translation.add(object);
}
}
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureFile object = SecureFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
files.add(object);
}
}
if ((flags & 32) != 0) {
plain_data = SecurePlainData.TLdeserialize(stream, stream.readInt32(exception), exception);
}
hash = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
type.serializeToStream(stream);
if ((flags & 1) != 0) {
data.serializeToStream(stream);
}
if ((flags & 2) != 0) {
front_side.serializeToStream(stream);
}
if ((flags & 4) != 0) {
reverse_side.serializeToStream(stream);
}
if ((flags & 8) != 0) {
selfie.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(0x1cb5c415);
int count = translation.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
translation.get(a).serializeToStream(stream);
}
}
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = files.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
files.get(a).serializeToStream(stream);
}
}
if ((flags & 32) != 0) {
plain_data.serializeToStream(stream);
}
stream.writeByteArray(hash);
}
}
public static abstract class PhoneCallDiscardReason extends TLObject {
public byte[] encrypted_key;
public static PhoneCallDiscardReason TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PhoneCallDiscardReason result = null;
switch (constructor) {
case 0x57adc690:
result = new TL_phoneCallDiscardReasonHangup();
break;
case 0xfaf7e8c9:
result = new TL_phoneCallDiscardReasonBusy();
break;
case 0x85e42301:
result = new TL_phoneCallDiscardReasonMissed();
break;
case 0xe095c1a0:
result = new TL_phoneCallDiscardReasonDisconnect();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PhoneCallDiscardReason", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_phoneCallDiscardReasonHangup extends PhoneCallDiscardReason {
public static int constructor = 0x57adc690;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_phoneCallDiscardReasonBusy extends PhoneCallDiscardReason {
public static int constructor = 0xfaf7e8c9;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_phoneCallDiscardReasonMissed extends PhoneCallDiscardReason {
public static int constructor = 0x85e42301;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_phoneCallDiscardReasonDisconnect extends PhoneCallDiscardReason {
public static int constructor = 0xe095c1a0;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_dialogFilter extends TLObject {
public static int constructor = 0x7438f7e8;
public int flags;
public boolean contacts;
public boolean non_contacts;
public boolean groups;
public boolean broadcasts;
public boolean bots;
public boolean exclude_muted;
public boolean exclude_read;
public boolean exclude_archived;
public int id;
public String title;
public String emoticon;
public ArrayList<InputPeer> pinned_peers = new ArrayList<>();
public ArrayList<InputPeer> include_peers = new ArrayList<>();
public ArrayList<InputPeer> exclude_peers = new ArrayList<>();
public static TL_dialogFilter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_dialogFilter.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_dialogFilter", constructor));
} else {
return null;
}
}
TL_dialogFilter result = new TL_dialogFilter();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
contacts = (flags & 1) != 0;
non_contacts = (flags & 2) != 0;
groups = (flags & 4) != 0;
broadcasts = (flags & 8) != 0;
bots = (flags & 16) != 0;
exclude_muted = (flags & 2048) != 0;
exclude_read = (flags & 4096) != 0;
exclude_archived = (flags & 8192) != 0;
id = stream.readInt32(exception);
title = stream.readString(exception);
if ((flags & 33554432) != 0) {
emoticon = stream.readString(exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputPeer object = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
pinned_peers.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputPeer object = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
include_peers.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputPeer object = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
exclude_peers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = contacts ? (flags | 1) : (flags &~ 1);
flags = non_contacts ? (flags | 2) : (flags &~ 2);
flags = groups ? (flags | 4) : (flags &~ 4);
flags = broadcasts ? (flags | 8) : (flags &~ 8);
flags = bots ? (flags | 16) : (flags &~ 16);
flags = exclude_muted ? (flags | 2048) : (flags &~ 2048);
flags = exclude_read ? (flags | 4096) : (flags &~ 4096);
flags = exclude_archived ? (flags | 8192) : (flags &~ 8192);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(title);
if ((flags & 33554432) != 0) {
stream.writeString(emoticon);
}
stream.writeInt32(0x1cb5c415);
int count = pinned_peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
pinned_peers.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = include_peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
include_peers.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = exclude_peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
exclude_peers.get(a).serializeToStream(stream);
}
}
}
public static abstract class account_ChatThemes extends TLObject {
public static account_ChatThemes TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
account_ChatThemes result = null;
switch (constructor) {
case 0xe011e1c4:
result = new TL_account_chatThemesNotModified();
break;
case 0xfe4cbebd:
result = new TL_account_chatThemes();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in account_ChatThemes", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_account_chatThemesNotModified extends account_ChatThemes {
public static int constructor = 0xe011e1c4;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_chatThemes extends account_ChatThemes {
public static int constructor = 0xfe4cbebd;
public int hash;
public ArrayList<TL_chatTheme> themes = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_chatTheme object = TL_chatTheme.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
themes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = themes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
themes.get(a).serializeToStream(stream);
}
}
}
public static class TL_auth_passwordRecovery extends TLObject {
public static int constructor = 0x137948a5;
public String email_pattern;
public static TL_auth_passwordRecovery TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_auth_passwordRecovery.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_auth_passwordRecovery", constructor));
} else {
return null;
}
}
TL_auth_passwordRecovery result = new TL_auth_passwordRecovery();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
email_pattern = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(email_pattern);
}
}
public static class TL_botCommand extends TLObject {
public static int constructor = 0xc27ac8c7;
public String command;
public String description;
public static TL_botCommand TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_botCommand.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_botCommand", constructor));
} else {
return null;
}
}
TL_botCommand result = new TL_botCommand();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
command = stream.readString(exception);
description = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(command);
stream.writeString(description);
}
}
public static abstract class InputNotifyPeer extends TLObject {
public static InputNotifyPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputNotifyPeer result = null;
switch (constructor) {
case 0x4a95e84e:
result = new TL_inputNotifyChats();
break;
case 0xb8bc5b0c:
result = new TL_inputNotifyPeer();
break;
case 0x193b4417:
result = new TL_inputNotifyUsers();
break;
case 0xb1db7c7e:
result = new TL_inputNotifyBroadcasts();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputNotifyPeer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputNotifyChats extends InputNotifyPeer {
public static int constructor = 0x4a95e84e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputNotifyPeer extends InputNotifyPeer {
public static int constructor = 0xb8bc5b0c;
public InputPeer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_inputNotifyUsers extends InputNotifyPeer {
public static int constructor = 0x193b4417;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputNotifyBroadcasts extends InputNotifyPeer {
public static int constructor = 0xb1db7c7e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class InputFileLocation extends TLObject {
public long id;
public long access_hash;
public byte[] file_reference;
public String thumb_size;
public int flags;
public long volume_id;
public int local_id;
public long secret;
public static InputFileLocation TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputFileLocation result = null;
switch (constructor) {
case 0x40181ffe:
result = new TL_inputPhotoFileLocation();
break;
case 0xbad07584:
result = new TL_inputDocumentFileLocation();
break;
case 0x37257e99:
result = new TL_inputPeerPhotoFileLocation();
break;
case 0xf5235d55:
result = new TL_inputEncryptedFileLocation();
break;
case 0x9d84f3db:
result = new TL_inputStickerSetThumb();
break;
case 0x598a92a:
result = new TL_inputGroupCallStream();
break;
case 0xdfdaabe1:
result = new TL_inputFileLocation();
break;
case 0xcbc7ee28:
result = new TL_inputSecureFileLocation();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputFileLocation", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPhotoFileLocation extends InputFileLocation {
public static int constructor = 0x40181ffe;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
thumb_size = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeString(thumb_size);
}
}
public static class TL_inputDocumentFileLocation extends InputFileLocation {
public static int constructor = 0xbad07584;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
thumb_size = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeString(thumb_size);
}
}
public static class TL_inputPeerPhotoFileLocation extends InputFileLocation {
public static int constructor = 0x37257e99;
public boolean big;
public InputPeer peer;
public long photo_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
big = (flags & 1) != 0;
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = big ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt64(photo_id);
}
}
public static class TL_inputEncryptedFileLocation extends InputFileLocation {
public static int constructor = 0xf5235d55;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputStickerSetThumb extends InputFileLocation {
public static int constructor = 0x9d84f3db;
public InputStickerSet stickerset;
public int thumb_version;
public void readParams(AbstractSerializedData stream, boolean exception) {
stickerset = InputStickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
thumb_version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stickerset.serializeToStream(stream);
stream.writeInt32(thumb_version);
}
}
public static class TL_inputGroupCallStream extends InputFileLocation {
public static int constructor = 0x598a92a;
public int flags;
public TL_inputGroupCall call;
public long time_ms;
public int scale;
public int video_channel;
public int video_quality;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
time_ms = stream.readInt64(exception);
scale = stream.readInt32(exception);
if ((flags & 1) != 0) {
video_channel = stream.readInt32(exception);
}
if ((flags & 1) != 0) {
video_quality = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
call.serializeToStream(stream);
stream.writeInt64(time_ms);
stream.writeInt32(scale);
if ((flags & 1) != 0) {
stream.writeInt32(video_channel);
}
if ((flags & 1) != 0) {
stream.writeInt32(video_quality);
}
}
}
public static class TL_inputFileLocation extends InputFileLocation {
public static int constructor = 0xdfdaabe1;
public void readParams(AbstractSerializedData stream, boolean exception) {
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
secret = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
stream.writeInt64(secret);
stream.writeByteArray(file_reference);
}
}
public static class TL_inputSecureFileLocation extends InputFileLocation {
public static int constructor = 0xcbc7ee28;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_photos_photo extends TLObject {
public static int constructor = 0x20212ca8;
public Photo photo;
public ArrayList<User> users = new ArrayList<>();
public static TL_photos_photo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_photos_photo.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_photos_photo", constructor));
} else {
return null;
}
}
TL_photos_photo result = new TL_photos_photo();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class help_TermsOfServiceUpdate extends TLObject {
public static help_TermsOfServiceUpdate TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_TermsOfServiceUpdate result = null;
switch (constructor) {
case 0x28ecf961:
result = new TL_help_termsOfServiceUpdate();
break;
case 0xe3309f7f:
result = new TL_help_termsOfServiceUpdateEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_TermsOfServiceUpdate", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_termsOfServiceUpdate extends help_TermsOfServiceUpdate {
public static int constructor = 0x28ecf961;
public int expires;
public TL_help_termsOfService terms_of_service;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
terms_of_service = TL_help_termsOfService.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
terms_of_service.serializeToStream(stream);
}
}
public static class TL_help_termsOfServiceUpdateEmpty extends help_TermsOfServiceUpdate {
public static int constructor = 0xe3309f7f;
public int expires;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
}
}
public static class TL_messages_chatAdminsWithInvites extends TLObject {
public static int constructor = 0xb69b72d7;
public ArrayList<TL_chatAdminWithInvites> admins = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_chatAdminsWithInvites TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_chatAdminsWithInvites.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_chatAdminsWithInvites", constructor));
} else {
return null;
}
}
TL_messages_chatAdminsWithInvites result = new TL_messages_chatAdminsWithInvites();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_chatAdminWithInvites object = TL_chatAdminWithInvites.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
admins.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = admins.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
admins.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_phone_groupCall extends TLObject {
public static int constructor = 0x9e727aad;
public GroupCall call;
public ArrayList<TL_groupCallParticipant> participants = new ArrayList<>();
public String participants_next_offset;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_phone_groupCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_phone_groupCall.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_phone_groupCall", constructor));
} else {
return null;
}
}
TL_phone_groupCall result = new TL_phone_groupCall();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
call = GroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_groupCallParticipant object = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
participants_next_offset = stream.readString(exception);
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeString(participants_next_offset);
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class PhoneCall extends TLObject {
public int flags;
public boolean p2p_allowed;
public long id;
public long access_hash;
public int date;
public int admin_id;
public int participant_id;
public byte[] g_a_or_b;
public long key_fingerprint;
public PhoneCallProtocol protocol;
public ArrayList<PhoneConnection> connections = new ArrayList<>();
public int start_date;
public boolean need_rating;
public boolean need_debug;
public boolean video;
public PhoneCallDiscardReason reason;
public int duration;
public byte[] g_a_hash;
public byte[] g_b;
public int receive_date;
public static PhoneCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PhoneCall result = null;
switch (constructor) {
case 0x87eabb53:
result = new TL_phoneCallRequested();
break;
case 0x8742ae7f:
result = new TL_phoneCall();
break;
case 0x5366c915:
result = new TL_phoneCallEmpty();
break;
case 0x997c454a:
result = new TL_phoneCallAccepted();
break;
case 0x1b8f4ad1:
result = new TL_phoneCallWaiting();
break;
case 0x50ca4de1:
result = new TL_phoneCallDiscarded();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PhoneCall", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_phoneCallRequested extends PhoneCall {
public static int constructor = 0x87eabb53;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
video = (flags & 64) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a_hash = stream.readByteArray(exception);
protocol = PhoneCallProtocol.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a_hash);
protocol.serializeToStream(stream);
}
}
public static class TL_phoneCall extends PhoneCall {
public static int constructor = 0x8742ae7f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
p2p_allowed = (flags & 32) != 0;
video = (flags & 64) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a_or_b = stream.readByteArray(exception);
key_fingerprint = stream.readInt64(exception);
protocol = PhoneCallProtocol.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhoneConnection object = PhoneConnection.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
connections.add(object);
}
start_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = p2p_allowed ? (flags | 32) : (flags &~ 32);
flags = video ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a_or_b);
stream.writeInt64(key_fingerprint);
protocol.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = connections.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
connections.get(a).serializeToStream(stream);
}
stream.writeInt32(start_date);
}
}
public static class TL_phoneCallEmpty extends PhoneCall {
public static int constructor = 0x5366c915;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_phoneCallAccepted extends PhoneCall {
public static int constructor = 0x997c454a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
video = (flags & 64) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_b = stream.readByteArray(exception);
protocol = PhoneCallProtocol.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_b);
protocol.serializeToStream(stream);
}
}
public static class TL_phoneCallWaiting extends PhoneCall {
public static int constructor = 0x1b8f4ad1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
video = (flags & 64) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
protocol = PhoneCallProtocol.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
receive_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
protocol.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(receive_date);
}
}
}
public static class TL_phoneCallDiscarded extends PhoneCall {
public static int constructor = 0x50ca4de1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
need_rating = (flags & 4) != 0;
need_debug = (flags & 8) != 0;
video = (flags & 64) != 0;
id = stream.readInt64(exception);
if ((flags & 1) != 0) {
reason = PhoneCallDiscardReason.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
duration = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = need_rating ? (flags | 4) : (flags &~ 4);
flags = need_debug ? (flags | 8) : (flags &~ 8);
flags = video ? (flags | 64) : (flags &~ 64);
stream.writeInt32(flags);
stream.writeInt64(id);
if ((flags & 1) != 0) {
reason.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(duration);
}
}
}
public static abstract class help_CountriesList extends TLObject {
public static help_CountriesList TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_CountriesList result = null;
switch (constructor) {
case 0x93cc1f32:
result = new TL_help_countriesListNotModified();
break;
case 0x87d0759e:
result = new TL_help_countriesList();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_CountriesList", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_countriesListNotModified extends help_CountriesList {
public static int constructor = 0x93cc1f32;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_countriesList extends help_CountriesList {
public static int constructor = 0x87d0759e;
public ArrayList<TL_help_country> countries = new ArrayList<>();
public int hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_help_country object = TL_help_country.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
countries.add(object);
}
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = countries.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
countries.get(a).serializeToStream(stream);
}
stream.writeInt32(hash);
}
}
public static abstract class User extends TLObject {
public int id;
public String first_name;
public String last_name;
public String username;
public long access_hash;
public String phone;
public UserProfilePhoto photo;
public UserStatus status;
public int flags;
public boolean self;
public boolean contact;
public boolean mutual_contact;
public boolean deleted;
public boolean bot;
public boolean bot_chat_history;
public boolean bot_nochats;
public boolean verified;
public boolean restricted;
public boolean min;
public boolean bot_inline_geo;
public boolean support;
public boolean scam;
public boolean apply_min_photo;
public boolean fake;
public int bot_info_version;
public String bot_inline_placeholder;
public String lang_code;
public boolean inactive;
public boolean explicit_content;
public ArrayList<TL_restrictionReason> restriction_reason = new ArrayList<>();
public static User TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
User result = null;
switch (constructor) {
case 0xcab35e18:
result = new TL_userContact_old2();
break;
case 0xf2fb8319:
result = new TL_userContact_old();
break;
case 0x938458c1:
result = new TL_user();
break;
case 0x2e13f4c3:
result = new TL_user_layer104();
break;
case 0x720535ec:
result = new TL_userSelf_old();
break;
case 0x1c60e608:
result = new TL_userSelf_old3();
break;
case 0xd6016d7a:
result = new TL_userDeleted_old2();
break;
case 0x200250ba:
result = new TL_userEmpty();
break;
case 0x22e8ceb0:
result = new TL_userRequest_old();
break;
case 0x5214c89d:
result = new TL_userForeign_old();
break;
case 0x75cf7a8:
result = new TL_userForeign_old2();
break;
case 0xd9ccc4ef:
result = new TL_userRequest_old2();
break;
case 0xb29ad7cc:
result = new TL_userDeleted_old();
break;
case 0xd10d979a:
result = new TL_user_layer65();
break;
case 0x22e49072:
result = new TL_user_old();
break;
case 0x7007b451:
result = new TL_userSelf_old2();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in User", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_userContact_old2 extends User {
public static int constructor = 0xcab35e18;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
access_hash = stream.readInt64(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
stream.writeInt64(access_hash);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userContact_old extends TL_userContact_old2 {
public static int constructor = 0xf2fb8319;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
access_hash = stream.readInt64(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeInt64(access_hash);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_user extends User {
public static int constructor = 0x938458c1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
self = (flags & 1024) != 0;
contact = (flags & 2048) != 0;
mutual_contact = (flags & 4096) != 0;
deleted = (flags & 8192) != 0;
bot = (flags & 16384) != 0;
bot_chat_history = (flags & 32768) != 0;
bot_nochats = (flags & 65536) != 0;
verified = (flags & 131072) != 0;
restricted = (flags & 262144) != 0;
min = (flags & 1048576) != 0;
bot_inline_geo = (flags & 2097152) != 0;
support = (flags & 8388608) != 0;
scam = (flags & 16777216) != 0;
apply_min_photo = (flags & 33554432) != 0;
fake = (flags & 67108864) != 0;
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
access_hash = stream.readInt64(exception);
}
if ((flags & 2) != 0) {
first_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
last_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
username = stream.readString(exception);
}
if ((flags & 16) != 0) {
phone = stream.readString(exception);
}
if ((flags & 32) != 0) {
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
bot_info_version = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
if ((flags & 524288) != 0) {
bot_inline_placeholder = stream.readString(exception);
}
if ((flags & 4194304) != 0) {
lang_code = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = self ? (flags | 1024) : (flags &~ 1024);
flags = contact ? (flags | 2048) : (flags &~ 2048);
flags = mutual_contact ? (flags | 4096) : (flags &~ 4096);
flags = deleted ? (flags | 8192) : (flags &~ 8192);
flags = bot ? (flags | 16384) : (flags &~ 16384);
flags = bot_chat_history ? (flags | 32768) : (flags &~ 32768);
flags = bot_nochats ? (flags | 65536) : (flags &~ 65536);
flags = verified ? (flags | 131072) : (flags &~ 131072);
flags = restricted ? (flags | 262144) : (flags &~ 262144);
flags = min ? (flags | 1048576) : (flags &~ 1048576);
flags = bot_inline_geo ? (flags | 2097152) : (flags &~ 2097152);
flags = support ? (flags | 8388608) : (flags &~ 8388608);
flags = scam ? (flags | 16777216) : (flags &~ 16777216);
flags = apply_min_photo ? (flags | 33554432) : (flags &~ 33554432);
flags = fake ? (flags | 67108864) : (flags &~ 67108864);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeInt64(access_hash);
}
if ((flags & 2) != 0) {
stream.writeString(first_name);
}
if ((flags & 4) != 0) {
stream.writeString(last_name);
}
if ((flags & 8) != 0) {
stream.writeString(username);
}
if ((flags & 16) != 0) {
stream.writeString(phone);
}
if ((flags & 32) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 64) != 0) {
status.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(bot_info_version);
}
if ((flags & 262144) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
if ((flags & 524288) != 0) {
stream.writeString(bot_inline_placeholder);
}
if ((flags & 4194304) != 0) {
stream.writeString(lang_code);
}
}
}
public static class TL_user_layer104 extends TL_user {
public static int constructor = 0x2e13f4c3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
self = (flags & 1024) != 0;
contact = (flags & 2048) != 0;
mutual_contact = (flags & 4096) != 0;
deleted = (flags & 8192) != 0;
bot = (flags & 16384) != 0;
bot_chat_history = (flags & 32768) != 0;
bot_nochats = (flags & 65536) != 0;
verified = (flags & 131072) != 0;
restricted = (flags & 262144) != 0;
min = (flags & 1048576) != 0;
bot_inline_geo = (flags & 2097152) != 0;
support = (flags & 8388608) != 0;
scam = (flags & 16777216) != 0;
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
access_hash = stream.readInt64(exception);
}
if ((flags & 2) != 0) {
first_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
last_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
username = stream.readString(exception);
}
if ((flags & 16) != 0) {
phone = stream.readString(exception);
}
if ((flags & 32) != 0) {
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
bot_info_version = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
stream.readString(exception);
}
if ((flags & 524288) != 0) {
bot_inline_placeholder = stream.readString(exception);
}
if ((flags & 4194304) != 0) {
lang_code = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = self ? (flags | 1024) : (flags &~ 1024);
flags = contact ? (flags | 2048) : (flags &~ 2048);
flags = mutual_contact ? (flags | 4096) : (flags &~ 4096);
flags = deleted ? (flags | 8192) : (flags &~ 8192);
flags = bot ? (flags | 16384) : (flags &~ 16384);
flags = bot_chat_history ? (flags | 32768) : (flags &~ 32768);
flags = bot_nochats ? (flags | 65536) : (flags &~ 65536);
flags = verified ? (flags | 131072) : (flags &~ 131072);
flags = restricted ? (flags | 262144) : (flags &~ 262144);
flags = min ? (flags | 1048576) : (flags &~ 1048576);
flags = bot_inline_geo ? (flags | 2097152) : (flags &~ 2097152);
flags = support ? (flags | 8388608) : (flags &~ 8388608);
flags = scam ? (flags | 16777216) : (flags &~ 16777216);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeInt64(access_hash);
}
if ((flags & 2) != 0) {
stream.writeString(first_name);
}
if ((flags & 4) != 0) {
stream.writeString(last_name);
}
if ((flags & 8) != 0) {
stream.writeString(username);
}
if ((flags & 16) != 0) {
stream.writeString(phone);
}
if ((flags & 32) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 64) != 0) {
status.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(bot_info_version);
}
if ((flags & 262144) != 0) {
stream.writeString("");
}
if ((flags & 524288) != 0) {
stream.writeString(bot_inline_placeholder);
}
if ((flags & 4194304) != 0) {
stream.writeString(lang_code);
}
}
}
public static class TL_userSelf_old extends TL_userSelf_old3 {
public static int constructor = 0x720535ec;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
inactive = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
stream.writeBool(inactive);
}
}
public static class TL_userSelf_old3 extends User {
public static int constructor = 0x1c60e608;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userDeleted_old2 extends User {
public static int constructor = 0xd6016d7a;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
}
}
public static class TL_userEmpty extends User {
public static int constructor = 0x200250ba;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
}
}
public static class TL_userRequest_old extends TL_userRequest_old2 {
public static int constructor = 0x22e8ceb0;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
access_hash = stream.readInt64(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeInt64(access_hash);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userForeign_old extends TL_userForeign_old2 {
public static int constructor = 0x5214c89d;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
access_hash = stream.readInt64(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeInt64(access_hash);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userForeign_old2 extends User {
public static int constructor = 0x75cf7a8;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
access_hash = stream.readInt64(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
stream.writeInt64(access_hash);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userRequest_old2 extends User {
public static int constructor = 0xd9ccc4ef;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
access_hash = stream.readInt64(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
stream.writeInt64(access_hash);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
}
}
public static class TL_userDeleted_old extends TL_userDeleted_old2 {
public static int constructor = 0xb29ad7cc;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
}
}
public static class TL_user_layer65 extends TL_user {
public static int constructor = 0xd10d979a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
self = (flags & 1024) != 0;
contact = (flags & 2048) != 0;
mutual_contact = (flags & 4096) != 0;
deleted = (flags & 8192) != 0;
bot = (flags & 16384) != 0;
bot_chat_history = (flags & 32768) != 0;
bot_nochats = (flags & 65536) != 0;
verified = (flags & 131072) != 0;
restricted = (flags & 262144) != 0;
min = (flags & 1048576) != 0;
bot_inline_geo = (flags & 2097152) != 0;
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
access_hash = stream.readInt64(exception);
}
if ((flags & 2) != 0) {
first_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
last_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
username = stream.readString(exception);
}
if ((flags & 16) != 0) {
phone = stream.readString(exception);
}
if ((flags & 32) != 0) {
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
bot_info_version = stream.readInt32(exception);
}
if ((flags & 262144) != 0) {
stream.readString(exception);
}
if ((flags & 524288) != 0) {
bot_inline_placeholder = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = self ? (flags | 1024) : (flags &~ 1024);
flags = contact ? (flags | 2048) : (flags &~ 2048);
flags = mutual_contact ? (flags | 4096) : (flags &~ 4096);
flags = deleted ? (flags | 8192) : (flags &~ 8192);
flags = bot ? (flags | 16384) : (flags &~ 16384);
flags = bot_chat_history ? (flags | 32768) : (flags &~ 32768);
flags = bot_nochats ? (flags | 65536) : (flags &~ 65536);
flags = verified ? (flags | 131072) : (flags &~ 131072);
flags = restricted ? (flags | 262144) : (flags &~ 262144);
flags = min ? (flags | 1048576) : (flags &~ 1048576);
flags = bot_inline_geo ? (flags | 2097152) : (flags &~ 2097152);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeInt64(access_hash);
}
if ((flags & 2) != 0) {
stream.writeString(first_name);
}
if ((flags & 4) != 0) {
stream.writeString(last_name);
}
if ((flags & 8) != 0) {
stream.writeString(username);
}
if ((flags & 16) != 0) {
stream.writeString(phone);
}
if ((flags & 32) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 64) != 0) {
status.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(bot_info_version);
}
if ((flags & 262144) != 0) {
stream.writeString("");
}
if ((flags & 524288) != 0) {
stream.writeString(bot_inline_placeholder);
}
}
}
public static class TL_user_old extends TL_user {
public static int constructor = 0x22e49072;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
self = (flags & 1024) != 0;
contact = (flags & 2048) != 0;
mutual_contact = (flags & 4096) != 0;
deleted = (flags & 8192) != 0;
bot = (flags & 16384) != 0;
bot_chat_history = (flags & 32768) != 0;
bot_nochats = (flags & 65536) != 0;
verified = (flags & 131072) != 0;
explicit_content = (flags & 262144) != 0;
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
access_hash = stream.readInt64(exception);
}
if ((flags & 2) != 0) {
first_name = stream.readString(exception);
}
if ((flags & 4) != 0) {
last_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
username = stream.readString(exception);
}
if ((flags & 16) != 0) {
phone = stream.readString(exception);
}
if ((flags & 32) != 0) {
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
bot_info_version = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = self ? (flags | 1024) : (flags &~ 1024);
flags = contact ? (flags | 2048) : (flags &~ 2048);
flags = mutual_contact ? (flags | 4096) : (flags &~ 4096);
flags = deleted ? (flags | 8192) : (flags &~ 8192);
flags = bot ? (flags | 16384) : (flags &~ 16384);
flags = bot_chat_history ? (flags | 32768) : (flags &~ 32768);
flags = bot_nochats ? (flags | 65536) : (flags &~ 65536);
flags = verified ? (flags | 131072) : (flags &~ 131072);
flags = explicit_content ? (flags | 262144) : (flags &~ 262144);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeInt64(access_hash);
}
if ((flags & 2) != 0) {
stream.writeString(first_name);
}
if ((flags & 4) != 0) {
stream.writeString(last_name);
}
if ((flags & 8) != 0) {
stream.writeString(username);
}
if ((flags & 16) != 0) {
stream.writeString(phone);
}
if ((flags & 32) != 0) {
photo.serializeToStream(stream);
}
if ((flags & 64) != 0) {
status.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
stream.writeInt32(bot_info_version);
}
}
}
public static class TL_userSelf_old2 extends TL_userSelf_old3 {
public static int constructor = 0x7007b451;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
phone = stream.readString(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
inactive = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
stream.writeString(phone);
photo.serializeToStream(stream);
status.serializeToStream(stream);
stream.writeBool(inactive);
}
}
public static abstract class RecentMeUrl extends TLObject {
public String url;
public int chat_id;
public StickerSetCovered set;
public ChatInvite chat_invite;
public int user_id;
public static RecentMeUrl TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
RecentMeUrl result = null;
switch (constructor) {
case 0xa01b22f9:
result = new TL_recentMeUrlChat();
break;
case 0xbc0a57dc:
result = new TL_recentMeUrlStickerSet();
break;
case 0x46e1d13d:
result = new TL_recentMeUrlUnknown();
break;
case 0xeb49081d:
result = new TL_recentMeUrlChatInvite();
break;
case 0x8dbc3336:
result = new TL_recentMeUrlUser();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in RecentMeUrl", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_recentMeUrlChat extends RecentMeUrl {
public static int constructor = 0xa01b22f9;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt32(chat_id);
}
}
public static class TL_recentMeUrlStickerSet extends RecentMeUrl {
public static int constructor = 0xbc0a57dc;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
set = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
set.serializeToStream(stream);
}
}
public static class TL_recentMeUrlUnknown extends RecentMeUrl {
public static int constructor = 0x46e1d13d;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_recentMeUrlChatInvite extends RecentMeUrl {
public static int constructor = 0xeb49081d;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
chat_invite = ChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
chat_invite.serializeToStream(stream);
}
}
public static class TL_recentMeUrlUser extends RecentMeUrl {
public static int constructor = 0x8dbc3336;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt32(user_id);
}
}
public static class TL_statsGroupTopPoster extends TLObject {
public static int constructor = 0x18f3d0f7;
public int user_id;
public int messages;
public int avg_chars;
public static TL_statsGroupTopPoster TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsGroupTopPoster.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsGroupTopPoster", constructor));
} else {
return null;
}
}
TL_statsGroupTopPoster result = new TL_statsGroupTopPoster();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
messages = stream.readInt32(exception);
avg_chars = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(messages);
stream.writeInt32(avg_chars);
}
}
public static class TL_statsDateRangeDays extends TLObject {
public static int constructor = 0xb637edaf;
public int min_date;
public int max_date;
public static TL_statsDateRangeDays TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsDateRangeDays.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsDateRangeDays", constructor));
} else {
return null;
}
}
TL_statsDateRangeDays result = new TL_statsDateRangeDays();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
min_date = stream.readInt32(exception);
max_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(min_date);
stream.writeInt32(max_date);
}
}
public static class TL_payments_bankCardData extends TLObject {
public static int constructor = 0x3e24e573;
public String title;
public ArrayList<TL_bankCardOpenUrl> open_urls = new ArrayList<>();
public static TL_payments_bankCardData TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_payments_bankCardData.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_payments_bankCardData", constructor));
} else {
return null;
}
}
TL_payments_bankCardData result = new TL_payments_bankCardData();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_bankCardOpenUrl object = TL_bankCardOpenUrl.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
open_urls.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
stream.writeInt32(0x1cb5c415);
int count = open_urls.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
open_urls.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_highScores extends TLObject {
public static int constructor = 0x9a3bfd99;
public ArrayList<TL_highScore> scores = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_highScores TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_highScores.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_highScores", constructor));
} else {
return null;
}
}
TL_messages_highScores result = new TL_messages_highScores();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_highScore object = TL_highScore.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
scores.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = scores.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
scores.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_phone_phoneCall extends TLObject {
public static int constructor = 0xec82e140;
public PhoneCall phone_call;
public ArrayList<User> users = new ArrayList<>();
public static TL_phone_phoneCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_phone_phoneCall.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_phone_phoneCall", constructor));
} else {
return null;
}
}
TL_phone_phoneCall result = new TL_phone_phoneCall();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_call = PhoneCall.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
phone_call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ChannelParticipantsFilter extends TLObject {
public String q;
public static ChannelParticipantsFilter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChannelParticipantsFilter result = null;
switch (constructor) {
case 0xe04b5ceb:
result = new TL_channelParticipantsMentions();
break;
case 0xbb6ae88d:
result = new TL_channelParticipantsContacts();
break;
case 0xb4608969:
result = new TL_channelParticipantsAdmins();
break;
case 0xa3b54985:
result = new TL_channelParticipantsKicked();
break;
case 0x656ac4b:
result = new TL_channelParticipantsSearch();
break;
case 0xb0d1865b:
result = new TL_channelParticipantsBots();
break;
case 0x1427a5e1:
result = new TL_channelParticipantsBanned();
break;
case 0xde3f3c79:
result = new TL_channelParticipantsRecent();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChannelParticipantsFilter", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channelParticipantsMentions extends ChannelParticipantsFilter {
public static int constructor = 0xe04b5ceb;
public int flags;
public int top_msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
q = stream.readString(exception);
}
if ((flags & 2) != 0) {
top_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(q);
}
if ((flags & 2) != 0) {
stream.writeInt32(top_msg_id);
}
}
}
public static class TL_channelParticipantsContacts extends ChannelParticipantsFilter {
public static int constructor = 0xbb6ae88d;
public void readParams(AbstractSerializedData stream, boolean exception) {
q = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
}
}
public static class TL_channelParticipantsAdmins extends ChannelParticipantsFilter {
public static int constructor = 0xb4608969;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelParticipantsKicked extends ChannelParticipantsFilter {
public static int constructor = 0xa3b54985;
public void readParams(AbstractSerializedData stream, boolean exception) {
q = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
}
}
public static class TL_channelParticipantsSearch extends ChannelParticipantsFilter {
public static int constructor = 0x656ac4b;
public void readParams(AbstractSerializedData stream, boolean exception) {
q = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
}
}
public static class TL_channelParticipantsBots extends ChannelParticipantsFilter {
public static int constructor = 0xb0d1865b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelParticipantsBanned extends ChannelParticipantsFilter {
public static int constructor = 0x1427a5e1;
public void readParams(AbstractSerializedData stream, boolean exception) {
q = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
}
}
public static class TL_channelParticipantsRecent extends ChannelParticipantsFilter {
public static int constructor = 0xde3f3c79;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class MessageAction extends TLObject {
public String title;
public String address;
public DecryptedMessageAction encryptedAction;
public String message;
public ArrayList<Integer> users = new ArrayList<>();
public TL_inputGroupCall call;
public int channel_id;
public Photo photo;
public int chat_id;
public int user_id;
public UserProfilePhoto newUserPhoto;
public int inviter_id;
public int ttl;
public int flags;
public long call_id;
public PhoneCallDiscardReason reason;
public int duration;
public String currency;
public long total_amount;
public long game_id;
public int score;
public boolean video;
public static MessageAction TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessageAction result = null;
switch (constructor) {
case 0x555555F5:
result = new TL_messageActionLoginUnknownLocation();
break;
case 0x555555F7:
result = new TL_messageEncryptedAction();
break;
case 0xfae69f56:
result = new TL_messageActionCustomAction();
break;
case 0xa6638b9a:
result = new TL_messageActionChatCreate();
break;
case 0x51bdb021:
result = new TL_messageActionChatMigrateTo();
break;
case 0x7a0d7f42:
result = new TL_messageActionGroupCall();
break;
case 0xaa786345:
result = new TL_messageActionSetChatTheme();
break;
case 0x4792929b:
result = new TL_messageActionScreenshotTaken();
break;
case 0x9fbab604:
result = new TL_messageActionHistoryClear();
break;
case 0x7fcb13a8:
result = new TL_messageActionChatEditPhoto();
break;
case 0xb055eaee:
result = new TL_messageActionChannelMigrateFrom();
break;
case 0x488a7337:
result = new TL_messageActionChatAddUser();
break;
case 0xb2ae9b0c:
result = new TL_messageActionChatDeleteUser();
break;
case 0x55555557:
result = new TL_messageActionCreatedBroadcastList();
break;
case 0x55555550:
result = new TL_messageActionUserJoined();
break;
case 0x55555551:
result = new TL_messageActionUserUpdatedPhoto();
break;
case 0x5e3cfc4b:
result = new TL_messageActionChatAddUser_old();
break;
case 0x55555552:
result = new TL_messageActionTTLChange();
break;
case 0xaa1afbfd:
result = new TL_messageActionSetMessagesTTL();
break;
case 0xd95c6154:
result = new TL_messageActionSecureValuesSent();
break;
case 0xf89cf5e8:
result = new TL_messageActionChatJoinedByLink();
break;
case 0xf3f25f76:
result = new TL_messageActionContactSignUp();
break;
case 0x95d2ac92:
result = new TL_messageActionChannelCreate();
break;
case 0x94bd38ed:
result = new TL_messageActionPinMessage();
break;
case 0x98e0d697:
result = new TL_messageActionGeoProximityReached();
break;
case 0x95e3fbef:
result = new TL_messageActionChatDeletePhoto();
break;
case 0x76b9f11a:
result = new TL_messageActionInviteToGroupCall();
break;
case 0x80e11a7f:
result = new TL_messageActionPhoneCall();
break;
case 0xb5a1ce5a:
result = new TL_messageActionChatEditTitle();
break;
case 0xabe9affe:
result = new TL_messageActionBotAllowed();
break;
case 0x40699cd0:
result = new TL_messageActionPaymentSent();
break;
case 0xb6aef7b0:
result = new TL_messageActionEmpty();
break;
case 0x92a72876:
result = new TL_messageActionGameScore();
break;
case 0xb3a07661:
result = new TL_messageActionGroupCallScheduled();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessageAction", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messageActionLoginUnknownLocation extends MessageAction {
public static int constructor = 0x555555F5;
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
address = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
stream.writeString(address);
}
}
public static class TL_messageEncryptedAction extends MessageAction {
public static int constructor = 0x555555F7;
public void readParams(AbstractSerializedData stream, boolean exception) {
encryptedAction = DecryptedMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
encryptedAction.serializeToStream(stream);
}
}
public static class TL_messageActionCustomAction extends MessageAction {
public static int constructor = 0xfae69f56;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(message);
}
}
public static class TL_messageActionChatCreate extends MessageAction {
public static int constructor = 0xa6638b9a;
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
users.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(users.get(a));
}
}
}
public static class TL_messageActionGroupCall extends MessageAction {
public static int constructor = 0x7a0d7f42;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
duration = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
call.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(duration);
}
}
}
public static class TL_messageActionSetChatTheme extends MessageAction {
public static int constructor = 0xaa786345;
public String emoticon;
public void readParams(AbstractSerializedData stream, boolean exception) {
emoticon = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
}
}
public static class TL_messageActionChatMigrateTo extends MessageAction {
public static int constructor = 0x51bdb021;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
}
}
public static class TL_messageActionHistoryClear extends MessageAction {
public static int constructor = 0x9fbab604;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionChatEditPhoto extends MessageAction {
public static int constructor = 0x7fcb13a8;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo.serializeToStream(stream);
}
}
public static class TL_messageActionScreenshotTaken extends MessageAction {
public static int constructor = 0x4792929b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionChannelMigrateFrom extends MessageAction {
public static int constructor = 0xb055eaee;
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
stream.writeInt32(chat_id);
}
}
public static class TL_messageActionChatAddUser extends MessageAction {
public static int constructor = 0x488a7337;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
users.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(users.get(a));
}
}
}
public static class TL_messageActionChatDeleteUser extends MessageAction {
public static int constructor = 0xb2ae9b0c;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
}
}
public static class TL_messageActionCreatedBroadcastList extends MessageAction {
public static int constructor = 0x55555557;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionInviteToGroupCall extends MessageAction {
public static int constructor = 0x76b9f11a;
public void readParams(AbstractSerializedData stream, boolean exception) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
users.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(users.get(a));
}
}
}
public static class TL_messageActionUserJoined extends MessageAction {
public static int constructor = 0x55555550;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionUserUpdatedPhoto extends MessageAction {
public static int constructor = 0x55555551;
public void readParams(AbstractSerializedData stream, boolean exception) {
newUserPhoto = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
newUserPhoto.serializeToStream(stream);
}
}
public static class TL_messageActionContactSignUp extends MessageAction {
public static int constructor = 0xf3f25f76;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionChatAddUser_old extends TL_messageActionChatAddUser {
public static int constructor = 0x5e3cfc4b;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
}
}
public static class TL_messageActionTTLChange extends MessageAction {
public static int constructor = 0x55555552;
public void readParams(AbstractSerializedData stream, boolean exception) {
ttl = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(ttl);
}
}
public static class TL_messageActionSetMessagesTTL extends MessageAction {
public static int constructor = 0xaa1afbfd;
public int period;
public void readParams(AbstractSerializedData stream, boolean exception) {
period = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(period);
}
}
public static class TL_messageActionChatJoinedByLink extends MessageAction {
public static int constructor = 0xf89cf5e8;
public void readParams(AbstractSerializedData stream, boolean exception) {
inviter_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(inviter_id);
}
}
public static class TL_messageActionChannelCreate extends MessageAction {
public static int constructor = 0x95d2ac92;
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
}
}
public static class TL_messageActionSecureValuesSent extends MessageAction {
public static int constructor = 0xd95c6154;
public ArrayList<SecureValueType> types = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureValueType object = SecureValueType.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
types.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = types.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
types.get(a).serializeToStream(stream);
}
}
}
public static class TL_messageActionPinMessage extends MessageAction {
public static int constructor = 0x94bd38ed;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionGeoProximityReached extends MessageAction {
public static int constructor = 0x98e0d697;
public Peer from_id;
public Peer to_id;
public int distance;
public void readParams(AbstractSerializedData stream, boolean exception) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
to_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
distance = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
from_id.serializeToStream(stream);
to_id.serializeToStream(stream);
stream.writeInt32(distance);
}
}
public static class TL_messageActionChatDeletePhoto extends MessageAction {
public static int constructor = 0x95e3fbef;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionPhoneCall extends MessageAction {
public static int constructor = 0x80e11a7f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
video = (flags & 4) != 0;
call_id = stream.readInt64(exception);
if ((flags & 1) != 0) {
reason = PhoneCallDiscardReason.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
duration = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt64(call_id);
if ((flags & 1) != 0) {
reason.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(duration);
}
}
}
public static class TL_messageActionChatEditTitle extends MessageAction {
public static int constructor = 0xb5a1ce5a;
public void readParams(AbstractSerializedData stream, boolean exception) {
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
}
}
public static class TL_messageActionPaymentSent extends MessageAction {
public static int constructor = 0x40699cd0;
public void readParams(AbstractSerializedData stream, boolean exception) {
currency = stream.readString(exception);
total_amount = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(currency);
stream.writeInt64(total_amount);
}
}
public static class TL_messageActionBotAllowed extends MessageAction {
public static int constructor = 0xabe9affe;
public String domain;
public void readParams(AbstractSerializedData stream, boolean exception) {
domain = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(domain);
}
}
public static class TL_messageActionEmpty extends MessageAction {
public static int constructor = 0xb6aef7b0;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageActionGameScore extends MessageAction {
public static int constructor = 0x92a72876;
public void readParams(AbstractSerializedData stream, boolean exception) {
game_id = stream.readInt64(exception);
score = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(game_id);
stream.writeInt32(score);
}
}
public static class TL_messageActionGroupCallScheduled extends MessageAction {
public static int constructor = 0xb3a07661;
public int schedule_date;
public void readParams(AbstractSerializedData stream, boolean exception) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
schedule_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(schedule_date);
}
}
public static abstract class ReportReason extends TLObject {
public static ReportReason TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ReportReason result = null;
switch (constructor) {
case 0xdbd4feed:
result = new TL_inputReportReasonGeoIrrelevant();
break;
case 0xc1e4a2b1:
result = new TL_inputReportReasonOther();
break;
case 0xf5ddd6e7:
result = new TL_inputReportReasonFake();
break;
case 0x9b89f93a:
result = new TL_inputReportReasonCopyright();
break;
case 0x58dbcab8:
result = new TL_inputReportReasonSpam();
break;
case 0x1e22c78d:
result = new TL_inputReportReasonViolence();
break;
case 0xadf44ee3:
result = new TL_inputReportReasonChildAbuse();
break;
case 0x2e59d922:
result = new TL_inputReportReasonPornography();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ReportReason", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputReportReasonGeoIrrelevant extends ReportReason {
public static int constructor = 0xdbd4feed;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonOther extends ReportReason {
public static int constructor = 0xc1e4a2b1;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonFake extends ReportReason {
public static int constructor = 0xf5ddd6e7;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonCopyright extends ReportReason {
public static int constructor = 0x9b89f93a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonSpam extends ReportReason {
public static int constructor = 0x58dbcab8;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonViolence extends ReportReason {
public static int constructor = 0x1e22c78d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonChildAbuse extends ReportReason {
public static int constructor = 0xadf44ee3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputReportReasonPornography extends ReportReason {
public static int constructor = 0x2e59d922;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_archivedStickers extends TLObject {
public static int constructor = 0x4fcba9c8;
public int count;
public ArrayList<StickerSetCovered> sets = new ArrayList<>();
public static TL_messages_archivedStickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_archivedStickers.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_archivedStickers", constructor));
} else {
return null;
}
}
TL_messages_archivedStickers result = new TL_messages_archivedStickers();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
StickerSetCovered object = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sets.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = sets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sets.get(a).serializeToStream(stream);
}
}
}
public static class TL_chatLocated extends TLObject {
public static int constructor = 0x3631cf4c;
public int chat_id;
public int distance;
public static TL_chatLocated TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatLocated.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatLocated", constructor));
} else {
return null;
}
}
TL_chatLocated result = new TL_chatLocated();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
distance = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(distance);
}
}
public static abstract class DecryptedMessage extends TLObject {
public long random_id;
public int ttl;
public String message;
public DecryptedMessageMedia media;
public DecryptedMessageAction action;
public byte[] random_bytes;
public int flags;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public String via_bot_name;
public long reply_to_random_id;
public long grouped_id;
public boolean silent;
public static DecryptedMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DecryptedMessage result = null;
switch (constructor) {
case 0x204d3878:
result = new TL_decryptedMessage_layer17();
break;
case 0x73164160:
result = new TL_decryptedMessageService();
break;
case 0xaa48327d:
result = new TL_decryptedMessageService_layer8();
break;
case 0x1f814f1f:
result = new TL_decryptedMessage_layer8();
break;
case 0x91cc4674:
result = new TL_decryptedMessage();
break;
case 0x36b091de:
result = new TL_decryptedMessage_layer45();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DecryptedMessage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_decryptedMessage_layer17 extends TL_decryptedMessage {
public static int constructor = 0x204d3878;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
ttl = stream.readInt32(exception);
message = stream.readString(exception);
media = DecryptedMessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
stream.writeInt32(ttl);
stream.writeString(message);
media.serializeToStream(stream);
}
}
public static class TL_decryptedMessageService extends DecryptedMessage {
public static int constructor = 0x73164160;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
action = DecryptedMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
action.serializeToStream(stream);
}
}
public static class TL_decryptedMessageService_layer8 extends TL_decryptedMessageService {
public static int constructor = 0xaa48327d;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
random_bytes = stream.readByteArray(exception);
action = DecryptedMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
stream.writeByteArray(random_bytes);
action.serializeToStream(stream);
}
}
public static class TL_decryptedMessage_layer8 extends TL_decryptedMessage {
public static int constructor = 0x1f814f1f;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
random_bytes = stream.readByteArray(exception);
message = stream.readString(exception);
media = DecryptedMessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
stream.writeByteArray(random_bytes);
stream.writeString(message);
media.serializeToStream(stream);
}
}
public static class TL_decryptedMessage extends DecryptedMessage {
public static int constructor = 0x91cc4674;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
silent = (flags & 32) != 0;
random_id = stream.readInt64(exception);
ttl = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = DecryptedMessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 2048) != 0) {
via_bot_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
reply_to_random_id = stream.readInt64(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt64(random_id);
stream.writeInt32(ttl);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 2048) != 0) {
stream.writeString(via_bot_name);
}
if ((flags & 8) != 0) {
stream.writeInt64(reply_to_random_id);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
}
}
public static class TL_decryptedMessage_layer45 extends TL_decryptedMessage {
public static int constructor = 0x36b091de;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
random_id = stream.readInt64(exception);
ttl = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = DecryptedMessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 2048) != 0) {
via_bot_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
reply_to_random_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(random_id);
stream.writeInt32(ttl);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 2048) != 0) {
stream.writeString(via_bot_name);
}
if ((flags & 8) != 0) {
stream.writeInt64(reply_to_random_id);
}
}
}
public static abstract class account_Themes extends TLObject {
public static account_Themes TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
account_Themes result = null;
switch (constructor) {
case 0x7f676421:
result = new TL_account_themes();
break;
case 0xf41eb622:
result = new TL_account_themesNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in account_Themes", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_account_themes extends account_Themes {
public static int constructor = 0x7f676421;
public int hash;
public ArrayList<Theme> themes = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Theme object = Theme.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
themes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = themes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
themes.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_themesNotModified extends account_Themes {
public static int constructor = 0xf41eb622;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_invoice extends TLObject {
public static int constructor = 0xcd886e0;
public int flags;
public boolean test;
public boolean name_requested;
public boolean phone_requested;
public boolean email_requested;
public boolean shipping_address_requested;
public boolean flexible;
public boolean phone_to_provider;
public boolean email_to_provider;
public String currency;
public ArrayList<TL_labeledPrice> prices = new ArrayList<>();
public long max_tip_amount;
public ArrayList<Long> suggested_tip_amounts = new ArrayList<>();
public static TL_invoice TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_invoice.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_invoice", constructor));
} else {
return null;
}
}
TL_invoice result = new TL_invoice();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
test = (flags & 1) != 0;
name_requested = (flags & 2) != 0;
phone_requested = (flags & 4) != 0;
email_requested = (flags & 8) != 0;
shipping_address_requested = (flags & 16) != 0;
flexible = (flags & 32) != 0;
phone_to_provider = (flags & 64) != 0;
email_to_provider = (flags & 128) != 0;
currency = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_labeledPrice object = TL_labeledPrice.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
prices.add(object);
}
if ((flags & 256) != 0) {
max_tip_amount = stream.readInt64(exception);
}
if ((flags & 256) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
suggested_tip_amounts.add(stream.readInt64(exception));
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = test ? (flags | 1) : (flags &~ 1);
flags = name_requested ? (flags | 2) : (flags &~ 2);
flags = phone_requested ? (flags | 4) : (flags &~ 4);
flags = email_requested ? (flags | 8) : (flags &~ 8);
flags = shipping_address_requested ? (flags | 16) : (flags &~ 16);
flags = flexible ? (flags | 32) : (flags &~ 32);
flags = phone_to_provider ? (flags | 64) : (flags &~ 64);
flags = email_to_provider ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
stream.writeString(currency);
stream.writeInt32(0x1cb5c415);
int count = prices.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
prices.get(a).serializeToStream(stream);
}
if ((flags & 256) != 0) {
stream.writeInt64(max_tip_amount);
}
if ((flags & 256) != 0) {
stream.writeInt32(0x1cb5c415);
count = suggested_tip_amounts.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(suggested_tip_amounts.get(a));
}
}
}
}
public static abstract class account_WallPapers extends TLObject {
public static account_WallPapers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
account_WallPapers result = null;
switch (constructor) {
case 0x1c199183:
result = new TL_account_wallPapersNotModified();
break;
case 0x702b65a9:
result = new TL_account_wallPapers();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in account_WallPapers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_account_wallPapersNotModified extends account_WallPapers {
public static int constructor = 0x1c199183;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_wallPapers extends account_WallPapers {
public static int constructor = 0x702b65a9;
public int hash;
public ArrayList<WallPaper> wallpapers = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
WallPaper object = WallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
wallpapers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = wallpapers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
wallpapers.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputWebDocument extends TLObject {
public static int constructor = 0x9bed434d;
public String url;
public int size;
public String mime_type;
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
public static TL_inputWebDocument TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputWebDocument.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputWebDocument", constructor));
} else {
return null;
}
}
TL_inputWebDocument result = new TL_inputWebDocument();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
size = stream.readInt32(exception);
mime_type = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt32(size);
stream.writeString(mime_type);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_messageReactions extends TLObject {
public static int constructor = 0xb87a24d1;
public int flags;
public boolean min;
public ArrayList<TL_reactionCount> results = new ArrayList<>();
public static TL_messageReactions TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageReactions.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageReactions", constructor));
} else {
return null;
}
}
TL_messageReactions result = new TL_messageReactions();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
min = (flags & 1) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_reactionCount object = TL_reactionCount.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = min ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
}
}
public static abstract class Video extends TLObject {
public long id;
public long access_hash;
public int user_id;
public int date;
public int duration;
public int size;
public PhotoSize thumb;
public int dc_id;
public int w;
public int h;
public String mime_type;
public String caption;
public byte[] key;
public byte[] iv;
public static Video TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Video result = null;
switch (constructor) {
case 0xee9f4a4d:
result = new TL_video_old3();
break;
case 0xf72887d3:
result = new TL_video_layer45();
break;
case 0x55555553:
result = new TL_videoEncrypted();
break;
case 0x5a04a49f:
result = new TL_video_old();
break;
case 0x388fa391:
result = new TL_video_old2();
break;
case 0xc10658a8:
result = new TL_videoEmpty_layer45();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Video", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_video_old3 extends TL_video_layer45 {
public static int constructor = 0xee9f4a4d;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_video_layer45 extends Video {
public static int constructor = 0xf72887d3;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_videoEncrypted extends TL_video_layer45 {
public static int constructor = 0x55555553;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
caption = stream.readString(exception);
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(caption);
stream.writeInt32(duration);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_video_old extends TL_video_layer45 {
public static int constructor = 0x5a04a49f;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
caption = stream.readString(exception);
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(caption);
stream.writeInt32(duration);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_video_old2 extends TL_video_layer45 {
public static int constructor = 0x388fa391;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
caption = stream.readString(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(caption);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(w);
stream.writeInt32(h);
}
}
public static class TL_videoEmpty_layer45 extends Video {
public static int constructor = 0xc10658a8;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static abstract class InputPaymentCredentials extends TLObject {
public int flags;
public boolean save;
public TL_dataJSON data;
public String id;
public byte[] tmp_password;
public TL_dataJSON payment_token;
public static InputPaymentCredentials TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputPaymentCredentials result = null;
switch (constructor) {
case 0x3417d728:
result = new TL_inputPaymentCredentials();
break;
case 0x8ac32801:
result = new TL_inputPaymentCredentialsGooglePay();
break;
case 0xc10eb2cf:
result = new TL_inputPaymentCredentialsSaved();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputPaymentCredentials", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPaymentCredentials extends InputPaymentCredentials {
public static int constructor = 0x3417d728;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
save = (flags & 1) != 0;
data = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = save ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
data.serializeToStream(stream);
}
}
public static class TL_inputPaymentCredentialsGooglePay extends InputPaymentCredentials {
public static int constructor = 0x8ac32801;
public void readParams(AbstractSerializedData stream, boolean exception) {
payment_token = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
payment_token.serializeToStream(stream);
}
}
public static class TL_inputPaymentCredentialsSaved extends InputPaymentCredentials {
public static int constructor = 0xc10eb2cf;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readString(exception);
tmp_password = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(id);
stream.writeByteArray(tmp_password);
}
}
public static class TL_exportedMessageLink extends TLObject {
public static int constructor = 0x5dab1af4;
public String link;
public String html;
public static TL_exportedMessageLink TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_exportedMessageLink.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_exportedMessageLink", constructor));
} else {
return null;
}
}
TL_exportedMessageLink result = new TL_exportedMessageLink();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
link = stream.readString(exception);
html = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(link);
stream.writeString(html);
}
}
public static class TL_groupCallParticipantVideo extends TLObject {
public static int constructor = 0x67753ac8;
public int flags;
public boolean paused;
public String endpoint;
public ArrayList<TL_groupCallParticipantVideoSourceGroup> source_groups = new ArrayList<>();
public int audio_source;
public static TL_groupCallParticipantVideo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_groupCallParticipantVideo.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_groupCallParticipantVideo", constructor));
} else {
return null;
}
}
TL_groupCallParticipantVideo result = new TL_groupCallParticipantVideo();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
paused = (flags & 1) != 0;
endpoint = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_groupCallParticipantVideoSourceGroup object = TL_groupCallParticipantVideoSourceGroup.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
source_groups.add(object);
}
if ((flags & 2) != 0) {
audio_source = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = paused ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(endpoint);
stream.writeInt32(0x1cb5c415);
int count = source_groups.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
source_groups.get(a).serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(audio_source);
}
}
}
public static abstract class TopPeerCategory extends TLObject {
public static TopPeerCategory TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
TopPeerCategory result = null;
switch (constructor) {
case 0x161d9628:
result = new TL_topPeerCategoryChannels();
break;
case 0x1e76a78c:
result = new TL_topPeerCategoryPhoneCalls();
break;
case 0xbd17a14a:
result = new TL_topPeerCategoryGroups();
break;
case 0x148677e2:
result = new TL_topPeerCategoryBotsInline();
break;
case 0xa8406ca9:
result = new TL_topPeerCategoryForwardUsers();
break;
case 0xfbeec0f0:
result = new TL_topPeerCategoryForwardChats();
break;
case 0xab661b5b:
result = new TL_topPeerCategoryBotsPM();
break;
case 0x637b7ed:
result = new TL_topPeerCategoryCorrespondents();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in TopPeerCategory", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_topPeerCategoryChannels extends TopPeerCategory {
public static int constructor = 0x161d9628;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryPhoneCalls extends TopPeerCategory {
public static int constructor = 0x1e76a78c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryGroups extends TopPeerCategory {
public static int constructor = 0xbd17a14a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryBotsInline extends TopPeerCategory {
public static int constructor = 0x148677e2;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryForwardUsers extends TopPeerCategory {
public static int constructor = 0xa8406ca9;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryForwardChats extends TopPeerCategory {
public static int constructor = 0xfbeec0f0;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryBotsPM extends TopPeerCategory {
public static int constructor = 0xab661b5b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_topPeerCategoryCorrespondents extends TopPeerCategory {
public static int constructor = 0x637b7ed;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messageReplyHeader extends TLObject {
public static int constructor = 0xa6d57763;
public int flags;
public int reply_to_msg_id;
public Peer reply_to_peer_id;
public int reply_to_top_id;
public long reply_to_random_id;
public static TL_messageReplyHeader TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageReplyHeader.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageReplyHeader", constructor));
} else {
return null;
}
}
TL_messageReplyHeader result = new TL_messageReplyHeader();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
reply_to_msg_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
reply_to_peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
reply_to_top_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(reply_to_msg_id);
if ((flags & 1) != 0) {
reply_to_peer_id.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(reply_to_top_id);
}
}
}
public static class TL_payments_validatedRequestedInfo extends TLObject {
public static int constructor = 0xd1451883;
public int flags;
public String id;
public ArrayList<TL_shippingOption> shipping_options = new ArrayList<>();
public static TL_payments_validatedRequestedInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_payments_validatedRequestedInfo.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_payments_validatedRequestedInfo", constructor));
} else {
return null;
}
}
TL_payments_validatedRequestedInfo result = new TL_payments_validatedRequestedInfo();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
id = stream.readString(exception);
}
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_shippingOption object = TL_shippingOption.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
shipping_options.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(id);
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = shipping_options.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
shipping_options.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_jsonObjectValue extends TLObject {
public static int constructor = 0xc0de1bd9;
public String key;
public JSONValue value;
public static TL_jsonObjectValue TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_jsonObjectValue.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_jsonObjectValue", constructor));
} else {
return null;
}
}
TL_jsonObjectValue result = new TL_jsonObjectValue();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
key = stream.readString(exception);
value = JSONValue.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(key);
value.serializeToStream(stream);
}
}
public static class TL_shippingOption extends TLObject {
public static int constructor = 0xb6213cdf;
public String id;
public String title;
public ArrayList<TL_labeledPrice> prices = new ArrayList<>();
public static TL_shippingOption TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_shippingOption.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_shippingOption", constructor));
} else {
return null;
}
}
TL_shippingOption result = new TL_shippingOption();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readString(exception);
title = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_labeledPrice object = TL_labeledPrice.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
prices.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(id);
stream.writeString(title);
stream.writeInt32(0x1cb5c415);
int count = prices.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
prices.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputDocument extends TLObject {
public long id;
public long access_hash;
public byte[] file_reference;
public static InputDocument TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputDocument result = null;
switch (constructor) {
case 0x72f0eaae:
result = new TL_inputDocumentEmpty();
break;
case 0x1abfb575:
result = new TL_inputDocument();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputDocument", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputDocumentEmpty extends InputDocument {
public static int constructor = 0x72f0eaae;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputDocument extends InputDocument {
public static int constructor = 0x1abfb575;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
}
}
public static class TL_folderPeer extends TLObject {
public static int constructor = 0xe9baa668;
public Peer peer;
public int folder_id;
public static TL_folderPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_folderPeer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_folderPeer", constructor));
} else {
return null;
}
}
TL_folderPeer result = new TL_folderPeer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
folder_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(folder_id);
}
}
public static class TL_stats_broadcastStats extends TLObject {
public static int constructor = 0xbdf78394;
public TL_statsDateRangeDays period;
public TL_statsAbsValueAndPrev followers;
public TL_statsAbsValueAndPrev views_per_post;
public TL_statsAbsValueAndPrev shares_per_post;
public TL_statsPercentValue enabled_notifications;
public StatsGraph growth_graph;
public StatsGraph followers_graph;
public StatsGraph mute_graph;
public StatsGraph top_hours_graph;
public StatsGraph interactions_graph;
public StatsGraph iv_interactions_graph;
public StatsGraph views_by_source_graph;
public StatsGraph new_followers_by_source_graph;
public StatsGraph languages_graph;
public ArrayList<TL_messageInteractionCounters> recent_message_interactions = new ArrayList<>();
public static TL_stats_broadcastStats TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_stats_broadcastStats.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_stats_broadcastStats", constructor));
} else {
return null;
}
}
TL_stats_broadcastStats result = new TL_stats_broadcastStats();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
period = TL_statsDateRangeDays.TLdeserialize(stream, stream.readInt32(exception), exception);
followers = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
views_per_post = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
shares_per_post = TL_statsAbsValueAndPrev.TLdeserialize(stream, stream.readInt32(exception), exception);
enabled_notifications = TL_statsPercentValue.TLdeserialize(stream, stream.readInt32(exception), exception);
growth_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
followers_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
mute_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
top_hours_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
interactions_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
iv_interactions_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
views_by_source_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
new_followers_by_source_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
languages_graph = StatsGraph.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_messageInteractionCounters object = TL_messageInteractionCounters.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
recent_message_interactions.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
period.serializeToStream(stream);
followers.serializeToStream(stream);
views_per_post.serializeToStream(stream);
shares_per_post.serializeToStream(stream);
enabled_notifications.serializeToStream(stream);
growth_graph.serializeToStream(stream);
followers_graph.serializeToStream(stream);
mute_graph.serializeToStream(stream);
top_hours_graph.serializeToStream(stream);
interactions_graph.serializeToStream(stream);
iv_interactions_graph.serializeToStream(stream);
views_by_source_graph.serializeToStream(stream);
new_followers_by_source_graph.serializeToStream(stream);
languages_graph.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = recent_message_interactions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
recent_message_interactions.get(a).serializeToStream(stream);
}
}
}
public static abstract class SecureValueType extends TLObject {
public static SecureValueType TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecureValueType result = null;
switch (constructor) {
case 0xcbe31e26:
result = new TL_secureValueTypeAddress();
break;
case 0x99e3806a:
result = new TL_secureValueTypePassportRegistration();
break;
case 0xa0d0744b:
result = new TL_secureValueTypeIdentityCard();
break;
case 0xfc36954e:
result = new TL_secureValueTypeUtilityBill();
break;
case 0x89137c0d:
result = new TL_secureValueTypeBankStatement();
break;
case 0x8e3ca7ee:
result = new TL_secureValueTypeEmail();
break;
case 0x9d2a81e3:
result = new TL_secureValueTypePersonalDetails();
break;
case 0xea02ec33:
result = new TL_secureValueTypeTemporaryRegistration();
break;
case 0x3dac6a00:
result = new TL_secureValueTypePassport();
break;
case 0x8b883488:
result = new TL_secureValueTypeRentalAgreement();
break;
case 0x6e425c4:
result = new TL_secureValueTypeDriverLicense();
break;
case 0xb320aadb:
result = new TL_secureValueTypePhone();
break;
case 0x99a48f23:
result = new TL_secureValueTypeInternalPassport();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecureValueType", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_secureValueTypeAddress extends SecureValueType {
public static int constructor = 0xcbe31e26;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypePassportRegistration extends SecureValueType {
public static int constructor = 0x99e3806a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeIdentityCard extends SecureValueType {
public static int constructor = 0xa0d0744b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeUtilityBill extends SecureValueType {
public static int constructor = 0xfc36954e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeBankStatement extends SecureValueType {
public static int constructor = 0x89137c0d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeEmail extends SecureValueType {
public static int constructor = 0x8e3ca7ee;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypePersonalDetails extends SecureValueType {
public static int constructor = 0x9d2a81e3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeTemporaryRegistration extends SecureValueType {
public static int constructor = 0xea02ec33;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypePassport extends SecureValueType {
public static int constructor = 0x3dac6a00;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeRentalAgreement extends SecureValueType {
public static int constructor = 0x8b883488;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeDriverLicense extends SecureValueType {
public static int constructor = 0x6e425c4;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypePhone extends SecureValueType {
public static int constructor = 0xb320aadb;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureValueTypeInternalPassport extends SecureValueType {
public static int constructor = 0x99a48f23;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_peerBlocked extends TLObject {
public static int constructor = 0xe8fd8014;
public Peer peer_id;
public int date;
public static TL_peerBlocked TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_peerBlocked.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_peerBlocked", constructor));
} else {
return null;
}
}
TL_peerBlocked result = new TL_peerBlocked();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
}
}
public static class TL_messages_affectedHistory extends TLObject {
public static int constructor = 0xb45c69d1;
public int pts;
public int pts_count;
public int offset;
public static TL_messages_affectedHistory TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_affectedHistory.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_affectedHistory", constructor));
} else {
return null;
}
}
TL_messages_affectedHistory result = new TL_messages_affectedHistory();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
offset = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
stream.writeInt32(offset);
}
}
public static abstract class Document extends TLObject {
public int flags;
public long id;
public long access_hash;
public byte[] file_reference;
public int user_id;
public int date;
public String file_name;
public String mime_type;
public int size;
public ArrayList<PhotoSize> thumbs = new ArrayList<>();
public ArrayList<VideoSize> video_thumbs = new ArrayList<>();
public int version;
public int dc_id;
public byte[] key;
public byte[] iv;
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
public static Document TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Document result = null;
switch (constructor) {
case 0x9ba29cc1:
result = new TL_document_layer113();
break;
case 0x59534e4c:
result = new TL_document_layer92();
break;
case 0x87232bc7:
result = new TL_document_layer82();
break;
case 0x55555556:
result = new TL_documentEncrypted_old();
break;
case 0x1e87342b:
result = new TL_document();
break;
case 0x9efc6326:
result = new TL_document_old();
break;
case 0x36f8c871:
result = new TL_documentEmpty();
break;
case 0x55555558:
result = new TL_documentEncrypted();
break;
case 0xf9a39f4f:
result = new TL_document_layer53();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Document", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_document_layer92 extends TL_document {
public static int constructor = 0x59534e4c;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_document_layer82 extends TL_document {
public static int constructor = 0x87232bc7;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(0);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_documentEncrypted_old extends TL_document {
public static int constructor = 0x55555556;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
file_name = stream.readString(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(file_name);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_document extends Document {
public static int constructor = 0x1e87342b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, id, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
thumbs.add(object);
}
}
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
VideoSize object = VideoSize.TLdeserialize(0, id, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
video_thumbs.add(object);
}
}
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = thumbs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
thumbs.get(a).serializeToStream(stream);
}
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = video_thumbs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
video_thumbs.get(a).serializeToStream(stream);
}
}
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_document_layer113 extends TL_document {
public static int constructor = 0x9ba29cc1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
thumbs.add(object);
}
}
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = thumbs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
thumbs.get(a).serializeToStream(stream);
}
}
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_document_old extends TL_document {
public static int constructor = 0x9efc6326;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
file_name = stream.readString(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(file_name);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
}
}
public static class TL_documentEmpty extends Document {
public static int constructor = 0x36f8c871;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_documentEncrypted extends Document {
public static int constructor = 0x55555558;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_document_layer53 extends TL_document {
public static int constructor = 0xf9a39f4f;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumbs.add(PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception));
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
thumbs.get(0).serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static abstract class PasswordKdfAlgo extends TLObject {
public static PasswordKdfAlgo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PasswordKdfAlgo result = null;
switch (constructor) {
case 0xd45ab096:
result = new TL_passwordKdfAlgoUnknown();
break;
case 0x3a912d4a:
result = new TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PasswordKdfAlgo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_passwordKdfAlgoUnknown extends PasswordKdfAlgo {
public static int constructor = 0xd45ab096;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow extends PasswordKdfAlgo {
public static int constructor = 0x3a912d4a;
public byte[] salt1;
public byte[] salt2;
public int g;
public byte[] p;
public void readParams(AbstractSerializedData stream, boolean exception) {
salt1 = stream.readByteArray(exception);
salt2 = stream.readByteArray(exception);
g = stream.readInt32(exception);
p = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(salt1);
stream.writeByteArray(salt2);
stream.writeInt32(g);
stream.writeByteArray(p);
}
}
public static abstract class PageBlock extends TLObject {
public boolean first; //custom
public boolean bottom; //custom
public int level; //custom
public int mid; //custom
public int groupId; //custom
public PhotoSize thumb; //custom
public TLObject thumbObject; //custom
public static PageBlock TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PageBlock result = null;
switch (constructor) {
case 0x9a8ae1e1:
result = new TL_pageBlockOrderedList();
break;
case 0xd9d71866:
result = new TL_pageBlockVideo_layer82();
break;
case 0xf259a80b:
result = new TL_pageBlockEmbedPost();
break;
case 0x467a0766:
result = new TL_pageBlockParagraph();
break;
case 0x1e148390:
result = new TL_pageBlockKicker();
break;
case 0x48870999:
result = new TL_pageBlockFooter();
break;
case 0xbfd064ec:
result = new TL_pageBlockHeader();
break;
case 0xc070d93e:
result = new TL_pageBlockPreformatted();
break;
case 0x16115a96:
result = new TL_pageBlockRelatedArticles();
break;
case 0xf12bb6e1:
result = new TL_pageBlockSubheader();
break;
case 0x31f9590:
result = new TL_pageBlockSlideshow();
break;
case 0xce0d37b0:
result = new TL_pageBlockAnchor();
break;
case 0xa44f3ef6:
result = new TL_pageBlockMap();
break;
case 0xdb20b188:
result = new TL_pageBlockDivider();
break;
case 0x1759c560:
result = new TL_pageBlockPhoto();
break;
case 0xe4e88011:
result = new TL_pageBlockList();
break;
case 0x13567e8a:
result = new TL_pageBlockUnsupported();
break;
case 0x65a0fa4d:
result = new TL_pageBlockCollage();
break;
case 0x3d5b64f2:
result = new TL_pageBlockAuthorDate_layer60();
break;
case 0x3a58c7f4:
result = new TL_pageBlockList_layer82();
break;
case 0xa8718dc5:
result = new TL_pageBlockEmbed();
break;
case 0x130c8963:
result = new TL_pageBlockSlideshow_layer82();
break;
case 0x8ffa9a1f:
result = new TL_pageBlockSubtitle();
break;
case 0x263d7c26:
result = new TL_pageBlockBlockquote();
break;
case 0x76768bed:
result = new TL_pageBlockDetails();
break;
case 0xef1751b5:
result = new TL_pageBlockChannel();
break;
case 0x7c8fe7b6:
result = new TL_pageBlockVideo();
break;
case 0xd935d8fb:
result = new TL_pageBlockEmbed_layer60();
break;
case 0x4f4456d3:
result = new TL_pageBlockPullquote();
break;
case 0x804361ea:
result = new TL_pageBlockAudio();
break;
case 0xbf4dea82:
result = new TL_pageBlockTable();
break;
case 0xe9c69982:
result = new TL_pageBlockPhoto_layer82();
break;
case 0x70abc3fd:
result = new TL_pageBlockTitle();
break;
case 0x292c7be9:
result = new TL_pageBlockEmbedPost_layer82();
break;
case 0x8b31c4f:
result = new TL_pageBlockCollage_layer82();
break;
case 0x31b81a7f:
result = new TL_pageBlockAudio_layer82();
break;
case 0x39f23300:
result = new TL_pageBlockCover();
break;
case 0xcde200d1:
result = new TL_pageBlockEmbed_layer82();
break;
case 0xbaafe5e0:
result = new TL_pageBlockAuthorDate();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PageBlock", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pageBlockOrderedList extends PageBlock {
public static int constructor = 0x9a8ae1e1;
public ArrayList<PageListOrderedItem> items = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageListOrderedItem object = PageListOrderedItem.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageBlockEmbedPost extends PageBlock {
public static int constructor = 0xf259a80b;
public String url;
public long webpage_id;
public long author_photo_id;
public String author;
public int date;
public ArrayList<PageBlock> blocks = new ArrayList<>();
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
webpage_id = stream.readInt64(exception);
author_photo_id = stream.readInt64(exception);
author = stream.readString(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt64(webpage_id);
stream.writeInt64(author_photo_id);
stream.writeString(author);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockParagraph extends PageBlock {
public static int constructor = 0x467a0766;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockKicker extends PageBlock {
public static int constructor = 0x1e148390;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockFooter extends PageBlock {
public static int constructor = 0x48870999;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockHeader extends PageBlock {
public static int constructor = 0xbfd064ec;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockPreformatted extends PageBlock {
public static int constructor = 0xc070d93e;
public RichText text;
public String language;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
language = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
stream.writeString(language);
}
}
public static class TL_pageBlockRelatedArticles extends PageBlock {
public static int constructor = 0x16115a96;
public RichText title;
public ArrayList<TL_pageRelatedArticle> articles = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
title = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pageRelatedArticle object = TL_pageRelatedArticle.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
articles.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
title.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = articles.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
articles.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageBlockSubheader extends PageBlock {
public static int constructor = 0xf12bb6e1;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockSlideshow extends PageBlock {
public static int constructor = 0x31f9590;
public ArrayList<PageBlock> items = new ArrayList<>();
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockAnchor extends PageBlock {
public static int constructor = 0xce0d37b0;
public String name;
public void readParams(AbstractSerializedData stream, boolean exception) {
name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(name);
}
}
public static class TL_pageBlockMap extends PageBlock {
public static int constructor = 0xa44f3ef6;
public GeoPoint geo;
public int zoom;
public int w;
public int h;
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
zoom = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo.serializeToStream(stream);
stream.writeInt32(zoom);
stream.writeInt32(w);
stream.writeInt32(h);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockDivider extends PageBlock {
public static int constructor = 0xdb20b188;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_pageBlockPhoto extends PageBlock {
public static int constructor = 0x1759c560;
public int flags;
public long photo_id;
public TL_pageCaption caption;
public String url;
public long webpage_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
photo_id = stream.readInt64(exception);
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
url = stream.readString(exception);
}
if ((flags & 1) != 0) {
webpage_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(photo_id);
caption.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeString(url);
}
if ((flags & 1) != 0) {
stream.writeInt64(webpage_id);
}
}
}
public static class TL_pageBlockList extends PageBlock {
public static int constructor = 0xe4e88011;
public boolean ordered;
public ArrayList<PageListItem> items = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageListItem object = PageListItem.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageBlockUnsupported extends PageBlock {
public static int constructor = 0x13567e8a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_pageBlockCollage extends PageBlock {
public static int constructor = 0x65a0fa4d;
public ArrayList<PageBlock> items = new ArrayList<>();
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockEmbed extends PageBlock {
public static int constructor = 0xa8718dc5;
public int flags;
public boolean full_width;
public boolean allow_scrolling;
public String url;
public String html;
public long poster_photo_id;
public int w;
public int h;
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
full_width = (flags & 1) != 0;
allow_scrolling = (flags & 8) != 0;
if ((flags & 2) != 0) {
url = stream.readString(exception);
}
if ((flags & 4) != 0) {
html = stream.readString(exception);
}
if ((flags & 16) != 0) {
poster_photo_id = stream.readInt64(exception);
}
if ((flags & 32) != 0) {
w = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
h = stream.readInt32(exception);
}
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = full_width ? (flags | 1) : (flags &~ 1);
flags = allow_scrolling ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeString(url);
}
if ((flags & 4) != 0) {
stream.writeString(html);
}
if ((flags & 16) != 0) {
stream.writeInt64(poster_photo_id);
}
if ((flags & 32) != 0) {
stream.writeInt32(w);
}
if ((flags & 32) != 0) {
stream.writeInt32(h);
}
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockSubtitle extends PageBlock {
public static int constructor = 0x8ffa9a1f;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockBlockquote extends PageBlock {
public static int constructor = 0x263d7c26;
public RichText text;
public RichText caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockDetails extends PageBlock {
public static int constructor = 0x76768bed;
public int flags;
public boolean open;
public ArrayList<PageBlock> blocks = new ArrayList<>();
public RichText title;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
open = (flags & 1) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
title = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = open ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
title.serializeToStream(stream);
}
}
public static class TL_pageBlockChannel extends PageBlock {
public static int constructor = 0xef1751b5;
public Chat channel;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_pageBlockVideo extends PageBlock {
public static int constructor = 0x7c8fe7b6;
public int flags;
public boolean autoplay;
public boolean loop;
public long video_id;
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
autoplay = (flags & 1) != 0;
loop = (flags & 2) != 0;
video_id = stream.readInt64(exception);
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = autoplay ? (flags | 1) : (flags &~ 1);
flags = loop ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(video_id);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockEmbed_layer60 extends TL_pageBlockEmbed {
public static int constructor = 0xd935d8fb;
public int flags;
public boolean full_width;
public boolean allow_scrolling;
public String url;
public String html;
public int w;
public int h;
public RichText caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
full_width = (flags & 1) != 0;
allow_scrolling = (flags & 8) != 0;
if ((flags & 2) != 0) {
url = stream.readString(exception);
}
if ((flags & 4) != 0) {
html = stream.readString(exception);
}
w = stream.readInt32(exception);
h = stream.readInt32(exception);
caption = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = full_width ? (flags | 1) : (flags &~ 1);
flags = allow_scrolling ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeString(url);
}
if ((flags & 4) != 0) {
stream.writeString(html);
}
stream.writeInt32(w);
stream.writeInt32(h);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockPullquote extends PageBlock {
public static int constructor = 0x4f4456d3;
public RichText text;
public RichText caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockAudio extends PageBlock {
public static int constructor = 0x804361ea;
public long audio_id;
public TL_pageCaption caption;
public void readParams(AbstractSerializedData stream, boolean exception) {
audio_id = stream.readInt64(exception);
caption = TL_pageCaption.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(audio_id);
caption.serializeToStream(stream);
}
}
public static class TL_pageBlockTable extends PageBlock {
public static int constructor = 0xbf4dea82;
public int flags;
public boolean bordered;
public boolean striped;
public RichText title;
public ArrayList<TL_pageTableRow> rows = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
bordered = (flags & 1) != 0;
striped = (flags & 2) != 0;
title = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pageTableRow object = TL_pageTableRow.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rows.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = bordered ? (flags | 1) : (flags &~ 1);
flags = striped ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
title.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = rows.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rows.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageBlockTitle extends PageBlock {
public static int constructor = 0x70abc3fd;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_pageBlockCover extends PageBlock {
public static int constructor = 0x39f23300;
public PageBlock cover;
public void readParams(AbstractSerializedData stream, boolean exception) {
cover = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
cover.serializeToStream(stream);
}
}
public static class TL_pageBlockAuthorDate extends PageBlock {
public static int constructor = 0xbaafe5e0;
public RichText author;
public int published_date;
public void readParams(AbstractSerializedData stream, boolean exception) {
author = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
published_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
author.serializeToStream(stream);
stream.writeInt32(published_date);
}
}
public static abstract class InputPrivacyRule extends TLObject {
public static InputPrivacyRule TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputPrivacyRule result = null;
switch (constructor) {
case 0xd66b66c9:
result = new TL_inputPrivacyValueDisallowAll();
break;
case 0x90110467:
result = new TL_inputPrivacyValueDisallowUsers();
break;
case 0xd09e07b:
result = new TL_inputPrivacyValueAllowContacts();
break;
case 0x4c81c1ba:
result = new TL_inputPrivacyValueAllowChatParticipants();
break;
case 0xba52007:
result = new TL_inputPrivacyValueDisallowContacts();
break;
case 0x184b35ce:
result = new TL_inputPrivacyValueAllowAll();
break;
case 0x131cc67f:
result = new TL_inputPrivacyValueAllowUsers();
break;
case 0xd82363af:
result = new TL_inputPrivacyValueDisallowChatParticipants();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputPrivacyRule", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPrivacyValueDisallowAll extends InputPrivacyRule {
public static int constructor = 0xd66b66c9;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyValueDisallowUsers extends InputPrivacyRule {
public static int constructor = 0x90110467;
public ArrayList<InputUser> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputUser object = InputUser.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputPrivacyValueAllowContacts extends InputPrivacyRule {
public static int constructor = 0xd09e07b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyValueAllowChatParticipants extends InputPrivacyRule {
public static int constructor = 0x4c81c1ba;
public ArrayList<Integer> chats = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
chats.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(chats.get(a));
}
}
}
public static class TL_inputPrivacyValueDisallowContacts extends InputPrivacyRule {
public static int constructor = 0xba52007;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyValueAllowAll extends InputPrivacyRule {
public static int constructor = 0x184b35ce;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPrivacyValueAllowUsers extends InputPrivacyRule {
public static int constructor = 0x131cc67f;
public ArrayList<InputUser> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputUser object = InputUser.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputPrivacyValueDisallowChatParticipants extends InputPrivacyRule {
public static int constructor = 0xd82363af;
public ArrayList<Integer> chats = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
chats.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(chats.get(a));
}
}
}
public static class TL_maskCoords extends TLObject {
public static int constructor = 0xaed6dbb2;
public int n;
public double x;
public double y;
public double zoom;
public static TL_maskCoords TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_maskCoords.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_maskCoords", constructor));
} else {
return null;
}
}
TL_maskCoords result = new TL_maskCoords();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
n = stream.readInt32(exception);
x = stream.readDouble(exception);
y = stream.readDouble(exception);
zoom = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(n);
stream.writeDouble(x);
stream.writeDouble(y);
stream.writeDouble(zoom);
}
}
public static class TL_messages_votesList extends TLObject {
public static int constructor = 0x823f649;
public int flags;
public int count;
public ArrayList<MessageUserVote> votes = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public String next_offset;
public static TL_messages_votesList TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_votesList.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_votesList", constructor));
} else {
return null;
}
}
TL_messages_votesList result = new TL_messages_votesList();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageUserVote object = MessageUserVote.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
votes.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
if ((flags & 1) != 0) {
next_offset = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = votes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
votes.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeString(next_offset);
}
}
}
public static class TL_highScore extends TLObject {
public static int constructor = 0x58fffcd0;
public int pos;
public int user_id;
public int score;
public static TL_highScore TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_highScore.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_highScore", constructor));
} else {
return null;
}
}
TL_highScore result = new TL_highScore();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
pos = stream.readInt32(exception);
user_id = stream.readInt32(exception);
score = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pos);
stream.writeInt32(user_id);
stream.writeInt32(score);
}
}
public static abstract class InputMedia extends TLObject {
public String phone_number;
public String first_name;
public String last_name;
public String vcard;
public int flags;
public int ttl_seconds;
public InputGeoPoint geo_point;
public InputFile file;
public ArrayList<InputDocument> stickers = new ArrayList<>();
public String title;
public String address;
public String provider;
public String venue_id;
public String venue_type;
public int heading;
public int period;
public boolean nosound_video;
public boolean force_file;
public boolean stopped;
public InputFile thumb;
public String mime_type;
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
public int proximity_notification_radius;
public static InputMedia TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputMedia result = null;
switch (constructor) {
case 0xf8ab7dfb:
result = new TL_inputMediaContact();
break;
case 0x33473058:
result = new TL_inputMediaDocument();
break;
case 0xd33f43f3:
result = new TL_inputMediaGame();
break;
case 0xe66fbf7b:
result = new TL_inputMediaDice();
break;
case 0xf9c44144:
result = new TL_inputMediaGeoPoint();
break;
case 0xfb52dc99:
result = new TL_inputMediaDocumentExternal();
break;
case 0x9664f57f:
result = new TL_inputMediaEmpty();
break;
case 0xf94e5f1:
result = new TL_inputMediaPoll();
break;
case 0x1e287d04:
result = new TL_inputMediaUploadedPhoto();
break;
case 0xc13d1c11:
result = new TL_inputMediaVenue();
break;
case 0x971fa843:
result = new TL_inputMediaGeoLive();
break;
case 0x5b38c6c1:
result = new TL_inputMediaUploadedDocument();
break;
case 0xe5bbfe1a:
result = new TL_inputMediaPhotoExternal();
break;
case 0xb3ba0635:
result = new TL_inputMediaPhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputMedia", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputMediaContact extends InputMedia {
public static int constructor = 0xf8ab7dfb;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
vcard = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(vcard);
}
}
public static class TL_inputMediaDocument extends InputMedia {
public static int constructor = 0x33473058;
public InputDocument id;
public String query;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = InputDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
ttl_seconds = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
query = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
id.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(ttl_seconds);
}
if ((flags & 2) != 0) {
stream.writeString(query);
}
}
}
public static class TL_inputMediaGame extends InputMedia {
public static int constructor = 0xd33f43f3;
public InputGame id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = InputGame.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_inputMediaDice extends InputMedia {
public static int constructor = 0xe66fbf7b;
public String emoticon;
public void readParams(AbstractSerializedData stream, boolean exception) {
emoticon = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
}
}
public static class TL_inputMediaGeoPoint extends InputMedia {
public static int constructor = 0xf9c44144;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo_point = InputGeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo_point.serializeToStream(stream);
}
}
public static class TL_inputMediaDocumentExternal extends InputMedia {
public static int constructor = 0xfb52dc99;
public String url;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
url = stream.readString(exception);
if ((flags & 1) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(url);
if ((flags & 1) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_inputMediaEmpty extends InputMedia {
public static int constructor = 0x9664f57f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMediaPoll extends InputMedia {
public static int constructor = 0xf94e5f1;
public Poll poll;
public ArrayList<byte[]> correct_answers = new ArrayList<>();
public String solution;
public ArrayList<MessageEntity> solution_entities = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
poll = Poll.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
correct_answers.add(stream.readByteArray(exception));
}
}
if ((flags & 2) != 0) {
solution = stream.readString(exception);
}
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
solution_entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
poll.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = correct_answers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeByteArray(correct_answers.get(a));
}
}
if ((flags & 2) != 0) {
stream.writeString(solution);
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = solution_entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
solution_entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_inputMediaUploadedPhoto extends InputMedia {
public static int constructor = 0x1e287d04;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
file = InputFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputDocument object = InputDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
stickers.add(object);
}
}
if ((flags & 2) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
file.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
}
if ((flags & 2) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_inputMediaVenue extends InputMedia {
public static int constructor = 0xc13d1c11;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo_point = InputGeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
venue_type = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo_point.serializeToStream(stream);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
stream.writeString(venue_type);
}
}
public static class TL_inputMediaGeoLive extends InputMedia {
public static int constructor = 0x971fa843;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
stopped = (flags & 1) != 0;
geo_point = InputGeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
heading = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
period = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
proximity_notification_radius = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = stopped ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
geo_point.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(heading);
}
if ((flags & 2) != 0) {
stream.writeInt32(period);
}
if ((flags & 8) != 0) {
stream.writeInt32(proximity_notification_radius);
}
}
}
public static class TL_inputMediaUploadedDocument extends InputMedia {
public static int constructor = 0x5b38c6c1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
nosound_video = (flags & 8) != 0;
force_file = (flags & 16) != 0;
file = InputFile.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
thumb = InputFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
mime_type = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
if ((flags & 1) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
InputDocument object = InputDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
stickers.add(object);
}
}
if ((flags & 2) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = nosound_video ? (flags | 8) : (flags &~ 8);
flags = force_file ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
file.serializeToStream(stream);
if ((flags & 4) != 0) {
thumb.serializeToStream(stream);
}
stream.writeString(mime_type);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
}
if ((flags & 2) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_inputMediaPhotoExternal extends InputMedia {
public static int constructor = 0xe5bbfe1a;
public String url;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
url = stream.readString(exception);
if ((flags & 1) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(url);
if ((flags & 1) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static class TL_inputMediaPhoto extends InputMedia {
public static int constructor = 0xb3ba0635;
public InputPhoto id;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = InputPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
ttl_seconds = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
id.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(ttl_seconds);
}
}
}
public static abstract class StickerSetCovered extends TLObject {
public StickerSet set;
public ArrayList<Document> covers = new ArrayList<>();
public Document cover;
public static StickerSetCovered TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
StickerSetCovered result = null;
switch (constructor) {
case 0x3407e51b:
result = new TL_stickerSetMultiCovered();
break;
case 0x6410a5d2:
result = new TL_stickerSetCovered();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in StickerSetCovered", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_stickerSetMultiCovered extends StickerSetCovered {
public static int constructor = 0x3407e51b;
public void readParams(AbstractSerializedData stream, boolean exception) {
set = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
covers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
set.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = covers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
covers.get(a).serializeToStream(stream);
}
}
}
public static class TL_stickerSetCovered extends StickerSetCovered {
public static int constructor = 0x6410a5d2;
public void readParams(AbstractSerializedData stream, boolean exception) {
set = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
cover = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
set.serializeToStream(stream);
cover.serializeToStream(stream);
}
}
public static abstract class EncryptedMessage extends TLObject {
public long random_id;
public int chat_id;
public int date;
public byte[] bytes;
public EncryptedFile file;
public static EncryptedMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
EncryptedMessage result = null;
switch (constructor) {
case 0x23734b06:
result = new TL_encryptedMessageService();
break;
case 0xed18c118:
result = new TL_encryptedMessage();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in EncryptedMessage", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_encryptedMessageService extends EncryptedMessage {
public static int constructor = 0x23734b06;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
chat_id = stream.readInt32(exception);
date = stream.readInt32(exception);
bytes = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
stream.writeInt32(chat_id);
stream.writeInt32(date);
stream.writeByteArray(bytes);
}
}
public static class TL_encryptedMessage extends EncryptedMessage {
public static int constructor = 0xed18c118;
public void readParams(AbstractSerializedData stream, boolean exception) {
random_id = stream.readInt64(exception);
chat_id = stream.readInt32(exception);
date = stream.readInt32(exception);
bytes = stream.readByteArray(exception);
file = EncryptedFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(random_id);
stream.writeInt32(chat_id);
stream.writeInt32(date);
stream.writeByteArray(bytes);
file.serializeToStream(stream);
}
}
public static abstract class InputStickerSet extends TLObject {
public long id;
public long access_hash;
public String short_name;
public static InputStickerSet TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputStickerSet result = null;
switch (constructor) {
case 0xffb62b95:
result = new TL_inputStickerSetEmpty();
break;
case 0x9de7a269:
result = new TL_inputStickerSetID();
break;
case 0x861cc8a0:
result = new TL_inputStickerSetShortName();
break;
case 0x28703c8:
result = new TL_inputStickerSetAnimatedEmoji();
break;
case 0xe67f520e:
result = new TL_inputStickerSetDice();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputStickerSet", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputStickerSetDice extends InputStickerSet {
public static int constructor = 0xe67f520e;
public String emoticon;
public void readParams(AbstractSerializedData stream, boolean exception) {
emoticon = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
}
}
public static class TL_inputStickerSetEmpty extends InputStickerSet {
public static int constructor = 0xffb62b95;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputStickerSetID extends InputStickerSet {
public static int constructor = 0x9de7a269;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputStickerSetShortName extends InputStickerSet {
public static int constructor = 0x861cc8a0;
public void readParams(AbstractSerializedData stream, boolean exception) {
short_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(short_name);
}
}
public static class TL_inputStickerSetAnimatedEmoji extends InputStickerSet {
public static int constructor = 0x28703c8;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelAdminLogEventsFilter extends TLObject {
public static int constructor = 0xea107ae4;
public int flags;
public boolean join;
public boolean leave;
public boolean invite;
public boolean ban;
public boolean unban;
public boolean kick;
public boolean unkick;
public boolean promote;
public boolean demote;
public boolean info;
public boolean settings;
public boolean pinned;
public boolean edit;
public boolean delete;
public boolean group_call;
public boolean invites;
public static TL_channelAdminLogEventsFilter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channelAdminLogEventsFilter.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channelAdminLogEventsFilter", constructor));
} else {
return null;
}
}
TL_channelAdminLogEventsFilter result = new TL_channelAdminLogEventsFilter();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
join = (flags & 1) != 0;
leave = (flags & 2) != 0;
invite = (flags & 4) != 0;
ban = (flags & 8) != 0;
unban = (flags & 16) != 0;
kick = (flags & 32) != 0;
unkick = (flags & 64) != 0;
promote = (flags & 128) != 0;
demote = (flags & 256) != 0;
info = (flags & 512) != 0;
settings = (flags & 1024) != 0;
pinned = (flags & 2048) != 0;
edit = (flags & 4096) != 0;
delete = (flags & 8192) != 0;
group_call = (flags & 16384) != 0;
invites = (flags & 32768) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = join ? (flags | 1) : (flags &~ 1);
flags = leave ? (flags | 2) : (flags &~ 2);
flags = invite ? (flags | 4) : (flags &~ 4);
flags = ban ? (flags | 8) : (flags &~ 8);
flags = unban ? (flags | 16) : (flags &~ 16);
flags = kick ? (flags | 32) : (flags &~ 32);
flags = unkick ? (flags | 64) : (flags &~ 64);
flags = promote ? (flags | 128) : (flags &~ 128);
flags = demote ? (flags | 256) : (flags &~ 256);
flags = info ? (flags | 512) : (flags &~ 512);
flags = settings ? (flags | 1024) : (flags &~ 1024);
flags = pinned ? (flags | 2048) : (flags &~ 2048);
flags = edit ? (flags | 4096) : (flags &~ 4096);
flags = delete ? (flags | 8192) : (flags &~ 8192);
flags = group_call ? (flags | 16384) : (flags &~ 16384);
flags = invites ? (flags | 32768) : (flags &~ 32768);
stream.writeInt32(flags);
}
}
public static abstract class UserStatus extends TLObject {
public int expires;
public static UserStatus TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
UserStatus result = null;
switch (constructor) {
case 0x8c703f:
result = new TL_userStatusOffline();
break;
case 0x7bf09fc:
result = new TL_userStatusLastWeek();
break;
case 0x9d05049:
result = new TL_userStatusEmpty();
break;
case 0x77ebc742:
result = new TL_userStatusLastMonth();
break;
case 0xedb93949:
result = new TL_userStatusOnline();
break;
case 0xe26f42f1:
result = new TL_userStatusRecently();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in UserStatus", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_userStatusOffline extends UserStatus {
public static int constructor = 0x8c703f;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
}
}
public static class TL_userStatusLastWeek extends UserStatus {
public static int constructor = 0x7bf09fc;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_userStatusEmpty extends UserStatus {
public static int constructor = 0x9d05049;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_userStatusLastMonth extends UserStatus {
public static int constructor = 0x77ebc742;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_userStatusOnline extends UserStatus {
public static int constructor = 0xedb93949;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
}
}
public static class TL_userStatusRecently extends UserStatus {
public static int constructor = 0xe26f42f1;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_checkedHistoryImportPeer extends TLObject {
public static int constructor = 0xa24de717;
public String confirm_text;
public static TL_messages_checkedHistoryImportPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_checkedHistoryImportPeer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_checkedHistoryImportPeer", constructor));
} else {
return null;
}
}
TL_messages_checkedHistoryImportPeer result = new TL_messages_checkedHistoryImportPeer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
confirm_text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(confirm_text);
}
}
public static class TL_messages_messageEditData extends TLObject {
public static int constructor = 0x26b5dde6;
public int flags;
public boolean caption;
public static TL_messages_messageEditData TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_messageEditData.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_messageEditData", constructor));
} else {
return null;
}
}
TL_messages_messageEditData result = new TL_messages_messageEditData();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
caption = (flags & 1) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = caption ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
}
}
public static abstract class MessageUserVote extends TLObject {
public int user_id;
public int date;
public static MessageUserVote TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessageUserVote result = null;
switch (constructor) {
case 0xa28e5559:
result = new TL_messageUserVote();
break;
case 0x36377430:
result = new TL_messageUserVoteInputOption();
break;
case 0xe8fe0de:
result = new TL_messageUserVoteMultiple();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessageUserVote", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messageUserVote extends MessageUserVote {
public static int constructor = 0xa28e5559;
public byte[] option;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
option = stream.readByteArray(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeByteArray(option);
stream.writeInt32(date);
}
}
public static class TL_messageUserVoteInputOption extends MessageUserVote {
public static int constructor = 0x36377430;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(date);
}
}
public static class TL_messageUserVoteMultiple extends MessageUserVote {
public static int constructor = 0xe8fe0de;
public ArrayList<byte[]> options = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
options.add(stream.readByteArray(exception));
}
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(0x1cb5c415);
int count = options.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeByteArray(options.get(a));
}
stream.writeInt32(date);
}
}
public static class TL_contacts_importedContacts extends TLObject {
public static int constructor = 0x77d01c3b;
public ArrayList<TL_importedContact> imported = new ArrayList<>();
public ArrayList<TL_popularContact> popular_invites = new ArrayList<>();
public ArrayList<Long> retry_contacts = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_contacts_importedContacts TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contacts_importedContacts.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contacts_importedContacts", constructor));
} else {
return null;
}
}
TL_contacts_importedContacts result = new TL_contacts_importedContacts();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_importedContact object = TL_importedContact.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
imported.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_popularContact object = TL_popularContact.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
popular_invites.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
retry_contacts.add(stream.readInt64(exception));
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = imported.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
imported.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = popular_invites.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
popular_invites.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = retry_contacts.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(retry_contacts.get(a));
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_dialogFilterSuggested extends TLObject {
public static int constructor = 0x77744d4a;
public TL_dialogFilter filter;
public String description;
public static TL_dialogFilterSuggested TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_dialogFilterSuggested.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_dialogFilterSuggested", constructor));
} else {
return null;
}
}
TL_dialogFilterSuggested result = new TL_dialogFilterSuggested();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
filter = TL_dialogFilter.TLdeserialize(stream, stream.readInt32(exception), exception);
description = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
filter.serializeToStream(stream);
stream.writeString(description);
}
}
public static class TL_inlineBotSwitchPM extends TLObject {
public static int constructor = 0x3c20629f;
public String text;
public String start_param;
public static TL_inlineBotSwitchPM TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inlineBotSwitchPM.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inlineBotSwitchPM", constructor));
} else {
return null;
}
}
TL_inlineBotSwitchPM result = new TL_inlineBotSwitchPM();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
text = stream.readString(exception);
start_param = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(text);
stream.writeString(start_param);
}
}
public static abstract class Update extends TLObject {
public static Update TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Update result = null;
switch (constructor) {
case 0xaca1657b:
result = new TL_updateMessagePoll();
break;
case 0xbb9bb9a5:
result = new TL_updatePeerHistoryTTL();
break;
case 0x1330a196:
result = new TL_updateChat();
break;
case 0xa20db0e5:
result = new TL_updateDeleteMessages();
break;
case 0x8588878b:
result = new TL_updatePinnedChannelMessages();
break;
case 0xf2ebdb4e:
result = new TL_updateGroupCallParticipants();
break;
case 0x571d2742:
result = new TL_updateReadFeaturedStickers();
break;
case 0x1710f156:
result = new TL_updateEncryptedChatTyping();
break;
case 0x62ba04d9:
result = new TL_updateNewChannelMessage();
break;
case 0x2f2f21bf:
result = new TL_updateReadHistoryOutbox();
break;
case 0x6e6fe51c:
result = new TL_updateDialogPinned();
break;
case 0x6a7e7366:
result = new TL_updatePeerSettings();
break;
case 0x12b9417b:
result = new TL_updateUserPhone();
break;
case 0x4e90bfd6:
result = new TL_updateMessageID();
break;
case 0x25d6c9c7:
result = new TL_updateReadChannelOutbox();
break;
case 0x43ae3dec:
result = new TL_updateStickerSets();
break;
case 0x19360dc0:
result = new TL_updateFolderPeers();
break;
case 0x1f2b0afd:
result = new TL_updateNewMessage();
break;
case 0x39a51dfb:
result = new TL_updateNewScheduledMessage();
break;
case 0x12bcbd9a:
result = new TL_updateNewEncryptedMessage();
break;
case 0x1bfbd823:
result = new TL_updateUserStatus();
break;
case 0x98a12b4b:
result = new TL_updateChannelMessageViews();
break;
case 0xb783982:
result = new TL_updateGroupCallConnection();
break;
case 0xcf7e0873:
result = new TL_updateBotCommands();
break;
case 0x871fb939:
result = new TL_updateGeoLiveViewed();
break;
case 0xbec268ef:
result = new TL_updateNotifySettings();
break;
case 0x65d2b464:
result = new TL_updateChannelParticipant();
break;
case 0x6e5f8c22:
result = new TL_updateChatParticipantDelete();
break;
case 0xe40370a3:
result = new TL_updateEditMessage();
break;
case 0x7f891213:
result = new TL_updateWebPage();
break;
case 0xe511996d:
result = new TL_updateFavedStickers();
break;
case 0xb4afcfb0:
result = new TL_updatePeerLocated();
break;
case 0xea4b0e5c:
result = new TL_updateChatParticipantAdd();
break;
case 0x86cadb6c:
result = new TL_updateChatUserTyping();
break;
case 0x564fe691:
result = new TL_updateLoginToken();
break;
case 0xb4a2e88d:
result = new TL_updateEncryption();
break;
case 0xa45eb99b:
result = new TL_updateGroupCall();
break;
case 0xeb0467fb:
result = new TL_updateChannelTooLong();
break;
case 0x5c486927:
result = new TL_updateUserTyping();
break;
case 0xebe46819:
result = new TL_updateServiceNotification();
break;
case 0x56022f4d:
result = new TL_updateLangPack();
break;
case 0xb6901959:
result = new TL_updateChatParticipantAdmin();
break;
case 0x89893b45:
result = new TL_updateChannelReadMessagesContents();
break;
case 0xee3b272a:
result = new TL_updatePrivacy();
break;
case 0xa229dd06:
result = new TL_updateConfig();
break;
case 0xee2bb969:
result = new TL_updateDraftMessage();
break;
case 0xa7332b73:
result = new TL_updateUserName();
break;
case 0x70db6837:
result = new TL_updateChannelAvailableMessages();
break;
case 0xe16459c3:
result = new TL_updateDialogUnreadMark();
break;
case 0xab0f6b1e:
result = new TL_updatePhoneCall();
break;
case 0x154798c3:
result = new TL_updateMessageReactions();
break;
case 0x26ffde7d:
result = new TL_updateDialogFilter();
break;
case 0x1cc7de54:
result = new TL_updateReadChannelDiscussionInbox();
break;
case 0x4638a26c:
result = new TL_updateReadChannelDiscussionOutbox();
break;
case 0x6b171718:
result = new TL_updateChannelUserTyping();
break;
case 0x2661bf09:
result = new TL_updatePhoneCallSignalingData();
break;
case 0xfa0f3ca2:
result = new TL_updatePinnedDialogs();
break;
case 0x9a422c20:
result = new TL_updateRecentStickers();
break;
case 0x9c974fdf:
result = new TL_updateReadHistoryInbox();
break;
case 0xa5d72105:
result = new TL_updateDialogFilterOrder();
break;
case 0x9375341e:
result = new TL_updateSavedGifs();
break;
case 0x7084a7be:
result = new TL_updateContactsReset();
break;
case 0xb6d45656:
result = new TL_updateChannel();
break;
case 0x40771900:
result = new TL_updateChannelWebPage();
break;
case 0x90866cee:
result = new TL_updateDeleteScheduledMessages();
break;
case 0x6e8a84df:
result = new TL_updateChannelMessageForwards();
break;
case 0xc37521c9:
result = new TL_updateDeleteChannelMessages();
break;
case 0x95313b0c:
result = new TL_updateUserPhoto();
break;
case 0x3504914f:
result = new TL_updateDialogFilters();
break;
case 0x246a4b22:
result = new TL_updatePeerBlocked();
break;
case 0xed85eab5:
result = new TL_updatePinnedMessages();
break;
case 0x8e5e9873:
result = new TL_updateDcOptions();
break;
case 0x1b3f4df7:
result = new TL_updateEditChannelMessage();
break;
case 0x688a30aa:
result = new TL_updateNewStickerSet();
break;
case 0x46560264:
result = new TL_updateLangPackTooLong();
break;
case 0x8216fba3:
result = new TL_updateTheme();
break;
case 0x38fe25b7:
result = new TL_updateEncryptedMessagesRead();
break;
case 0xbb2d201:
result = new TL_updateStickerSetsOrder();
break;
case 0x330b5424:
result = new TL_updateReadChannelInbox();
break;
case 0x68c13933:
result = new TL_updateReadMessagesContents();
break;
case 0x7761198:
result = new TL_updateChatParticipants();
break;
case 0x54c01850:
result = new TL_updateChatDefaultBannedRights();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Update", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_updateDeleteMessages extends Update {
public static int constructor = 0xa20db0e5;
public ArrayList<Integer> messages = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updatePinnedChannelMessages extends Update {
public static int constructor = 0x8588878b;
public int flags;
public boolean pinned;
public int channel_id;
public ArrayList<Integer> messages = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pinned = (flags & 1) != 0;
channel_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(channel_id);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateGroupCallParticipants extends Update {
public static int constructor = 0xf2ebdb4e;
public TL_inputGroupCall call;
public ArrayList<TL_groupCallParticipant> participants = new ArrayList<>();
public int version;
public void readParams(AbstractSerializedData stream, boolean exception) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_groupCallParticipant object = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeInt32(version);
}
}
public static class TL_updateReadFeaturedStickers extends Update {
public static int constructor = 0x571d2742;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateEncryptedChatTyping extends Update {
public static int constructor = 0x1710f156;
public int chat_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_updateNewChannelMessage extends Update {
public static int constructor = 0x62ba04d9;
public Message message;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateReadHistoryOutbox extends Update {
public static int constructor = 0x2f2f21bf;
public Peer peer;
public int max_id;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
max_id = stream.readInt32(exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(max_id);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateDialogPinned extends Update {
public static int constructor = 0x6e6fe51c;
public int flags;
public boolean pinned;
public int folder_id;
public DialogPeer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pinned = (flags & 1) != 0;
if ((flags & 2) != 0) {
folder_id = stream.readInt32(exception);
}
peer = DialogPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(folder_id);
}
peer.serializeToStream(stream);
}
}
public static class TL_updatePeerSettings extends Update {
public static int constructor = 0x6a7e7366;
public Peer peer;
public TL_peerSettings settings;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
settings = TL_peerSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
settings.serializeToStream(stream);
}
}
public static class TL_updateUserPhone extends Update {
public static int constructor = 0x12b9417b;
public int user_id;
public String phone;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
phone = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeString(phone);
}
}
public static class TL_updateMessageID extends Update {
public static int constructor = 0x4e90bfd6;
public int id;
public long random_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
random_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(random_id);
}
}
public static class TL_updateReadChannelOutbox extends Update {
public static int constructor = 0x25d6c9c7;
public int channel_id;
public int max_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
max_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(max_id);
}
}
public static class TL_updateStickerSets extends Update {
public static int constructor = 0x43ae3dec;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateFolderPeers extends Update {
public static int constructor = 0x19360dc0;
public ArrayList<TL_folderPeer> folder_peers = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_folderPeer object = TL_folderPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
folder_peers.add(object);
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = folder_peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
folder_peers.get(a).serializeToStream(stream);
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateNewMessage extends Update {
public static int constructor = 0x1f2b0afd;
public Message message;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateNewScheduledMessage extends Update {
public static int constructor = 0x39a51dfb;
public Message message;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
}
}
public static class TL_updateNewEncryptedMessage extends Update {
public static int constructor = 0x12bcbd9a;
public EncryptedMessage message;
public int qts;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = EncryptedMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
qts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
stream.writeInt32(qts);
}
}
public static class TL_updateUserStatus extends Update {
public static int constructor = 0x1bfbd823;
public int user_id;
public UserStatus status;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
status = UserStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
status.serializeToStream(stream);
}
}
public static class TL_updateChannelMessageViews extends Update {
public static int constructor = 0x98a12b4b;
public int channel_id;
public int id;
public int views;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
id = stream.readInt32(exception);
views = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(id);
stream.writeInt32(views);
}
}
public static class TL_updateGroupCallConnection extends Update {
public static int constructor = 0xb783982;
public int flags;
public boolean presentation;
public TL_dataJSON params;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
presentation = (flags & 1) != 0;
params = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = presentation ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
params.serializeToStream(stream);
}
}
public static class TL_updateBotCommands extends Update {
public static int constructor = 0xcf7e0873;
public Peer peer;
public int bot_id;
public ArrayList<TL_botCommand> commands = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
bot_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_botCommand object = TL_botCommand.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
commands.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(bot_id);
stream.writeInt32(0x1cb5c415);
int count = commands.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
commands.get(a).serializeToStream(stream);
}
}
}
public static class TL_updateGeoLiveViewed extends Update {
public static int constructor = 0x871fb939;
public Peer peer;
public int msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
}
}
public static class TL_updateNotifySettings extends Update {
public static int constructor = 0xbec268ef;
public NotifyPeer peer;
public PeerNotifySettings notify_settings;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = NotifyPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
notify_settings.serializeToStream(stream);
}
}
public static class TL_updateChannelParticipant extends Update {
public static int constructor = 0x65d2b464;
public int flags;
public int channel_id;
public int date;
public int user_id;
public ChannelParticipant prev_participant;
public ChannelParticipant new_participant;
public int qts;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
date = stream.readInt32(exception);
user_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
prev_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
new_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
qts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(channel_id);
stream.writeInt32(date);
stream.writeInt32(user_id);
if ((flags & 1) != 0) {
prev_participant.serializeToStream(stream);
}
if ((flags & 2) != 0) {
new_participant.serializeToStream(stream);
}
stream.writeInt32(qts);
}
}
public static class TL_updateChatParticipantDelete extends Update {
public static int constructor = 0x6e5f8c22;
public int chat_id;
public int user_id;
public int version;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(user_id);
stream.writeInt32(version);
}
}
public static class TL_updateEditMessage extends Update {
public static int constructor = 0xe40370a3;
public Message message;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateWebPage extends Update {
public static int constructor = 0x7f891213;
public WebPage webpage;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
webpage = WebPage.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
webpage.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateFavedStickers extends Update {
public static int constructor = 0xe511996d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updatePeerLocated extends Update {
public static int constructor = 0xb4afcfb0;
public ArrayList<PeerLocated> peers = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PeerLocated object = PeerLocated.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
peers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
peers.get(a).serializeToStream(stream);
}
}
}
public static class TL_updateChatParticipantAdd extends Update {
public static int constructor = 0xea4b0e5c;
public int chat_id;
public int user_id;
public int inviter_id;
public int date;
public int version;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
stream.writeInt32(version);
}
}
public static class TL_updateMessagePoll extends Update {
public static int constructor = 0xaca1657b;
public int flags;
public long poll_id;
public Poll poll;
public PollResults results;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
poll_id = stream.readInt64(exception);
if ((flags & 1) != 0) {
poll = Poll.TLdeserialize(stream, stream.readInt32(exception), exception);
}
results = PollResults.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(poll_id);
if ((flags & 1) != 0) {
poll.serializeToStream(stream);
}
results.serializeToStream(stream);
}
}
public static class TL_updatePeerHistoryTTL extends Update {
public static int constructor = 0xbb9bb9a5;
public int flags;
public Peer peer;
public int ttl_period;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
ttl_period = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(ttl_period);
}
}
}
public static class TL_updateChat extends Update {
public static int constructor = 0x1330a196;
public int chat_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_updateChatUserTyping extends Update {
public static int constructor = 0x86cadb6c;
public int chat_id;
public Peer from_id;
public SendMessageAction action;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
action = SendMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
from_id.serializeToStream(stream);
action.serializeToStream(stream);
}
}
public static class TL_updateLoginToken extends Update {
public static int constructor = 0x564fe691;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateEncryption extends Update {
public static int constructor = 0xb4a2e88d;
public EncryptedChat chat;
public int date;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat = EncryptedChat.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
chat.serializeToStream(stream);
stream.writeInt32(date);
}
}
public static class TL_updateGroupCall extends Update {
public static int constructor = 0xa45eb99b;
public int chat_id;
public GroupCall call;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
call = GroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
call.serializeToStream(stream);
}
}
public static class TL_updateChannelTooLong extends Update {
public static int constructor = 0xeb0467fb;
public int flags;
public int channel_id;
public int pts;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
pts = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(channel_id);
if ((flags & 1) != 0) {
stream.writeInt32(pts);
}
}
}
public static class TL_updateUserTyping extends Update {
public static int constructor = 0x5c486927;
public int user_id;
public SendMessageAction action;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
action = SendMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
action.serializeToStream(stream);
}
}
public static class TL_updateServiceNotification extends Update {
public static int constructor = 0xebe46819;
public int flags;
public boolean popup;
public int inbox_date;
public String type;
public String message;
public MessageMedia media;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
popup = (flags & 1) != 0;
if ((flags & 2) != 0) {
inbox_date = stream.readInt32(exception);
}
type = stream.readString(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = popup ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(inbox_date);
}
stream.writeString(type);
stream.writeString(message);
media.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
public static class TL_updateLangPack extends Update {
public static int constructor = 0x56022f4d;
public TL_langPackDifference difference;
public void readParams(AbstractSerializedData stream, boolean exception) {
difference = TL_langPackDifference.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
difference.serializeToStream(stream);
}
}
public static class TL_updateChatParticipantAdmin extends Update {
public static int constructor = 0xb6901959;
public int chat_id;
public int user_id;
public boolean is_admin;
public int version;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
is_admin = stream.readBool(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(user_id);
stream.writeBool(is_admin);
stream.writeInt32(version);
}
}
public static class TL_updateChannelReadMessagesContents extends Update {
public static int constructor = 0x89893b45;
public int channel_id;
public ArrayList<Integer> messages = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
}
}
public static class TL_updatePrivacy extends Update {
public static int constructor = 0xee3b272a;
public PrivacyKey key;
public ArrayList<PrivacyRule> rules = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
key = PrivacyKey.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PrivacyRule object = PrivacyRule.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
rules.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
key.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = rules.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rules.get(a).serializeToStream(stream);
}
}
}
public static class TL_updateConfig extends Update {
public static int constructor = 0xa229dd06;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateDraftMessage extends Update {
public static int constructor = 0xee2bb969;
public Peer peer;
public DraftMessage draft;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
draft = DraftMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
draft.serializeToStream(stream);
}
}
public static class TL_updateUserName extends Update {
public static int constructor = 0xa7332b73;
public int user_id;
public String first_name;
public String last_name;
public String username;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
username = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(username);
}
}
public static class TL_updateChannelAvailableMessages extends Update {
public static int constructor = 0x70db6837;
public int channel_id;
public int available_min_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
available_min_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(available_min_id);
}
}
public static class TL_updateDialogUnreadMark extends Update {
public static int constructor = 0xe16459c3;
public int flags;
public boolean unread;
public DialogPeer peer;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
peer = DialogPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
}
}
public static class TL_updatePhoneCall extends Update {
public static int constructor = 0xab0f6b1e;
public PhoneCall phone_call;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_call = PhoneCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
phone_call.serializeToStream(stream);
}
}
public static class TL_updateMessageReactions extends Update {
public static int constructor = 0x154798c3;
public Peer peer;
public int msg_id;
public TL_messageReactions reactions;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
reactions = TL_messageReactions.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
reactions.serializeToStream(stream);
}
}
public static class TL_updateDialogFilter extends Update {
public static int constructor = 0x26ffde7d;
public int flags;
public int id;
public TL_dialogFilter filter;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
filter = TL_dialogFilter.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
filter.serializeToStream(stream);
}
}
}
public static class TL_updatePhoneCallSignalingData extends Update {
public static int constructor = 0x2661bf09;
public long phone_call_id;
public byte[] data;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_call_id = stream.readInt64(exception);
data = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(phone_call_id);
stream.writeByteArray(data);
}
}
public static class TL_updatePinnedDialogs extends Update {
public static int constructor = 0xfa0f3ca2;
public int flags;
public int folder_id;
public ArrayList<DialogPeer> order = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 2) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DialogPeer object = DialogPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
order.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
order.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_updateReadChannelDiscussionInbox extends Update {
public static int constructor = 0x1cc7de54;
public int flags;
public int channel_id;
public int top_msg_id;
public int read_max_id;
public int broadcast_id;
public int broadcast_post;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
top_msg_id = stream.readInt32(exception);
read_max_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
broadcast_id = stream.readInt32(exception);
}
if ((flags & 1) != 0) {
broadcast_post = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(channel_id);
stream.writeInt32(top_msg_id);
stream.writeInt32(read_max_id);
if ((flags & 1) != 0) {
stream.writeInt32(broadcast_id);
}
if ((flags & 1) != 0) {
stream.writeInt32(broadcast_post);
}
}
}
public static class TL_updateReadChannelDiscussionOutbox extends Update {
public static int constructor = 0x4638a26c;
public int channel_id;
public int top_msg_id;
public int read_max_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
top_msg_id = stream.readInt32(exception);
read_max_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(top_msg_id);
stream.writeInt32(read_max_id);
}
}
public static class TL_updateChannelUserTyping extends Update {
public static int constructor = 0x6b171718;
public int flags;
public int channel_id;
public int top_msg_id;
public Peer from_id;
public SendMessageAction action;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
top_msg_id = stream.readInt32(exception);
}
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
action = SendMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(channel_id);
if ((flags & 1) != 0) {
stream.writeInt32(top_msg_id);
}
from_id.serializeToStream(stream);
action.serializeToStream(stream);
}
}
public static class TL_updateRecentStickers extends Update {
public static int constructor = 0x9a422c20;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateReadHistoryInbox extends Update {
public static int constructor = 0x9c974fdf;
public int flags;
public int folder_id;
public Peer peer;
public int max_id;
public int still_unread_count;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
folder_id = stream.readInt32(exception);
}
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
max_id = stream.readInt32(exception);
still_unread_count = stream.readInt32(exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(folder_id);
}
peer.serializeToStream(stream);
stream.writeInt32(max_id);
stream.writeInt32(still_unread_count);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateDialogFilterOrder extends Update {
public static int constructor = 0xa5d72105;
public ArrayList<Integer> order = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
order.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(order.get(a));
}
}
}
public static class TL_updateSavedGifs extends Update {
public static int constructor = 0x9375341e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateContactsReset extends Update {
public static int constructor = 0x7084a7be;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updateChannel extends Update {
public static int constructor = 0xb6d45656;
public int channel_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
}
}
public static class TL_updateChannelWebPage extends Update {
public static int constructor = 0x40771900;
public int channel_id;
public WebPage webpage;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
webpage = WebPage.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
webpage.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateDeleteScheduledMessages extends Update {
public static int constructor = 0x90866cee;
public Peer peer;
public ArrayList<Integer> messages = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
}
}
public static class TL_updateChannelMessageForwards extends Update {
public static int constructor = 0x6e8a84df;
public int channel_id;
public int id;
public int forwards;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
id = stream.readInt32(exception);
forwards = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(id);
stream.writeInt32(forwards);
}
}
public static class TL_updateDeleteChannelMessages extends Update {
public static int constructor = 0xc37521c9;
public int channel_id;
public ArrayList<Integer> messages = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateUserPhoto extends Update {
public static int constructor = 0x95313b0c;
public int user_id;
public int date;
public UserProfilePhoto photo;
public boolean previous;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
photo = UserProfilePhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
previous = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(date);
photo.serializeToStream(stream);
stream.writeBool(previous);
}
}
public static class TL_updateDialogFilters extends Update {
public static int constructor = 0x3504914f;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updatePeerBlocked extends Update {
public static int constructor = 0x246a4b22;
public Peer peer_id;
public boolean blocked;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
blocked = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer_id.serializeToStream(stream);
stream.writeBool(blocked);
}
}
public static class TL_updatePinnedMessages extends Update {
public static int constructor = 0xed85eab5;
public int flags;
public boolean pinned;
public Peer peer;
public ArrayList<Integer> messages = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pinned = (flags & 1) != 0;
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateDcOptions extends Update {
public static int constructor = 0x8e5e9873;
public ArrayList<TL_dcOption> dc_options = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_dcOption object = TL_dcOption.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
dc_options.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = dc_options.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
dc_options.get(a).serializeToStream(stream);
}
}
}
public static class TL_updateEditChannelMessage extends Update {
public static int constructor = 0x1b3f4df7;
public Message message;
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateNewStickerSet extends Update {
public static int constructor = 0x688a30aa;
public TL_messages_stickerSet stickerset;
public void readParams(AbstractSerializedData stream, boolean exception) {
stickerset = TL_messages_stickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stickerset.serializeToStream(stream);
}
}
public static class TL_updateLangPackTooLong extends Update {
public static int constructor = 0x46560264;
public String lang_code;
public void readParams(AbstractSerializedData stream, boolean exception) {
lang_code = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
}
}
public static class TL_updateTheme extends Update {
public static int constructor = 0x8216fba3;
public Theme theme;
public void readParams(AbstractSerializedData stream, boolean exception) {
theme = Theme.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
theme.serializeToStream(stream);
}
}
public static class TL_updateEncryptedMessagesRead extends Update {
public static int constructor = 0x38fe25b7;
public int chat_id;
public int max_date;
public int date;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
max_date = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(max_date);
stream.writeInt32(date);
}
}
public static class TL_updateStickerSetsOrder extends Update {
public static int constructor = 0xbb2d201;
public int flags;
public boolean masks;
public ArrayList<Long> order = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
masks = (flags & 1) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
order.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = masks ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(order.get(a));
}
}
}
public static class TL_updateReadChannelInbox extends Update {
public static int constructor = 0x330b5424;
public int flags;
public int folder_id;
public int channel_id;
public int max_id;
public int still_unread_count;
public int pts;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
folder_id = stream.readInt32(exception);
}
channel_id = stream.readInt32(exception);
max_id = stream.readInt32(exception);
still_unread_count = stream.readInt32(exception);
pts = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(folder_id);
}
stream.writeInt32(channel_id);
stream.writeInt32(max_id);
stream.writeInt32(still_unread_count);
stream.writeInt32(pts);
}
}
public static class TL_updateReadMessagesContents extends Update {
public static int constructor = 0x68c13933;
public ArrayList<Integer> messages = new ArrayList<>();
public int pts;
public int pts_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
messages.add(stream.readInt32(exception));
}
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(messages.get(a));
}
stream.writeInt32(pts);
stream.writeInt32(pts_count);
}
}
public static class TL_updateChatParticipants extends Update {
public static int constructor = 0x7761198;
public ChatParticipants participants;
public void readParams(AbstractSerializedData stream, boolean exception) {
participants = ChatParticipants.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participants.serializeToStream(stream);
}
}
public static class TL_updateChatDefaultBannedRights extends Update {
public static int constructor = 0x54c01850;
public Peer peer;
public TL_chatBannedRights default_banned_rights;
public int version;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
default_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
default_banned_rights.serializeToStream(stream);
stream.writeInt32(version);
}
}
public static class TL_receivedNotifyMessage extends TLObject {
public static int constructor = 0xa384b779;
public int id;
public int flags;
public static TL_receivedNotifyMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_receivedNotifyMessage.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_receivedNotifyMessage", constructor));
} else {
return null;
}
}
TL_receivedNotifyMessage result = new TL_receivedNotifyMessage();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
flags = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt32(flags);
}
}
public static abstract class InputEncryptedFile extends TLObject {
public long id;
public long access_hash;
public int parts;
public int key_fingerprint;
public String md5_checksum;
public static InputEncryptedFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputEncryptedFile result = null;
switch (constructor) {
case 0x5a17b5e5:
result = new TL_inputEncryptedFile();
break;
case 0x2dc173c8:
result = new TL_inputEncryptedFileBigUploaded();
break;
case 0x1837c364:
result = new TL_inputEncryptedFileEmpty();
break;
case 0x64bd0306:
result = new TL_inputEncryptedFileUploaded();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputEncryptedFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputEncryptedFile extends InputEncryptedFile {
public static int constructor = 0x5a17b5e5;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputEncryptedFileBigUploaded extends InputEncryptedFile {
public static int constructor = 0x2dc173c8;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
parts = stream.readInt32(exception);
key_fingerprint = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(parts);
stream.writeInt32(key_fingerprint);
}
}
public static class TL_inputEncryptedFileEmpty extends InputEncryptedFile {
public static int constructor = 0x1837c364;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputEncryptedFileUploaded extends InputEncryptedFile {
public static int constructor = 0x64bd0306;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
parts = stream.readInt32(exception);
md5_checksum = stream.readString(exception);
key_fingerprint = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(parts);
stream.writeString(md5_checksum);
stream.writeInt32(key_fingerprint);
}
}
public static abstract class messages_AllStickers extends TLObject {
public String hash;
public ArrayList<StickerSet> sets = new ArrayList<>();
public ArrayList<TL_stickerPack> packs = new ArrayList<>();
public ArrayList<Document> documents = new ArrayList<>();
public static messages_AllStickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_AllStickers result = null;
switch (constructor) {
case 0xedfd405f:
result = new TL_messages_allStickers();
break;
case 0xe86602c3:
result = new TL_messages_allStickersNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_AllStickers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_allStickers extends messages_AllStickers {
public static int constructor = 0xedfd405f;
public int hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
StickerSet object = StickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sets.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = sets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sets.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_allStickersNotModified extends messages_AllStickers {
public static int constructor = 0xe86602c3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_messageViews extends TLObject {
public static int constructor = 0xb6c4f543;
public ArrayList<TL_messageViews> views = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_messageViews TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_messageViews.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_messageViews", constructor));
} else {
return null;
}
}
TL_messages_messageViews result = new TL_messages_messageViews();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_messageViews object = TL_messageViews.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
views.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = views.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
views.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class DecryptedMessageAction extends TLObject {
public int ttl_seconds;
public int layer;
public ArrayList<Long> random_ids = new ArrayList<>();
public long exchange_id;
public long key_fingerprint;
public SendMessageAction action;
public byte[] g_b;
public int start_seq_no;
public int end_seq_no;
public byte[] g_a;
public static DecryptedMessageAction TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DecryptedMessageAction result = null;
switch (constructor) {
case 0xa1733aec:
result = new TL_decryptedMessageActionSetMessageTTL();
break;
case 0xf3048883:
result = new TL_decryptedMessageActionNotifyLayer();
break;
case 0x65614304:
result = new TL_decryptedMessageActionDeleteMessages();
break;
case 0xec2e0b9b:
result = new TL_decryptedMessageActionCommitKey();
break;
case 0xdd05ec6b:
result = new TL_decryptedMessageActionAbortKey();
break;
case 0x6719e45c:
result = new TL_decryptedMessageActionFlushHistory();
break;
case 0xccb27641:
result = new TL_decryptedMessageActionTyping();
break;
case 0x6fe1735b:
result = new TL_decryptedMessageActionAcceptKey();
break;
case 0xc4f40be:
result = new TL_decryptedMessageActionReadMessages();
break;
case 0x511110b0:
result = new TL_decryptedMessageActionResend();
break;
case 0xf3c9611b:
result = new TL_decryptedMessageActionRequestKey();
break;
case 0x8ac1f475:
result = new TL_decryptedMessageActionScreenshotMessages();
break;
case 0xa82fdd63:
result = new TL_decryptedMessageActionNoop();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DecryptedMessageAction", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_decryptedMessageActionSetMessageTTL extends DecryptedMessageAction {
public static int constructor = 0xa1733aec;
public void readParams(AbstractSerializedData stream, boolean exception) {
ttl_seconds = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(ttl_seconds);
}
}
public static class TL_decryptedMessageActionNotifyLayer extends DecryptedMessageAction {
public static int constructor = 0xf3048883;
public void readParams(AbstractSerializedData stream, boolean exception) {
layer = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(layer);
}
}
public static class TL_decryptedMessageActionDeleteMessages extends DecryptedMessageAction {
public static int constructor = 0x65614304;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
random_ids.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = random_ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(random_ids.get(a));
}
}
}
public static class TL_decryptedMessageActionCommitKey extends DecryptedMessageAction {
public static int constructor = 0xec2e0b9b;
public void readParams(AbstractSerializedData stream, boolean exception) {
exchange_id = stream.readInt64(exception);
key_fingerprint = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_decryptedMessageActionAbortKey extends DecryptedMessageAction {
public static int constructor = 0xdd05ec6b;
public void readParams(AbstractSerializedData stream, boolean exception) {
exchange_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
}
}
public static class TL_decryptedMessageActionFlushHistory extends DecryptedMessageAction {
public static int constructor = 0x6719e45c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_decryptedMessageActionTyping extends DecryptedMessageAction {
public static int constructor = 0xccb27641;
public void readParams(AbstractSerializedData stream, boolean exception) {
action = SendMessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
action.serializeToStream(stream);
}
}
public static class TL_decryptedMessageActionAcceptKey extends DecryptedMessageAction {
public static int constructor = 0x6fe1735b;
public void readParams(AbstractSerializedData stream, boolean exception) {
exchange_id = stream.readInt64(exception);
g_b = stream.readByteArray(exception);
key_fingerprint = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeByteArray(g_b);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_decryptedMessageActionReadMessages extends DecryptedMessageAction {
public static int constructor = 0xc4f40be;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
random_ids.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = random_ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(random_ids.get(a));
}
}
}
public static class TL_decryptedMessageActionResend extends DecryptedMessageAction {
public static int constructor = 0x511110b0;
public void readParams(AbstractSerializedData stream, boolean exception) {
start_seq_no = stream.readInt32(exception);
end_seq_no = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(start_seq_no);
stream.writeInt32(end_seq_no);
}
}
public static class TL_decryptedMessageActionRequestKey extends DecryptedMessageAction {
public static int constructor = 0xf3c9611b;
public void readParams(AbstractSerializedData stream, boolean exception) {
exchange_id = stream.readInt64(exception);
g_a = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(exchange_id);
stream.writeByteArray(g_a);
}
}
public static class TL_decryptedMessageActionScreenshotMessages extends DecryptedMessageAction {
public static int constructor = 0x8ac1f475;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
random_ids.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = random_ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(random_ids.get(a));
}
}
}
public static class TL_decryptedMessageActionNoop extends DecryptedMessageAction {
public static int constructor = 0xa82fdd63;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class InputCheckPasswordSRP extends TLObject {
public static InputCheckPasswordSRP TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputCheckPasswordSRP result = null;
switch (constructor) {
case 0x9880f658:
result = new TL_inputCheckPasswordEmpty();
break;
case 0xd27ff082:
result = new TL_inputCheckPasswordSRP();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputCheckPasswordSRP", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputCheckPasswordEmpty extends InputCheckPasswordSRP {
public static int constructor = 0x9880f658;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputCheckPasswordSRP extends InputCheckPasswordSRP {
public static int constructor = 0xd27ff082;
public long srp_id;
public byte[] A;
public byte[] M1;
public void readParams(AbstractSerializedData stream, boolean exception) {
srp_id = stream.readInt64(exception);
A = stream.readByteArray(exception);
M1 = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(srp_id);
stream.writeByteArray(A);
stream.writeByteArray(M1);
}
}
public static class TL_account_password extends TLObject {
public static int constructor = 0x185b184f;
public int flags;
public boolean has_recovery;
public boolean has_secure_values;
public boolean has_password;
public PasswordKdfAlgo current_algo;
public byte[] srp_B;
public long srp_id;
public String hint;
public String email_unconfirmed_pattern;
public PasswordKdfAlgo new_algo;
public SecurePasswordKdfAlgo new_secure_algo;
public byte[] secure_random;
public int pending_reset_date;
public static TL_account_password TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_password.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_password", constructor));
} else {
return null;
}
}
TL_account_password result = new TL_account_password();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_recovery = (flags & 1) != 0;
has_secure_values = (flags & 2) != 0;
has_password = (flags & 4) != 0;
if ((flags & 4) != 0) {
current_algo = PasswordKdfAlgo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
srp_B = stream.readByteArray(exception);
}
if ((flags & 4) != 0) {
srp_id = stream.readInt64(exception);
}
if ((flags & 8) != 0) {
hint = stream.readString(exception);
}
if ((flags & 16) != 0) {
email_unconfirmed_pattern = stream.readString(exception);
}
new_algo = PasswordKdfAlgo.TLdeserialize(stream, stream.readInt32(exception), exception);
new_secure_algo = SecurePasswordKdfAlgo.TLdeserialize(stream, stream.readInt32(exception), exception);
secure_random = stream.readByteArray(exception);
if ((flags & 32) != 0) {
pending_reset_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_recovery ? (flags | 1) : (flags &~ 1);
flags = has_secure_values ? (flags | 2) : (flags &~ 2);
flags = has_password ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 4) != 0) {
current_algo.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeByteArray(srp_B);
}
if ((flags & 4) != 0) {
stream.writeInt64(srp_id);
}
if ((flags & 8) != 0) {
stream.writeString(hint);
}
if ((flags & 16) != 0) {
stream.writeString(email_unconfirmed_pattern);
}
new_algo.serializeToStream(stream);
new_secure_algo.serializeToStream(stream);
stream.writeByteArray(secure_random);
if ((flags & 32) != 0) {
stream.writeInt32(pending_reset_date);
}
}
}
public static class TL_chatAdminWithInvites extends TLObject {
public static int constructor = 0xdfd2330f;
public int admin_id;
public int invites_count;
public int revoked_invites_count;
public static TL_chatAdminWithInvites TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatAdminWithInvites.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatAdminWithInvites", constructor));
} else {
return null;
}
}
TL_chatAdminWithInvites result = new TL_chatAdminWithInvites();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
admin_id = stream.readInt32(exception);
invites_count = stream.readInt32(exception);
revoked_invites_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(admin_id);
stream.writeInt32(invites_count);
stream.writeInt32(revoked_invites_count);
}
}
public static abstract class UserProfilePhoto extends TLObject {
public int flags;
public boolean has_video;
public long photo_id;
public FileLocation photo_small;
public FileLocation photo_big;
public byte[] stripped_thumb;
public int dc_id;
public BitmapDrawable strippedBitmap;
public static UserProfilePhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
UserProfilePhoto result = null;
switch (constructor) {
case 0x69d3ab26:
result = new TL_userProfilePhoto_layer126();
break;
case 0xecd75d8c:
result = new TL_userProfilePhoto_layer115();
break;
case 0x4f11bae1:
result = new TL_userProfilePhotoEmpty();
break;
case 0xd559d8c8:
result = new TL_userProfilePhoto_layer97();
break;
case 0x990d1493:
result = new TL_userProfilePhoto_old();
break;
case 0xcc656077:
result = new TL_userProfilePhoto_layer127();
break;
case 0x82d1f706:
result = new TL_userProfilePhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in UserProfilePhoto", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_userProfilePhoto_layer126 extends TL_userProfilePhoto {
public static int constructor = 0x69d3ab26;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_id = stream.readInt64(exception);
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(photo_id);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
stream.writeInt32(dc_id);
}
}
public static class TL_userProfilePhoto_layer127 extends TL_userProfilePhoto {
public static int constructor = 0xcc656077;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_id = stream.readInt64(exception);
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
stripped_thumb = stream.readByteArray(exception);
if (Build.VERSION.SDK_INT >= 21) {
try {
strippedBitmap = new BitmapDrawable(ImageLoader.getStrippedPhotoBitmap(stripped_thumb, "b"));
} catch (Throwable e) {
FileLog.e(e);
}
}
}
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(photo_id);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeByteArray(stripped_thumb);
}
stream.writeInt32(dc_id);
}
}
public static class TL_userProfilePhoto_layer115 extends TL_userProfilePhoto {
public static int constructor = 0xecd75d8c;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_id = stream.readInt64(exception);
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(photo_id);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
stream.writeInt32(dc_id);
}
}
public static class TL_userProfilePhotoEmpty extends UserProfilePhoto {
public static int constructor = 0x4f11bae1;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_userProfilePhoto_layer97 extends TL_userProfilePhoto {
public static int constructor = 0xd559d8c8;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_id = stream.readInt64(exception);
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(photo_id);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
}
}
public static class TL_userProfilePhoto_old extends TL_userProfilePhoto {
public static int constructor = 0x990d1493;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_small = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
photo_big = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
photo_small.serializeToStream(stream);
photo_big.serializeToStream(stream);
}
}
public static class TL_userProfilePhoto extends UserProfilePhoto {
public static int constructor = 0x82d1f706;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_video = (flags & 1) != 0;
photo_id = stream.readInt64(exception);
if ((flags & 2) != 0) {
stripped_thumb = stream.readByteArray(exception);
}
dc_id = stream.readInt32(exception);
photo_small = new TL_fileLocationToBeDeprecated();
photo_small.volume_id = -photo_id;
photo_small.local_id = 'a';
photo_big = new TL_fileLocationToBeDeprecated();
photo_big.volume_id = -photo_id;
photo_big.local_id = 'c';
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(photo_id);
if ((flags & 2) != 0) {
stream.writeByteArray(stripped_thumb);
}
stream.writeInt32(dc_id);
}
}
public static abstract class MessageEntity extends TLObject {
public int offset;
public int length;
public String url;
public String language;
public static MessageEntity TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessageEntity result = null;
switch (constructor) {
case 0x76a6d327:
result = new TL_messageEntityTextUrl();
break;
case 0x6cef8ac7:
result = new TL_messageEntityBotCommand();
break;
case 0x64e475c2:
result = new TL_messageEntityEmail();
break;
case 0x73924be0:
result = new TL_messageEntityPre();
break;
case 0xbb92ba95:
result = new TL_messageEntityUnknown();
break;
case 0x6ed02538:
result = new TL_messageEntityUrl();
break;
case 0x826f8b60:
result = new TL_messageEntityItalic();
break;
case 0xfa04579d:
result = new TL_messageEntityMention();
break;
case 0x352dca58:
result = new TL_messageEntityMentionName();
break;
case 0x208e68c9:
result = new TL_inputMessageEntityMentionName();
break;
case 0x4c4e743f:
result = new TL_messageEntityCashtag();
break;
case 0xbd610bc9:
result = new TL_messageEntityBold();
break;
case 0x6f635b0d:
result = new TL_messageEntityHashtag();
break;
case 0x28a20571:
result = new TL_messageEntityCode();
break;
case 0xbf0693d4:
result = new TL_messageEntityStrike();
break;
case 0x20df5d0:
result = new TL_messageEntityBlockquote();
break;
case 0x9c4e7e8b:
result = new TL_messageEntityUnderline();
break;
case 0x761e6af4:
result = new TL_messageEntityBankCard();
break;
case 0x9b69e34b:
result = new TL_messageEntityPhone();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessageEntity", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messageEntityTextUrl extends MessageEntity {
public static int constructor = 0x76a6d327;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
stream.writeString(url);
}
}
public static class TL_messageEntityBotCommand extends MessageEntity {
public static int constructor = 0x6cef8ac7;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityEmail extends MessageEntity {
public static int constructor = 0x64e475c2;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityPre extends MessageEntity {
public static int constructor = 0x73924be0;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
language = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
stream.writeString(language);
}
}
public static class TL_messageEntityUnknown extends MessageEntity {
public static int constructor = 0xbb92ba95;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityUrl extends MessageEntity {
public static int constructor = 0x6ed02538;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityItalic extends MessageEntity {
public static int constructor = 0x826f8b60;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityMention extends MessageEntity {
public static int constructor = 0xfa04579d;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityMentionName extends MessageEntity {
public static int constructor = 0x352dca58;
public int user_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
stream.writeInt32(user_id);
}
}
public static class TL_inputMessageEntityMentionName extends MessageEntity {
public static int constructor = 0x208e68c9;
public InputUser user_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
user_id = InputUser.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
user_id.serializeToStream(stream);
}
}
public static class TL_messageEntityCashtag extends MessageEntity {
public static int constructor = 0x4c4e743f;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityBold extends MessageEntity {
public static int constructor = 0xbd610bc9;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityHashtag extends MessageEntity {
public static int constructor = 0x6f635b0d;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityCode extends MessageEntity {
public static int constructor = 0x28a20571;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityStrike extends MessageEntity {
public static int constructor = 0xbf0693d4;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityBlockquote extends MessageEntity {
public static int constructor = 0x20df5d0;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityUnderline extends MessageEntity {
public static int constructor = 0x9c4e7e8b;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityBankCard extends MessageEntity {
public static int constructor = 0x761e6af4;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static class TL_messageEntityPhone extends MessageEntity {
public static int constructor = 0x9b69e34b;
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(length);
}
}
public static abstract class ChannelLocation extends TLObject {
public static ChannelLocation TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChannelLocation result = null;
switch (constructor) {
case 0xbfb5ad8b:
result = new TL_channelLocationEmpty();
break;
case 0x209b82db:
result = new TL_channelLocation();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChannelLocation", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channelLocationEmpty extends ChannelLocation {
public static int constructor = 0xbfb5ad8b;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelLocation extends ChannelLocation {
public static int constructor = 0x209b82db;
public GeoPoint geo_point;
public String address;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo_point = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
address = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo_point.serializeToStream(stream);
stream.writeString(address);
}
}
public static abstract class Photo extends TLObject {
public int flags;
public boolean has_stickers;
public long id;
public long access_hash;
public byte[] file_reference;
public int date;
public ArrayList<PhotoSize> sizes = new ArrayList<>();
public ArrayList<VideoSize> video_sizes = new ArrayList<>();
public int dc_id;
public int user_id;
public GeoPoint geo;
public String caption;
public static Photo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Photo result = null;
switch (constructor) {
case 0x9c477dd8:
result = new TL_photo_layer97();
break;
case 0xcded42fe:
result = new TL_photo_layer55();
break;
case 0xc3838076:
result = new TL_photo_old2();
break;
case 0x2331b22d:
result = new TL_photoEmpty();
break;
case 0x22b56751:
result = new TL_photo_old();
break;
case 0xd07504a5:
result = new TL_photo_layer115();
break;
case 0xfb197a65:
result = new TL_photo();
break;
case 0x9288dd29:
result = new TL_photo_layer82();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Photo", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_photo_layer97 extends TL_photo {
public static int constructor = 0x9c477dd8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_stickers = (flags & 1) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_stickers ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
}
}
public static class TL_photo_layer55 extends TL_photo {
public static int constructor = 0xcded42fe;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
}
}
public static class TL_photo_old2 extends TL_photo {
public static int constructor = 0xc3838076;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
geo.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
}
}
public static class TL_photoEmpty extends Photo {
public static int constructor = 0x2331b22d;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
}
}
public static class TL_photo_old extends TL_photo {
public static int constructor = 0x22b56751;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
caption = stream.readString(exception);
geo = GeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(user_id);
stream.writeInt32(date);
stream.writeString(caption);
geo.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
}
}
public static class TL_photo_layer115 extends TL_photo {
public static int constructor = 0xd07504a5;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_stickers = (flags & 1) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_stickers ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
stream.writeInt32(dc_id);
}
}
public static class TL_photo extends Photo {
public static int constructor = 0xfb197a65;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_stickers = (flags & 1) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(id, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
if ((flags & 2) != 0) {
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
VideoSize object = VideoSize.TLdeserialize(id, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
video_sizes.add(object);
}
}
dc_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_stickers ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
count = video_sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
video_sizes.get(a).serializeToStream(stream);
}
}
stream.writeInt32(dc_id);
}
}
public static class TL_photo_layer82 extends TL_photo {
public static int constructor = 0x9288dd29;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_stickers = (flags & 1) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sizes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_stickers ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sizes.get(a).serializeToStream(stream);
}
}
}
public static class TL_encryptedChatRequested extends EncryptedChat {
public static int constructor = 0x62718a82;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
folder_id = stream.readInt32(exception);
}
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(folder_id);
}
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a);
}
}
public static class TL_encryptedChatRequested_old extends TL_encryptedChatRequested {
public static int constructor = 0xfda9a7b7;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a = stream.readByteArray(exception);
nonce = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a);
stream.writeByteArray(nonce);
}
}
public static class TL_encryptedChatRequested_layer115 extends EncryptedChat {
public static int constructor = 0xc878527e;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a);
}
}
public static class TL_encryptedChat extends EncryptedChat {
public static int constructor = 0xfa56ce36;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a_or_b = stream.readByteArray(exception);
key_fingerprint = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a_or_b);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_encryptedChat_old extends TL_encryptedChat {
public static int constructor = 0x6601d14f;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
g_a_or_b = stream.readByteArray(exception);
nonce = stream.readByteArray(exception);
key_fingerprint = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
stream.writeByteArray(g_a_or_b);
stream.writeByteArray(nonce);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_encryptedChatEmpty extends EncryptedChat {
public static int constructor = 0xab7ec0a0;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
}
}
public static class TL_encryptedChatWaiting extends EncryptedChat {
public static int constructor = 0x3bf703dc;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
participant_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeInt32(admin_id);
stream.writeInt32(participant_id);
}
}
public static class TL_encryptedChatDiscarded_layer122 extends TL_encryptedChatDiscarded {
public static int constructor = 0x13d6dd27;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
}
}
public static class TL_encryptedChatDiscarded extends EncryptedChat {
public static int constructor = 0x1e1c7c45;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
history_deleted = (flags & 1) != 0;
id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = history_deleted ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(id);
}
}
public static abstract class messages_FoundStickerSets extends TLObject {
public static messages_FoundStickerSets TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_FoundStickerSets result = null;
switch (constructor) {
case 0xd54b65d:
result = new TL_messages_foundStickerSetsNotModified();
break;
case 0x5108d648:
result = new TL_messages_foundStickerSets();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_FoundStickerSets", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_foundStickerSetsNotModified extends messages_FoundStickerSets {
public static int constructor = 0xd54b65d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_foundStickerSets extends messages_FoundStickerSets {
public static int constructor = 0x5108d648;
public int hash;
public ArrayList<StickerSetCovered> sets = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
StickerSetCovered object = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
sets.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = sets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
sets.get(a).serializeToStream(stream);
}
}
}
public static class TL_contact extends TLObject {
public static int constructor = 0xf911c994;
public int user_id;
public boolean mutual;
public static TL_contact TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contact.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contact", constructor));
} else {
return null;
}
}
TL_contact result = new TL_contact();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
mutual = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeBool(mutual);
}
}
public static class TL_groupCallParticipantVideoSourceGroup extends TLObject {
public static int constructor = 0xdcb118b7;
public String semantics;
public ArrayList<Integer> sources = new ArrayList<>();
public static TL_groupCallParticipantVideoSourceGroup TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_groupCallParticipantVideoSourceGroup.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_groupCallParticipantVideoSourceGroup", constructor));
} else {
return null;
}
}
TL_groupCallParticipantVideoSourceGroup result = new TL_groupCallParticipantVideoSourceGroup();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
semantics = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
sources.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(semantics);
stream.writeInt32(0x1cb5c415);
int count = sources.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(sources.get(a));
}
}
}
public static class TL_help_countryCode extends TLObject {
public static int constructor = 0x4203c5ef;
public int flags;
public String country_code;
public ArrayList<String> prefixes = new ArrayList<>();
public ArrayList<String> patterns = new ArrayList<>();
public static TL_help_countryCode TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_countryCode.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_countryCode", constructor));
} else {
return null;
}
}
TL_help_countryCode result = new TL_help_countryCode();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
country_code = stream.readString(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
prefixes.add(stream.readString(exception));
}
}
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
patterns.add(stream.readString(exception));
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(country_code);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = prefixes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(prefixes.get(a));
}
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = patterns.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(patterns.get(a));
}
}
}
}
public static class TL_secureData extends TLObject {
public static int constructor = 0x8aeabec3;
public byte[] data;
public byte[] data_hash;
public byte[] secret;
public static TL_secureData TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_secureData.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_secureData", constructor));
} else {
return null;
}
}
TL_secureData result = new TL_secureData();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
data = stream.readByteArray(exception);
data_hash = stream.readByteArray(exception);
secret = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(data);
stream.writeByteArray(data_hash);
stream.writeByteArray(secret);
}
}
public static class TL_config extends TLObject {
public static int constructor = 0x330b4067;
public int flags;
public boolean phonecalls_enabled;
public boolean default_p2p_contacts;
public boolean preload_featured_stickers;
public boolean ignore_phone_entities;
public boolean revoke_pm_inbox;
public boolean blocked_mode;
public boolean pfs_enabled;
public int date;
public int expires;
public boolean test_mode;
public int this_dc;
public ArrayList<TL_dcOption> dc_options = new ArrayList<>();
public String dc_txt_domain_name;
public int chat_size_max;
public int megagroup_size_max;
public int forwarded_count_max;
public int online_update_period_ms;
public int offline_blur_timeout_ms;
public int offline_idle_timeout_ms;
public int online_cloud_timeout_ms;
public int notify_cloud_delay_ms;
public int notify_default_delay_ms;
public int push_chat_period_ms;
public int push_chat_limit;
public int saved_gifs_limit;
public int edit_time_limit;
public int revoke_time_limit;
public int revoke_pm_time_limit;
public int rating_e_decay;
public int stickers_recent_limit;
public int stickers_faved_limit;
public int channels_read_media_period;
public int tmp_sessions;
public int pinned_dialogs_count_max;
public int pinned_infolder_count_max;
public int call_receive_timeout_ms;
public int call_ring_timeout_ms;
public int call_connect_timeout_ms;
public int call_packet_timeout_ms;
public String me_url_prefix;
public String autoupdate_url_prefix;
public String gif_search_username;
public String venue_search_username;
public String img_search_username;
public String static_maps_provider;
public int caption_length_max;
public int message_length_max;
public int webfile_dc_id;
public String suggested_lang_code;
public int lang_pack_version;
public int base_lang_pack_version;
public static TL_config TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_config.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_config", constructor));
} else {
return null;
}
}
TL_config result = new TL_config();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
phonecalls_enabled = (flags & 2) != 0;
default_p2p_contacts = (flags & 8) != 0;
preload_featured_stickers = (flags & 16) != 0;
ignore_phone_entities = (flags & 32) != 0;
revoke_pm_inbox = (flags & 64) != 0;
blocked_mode = (flags & 256) != 0;
pfs_enabled = (flags & 8192) != 0;
date = stream.readInt32(exception);
expires = stream.readInt32(exception);
test_mode = stream.readBool(exception);
this_dc = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_dcOption object = TL_dcOption.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
dc_options.add(object);
}
dc_txt_domain_name = stream.readString(exception);
chat_size_max = stream.readInt32(exception);
megagroup_size_max = stream.readInt32(exception);
forwarded_count_max = stream.readInt32(exception);
online_update_period_ms = stream.readInt32(exception);
offline_blur_timeout_ms = stream.readInt32(exception);
offline_idle_timeout_ms = stream.readInt32(exception);
online_cloud_timeout_ms = stream.readInt32(exception);
notify_cloud_delay_ms = stream.readInt32(exception);
notify_default_delay_ms = stream.readInt32(exception);
push_chat_period_ms = stream.readInt32(exception);
push_chat_limit = stream.readInt32(exception);
saved_gifs_limit = stream.readInt32(exception);
edit_time_limit = stream.readInt32(exception);
revoke_time_limit = stream.readInt32(exception);
revoke_pm_time_limit = stream.readInt32(exception);
rating_e_decay = stream.readInt32(exception);
stickers_recent_limit = stream.readInt32(exception);
stickers_faved_limit = stream.readInt32(exception);
channels_read_media_period = stream.readInt32(exception);
if ((flags & 1) != 0) {
tmp_sessions = stream.readInt32(exception);
}
pinned_dialogs_count_max = stream.readInt32(exception);
pinned_infolder_count_max = stream.readInt32(exception);
call_receive_timeout_ms = stream.readInt32(exception);
call_ring_timeout_ms = stream.readInt32(exception);
call_connect_timeout_ms = stream.readInt32(exception);
call_packet_timeout_ms = stream.readInt32(exception);
me_url_prefix = stream.readString(exception);
if ((flags & 128) != 0) {
autoupdate_url_prefix = stream.readString(exception);
}
if ((flags & 512) != 0) {
gif_search_username = stream.readString(exception);
}
if ((flags & 1024) != 0) {
venue_search_username = stream.readString(exception);
}
if ((flags & 2048) != 0) {
img_search_username = stream.readString(exception);
}
if ((flags & 4096) != 0) {
static_maps_provider = stream.readString(exception);
}
caption_length_max = stream.readInt32(exception);
message_length_max = stream.readInt32(exception);
webfile_dc_id = stream.readInt32(exception);
if ((flags & 4) != 0) {
suggested_lang_code = stream.readString(exception);
}
if ((flags & 4) != 0) {
lang_pack_version = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
base_lang_pack_version = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = phonecalls_enabled ? (flags | 2) : (flags &~ 2);
flags = default_p2p_contacts ? (flags | 8) : (flags &~ 8);
flags = preload_featured_stickers ? (flags | 16) : (flags &~ 16);
flags = ignore_phone_entities ? (flags | 32) : (flags &~ 32);
flags = revoke_pm_inbox ? (flags | 64) : (flags &~ 64);
flags = blocked_mode ? (flags | 256) : (flags &~ 256);
flags = pfs_enabled ? (flags | 8192) : (flags &~ 8192);
stream.writeInt32(flags);
stream.writeInt32(date);
stream.writeInt32(expires);
stream.writeBool(test_mode);
stream.writeInt32(this_dc);
stream.writeInt32(0x1cb5c415);
int count = dc_options.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
dc_options.get(a).serializeToStream(stream);
}
stream.writeString(dc_txt_domain_name);
stream.writeInt32(chat_size_max);
stream.writeInt32(megagroup_size_max);
stream.writeInt32(forwarded_count_max);
stream.writeInt32(online_update_period_ms);
stream.writeInt32(offline_blur_timeout_ms);
stream.writeInt32(offline_idle_timeout_ms);
stream.writeInt32(online_cloud_timeout_ms);
stream.writeInt32(notify_cloud_delay_ms);
stream.writeInt32(notify_default_delay_ms);
stream.writeInt32(push_chat_period_ms);
stream.writeInt32(push_chat_limit);
stream.writeInt32(saved_gifs_limit);
stream.writeInt32(edit_time_limit);
stream.writeInt32(revoke_time_limit);
stream.writeInt32(revoke_pm_time_limit);
stream.writeInt32(rating_e_decay);
stream.writeInt32(stickers_recent_limit);
stream.writeInt32(stickers_faved_limit);
stream.writeInt32(channels_read_media_period);
if ((flags & 1) != 0) {
stream.writeInt32(tmp_sessions);
}
stream.writeInt32(pinned_dialogs_count_max);
stream.writeInt32(pinned_infolder_count_max);
stream.writeInt32(call_receive_timeout_ms);
stream.writeInt32(call_ring_timeout_ms);
stream.writeInt32(call_connect_timeout_ms);
stream.writeInt32(call_packet_timeout_ms);
stream.writeString(me_url_prefix);
if ((flags & 128) != 0) {
stream.writeString(autoupdate_url_prefix);
}
if ((flags & 512) != 0) {
stream.writeString(gif_search_username);
}
if ((flags & 1024) != 0) {
stream.writeString(venue_search_username);
}
if ((flags & 2048) != 0) {
stream.writeString(img_search_username);
}
if ((flags & 4096) != 0) {
stream.writeString(static_maps_provider);
}
stream.writeInt32(caption_length_max);
stream.writeInt32(message_length_max);
stream.writeInt32(webfile_dc_id);
if ((flags & 4) != 0) {
stream.writeString(suggested_lang_code);
}
if ((flags & 4) != 0) {
stream.writeInt32(lang_pack_version);
}
if ((flags & 4) != 0) {
stream.writeInt32(base_lang_pack_version);
}
}
}
public static abstract class contacts_TopPeers extends TLObject {
public static contacts_TopPeers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
contacts_TopPeers result = null;
switch (constructor) {
case 0x70b772a8:
result = new TL_contacts_topPeers();
break;
case 0xb52c939d:
result = new TL_contacts_topPeersDisabled();
break;
case 0xde266ef5:
result = new TL_contacts_topPeersNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in contacts_TopPeers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_contacts_topPeers extends contacts_TopPeers {
public static int constructor = 0x70b772a8;
public ArrayList<TL_topPeerCategoryPeers> categories = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_topPeerCategoryPeers object = TL_topPeerCategoryPeers.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
categories.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = categories.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
categories.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_contacts_topPeersDisabled extends contacts_TopPeers {
public static int constructor = 0xb52c939d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_topPeersNotModified extends contacts_TopPeers {
public static int constructor = 0xde266ef5;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_support extends TLObject {
public static int constructor = 0x17c6b5f6;
public String phone_number;
public User user;
public static TL_help_support TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_support.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_support", constructor));
} else {
return null;
}
}
TL_help_support result = new TL_help_support();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_number = stream.readString(exception);
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
user.serializeToStream(stream);
}
}
public static class TL_account_tmpPassword extends TLObject {
public static int constructor = 0xdb64fd34;
public byte[] tmp_password;
public int valid_until;
public static TL_account_tmpPassword TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_tmpPassword.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_tmpPassword", constructor));
} else {
return null;
}
}
TL_account_tmpPassword result = new TL_account_tmpPassword();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
tmp_password = stream.readByteArray(exception);
valid_until = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(tmp_password);
stream.writeInt32(valid_until);
}
}
public static abstract class messages_Chats extends TLObject {
public ArrayList<Chat> chats = new ArrayList<>();
public int count;
public static messages_Chats TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_Chats result = null;
switch (constructor) {
case 0x64ff9fd5:
result = new TL_messages_chats();
break;
case 0x9cd81144:
result = new TL_messages_chatsSlice();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_Chats", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_chats extends messages_Chats {
public static int constructor = 0x64ff9fd5;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_chatsSlice extends messages_Chats {
public static int constructor = 0x9cd81144;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputChannel extends TLObject {
public int channel_id;
public long access_hash;
public static InputChannel TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputChannel result = null;
switch (constructor) {
case 0xee8c1e86:
result = new TL_inputChannelEmpty();
break;
case 0xafeb712e:
result = new TL_inputChannel();
break;
case 0x2a286531:
result = new TL_inputChannelFromMessage();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputChannel", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputChannelEmpty extends InputChannel {
public static int constructor = 0xee8c1e86;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputChannel extends InputChannel {
public static int constructor = 0xafeb712e;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputChannelFromMessage extends InputChannel {
public static int constructor = 0x2a286531;
public InputPeer peer;
public int msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(channel_id);
}
}
public static class TL_messageRange extends TLObject {
public static int constructor = 0xae30253;
public int min_id;
public int max_id;
public static TL_messageRange TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messageRange.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messageRange", constructor));
} else {
return null;
}
}
TL_messageRange result = new TL_messageRange();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
min_id = stream.readInt32(exception);
max_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(min_id);
stream.writeInt32(max_id);
}
}
public static abstract class Poll extends TLObject {
public long id;
public int flags;
public boolean closed;
public boolean public_voters;
public boolean multiple_choice;
public boolean quiz;
public String question;
public ArrayList<TL_pollAnswer> answers = new ArrayList<>();
public int close_period;
public int close_date;
public static Poll TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Poll result = null;
switch (constructor) {
case 0x86e18161:
result = new TL_poll();
break;
case 0xaf746786:
result = new TL_poll_toDelete();
break;
case 0xd5529d06:
result = new TL_poll_layer111();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Poll", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_poll extends Poll {
public static int constructor = 0x86e18161;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
closed = (flags & 1) != 0;
public_voters = (flags & 2) != 0;
multiple_choice = (flags & 4) != 0;
quiz = (flags & 8) != 0;
question = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswer object = TL_pollAnswer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
answers.add(object);
}
if ((flags & 16) != 0) {
close_period = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
close_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = closed ? (flags | 1) : (flags &~ 1);
flags = public_voters ? (flags | 2) : (flags &~ 2);
flags = multiple_choice ? (flags | 4) : (flags &~ 4);
flags = quiz ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(question);
stream.writeInt32(0x1cb5c415);
int count = answers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
answers.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(close_period);
}
if ((flags & 32) != 0) {
stream.writeInt32(close_date);
}
}
}
public static class TL_poll_toDelete extends TL_poll {
public static int constructor = 0xaf746786;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
closed = (flags & 1) != 0;
public_voters = (flags & 2) != 0;
multiple_choice = (flags & 4) != 0;
quiz = (flags & 8) != 0;
question = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswer object = TL_pollAnswer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
answers.add(object);
}
if ((flags & 16) != 0) {
close_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = closed ? (flags | 1) : (flags &~ 1);
flags = public_voters ? (flags | 2) : (flags &~ 2);
flags = multiple_choice ? (flags | 4) : (flags &~ 4);
flags = quiz ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(question);
stream.writeInt32(0x1cb5c415);
int count = answers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
answers.get(a).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(close_date);
}
}
}
public static class TL_poll_layer111 extends TL_poll {
public static int constructor = 0xd5529d06;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
closed = (flags & 1) != 0;
public_voters = (flags & 2) != 0;
multiple_choice = (flags & 4) != 0;
quiz = (flags & 8) != 0;
question = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pollAnswer object = TL_pollAnswer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
answers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = closed ? (flags | 1) : (flags &~ 1);
flags = public_voters ? (flags | 2) : (flags &~ 2);
flags = multiple_choice ? (flags | 4) : (flags &~ 4);
flags = quiz ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(question);
stream.writeInt32(0x1cb5c415);
int count = answers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
answers.get(a).serializeToStream(stream);
}
}
}
public static abstract class messages_BotResults extends TLObject {
public int flags;
public boolean gallery;
public long query_id;
public String next_offset;
public TL_inlineBotSwitchPM switch_pm;
public ArrayList<BotInlineResult> results = new ArrayList<>();
public int cache_time;
public ArrayList<User> users = new ArrayList<>();
public static messages_BotResults TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_BotResults result = null;
switch (constructor) {
case 0xccd3563d:
result = new TL_messages_botResults_layer71();
break;
case 0x947ca848:
result = new TL_messages_botResults();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_BotResults", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_botResults_layer71 extends TL_messages_botResults {
public static int constructor = 0xccd3563d;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
gallery = (flags & 1) != 0;
query_id = stream.readInt64(exception);
if ((flags & 2) != 0) {
next_offset = stream.readString(exception);
}
if ((flags & 4) != 0) {
switch_pm = TL_inlineBotSwitchPM.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInlineResult object = BotInlineResult.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
cache_time = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = gallery ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(query_id);
if ((flags & 2) != 0) {
stream.writeString(next_offset);
}
if ((flags & 4) != 0) {
switch_pm.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
stream.writeInt32(cache_time);
}
}
public static class TL_messages_botResults extends messages_BotResults {
public static int constructor = 0x947ca848;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
gallery = (flags & 1) != 0;
query_id = stream.readInt64(exception);
if ((flags & 2) != 0) {
next_offset = stream.readString(exception);
}
if ((flags & 4) != 0) {
switch_pm = TL_inlineBotSwitchPM.TLdeserialize(stream, stream.readInt32(exception), exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
BotInlineResult object = BotInlineResult.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
cache_time = stream.readInt32(exception);
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = gallery ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(query_id);
if ((flags & 2) != 0) {
stream.writeString(next_offset);
}
if ((flags & 4) != 0) {
switch_pm.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
stream.writeInt32(cache_time);
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputFolderPeer extends TLObject {
public static int constructor = 0xfbd2c296;
public InputPeer peer;
public int folder_id;
public static TL_inputFolderPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputFolderPeer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputFolderPeer", constructor));
} else {
return null;
}
}
TL_inputFolderPeer result = new TL_inputFolderPeer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
folder_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(folder_id);
}
}
public static abstract class PhoneConnection extends TLObject {
public int flags;
public boolean turn;
public boolean stun;
public long id;
public String ip;
public String ipv6;
public int port;
public String username;
public String password;
public byte[] peer_tag;
public static PhoneConnection TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PhoneConnection result = null;
switch (constructor) {
case 0x9d4c17c0:
result = new TL_phoneConnection();
break;
case 0x635fe375:
result = new TL_phoneConnectionWebrtc();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PhoneConnection", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_phoneConnection extends PhoneConnection {
public static int constructor = 0x9d4c17c0;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
ip = stream.readString(exception);
ipv6 = stream.readString(exception);
port = stream.readInt32(exception);
peer_tag = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeString(ip);
stream.writeString(ipv6);
stream.writeInt32(port);
stream.writeByteArray(peer_tag);
}
}
public static class TL_phoneConnectionWebrtc extends PhoneConnection {
public static int constructor = 0x635fe375;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
turn = (flags & 1) != 0;
stun = (flags & 2) != 0;
id = stream.readInt64(exception);
ip = stream.readString(exception);
ipv6 = stream.readString(exception);
port = stream.readInt32(exception);
username = stream.readString(exception);
password = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = turn ? (flags | 1) : (flags &~ 1);
flags = stun ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeString(ip);
stream.writeString(ipv6);
stream.writeInt32(port);
stream.writeString(username);
stream.writeString(password);
}
}
public static class TL_inputBotInlineMessageID extends TLObject {
public static int constructor = 0x890c3d89;
public int dc_id;
public long id;
public long access_hash;
public static TL_inputBotInlineMessageID TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputBotInlineMessageID.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputBotInlineMessageID", constructor));
} else {
return null;
}
}
TL_inputBotInlineMessageID result = new TL_inputBotInlineMessageID();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static abstract class SecurePlainData extends TLObject {
public static SecurePlainData TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
SecurePlainData result = null;
switch (constructor) {
case 0x21ec5a5f:
result = new TL_securePlainEmail();
break;
case 0x7d6099dd:
result = new TL_securePlainPhone();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in SecurePlainData", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_securePlainEmail extends SecurePlainData {
public static int constructor = 0x21ec5a5f;
public String email;
public void readParams(AbstractSerializedData stream, boolean exception) {
email = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(email);
}
}
public static class TL_securePlainPhone extends SecurePlainData {
public static int constructor = 0x7d6099dd;
public String phone;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone);
}
}
public static class TL_secureSecretSettings extends TLObject {
public static int constructor = 0x1527bcac;
public SecurePasswordKdfAlgo secure_algo;
public byte[] secure_secret;
public long secure_secret_id;
public static TL_secureSecretSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_secureSecretSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_secureSecretSettings", constructor));
} else {
return null;
}
}
TL_secureSecretSettings result = new TL_secureSecretSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
secure_algo = SecurePasswordKdfAlgo.TLdeserialize(stream, stream.readInt32(exception), exception);
secure_secret = stream.readByteArray(exception);
secure_secret_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
secure_algo.serializeToStream(stream);
stream.writeByteArray(secure_secret);
stream.writeInt64(secure_secret_id);
}
}
public static class TL_emojiLanguage extends TLObject {
public static int constructor = 0xb3fb5361;
public String lang_code;
public static TL_emojiLanguage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_emojiLanguage.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_emojiLanguage", constructor));
} else {
return null;
}
}
TL_emojiLanguage result = new TL_emojiLanguage();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
lang_code = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
}
}
public static abstract class Theme extends TLObject {
public static Theme TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Theme result = null;
switch (constructor) {
case 0x28f1114:
result = new TL_theme_layer131();
break;
case 0xf7d90ce0:
result = new TL_theme_layer106();
break;
case 0x483d270c:
result = new TL_themeDocumentNotModified_layer106();
break;
case 0xe802b8dc:
result = new TL_theme();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Theme", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_theme extends Theme {
public static int constructor = 0xe802b8dc;
public int flags;
public boolean creator;
public boolean isDefault;
public boolean for_chat;
public long id;
public long access_hash;
public String slug;
public String title;
public Document document;
public TL_themeSettings settings;
public int installs_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
for_chat = (flags & 32) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
title = stream.readString(exception);
if ((flags & 4) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
settings = TL_themeSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
installs_count = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
flags = for_chat ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(slug);
stream.writeString(title);
if ((flags & 4) != 0) {
document.serializeToStream(stream);
}
if ((flags & 8) != 0) {
settings.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(installs_count);
}
}
}
public static class TL_theme_layer131 extends TL_theme {
public static int constructor = 0x28f1114;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
title = stream.readString(exception);
if ((flags & 4) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 8) != 0) {
settings = TL_themeSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
installs_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(slug);
stream.writeString(title);
if ((flags & 4) != 0) {
document.serializeToStream(stream);
}
if ((flags & 8) != 0) {
settings.serializeToStream(stream);
}
stream.writeInt32(installs_count);
}
}
public static class TL_theme_layer106 extends TL_theme {
public static int constructor = 0xf7d90ce0;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
title = stream.readString(exception);
if ((flags & 4) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
installs_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(slug);
stream.writeString(title);
if ((flags & 4) != 0) {
document.serializeToStream(stream);
}
stream.writeInt32(installs_count);
}
}
public static class TL_themeDocumentNotModified_layer106 extends Theme {
public static int constructor = 0x483d270c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class updates_ChannelDifference extends TLObject {
public int flags;
public boolean isFinal;
public int pts;
public int timeout;
public ArrayList<Message> new_messages = new ArrayList<>();
public ArrayList<Update> other_updates = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public Dialog dialog;
public ArrayList<Message> messages = new ArrayList<>();
public static updates_ChannelDifference TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
updates_ChannelDifference result = null;
switch (constructor) {
case 0x3e11affb:
result = new TL_updates_channelDifferenceEmpty();
break;
case 0x2064674e:
result = new TL_updates_channelDifference();
break;
case 0xa4bcc6fe:
result = new TL_updates_channelDifferenceTooLong();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in updates_ChannelDifference", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_updates_channelDifferenceEmpty extends updates_ChannelDifference {
public static int constructor = 0x3e11affb;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
isFinal = (flags & 1) != 0;
pts = stream.readInt32(exception);
if ((flags & 2) != 0) {
timeout = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = isFinal ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(pts);
if ((flags & 2) != 0) {
stream.writeInt32(timeout);
}
}
}
public static class TL_updates_channelDifference extends updates_ChannelDifference {
public static int constructor = 0x2064674e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
isFinal = (flags & 1) != 0;
pts = stream.readInt32(exception);
if ((flags & 2) != 0) {
timeout = stream.readInt32(exception);
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
new_messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Update object = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
other_updates.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = isFinal ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(pts);
if ((flags & 2) != 0) {
stream.writeInt32(timeout);
}
stream.writeInt32(0x1cb5c415);
int count = new_messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
new_messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = other_updates.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
other_updates.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_updates_channelDifferenceTooLong extends updates_ChannelDifference {
public static int constructor = 0xa4bcc6fe;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
isFinal = (flags & 1) != 0;
if ((flags & 2) != 0) {
timeout = stream.readInt32(exception);
}
dialog = Dialog.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = isFinal ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(timeout);
}
dialog.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ChannelMessagesFilter extends TLObject {
public int flags;
public boolean exclude_new_messages;
public ArrayList<TL_messageRange> ranges = new ArrayList<>();
public static ChannelMessagesFilter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChannelMessagesFilter result = null;
switch (constructor) {
case 0x94d42ee7:
result = new TL_channelMessagesFilterEmpty();
break;
case 0xcd77d957:
result = new TL_channelMessagesFilter();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChannelMessagesFilter", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_sponsoredMessage extends TLObject {
public static int constructor = 0x2a3c381f;
public int flags;
public byte[] random_id;
public Peer from_id;
public String start_param;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public static TL_sponsoredMessage TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_sponsoredMessage.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_sponsoredMessage", constructor));
} else {
return null;
}
}
TL_sponsoredMessage result = new TL_sponsoredMessage();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
random_id = stream.readByteArray(exception);
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
start_param = stream.readString(exception);
}
message = stream.readString(exception);
if ((flags & 2) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeByteArray(random_id);
from_id.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeString(start_param);
}
stream.writeString(message);
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_account_authorizationForm extends TLObject {
public static int constructor = 0xad2e1cd8;
public int flags;
public ArrayList<SecureRequiredType> required_types = new ArrayList<>();
public ArrayList<TL_secureValue> values = new ArrayList<>();
public ArrayList<SecureValueError> errors = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public String privacy_policy_url;
public static TL_account_authorizationForm TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_authorizationForm.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_authorizationForm", constructor));
} else {
return null;
}
}
TL_account_authorizationForm result = new TL_account_authorizationForm();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureRequiredType object = SecureRequiredType.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
required_types.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_secureValue object = TL_secureValue.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
values.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
SecureValueError object = SecureValueError.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
errors.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
if ((flags & 1) != 0) {
privacy_policy_url = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = required_types.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
required_types.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = values.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
values.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = errors.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
errors.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeString(privacy_policy_url);
}
}
}
public static class TL_help_recentMeUrls extends TLObject {
public static int constructor = 0xe0310d7;
public ArrayList<RecentMeUrl> urls = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_help_recentMeUrls TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_recentMeUrls.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_recentMeUrls", constructor));
} else {
return null;
}
}
TL_help_recentMeUrls result = new TL_help_recentMeUrls();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
RecentMeUrl object = RecentMeUrl.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
urls.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = urls.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
urls.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_channelMessagesFilterEmpty extends ChannelMessagesFilter {
public static int constructor = 0x94d42ee7;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelMessagesFilter extends ChannelMessagesFilter {
public static int constructor = 0xcd77d957;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
exclude_new_messages = (flags & 2) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_messageRange object = TL_messageRange.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
ranges.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = exclude_new_messages ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = ranges.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
ranges.get(a).serializeToStream(stream);
}
}
}
public static class TL_bankCardOpenUrl extends TLObject {
public static int constructor = 0xf568028a;
public String url;
public String name;
public static TL_bankCardOpenUrl TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_bankCardOpenUrl.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_bankCardOpenUrl", constructor));
} else {
return null;
}
}
TL_bankCardOpenUrl result = new TL_bankCardOpenUrl();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeString(name);
}
}
public static class TL_contacts_resolvedPeer extends TLObject {
public static int constructor = 0x7f077ad9;
public Peer peer;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_contacts_resolvedPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contacts_resolvedPeer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contacts_resolvedPeer", constructor));
} else {
return null;
}
}
TL_contacts_resolvedPeer result = new TL_contacts_resolvedPeer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_inputSingleMedia extends TLObject {
public static int constructor = 0x1cc6e91f;
public int flags;
public InputMedia media;
public long random_id;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public static TL_inputSingleMedia TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputSingleMedia.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputSingleMedia", constructor));
} else {
return null;
}
}
TL_inputSingleMedia result = new TL_inputSingleMedia();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
media = InputMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
random_id = stream.readInt64(exception);
message = stream.readString(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
media.serializeToStream(stream);
stream.writeInt64(random_id);
stream.writeString(message);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_inputPhoneCall extends TLObject {
public static int constructor = 0x1e36fded;
public long id;
public long access_hash;
public static TL_inputPhoneCall TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputPhoneCall.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputPhoneCall", constructor));
} else {
return null;
}
}
TL_inputPhoneCall result = new TL_inputPhoneCall();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static abstract class WebDocument extends TLObject {
public String url;
public long access_hash;
public int size;
public String mime_type;
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
public static WebDocument TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
WebDocument result = null;
switch (constructor) {
case 0xf9c8bcc6:
result = new TL_webDocumentNoProxy();
break;
case 0xc61acbd8:
result = new TL_webDocument_layer81();
break;
case 0x1c570ed1:
result = new TL_webDocument();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in WebDocument", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_webDocumentNoProxy extends WebDocument {
public static int constructor = 0xf9c8bcc6;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
size = stream.readInt32(exception);
mime_type = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt32(size);
stream.writeString(mime_type);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_webDocument_layer81 extends TL_webDocument {
public static int constructor = 0xc61acbd8;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
access_hash = stream.readInt64(exception);
size = stream.readInt32(exception);
mime_type = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt64(access_hash);
stream.writeInt32(size);
stream.writeString(mime_type);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
stream.writeInt32(0);
}
}
public static class TL_webDocument extends WebDocument {
public static int constructor = 0x1c570ed1;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
access_hash = stream.readInt64(exception);
size = stream.readInt32(exception);
mime_type = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt64(access_hash);
stream.writeInt32(size);
stream.writeString(mime_type);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static abstract class help_PromoData extends TLObject {
public static help_PromoData TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_PromoData result = null;
switch (constructor) {
case 0x8c39793f:
result = new TL_help_promoData();
break;
case 0x98f6ac75:
result = new TL_help_promoDataEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_PromoData", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_promoData extends help_PromoData {
public static int constructor = 0x8c39793f;
public int flags;
public boolean proxy;
public int expires;
public Peer peer;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public String psa_type;
public String psa_message;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
proxy = (flags & 1) != 0;
expires = stream.readInt32(exception);
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
if ((flags & 2) != 0) {
psa_type = stream.readString(exception);
}
if ((flags & 4) != 0) {
psa_message = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = proxy ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(expires);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeString(psa_type);
}
if ((flags & 4) != 0) {
stream.writeString(psa_message);
}
}
}
public static class TL_help_promoDataEmpty extends help_PromoData {
public static int constructor = 0x98f6ac75;
public int expires;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
}
}
public static abstract class ChannelParticipant extends TLObject {
public Peer peer;
public int kicked_by;
public int date;
public TL_channelBannedRights_layer92 banned_rights_layer92;
public int inviter_id;
public int flags;
public boolean can_edit;
public boolean self;
public boolean left;
public int promoted_by;
public TL_channelAdminRights_layer92 admin_rights_layer92;
public TL_chatAdminRights admin_rights;
public TL_chatBannedRights banned_rights;
public String rank;
public static ChannelParticipant TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChannelParticipant result = null;
switch (constructor) {
case 0x1c0facaf:
result = new TL_channelParticipantBanned_layer125();
break;
case 0x1b03f006:
result = new TL_channelParticipantLeft();
break;
case 0xc3c6796b:
result = new TL_channelParticipantLeft_layer125();
break;
case 0x222c1886:
result = new TL_channelParticipantBanned_layer92();
break;
case 0xe3e2e1f9:
result = new TL_channelParticipantCreator_layer103();
break;
case 0x15ebac1d:
result = new TL_channelParticipant();
break;
case 0x8cc5e69a:
result = new TL_channelParticipantKicked_layer67();
break;
case 0xa3289a6d:
result = new TL_channelParticipantSelf();
break;
case 0xccbebbaf:
result = new TL_channelParticipantAdmin();
break;
case 0x808d15a4:
result = new TL_channelParticipantCreator_layer118();
break;
case 0x91057fef:
result = new TL_channelParticipantModerator_layer67();
break;
case 0x98192d61:
result = new TL_channelParticipantEditor_layer67();
break;
case 0x447dca4b:
result = new TL_channelParticipantCreator();
break;
case 0xa82fa898:
result = new TL_channelParticipantAdmin_layer92();
break;
case 0x5daa6e23:
result = new TL_channelParticipantAdmin_layer103();
break;
case 0x50a1dfd6:
result = new TL_channelParticipantBanned();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChannelParticipant", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channelParticipantBanned_layer125 extends TL_channelParticipantBanned {
public static int constructor = 0x1c0facaf;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
left = (flags & 1) != 0;
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
kicked_by = stream.readInt32(exception);
date = stream.readInt32(exception);
banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = left ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
stream.writeInt32(kicked_by);
stream.writeInt32(date);
banned_rights.serializeToStream(stream);
}
}
public static class TL_channelParticipantLeft extends ChannelParticipant {
public static int constructor = 0x1b03f006;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_channelParticipantLeft_layer125 extends TL_channelParticipantLeft {
public static int constructor = 0xc3c6796b;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
}
}
public static class TL_channelParticipantBanned extends ChannelParticipant {
public static int constructor = 0x50a1dfd6;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
left = (flags & 1) != 0;
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
kicked_by = stream.readInt32(exception);
date = stream.readInt32(exception);
banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = left ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(kicked_by);
stream.writeInt32(date);
banned_rights.serializeToStream(stream);
}
}
public static class TL_channelParticipantCreator_layer103 extends TL_channelParticipantCreator {
public static int constructor = 0xe3e2e1f9;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
}
}
public static class TL_channelParticipant extends ChannelParticipant {
public static int constructor = 0x15ebac1d;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
stream.writeInt32(date);
}
}
public static class TL_channelParticipantKicked_layer67 extends ChannelParticipant {
public static int constructor = 0x8cc5e69a;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
kicked_by = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
stream.writeInt32(kicked_by);
stream.writeInt32(date);
}
}
public static class TL_channelParticipantSelf extends ChannelParticipant {
public static int constructor = 0xa3289a6d;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
}
}
public static class TL_channelParticipantAdmin extends ChannelParticipant {
public static int constructor = 0xccbebbaf;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_edit = (flags & 1) != 0;
self = (flags & 2) != 0;
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
if ((flags & 2) != 0) {
inviter_id = stream.readInt32(exception);
}
promoted_by = stream.readInt32(exception);
date = stream.readInt32(exception);
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
rank = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_edit ? (flags | 1) : (flags &~ 1);
flags = self ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
if ((flags & 2) != 0) {
stream.writeInt32(inviter_id);
}
stream.writeInt32(promoted_by);
stream.writeInt32(date);
admin_rights.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeString(rank);
}
}
}
public static class TL_channelParticipantCreator_layer118 extends TL_channelParticipantCreator {
public static int constructor = 0x808d15a4;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
rank = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
if ((flags & 1) != 0) {
stream.writeString(rank);
}
}
}
public static class TL_channelParticipantCreator extends ChannelParticipant {
public static int constructor = 0x447dca4b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
rank = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
admin_rights.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeString(rank);
}
}
}
public static class TL_channelParticipantModerator_layer67 extends TL_channelParticipantAdmin {
public static int constructor = 0x91057fef;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
}
}
public static class TL_channelParticipantEditor_layer67 extends TL_channelParticipantAdmin {
public static int constructor = 0x98192d61;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(peer.user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
}
}
public static class TL_channelParticipantAdmin_layer92 extends TL_channelParticipantAdmin {
public static int constructor = 0xa82fa898;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_edit = (flags & 1) != 0;
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
promoted_by = stream.readInt32(exception);
date = stream.readInt32(exception);
admin_rights_layer92 = TL_channelAdminRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
admin_rights = Chat.mergeAdminRights(admin_rights_layer92);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_edit ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(promoted_by);
stream.writeInt32(date);
admin_rights_layer92.serializeToStream(stream);
}
}
public static class TL_channelParticipantAdmin_layer103 extends TL_channelParticipantAdmin {
public static int constructor = 0x5daa6e23;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
can_edit = (flags & 1) != 0;
self = (flags & 2) != 0;
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
if ((flags & 2) != 0) {
inviter_id = stream.readInt32(exception);
}
promoted_by = stream.readInt32(exception);
date = stream.readInt32(exception);
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_edit ? (flags | 1) : (flags &~ 1);
flags = self ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
if ((flags & 2) != 0) {
stream.writeInt32(inviter_id);
}
stream.writeInt32(promoted_by);
stream.writeInt32(date);
admin_rights.serializeToStream(stream);
}
}
public static abstract class InputStickeredMedia extends TLObject {
public static InputStickeredMedia TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputStickeredMedia result = null;
switch (constructor) {
case 0x438865b:
result = new TL_inputStickeredMediaDocument();
break;
case 0x4a992157:
result = new TL_inputStickeredMediaPhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputStickeredMedia", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputStickeredMediaDocument extends InputStickeredMedia {
public static int constructor = 0x438865b;
public InputDocument id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = InputDocument.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_inputStickeredMediaPhoto extends InputStickeredMedia {
public static int constructor = 0x4a992157;
public InputPhoto id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = InputPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static abstract class channels_ChannelParticipants extends TLObject {
public int count;
public ArrayList<ChannelParticipant> participants = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static channels_ChannelParticipants TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
channels_ChannelParticipants result = null;
switch (constructor) {
case 0x9ab0feaf:
result = new TL_channels_channelParticipants();
break;
case 0xf0173fe9:
result = new TL_channels_channelParticipantsNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in channels_ChannelParticipants", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channels_channelParticipants extends channels_ChannelParticipants {
public static int constructor = 0x9ab0feaf;
public int count;
public ArrayList<ChannelParticipant> participants = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
ChannelParticipant object = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_channels_channelParticipantsNotModified extends channels_ChannelParticipants {
public static int constructor = 0xf0173fe9;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class WallPaperSettings extends TLObject {
public int flags;
public boolean blur;
public boolean motion;
public int background_color;
public int second_background_color;
public int third_background_color;
public int fourth_background_color;
public int intensity;
public int rotation;
public static WallPaperSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
WallPaperSettings result = null;
switch (constructor) {
case 0xa12f40b8:
result = new TL_wallPaperSettings_layer106();
break;
case 0x5086cf8:
result = new TL_wallPaperSettings_layer128();
break;
case 0x1dc1bca4:
result = new TL_wallPaperSettings();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in WallPaperSettings", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_wallPaperSettings_layer106 extends TL_wallPaperSettings {
public static int constructor = 0xa12f40b8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blur = (flags & 2) != 0;
motion = (flags & 4) != 0;
if ((flags & 1) != 0) {
background_color = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
intensity = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blur ? (flags | 2) : (flags &~ 2);
flags = motion ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(background_color);
}
if ((flags & 8) != 0) {
stream.writeInt32(intensity);
}
}
}
public static class TL_wallPaperSettings_layer128 extends TL_wallPaperSettings {
public static int constructor = 0x5086cf8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blur = (flags & 2) != 0;
motion = (flags & 4) != 0;
if ((flags & 1) != 0) {
background_color = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
second_background_color = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
intensity = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
rotation = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blur ? (flags | 2) : (flags &~ 2);
flags = motion ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(background_color);
}
if ((flags & 16) != 0) {
stream.writeInt32(second_background_color);
}
if ((flags & 8) != 0) {
stream.writeInt32(intensity);
}
if ((flags & 16) != 0) {
stream.writeInt32(rotation);
}
}
}
public static class TL_wallPaperSettings extends WallPaperSettings {
public static int constructor = 0x1dc1bca4;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blur = (flags & 2) != 0;
motion = (flags & 4) != 0;
if ((flags & 1) != 0) {
background_color = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
second_background_color = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
third_background_color = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
fourth_background_color = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
intensity = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
rotation = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blur ? (flags | 2) : (flags &~ 2);
flags = motion ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(background_color);
}
if ((flags & 16) != 0) {
stream.writeInt32(second_background_color);
}
if ((flags & 32) != 0) {
stream.writeInt32(third_background_color);
}
if ((flags & 64) != 0) {
stream.writeInt32(fourth_background_color);
}
if ((flags & 8) != 0) {
stream.writeInt32(intensity);
}
if ((flags & 16) != 0) {
stream.writeInt32(rotation);
}
}
}
public static class TL_contacts_found extends TLObject {
public static int constructor = 0xb3134d9d;
public ArrayList<Peer> my_results = new ArrayList<>();
public ArrayList<Peer> results = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_contacts_found TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contacts_found.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contacts_found", constructor));
} else {
return null;
}
}
TL_contacts_found result = new TL_contacts_found();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Peer object = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
my_results.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Peer object = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
results.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = my_results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
my_results.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = results.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
results.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static abstract class ChatParticipants extends TLObject {
public int flags;
public int chat_id;
public ChatParticipant self_participant;
public ArrayList<ChatParticipant> participants = new ArrayList<>();
public int version;
public int admin_id;
public static ChatParticipants TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChatParticipants result = null;
switch (constructor) {
case 0xfc900c2b:
result = new TL_chatParticipantsForbidden();
break;
case 0x3f460fed:
result = new TL_chatParticipants();
break;
case 0x7841b415:
result = new TL_chatParticipants_old();
break;
case 0xfd2bb8a:
result = new TL_chatParticipantsForbidden_old();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChatParticipants", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_chatParticipantsForbidden extends ChatParticipants {
public static int constructor = 0xfc900c2b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
chat_id = stream.readInt32(exception);
if ((flags & 1) != 0) {
self_participant = ChatParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(chat_id);
if ((flags & 1) != 0) {
self_participant.serializeToStream(stream);
}
}
}
public static class TL_chatParticipants extends ChatParticipants {
public static int constructor = 0x3f460fed;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
ChatParticipant object = ChatParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeInt32(version);
}
}
public static class TL_chatParticipants_old extends TL_chatParticipants {
public static int constructor = 0x7841b415;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
admin_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
ChatParticipant object = ChatParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt32(admin_id);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeInt32(version);
}
}
public static class TL_chatParticipantsForbidden_old extends TL_chatParticipantsForbidden {
public static int constructor = 0xfd2bb8a;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_game extends TLObject {
public static int constructor = 0xbdf9653b;
public int flags;
public long id;
public long access_hash;
public String short_name;
public String title;
public String description;
public Photo photo;
public Document document;
public static TL_game TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_game.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_game", constructor));
} else {
return null;
}
}
TL_game result = new TL_game();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
short_name = stream.readString(exception);
title = stream.readString(exception);
description = stream.readString(exception);
photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(short_name);
stream.writeString(title);
stream.writeString(description);
photo.serializeToStream(stream);
if ((flags & 1) != 0) {
document.serializeToStream(stream);
}
}
}
public static abstract class DecryptedMessageMedia extends TLObject {
public int duration;
public String mime_type;
public int size;
public byte[] key;
public byte[] iv;
public double lat;
public double _long;
public String phone_number;
public String first_name;
public String last_name;
public int user_id;
public int thumb_w;
public int thumb_h;
public ArrayList<DocumentAttribute> attributes = new ArrayList<>();
public String caption;
public String url;
public int w;
public int h;
public String file_name;
public String title;
public String address;
public String provider;
public String venue_id;
public long id;
public long access_hash;
public int date;
public int dc_id;
public static DecryptedMessageMedia TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
DecryptedMessageMedia result = null;
switch (constructor) {
case 0x57e0a9cb:
result = new TL_decryptedMessageMediaAudio();
break;
case 0x35480a59:
result = new TL_decryptedMessageMediaGeoPoint();
break;
case 0x588a0a97:
result = new TL_decryptedMessageMediaContact();
break;
case 0x89f5c4a:
result = new TL_decryptedMessageMediaEmpty();
break;
case 0x7afe8ae2:
result = new TL_decryptedMessageMediaDocument();
break;
case 0xe50511d8:
result = new TL_decryptedMessageMediaWebPage();
break;
case 0xf1fa8d78:
result = new TL_decryptedMessageMediaPhoto();
break;
case 0x970c8c0e:
result = new TL_decryptedMessageMediaVideo();
break;
case 0xb095434b:
result = new TL_decryptedMessageMediaDocument_layer8();
break;
case 0x4cee6ef3:
result = new TL_decryptedMessageMediaVideo_layer8();
break;
case 0x8a0df56f:
result = new TL_decryptedMessageMediaVenue();
break;
case 0xfa95b0dd:
result = new TL_decryptedMessageMediaExternalDocument();
break;
case 0x524a415d:
result = new TL_decryptedMessageMediaVideo_layer17();
break;
case 0x6080758f:
result = new TL_decryptedMessageMediaAudio_layer8();
break;
case 0x32798a8c:
result = new TL_decryptedMessageMediaPhoto_layer8();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in DecryptedMessageMedia", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_decryptedMessageMediaAudio extends DecryptedMessageMedia {
public static int constructor = 0x57e0a9cb;
public void readParams(AbstractSerializedData stream, boolean exception) {
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_decryptedMessageMediaGeoPoint extends DecryptedMessageMedia {
public static int constructor = 0x35480a59;
public void readParams(AbstractSerializedData stream, boolean exception) {
lat = stream.readDouble(exception);
_long = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(lat);
stream.writeDouble(_long);
}
}
public static class TL_decryptedMessageMediaContact extends DecryptedMessageMedia {
public static int constructor = 0x588a0a97;
public void readParams(AbstractSerializedData stream, boolean exception) {
phone_number = stream.readString(exception);
first_name = stream.readString(exception);
last_name = stream.readString(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeInt32(user_id);
}
}
public static class TL_decryptedMessageMediaEmpty extends DecryptedMessageMedia {
public static int constructor = 0x89f5c4a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_decryptedMessageMediaDocument extends DecryptedMessageMedia {
public static int constructor = 0x7afe8ae2;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
caption = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeString(mime_type);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
stream.writeString(caption);
}
}
public static class TL_decryptedMessageMediaWebPage extends DecryptedMessageMedia {
public static int constructor = 0xe50511d8;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_decryptedMessageMediaPhoto extends DecryptedMessageMedia {
public static int constructor = 0xf1fa8d78;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
caption = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
stream.writeString(caption);
}
}
public static class TL_decryptedMessageMediaVideo extends DecryptedMessageMedia {
public static int constructor = 0x970c8c0e;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
caption = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
stream.writeString(caption);
}
}
public static class TL_decryptedMessageMediaDocument_layer8 extends TL_decryptedMessageMediaDocument {
public static int constructor = 0xb095434b;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
file_name = stream.readString(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeString(file_name);
stream.writeString(mime_type);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_decryptedMessageMediaVideo_layer8 extends TL_decryptedMessageMediaVideo {
public static int constructor = 0x4cee6ef3;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
duration = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeInt32(duration);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_decryptedMessageMediaVenue extends DecryptedMessageMedia {
public static int constructor = 0x8a0df56f;
public void readParams(AbstractSerializedData stream, boolean exception) {
lat = stream.readDouble(exception);
_long = stream.readDouble(exception);
title = stream.readString(exception);
address = stream.readString(exception);
provider = stream.readString(exception);
venue_id = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(lat);
stream.writeDouble(_long);
stream.writeString(title);
stream.writeString(address);
stream.writeString(provider);
stream.writeString(venue_id);
}
}
public static class TL_decryptedMessageMediaExternalDocument extends DecryptedMessageMedia {
public static int constructor = 0xfa95b0dd;
public PhotoSize thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
date = stream.readInt32(exception);
mime_type = stream.readString(exception);
size = stream.readInt32(exception);
thumb = PhotoSize.TLdeserialize(0, id, 0, stream, stream.readInt32(exception), exception);
dc_id = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
DocumentAttribute object = DocumentAttribute.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
attributes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeInt32(date);
stream.writeString(mime_type);
stream.writeInt32(size);
thumb.serializeToStream(stream);
stream.writeInt32(dc_id);
stream.writeInt32(0x1cb5c415);
int count = attributes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
attributes.get(a).serializeToStream(stream);
}
}
}
public static class TL_decryptedMessageMediaVideo_layer17 extends TL_decryptedMessageMediaVideo {
public static int constructor = 0x524a415d;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
duration = stream.readInt32(exception);
mime_type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeInt32(duration);
stream.writeString(mime_type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_decryptedMessageMediaAudio_layer8 extends TL_decryptedMessageMediaAudio {
public static int constructor = 0x6080758f;
public void readParams(AbstractSerializedData stream, boolean exception) {
duration = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(duration);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static class TL_decryptedMessageMediaPhoto_layer8 extends TL_decryptedMessageMediaPhoto {
public static int constructor = 0x32798a8c;
public byte[] thumb;
public void readParams(AbstractSerializedData stream, boolean exception) {
thumb = stream.readByteArray(exception);
thumb_w = stream.readInt32(exception);
thumb_h = stream.readInt32(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(thumb);
stream.writeInt32(thumb_w);
stream.writeInt32(thumb_h);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static abstract class EmojiKeyword extends TLObject {
public static EmojiKeyword TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
EmojiKeyword result = null;
switch (constructor) {
case 0x236df622:
result = new TL_emojiKeywordDeleted();
break;
case 0xd5b3b9f9:
result = new TL_emojiKeyword();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in EmojiKeyword", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_emojiKeywordDeleted extends EmojiKeyword {
public static int constructor = 0x236df622;
public String keyword;
public ArrayList<String> emoticons = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
keyword = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
emoticons.add(stream.readString(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(keyword);
stream.writeInt32(0x1cb5c415);
int count = emoticons.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(emoticons.get(a));
}
}
}
public static class TL_emojiKeyword extends EmojiKeyword {
public static int constructor = 0xd5b3b9f9;
public String keyword;
public ArrayList<String> emoticons = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
keyword = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
emoticons.add(stream.readString(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(keyword);
stream.writeInt32(0x1cb5c415);
int count = emoticons.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(emoticons.get(a));
}
}
}
public static class TL_account_autoDownloadSettings extends TLObject {
public static int constructor = 0x63cacf26;
public TL_autoDownloadSettings low;
public TL_autoDownloadSettings medium;
public TL_autoDownloadSettings high;
public static TL_account_autoDownloadSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_autoDownloadSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_autoDownloadSettings", constructor));
} else {
return null;
}
}
TL_account_autoDownloadSettings result = new TL_account_autoDownloadSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
low = TL_autoDownloadSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
medium = TL_autoDownloadSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
high = TL_autoDownloadSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
low.serializeToStream(stream);
medium.serializeToStream(stream);
high.serializeToStream(stream);
}
}
public static abstract class ChatParticipant extends TLObject {
public int user_id;
public int inviter_id;
public int date;
public static ChatParticipant TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChatParticipant result = null;
switch (constructor) {
case 0xc8d7493e:
result = new TL_chatParticipant();
break;
case 0xda13538a:
result = new TL_chatParticipantCreator();
break;
case 0xe2d6e436:
result = new TL_chatParticipantAdmin();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChatParticipant", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_chatParticipant extends ChatParticipant {
public static int constructor = 0xc8d7493e;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
}
}
public static class TL_chatParticipantCreator extends ChatParticipant {
public static int constructor = 0xda13538a;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
}
}
public static class TL_chatParticipantAdmin extends ChatParticipant {
public static int constructor = 0xe2d6e436;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
inviter_id = stream.readInt32(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt32(inviter_id);
stream.writeInt32(date);
}
}
public static class TL_webAuthorization extends TLObject {
public static int constructor = 0xcac943f2;
public long hash;
public int bot_id;
public String domain;
public String browser;
public String platform;
public int date_created;
public int date_active;
public String ip;
public String region;
public static TL_webAuthorization TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_webAuthorization.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_webAuthorization", constructor));
} else {
return null;
}
}
TL_webAuthorization result = new TL_webAuthorization();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt64(exception);
bot_id = stream.readInt32(exception);
domain = stream.readString(exception);
browser = stream.readString(exception);
platform = stream.readString(exception);
date_created = stream.readInt32(exception);
date_active = stream.readInt32(exception);
ip = stream.readString(exception);
region = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(hash);
stream.writeInt32(bot_id);
stream.writeString(domain);
stream.writeString(browser);
stream.writeString(platform);
stream.writeInt32(date_created);
stream.writeInt32(date_active);
stream.writeString(ip);
stream.writeString(region);
}
}
public static abstract class InputSecureFile extends TLObject {
public static InputSecureFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputSecureFile result = null;
switch (constructor) {
case 0x3334b0f0:
result = new TL_inputSecureFileUploaded();
break;
case 0x5367e5be:
result = new TL_inputSecureFile();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputSecureFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputSecureFileUploaded extends InputSecureFile {
public static int constructor = 0x3334b0f0;
public long id;
public int parts;
public String md5_checksum;
public byte[] file_hash;
public byte[] secret;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
parts = stream.readInt32(exception);
md5_checksum = stream.readString(exception);
file_hash = stream.readByteArray(exception);
secret = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(parts);
stream.writeString(md5_checksum);
stream.writeByteArray(file_hash);
stream.writeByteArray(secret);
}
}
public static class TL_inputSecureFile extends InputSecureFile {
public static int constructor = 0x5367e5be;
public long id;
public long access_hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
}
}
public static class TL_postAddress extends TLObject {
public static int constructor = 0x1e8caaeb;
public String street_line1;
public String street_line2;
public String city;
public String state;
public String country_iso2;
public String post_code;
public static TL_postAddress TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_postAddress.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_postAddress", constructor));
} else {
return null;
}
}
TL_postAddress result = new TL_postAddress();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
street_line1 = stream.readString(exception);
street_line2 = stream.readString(exception);
city = stream.readString(exception);
state = stream.readString(exception);
country_iso2 = stream.readString(exception);
post_code = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(street_line1);
stream.writeString(street_line2);
stream.writeString(city);
stream.writeString(state);
stream.writeString(country_iso2);
stream.writeString(post_code);
}
}
public static abstract class ChannelAdminLogEventAction extends TLObject {
public static ChannelAdminLogEventAction TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ChannelAdminLogEventAction result = null;
switch (constructor) {
case 0xdb9f9140:
result = new TL_channelAdminLogEventActionDiscardGroupCall();
break;
case 0xb1c3caa7:
result = new TL_channelAdminLogEventActionChangeStickerSet();
break;
case 0xf92424d2:
result = new TL_channelAdminLogEventActionParticipantMute();
break;
case 0x2df5fc0a:
result = new TL_channelAdminLogEventActionDefaultBannedRights();
break;
case 0xfe69018d:
result = new TL_channelAdminLogEventActionChangeTheme();
break;
case 0xf89777f2:
result = new TL_channelAdminLogEventActionParticipantLeave();
break;
case 0x709b2405:
result = new TL_channelAdminLogEventActionEditMessage();
break;
case 0xe90ebb59:
result = new TL_channelAdminLogEventActionExportedInviteEdit();
break;
case 0x6a4afc38:
result = new TL_channelAdminLogEventActionChangeUsername();
break;
case 0xe6b76ae:
result = new TL_channelAdminLogEventActionChangeLocation();
break;
case 0x434bd2af:
result = new TL_channelAdminLogEventActionChangePhoto();
break;
case 0xd5676710:
result = new TL_channelAdminLogEventActionParticipantToggleAdmin();
break;
case 0x53909779:
result = new TL_channelAdminLogEventActionToggleSlowMode();
break;
case 0x5cdada77:
result = new TL_channelAdminLogEventActionParticipantJoinByInvite();
break;
case 0x410a134e:
result = new TL_channelAdminLogEventActionExportedInviteRevoke();
break;
case 0x8f079643:
result = new TL_channelAdminLogEventActionStopPoll();
break;
case 0x5a50fca4:
result = new TL_channelAdminLogEventActionExportedInviteDelete();
break;
case 0x26ae0971:
result = new TL_channelAdminLogEventActionToggleSignatures();
break;
case 0x3e7f6847:
result = new TL_channelAdminLogEventActionParticipantVolume();
break;
case 0xe6d83d7e:
result = new TL_channelAdminLogEventActionParticipantToggleBan();
break;
case 0x183040d3:
result = new TL_channelAdminLogEventActionParticipantJoin();
break;
case 0x5f5c95f1:
result = new TL_channelAdminLogEventActionTogglePreHistoryHidden();
break;
case 0xe9e82c18:
result = new TL_channelAdminLogEventActionUpdatePinned();
break;
case 0x56d6a247:
result = new TL_channelAdminLogEventActionToggleGroupCallSetting();
break;
case 0xe31c34d8:
result = new TL_channelAdminLogEventActionParticipantInvite();
break;
case 0x55188a2e:
result = new TL_channelAdminLogEventActionChangeAbout();
break;
case 0x23209745:
result = new TL_channelAdminLogEventActionStartGroupCall();
break;
case 0xa26f881b:
result = new TL_channelAdminLogEventActionChangeLinkedChat();
break;
case 0x1b7907ae:
result = new TL_channelAdminLogEventActionToggleInvites();
break;
case 0xe64429c0:
result = new TL_channelAdminLogEventActionParticipantUnmute();
break;
case 0x42e047bb:
result = new TL_channelAdminLogEventActionDeleteMessage();
break;
case 0xe6dfb825:
result = new TL_channelAdminLogEventActionChangeTitle();
break;
case 0x6e941a38:
result = new TL_channelAdminLogEventActionChangeHistoryTTL();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ChannelAdminLogEventAction", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_channelAdminLogEventActionDiscardGroupCall extends ChannelAdminLogEventAction {
public static int constructor = 0xdb9f9140;
public TL_inputGroupCall call;
public void readParams(AbstractSerializedData stream, boolean exception) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeStickerSet extends ChannelAdminLogEventAction {
public static int constructor = 0xb1c3caa7;
public InputStickerSet prev_stickerset;
public InputStickerSet new_stickerset;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_stickerset = InputStickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
new_stickerset = InputStickerSet.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_stickerset.serializeToStream(stream);
new_stickerset.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionParticipantMute extends ChannelAdminLogEventAction {
public static int constructor = 0xf92424d2;
public TL_groupCallParticipant participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
participant = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionDefaultBannedRights extends ChannelAdminLogEventAction {
public static int constructor = 0x2df5fc0a;
public TL_chatBannedRights prev_banned_rights;
public TL_chatBannedRights new_banned_rights;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
new_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_banned_rights.serializeToStream(stream);
new_banned_rights.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeTheme extends ChannelAdminLogEventAction {
public static int constructor = 0xfe69018d;
public String prev_value;
public String new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readString(exception);
new_value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(prev_value);
stream.writeString(new_value);
}
}
public static class TL_channelAdminLogEventActionParticipantLeave extends ChannelAdminLogEventAction {
public static int constructor = 0xf89777f2;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelAdminLogEventActionEditMessage extends ChannelAdminLogEventAction {
public static int constructor = 0x709b2405;
public Message prev_message;
public Message new_message;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
new_message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_message.serializeToStream(stream);
new_message.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionExportedInviteEdit extends ChannelAdminLogEventAction {
public static int constructor = 0xe90ebb59;
public TL_chatInviteExported prev_invite;
public TL_chatInviteExported new_invite;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
new_invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_invite.serializeToStream(stream);
new_invite.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeUsername extends ChannelAdminLogEventAction {
public static int constructor = 0x6a4afc38;
public String prev_value;
public String new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readString(exception);
new_value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(prev_value);
stream.writeString(new_value);
}
}
public static class TL_channelAdminLogEventActionChangeLocation extends ChannelAdminLogEventAction {
public static int constructor = 0xe6b76ae;
public ChannelLocation prev_value;
public ChannelLocation new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
new_value = ChannelLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_value.serializeToStream(stream);
new_value.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangePhoto extends ChannelAdminLogEventAction {
public static int constructor = 0x434bd2af;
public Photo prev_photo;
public Photo new_photo;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
new_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_photo.serializeToStream(stream);
new_photo.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionParticipantToggleAdmin extends ChannelAdminLogEventAction {
public static int constructor = 0xd5676710;
public ChannelParticipant prev_participant;
public ChannelParticipant new_participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
new_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_participant.serializeToStream(stream);
new_participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionToggleSlowMode extends ChannelAdminLogEventAction {
public static int constructor = 0x53909779;
public int prev_value;
public int new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readInt32(exception);
new_value = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(prev_value);
stream.writeInt32(new_value);
}
}
public static class TL_channelAdminLogEventActionParticipantJoinByInvite extends ChannelAdminLogEventAction {
public static int constructor = 0x5cdada77;
public TL_chatInviteExported invite;
public void readParams(AbstractSerializedData stream, boolean exception) {
invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
invite.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionExportedInviteRevoke extends ChannelAdminLogEventAction {
public static int constructor = 0x410a134e;
public TL_chatInviteExported invite;
public void readParams(AbstractSerializedData stream, boolean exception) {
invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
invite.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionStopPoll extends ChannelAdminLogEventAction {
public static int constructor = 0x8f079643;
public Message message;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionExportedInviteDelete extends ChannelAdminLogEventAction {
public static int constructor = 0x5a50fca4;
public TL_chatInviteExported invite;
public void readParams(AbstractSerializedData stream, boolean exception) {
invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
invite.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionToggleSignatures extends ChannelAdminLogEventAction {
public static int constructor = 0x26ae0971;
public boolean new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
new_value = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(new_value);
}
}
public static class TL_channelAdminLogEventActionParticipantVolume extends ChannelAdminLogEventAction {
public static int constructor = 0x3e7f6847;
public TL_groupCallParticipant participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
participant = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionParticipantToggleBan extends ChannelAdminLogEventAction {
public static int constructor = 0xe6d83d7e;
public ChannelParticipant prev_participant;
public ChannelParticipant new_participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
new_participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
prev_participant.serializeToStream(stream);
new_participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionParticipantJoin extends ChannelAdminLogEventAction {
public static int constructor = 0x183040d3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channelAdminLogEventActionTogglePreHistoryHidden extends ChannelAdminLogEventAction {
public static int constructor = 0x5f5c95f1;
public boolean new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
new_value = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(new_value);
}
}
public static class TL_channelAdminLogEventActionUpdatePinned extends ChannelAdminLogEventAction {
public static int constructor = 0xe9e82c18;
public Message message;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionToggleGroupCallSetting extends ChannelAdminLogEventAction {
public static int constructor = 0x56d6a247;
public boolean join_muted;
public void readParams(AbstractSerializedData stream, boolean exception) {
join_muted = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(join_muted);
}
}
public static class TL_channelAdminLogEventActionParticipantInvite extends ChannelAdminLogEventAction {
public static int constructor = 0xe31c34d8;
public ChannelParticipant participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
participant = ChannelParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeAbout extends ChannelAdminLogEventAction {
public static int constructor = 0x55188a2e;
public String prev_value;
public String new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readString(exception);
new_value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(prev_value);
stream.writeString(new_value);
}
}
public static class TL_channelAdminLogEventActionStartGroupCall extends ChannelAdminLogEventAction {
public static int constructor = 0x23209745;
public TL_inputGroupCall call;
public void readParams(AbstractSerializedData stream, boolean exception) {
call = TL_inputGroupCall.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeLinkedChat extends ChannelAdminLogEventAction {
public static int constructor = 0xa26f881b;
public int prev_value;
public int new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readInt32(exception);
new_value = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(prev_value);
stream.writeInt32(new_value);
}
}
public static class TL_channelAdminLogEventActionToggleInvites extends ChannelAdminLogEventAction {
public static int constructor = 0x1b7907ae;
public boolean new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
new_value = stream.readBool(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(new_value);
}
}
public static class TL_channelAdminLogEventActionParticipantUnmute extends ChannelAdminLogEventAction {
public static int constructor = 0xe64429c0;
public TL_groupCallParticipant participant;
public void readParams(AbstractSerializedData stream, boolean exception) {
participant = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
participant.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionDeleteMessage extends ChannelAdminLogEventAction {
public static int constructor = 0x42e047bb;
public Message message;
public void readParams(AbstractSerializedData stream, boolean exception) {
message = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
message.serializeToStream(stream);
}
}
public static class TL_channelAdminLogEventActionChangeTitle extends ChannelAdminLogEventAction {
public static int constructor = 0xe6dfb825;
public String prev_value;
public String new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readString(exception);
new_value = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(prev_value);
stream.writeString(new_value);
}
}
public static class TL_channelAdminLogEventActionChangeHistoryTTL extends ChannelAdminLogEventAction {
public static int constructor = 0x6e941a38;
public int prev_value;
public int new_value;
public void readParams(AbstractSerializedData stream, boolean exception) {
prev_value = stream.readInt32(exception);
new_value = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(prev_value);
stream.writeInt32(new_value);
}
}
public static abstract class InputWebFileLocation extends TLObject {
public static InputWebFileLocation TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputWebFileLocation result = null;
switch (constructor) {
case 0x9f2221c9:
result = new TL_inputWebFileGeoPointLocation();
break;
case 0xc239d686:
result = new TL_inputWebFileLocation();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputWebFileLocation", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputWebFileGeoPointLocation extends InputWebFileLocation {
public static int constructor = 0x9f2221c9;
public InputGeoPoint geo_point;
public long access_hash;
public int w;
public int h;
public int zoom;
public int scale;
public void readParams(AbstractSerializedData stream, boolean exception) {
geo_point = InputGeoPoint.TLdeserialize(stream, stream.readInt32(exception), exception);
access_hash = stream.readInt64(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
zoom = stream.readInt32(exception);
scale = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
geo_point.serializeToStream(stream);
stream.writeInt64(access_hash);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(zoom);
stream.writeInt32(scale);
}
}
public static class TL_inputWebFileLocation extends InputWebFileLocation {
public static int constructor = 0xc239d686;
public String url;
public long access_hash;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt64(access_hash);
}
}
public static abstract class PeerLocated extends TLObject {
public static PeerLocated TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PeerLocated result = null;
switch (constructor) {
case 0xf8ec284b:
result = new TL_peerSelfLocated();
break;
case 0xca461b5d:
result = new TL_peerLocated();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PeerLocated", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_peerSelfLocated extends PeerLocated {
public static int constructor = 0xf8ec284b;
public int expires;
public void readParams(AbstractSerializedData stream, boolean exception) {
expires = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(expires);
}
}
public static class TL_peerLocated extends PeerLocated {
public static int constructor = 0xca461b5d;
public Peer peer;
public int expires;
public int distance;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
expires = stream.readInt32(exception);
distance = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(expires);
stream.writeInt32(distance);
}
}
public static class TL_statsPercentValue extends TLObject {
public static int constructor = 0xcbce2fe0;
public double part;
public double total;
public static TL_statsPercentValue TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_statsPercentValue.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_statsPercentValue", constructor));
} else {
return null;
}
}
TL_statsPercentValue result = new TL_statsPercentValue();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
part = stream.readDouble(exception);
total = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeDouble(part);
stream.writeDouble(total);
}
}
public static class TL_autoDownloadSettings extends TLObject {
public static int constructor = 0xe04232f3;
public int flags;
public boolean disabled;
public boolean video_preload_large;
public boolean audio_preload_next;
public boolean phonecalls_less_data;
public int photo_size_max;
public int video_size_max;
public int file_size_max;
public int video_upload_maxbitrate;
public static TL_autoDownloadSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_autoDownloadSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_autoDownloadSettings", constructor));
} else {
return null;
}
}
TL_autoDownloadSettings result = new TL_autoDownloadSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
disabled = (flags & 1) != 0;
video_preload_large = (flags & 2) != 0;
audio_preload_next = (flags & 4) != 0;
phonecalls_less_data = (flags & 8) != 0;
photo_size_max = stream.readInt32(exception);
video_size_max = stream.readInt32(exception);
file_size_max = stream.readInt32(exception);
video_upload_maxbitrate = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = disabled ? (flags | 1) : (flags &~ 1);
flags = video_preload_large ? (flags | 2) : (flags &~ 2);
flags = audio_preload_next ? (flags | 4) : (flags &~ 4);
flags = phonecalls_less_data ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeInt32(photo_size_max);
stream.writeInt32(video_size_max);
stream.writeInt32(file_size_max);
stream.writeInt32(video_upload_maxbitrate);
}
}
public static class TL_account_sentEmailCode extends TLObject {
public static int constructor = 0x811f854f;
public String email_pattern;
public int length;
public static TL_account_sentEmailCode TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_sentEmailCode.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_sentEmailCode", constructor));
} else {
return null;
}
}
TL_account_sentEmailCode result = new TL_account_sentEmailCode();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
email_pattern = stream.readString(exception);
length = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(email_pattern);
stream.writeInt32(length);
}
}
public static class TL_messages_inactiveChats extends TLObject {
public static int constructor = 0xa927fec5;
public ArrayList<Integer> dates = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_messages_inactiveChats TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_inactiveChats.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_inactiveChats", constructor));
} else {
return null;
}
}
TL_messages_inactiveChats result = new TL_messages_inactiveChats();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
dates.add(stream.readInt32(exception));
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = dates.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(dates.get(a));
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_channelAdminRights_layer92 extends TLObject {
public static int constructor = 0x5d7ceba5;
public int flags;
public boolean change_info;
public boolean post_messages;
public boolean edit_messages;
public boolean delete_messages;
public boolean ban_users;
public boolean invite_users;
public boolean pin_messages;
public boolean add_admins;
public boolean manage_call;
public static TL_channelAdminRights_layer92 TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channelAdminRights_layer92.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channelAdminRights_layer92", constructor));
} else {
return null;
}
}
TL_channelAdminRights_layer92 result = new TL_channelAdminRights_layer92();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
change_info = (flags & 1) != 0;
post_messages = (flags & 2) != 0;
edit_messages = (flags & 4) != 0;
delete_messages = (flags & 8) != 0;
ban_users = (flags & 16) != 0;
invite_users = (flags & 32) != 0;
pin_messages = (flags & 128) != 0;
add_admins = (flags & 512) != 0;
manage_call = (flags & 1024) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = change_info ? (flags | 1) : (flags &~ 1);
flags = post_messages ? (flags | 2) : (flags &~ 2);
flags = edit_messages ? (flags | 4) : (flags &~ 4);
flags = delete_messages ? (flags | 8) : (flags &~ 8);
flags = ban_users ? (flags | 16) : (flags &~ 16);
flags = invite_users ? (flags | 32) : (flags &~ 32);
flags = pin_messages ? (flags | 128) : (flags &~ 128);
flags = add_admins ? (flags | 512) : (flags &~ 512);
flags = manage_call ? (flags | 1024) : (flags &~ 1024);
stream.writeInt32(flags);
}
}
public static abstract class Chat extends TLObject {
public int id;
public String title;
public int date;
public int flags;
public boolean creator;
public boolean kicked;
public boolean deactivated;
public boolean left;
public boolean has_geo;
public boolean slowmode_enabled;
public ChatPhoto photo;
public int participants_count;
public int version;
public boolean broadcast;
public boolean megagroup;
public long access_hash;
public int until_date;
public boolean moderator;
public boolean verified;
public boolean restricted;
public boolean signatures;
public String username;
public boolean min;
public boolean scam;
public boolean has_link;
public boolean explicit_content;
public boolean call_active;
public boolean call_not_empty;
public boolean fake;
public boolean gigagroup;
public ArrayList<TL_restrictionReason> restriction_reason = new ArrayList<>();
public TL_channelAdminRights_layer92 admin_rights_layer92;
public TL_channelBannedRights_layer92 banned_rights_layer92;
public TL_chatAdminRights admin_rights;
public TL_chatBannedRights banned_rights;
public TL_chatBannedRights default_banned_rights;
public InputChannel migrated_to;
public static Chat TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Chat result = null;
switch (constructor) {
case 0xfb0ccc41:
result = new TL_chatForbidden_old();
break;
case 0x7312bc48:
result = new TL_chat_old2();
break;
case 0x3bda1bde:
result = new TL_chat();
break;
case 0x289da732:
result = new TL_channelForbidden();
break;
case 0x8537784f:
result = new TL_channelForbidden_layer67();
break;
case 0x4b1b7506:
result = new TL_channel_layer48();
break;
case 0x2d85832c:
result = new TL_channelForbidden_layer52();
break;
case 0x7328bdb:
result = new TL_chatForbidden();
break;
case 0xa14dca52:
result = new TL_channel_layer67();
break;
case 0x678e9587:
result = new TL_channel_old();
break;
case 0x6e9c9bc7:
result = new TL_chat_old();
break;
case 0x9ba2d800:
result = new TL_chatEmpty();
break;
case 0xcb44b1c:
result = new TL_channel_layer72();
break;
case 0x450b7115:
result = new TL_channel_layer77();
break;
case 0x4df30834:
result = new TL_channel_layer104();
break;
case 0xd31a961e:
result = new TL_channel();
break;
case 0xc88974ac:
result = new TL_channel_layer92();
break;
case 0xd91cdd54:
result = new TL_chat_layer92();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Chat", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
protected static TL_chatBannedRights mergeBannedRights(TL_channelBannedRights_layer92 rights) {
if (rights == null) {
return null;
}
TL_chatBannedRights newRights = new TL_chatBannedRights();
newRights.view_messages = rights.view_messages;
newRights.send_messages = rights.send_messages;
newRights.send_media = rights.send_media;
newRights.send_stickers = rights.send_stickers;
newRights.send_gifs = rights.send_gifs;
newRights.send_games = rights.send_games;
newRights.send_inline = rights.send_inline;
newRights.embed_links = rights.embed_links;
newRights.send_polls = rights.send_media;
newRights.change_info = true;
newRights.invite_users = true;
newRights.pin_messages = true;
newRights.until_date = rights.until_date;
return newRights;
}
protected static TL_chatAdminRights mergeAdminRights(TL_channelAdminRights_layer92 rights) {
if (rights == null) {
return null;
}
TL_chatAdminRights newRights = new TL_chatAdminRights();
newRights.change_info = rights.change_info;
newRights.post_messages = rights.post_messages;
newRights.edit_messages = rights.edit_messages;
newRights.delete_messages = rights.delete_messages;
newRights.ban_users = rights.ban_users;
newRights.invite_users = rights.invite_users;
newRights.pin_messages = rights.pin_messages;
newRights.add_admins = rights.add_admins;
return newRights;
}
}
public static class TL_chatForbidden_old extends TL_chatForbidden {
public static int constructor = 0xfb0ccc41;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
title = stream.readString(exception);
date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(title);
stream.writeInt32(date);
}
}
public static class TL_chat_old2 extends TL_chat {
public static int constructor = 0x7312bc48;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
deactivated = (flags & 32) != 0;
id = stream.readInt32(exception);
title = stream.readString(exception);
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
participants_count = stream.readInt32(exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = deactivated ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(title);
photo.serializeToStream(stream);
stream.writeInt32(participants_count);
stream.writeInt32(date);
stream.writeInt32(version);
}
}
public static class TL_chat extends Chat {
public static int constructor = 0x3bda1bde;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
deactivated = (flags & 32) != 0;
call_active = (flags & 8388608) != 0;
call_not_empty = (flags & 16777216) != 0;
id = stream.readInt32(exception);
title = stream.readString(exception);
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
participants_count = stream.readInt32(exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 64) != 0) {
migrated_to = InputChannel.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 262144) != 0) {
default_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = deactivated ? (flags | 32) : (flags &~ 32);
flags = call_active ? (flags | 8388608) : (flags &~ 8388608);
flags = call_not_empty ? (flags | 16777216) : (flags &~ 16777216);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(title);
photo.serializeToStream(stream);
stream.writeInt32(participants_count);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 64) != 0) {
migrated_to.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
admin_rights.serializeToStream(stream);
}
if ((flags & 262144) != 0) {
default_banned_rights.serializeToStream(stream);
}
}
}
public static class TL_channelForbidden extends Chat {
public static int constructor = 0x289da732;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
broadcast = (flags & 32) != 0;
megagroup = (flags & 256) != 0;
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
if ((flags & 65536) != 0) {
until_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = megagroup ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeString(title);
if ((flags & 65536) != 0) {
stream.writeInt32(until_date);
}
}
}
public static class TL_channelForbidden_layer67 extends TL_channelForbidden {
public static int constructor = 0x8537784f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
broadcast = (flags & 32) != 0;
megagroup = (flags & 256) != 0;
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = megagroup ? (flags | 256) : (flags &~ 256);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeString(title);
}
}
public static class TL_channel_layer48 extends TL_channel {
public static int constructor = 0x4b1b7506;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
moderator = (flags & 16) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = moderator ? (flags | 16) : (flags &~ 16);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
}
}
public static class TL_channelForbidden_layer52 extends TL_channelForbidden {
public static int constructor = 0x2d85832c;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeString(title);
}
}
public static class TL_chatForbidden extends Chat {
public static int constructor = 0x7328bdb;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(title);
}
}
public static class TL_channel_layer67 extends TL_channel {
public static int constructor = 0xa14dca52;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
moderator = (flags & 16) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = moderator ? (flags | 16) : (flags &~ 16);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
}
}
public static class TL_channel_old extends TL_channel {
public static int constructor = 0x678e9587;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
moderator = (flags & 16) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
explicit_content = (flags & 512) != 0;
id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = moderator ? (flags | 16) : (flags &~ 16);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = explicit_content ? (flags | 512) : (flags &~ 512);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt64(access_hash);
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
}
}
public static class TL_chat_old extends TL_chat {
public static int constructor = 0x6e9c9bc7;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
title = stream.readString(exception);
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
participants_count = stream.readInt32(exception);
date = stream.readInt32(exception);
left = stream.readBool(exception);
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeString(title);
photo.serializeToStream(stream);
stream.writeInt32(participants_count);
stream.writeInt32(date);
stream.writeBool(left);
stream.writeInt32(version);
}
}
public static class TL_channel extends Chat {
public static int constructor = 0xd31a961e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
left = (flags & 4) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
scam = (flags & 524288) != 0;
has_link = (flags & 1048576) != 0;
has_geo = (flags & 2097152) != 0;
slowmode_enabled = (flags & 4194304) != 0;
call_active = (flags & 8388608) != 0;
call_not_empty = (flags & 16777216) != 0;
fake = (flags & 33554432) != 0;
gigagroup = (flags & 67108864) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
if ((flags & 16384) != 0) {
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32768) != 0) {
banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 262144) != 0) {
default_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
participants_count = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = left ? (flags | 4) : (flags &~ 4);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
flags = scam ? (flags | 524288) : (flags &~ 524288);
flags = has_link ? (flags | 1048576) : (flags &~ 1048576);
flags = has_geo ? (flags | 2097152) : (flags &~ 2097152);
flags = slowmode_enabled ? (flags | 4194304) : (flags &~ 4194304);
flags = call_active ? (flags | 8388608) : (flags &~ 8388608);
flags = call_not_empty ? (flags | 16777216) : (flags &~ 16777216);
flags = fake ? (flags | 33554432) : (flags &~ 33554432);
flags = gigagroup ? (flags | 67108864) : (flags &~ 67108864);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
if ((flags & 16384) != 0) {
admin_rights.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
banned_rights.serializeToStream(stream);
}
if ((flags & 262144) != 0) {
default_banned_rights.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(participants_count);
}
}
}
public static class TL_channel_layer104 extends TL_channel {
public static int constructor = 0x4df30834;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
left = (flags & 4) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
scam = (flags & 524288) != 0;
has_link = (flags & 1048576) != 0;
has_geo = (flags & 2097152) != 0;
slowmode_enabled = (flags & 4194304) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
if ((flags & 16384) != 0) {
admin_rights = TL_chatAdminRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32768) != 0) {
banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 262144) != 0) {
default_banned_rights = TL_chatBannedRights.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 131072) != 0) {
participants_count = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = left ? (flags | 4) : (flags &~ 4);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
flags = scam ? (flags | 524288) : (flags &~ 524288);
flags = has_link ? (flags | 1048576) : (flags &~ 1048576);
flags = has_geo ? (flags | 2097152) : (flags &~ 2097152);
flags = slowmode_enabled ? (flags | 4194304) : (flags &~ 4194304);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
if ((flags & 16384) != 0) {
admin_rights.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
banned_rights.serializeToStream(stream);
}
if ((flags & 262144) != 0) {
default_banned_rights.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(participants_count);
}
}
}
public static class TL_channelParticipantBanned_layer92 extends TL_channelParticipantBanned {
public static int constructor = 0x222c1886;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
left = (flags & 1) != 0;
peer = new TLRPC.TL_peerUser();
peer.user_id = stream.readInt32(exception);
kicked_by = stream.readInt32(exception);
date = stream.readInt32(exception);
banned_rights_layer92 = TL_channelBannedRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
banned_rights = Chat.mergeBannedRights(banned_rights_layer92);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = left ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(peer.user_id);
stream.writeInt32(kicked_by);
stream.writeInt32(date);
banned_rights_layer92.serializeToStream(stream);
}
}
public static class TL_channel_layer77 extends TL_channel {
public static int constructor = 0x450b7115;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
left = (flags & 4) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
if ((flags & 16384) != 0) {
admin_rights_layer92 = TL_channelAdminRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
admin_rights = mergeAdminRights(admin_rights_layer92);
}
if ((flags & 32768) != 0) {
banned_rights_layer92 = TL_channelBannedRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
banned_rights = mergeBannedRights(banned_rights_layer92);
}
if ((flags & 131072) != 0) {
participants_count = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = left ? (flags | 4) : (flags &~ 4);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
if ((flags & 16384) != 0) {
admin_rights_layer92.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
banned_rights_layer92.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(participants_count);
}
}
}
public static class TL_channel_layer72 extends TL_channel {
public static int constructor = 0xcb44b1c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
left = (flags & 4) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
if ((flags & 16384) != 0) {
admin_rights_layer92 = TL_channelAdminRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
admin_rights = mergeAdminRights(admin_rights_layer92);
}
if ((flags & 32768) != 0) {
banned_rights_layer92 = TL_channelBannedRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
banned_rights = mergeBannedRights(banned_rights_layer92);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
if ((flags & 16384) != 0) {
admin_rights_layer92.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
banned_rights_layer92.serializeToStream(stream);
}
}
}
public static class TL_channel_layer92 extends TL_channel {
public static int constructor = 0xc88974ac;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
left = (flags & 4) != 0;
broadcast = (flags & 32) != 0;
verified = (flags & 128) != 0;
megagroup = (flags & 256) != 0;
restricted = (flags & 512) != 0;
signatures = (flags & 2048) != 0;
min = (flags & 4096) != 0;
id = stream.readInt32(exception);
if ((flags & 8192) != 0) {
access_hash = stream.readInt64(exception);
}
title = stream.readString(exception);
if ((flags & 64) != 0) {
username = stream.readString(exception);
}
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 512) != 0) {
stream.readString(exception);
}
if ((flags & 16384) != 0) {
admin_rights_layer92 = TL_channelAdminRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
admin_rights = mergeAdminRights(admin_rights_layer92);
}
if ((flags & 32768) != 0) {
banned_rights_layer92 = TL_channelBannedRights_layer92.TLdeserialize(stream, stream.readInt32(exception), exception);
banned_rights = mergeBannedRights(banned_rights_layer92);
}
if ((flags & 131072) != 0) {
participants_count = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = left ? (flags | 4) : (flags &~ 4);
flags = broadcast ? (flags | 32) : (flags &~ 32);
flags = verified ? (flags | 128) : (flags &~ 128);
flags = megagroup ? (flags | 256) : (flags &~ 256);
flags = restricted ? (flags | 512) : (flags &~ 512);
flags = signatures ? (flags | 2048) : (flags &~ 2048);
flags = min ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 8192) != 0) {
stream.writeInt64(access_hash);
}
stream.writeString(title);
if ((flags & 64) != 0) {
stream.writeString(username);
}
photo.serializeToStream(stream);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 512) != 0) {
stream.writeString("");
}
if ((flags & 16384) != 0) {
admin_rights_layer92.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
banned_rights_layer92.serializeToStream(stream);
}
if ((flags & 131072) != 0) {
stream.writeInt32(participants_count);
}
}
}
public static class TL_chat_layer92 extends TL_chat {
public static int constructor = 0xd91cdd54;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
kicked = (flags & 2) != 0;
left = (flags & 4) != 0;
deactivated = (flags & 32) != 0;
id = stream.readInt32(exception);
title = stream.readString(exception);
photo = ChatPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
participants_count = stream.readInt32(exception);
date = stream.readInt32(exception);
version = stream.readInt32(exception);
if ((flags & 64) != 0) {
migrated_to = InputChannel.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = kicked ? (flags | 2) : (flags &~ 2);
flags = left ? (flags | 4) : (flags &~ 4);
flags = deactivated ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(title);
photo.serializeToStream(stream);
stream.writeInt32(participants_count);
stream.writeInt32(date);
stream.writeInt32(version);
if ((flags & 64) != 0) {
migrated_to.serializeToStream(stream);
}
}
}
public static class TL_restrictionReason extends TLObject {
public static int constructor = 0xd072acb4;
public String platform;
public String reason;
public String text;
public static TL_restrictionReason TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_restrictionReason.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_restrictionReason", constructor));
} else {
return null;
}
}
TL_restrictionReason result = new TL_restrictionReason();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
platform = stream.readString(exception);
reason = stream.readString(exception);
text = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(platform);
stream.writeString(reason);
stream.writeString(text);
}
}
public static abstract class StickerSet extends TLObject {
public int flags;
public boolean installed;
public boolean archived;
public boolean official;
public boolean animated;
public boolean masks;
public long id;
public long access_hash;
public String title;
public String short_name;
public int count;
public int hash;
public int installed_date;
public ArrayList<PhotoSize> thumbs = new ArrayList<>();
public int thumb_dc_id;
public int thumb_version;
public static StickerSet TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
StickerSet result = null;
switch (constructor) {
case 0xa7a43b17:
result = new TL_stickerSet_old();
break;
case 0x5585a139:
result = new TL_stickerSet_layer96();
break;
case 0x6a90bcb7:
result = new TL_stickerSet_layer97();
break;
case 0xeeb46f27:
result = new TL_stickerSet_layer121();
break;
case 0x40e237a8:
result = new TL_stickerSet_layer126();
break;
case 0xcd303b41:
result = new TL_stickerSet_layer75();
break;
case 0xd7df217a:
result = new TL_stickerSet();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in StickerSet", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_stickerSet_old extends TL_stickerSet {
public static int constructor = 0xa7a43b17;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
}
}
public static class TL_stickerSet extends StickerSet {
public static int constructor = 0xd7df217a;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
animated = (flags & 32) != 0;
if ((flags & 1) != 0) {
installed_date = stream.readInt32(exception);
}
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, id, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
thumbs.add(object);
}
}
if ((flags & 16) != 0) {
thumb_dc_id = stream.readInt32(exception);
}
if ((flags & 16) != 0) {
thumb_version = stream.readInt32(exception);
}
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
flags = animated ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(installed_date);
}
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = thumbs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
thumbs.get(a).serializeToStream(stream);
}
}
if ((flags & 16) != 0) {
stream.writeInt32(thumb_dc_id);
}
if ((flags & 16) != 0) {
stream.writeInt32(thumb_version);
}
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static class TL_stickerSet_layer96 extends TL_stickerSet {
public static int constructor = 0x5585a139;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
if ((flags & 1) != 0) {
installed_date = stream.readInt32(exception);
}
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(installed_date);
}
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static class TL_stickerSet_layer97 extends TL_stickerSet {
public static int constructor = 0x6a90bcb7;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
if ((flags & 1) != 0) {
installed_date = stream.readInt32(exception);
}
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
if ((flags & 16) != 0) {
PhotoSize thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (thumb != null) {
thumbs.add(thumb);
}
}
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(installed_date);
}
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
if ((flags & 16) != 0) {
thumbs.get(0).serializeToStream(stream);
}
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static class TL_stickerSet_layer126 extends TL_stickerSet {
public static int constructor = 0x40e237a8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
animated = (flags & 32) != 0;
if ((flags & 1) != 0) {
installed_date = stream.readInt32(exception);
}
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
if ((flags & 16) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PhotoSize object = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
thumbs.add(object);
}
}
if ((flags & 16) != 0) {
thumb_dc_id = stream.readInt32(exception);
}
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
flags = animated ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(installed_date);
}
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
if ((flags & 16) != 0) {
stream.writeInt32(0x1cb5c415);
int count = thumbs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
thumbs.get(a).serializeToStream(stream);
}
}
if ((flags & 16) != 0) {
stream.writeInt32(thumb_dc_id);
}
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static class TL_stickerSet_layer121 extends TL_stickerSet {
public static int constructor = 0xeeb46f27;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
animated = (flags & 32) != 0;
if ((flags & 1) != 0) {
installed_date = stream.readInt32(exception);
}
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
if ((flags & 16) != 0) {
PhotoSize thumb = PhotoSize.TLdeserialize(0, 0, 0, stream, stream.readInt32(exception), exception);
if (thumb != null) {
thumbs.add(thumb);
}
}
if ((flags & 16) != 0) {
thumb_dc_id = stream.readInt32(exception);
}
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
flags = animated ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(installed_date);
}
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
if ((flags & 16) != 0) {
thumbs.get(0).serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(thumb_dc_id);
}
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static class TL_stickerSet_layer75 extends TL_stickerSet {
public static int constructor = 0xcd303b41;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
installed = (flags & 1) != 0;
archived = (flags & 2) != 0;
official = (flags & 4) != 0;
masks = (flags & 8) != 0;
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
title = stream.readString(exception);
short_name = stream.readString(exception);
count = stream.readInt32(exception);
hash = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = installed ? (flags | 1) : (flags &~ 1);
flags = archived ? (flags | 2) : (flags &~ 2);
flags = official ? (flags | 4) : (flags &~ 4);
flags = masks ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeString(title);
stream.writeString(short_name);
stream.writeInt32(count);
stream.writeInt32(hash);
}
}
public static abstract class storage_FileType extends TLObject {
public static storage_FileType TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
storage_FileType result = null;
switch (constructor) {
case 0xaa963b05:
result = new TL_storage_fileUnknown();
break;
case 0xb3cea0e4:
result = new TL_storage_fileMp4();
break;
case 0x1081464c:
result = new TL_storage_fileWebp();
break;
case 0xa4f63c0:
result = new TL_storage_filePng();
break;
case 0xcae1aadf:
result = new TL_storage_fileGif();
break;
case 0xae1e508d:
result = new TL_storage_filePdf();
break;
case 0x528a0677:
result = new TL_storage_fileMp3();
break;
case 0x7efe0e:
result = new TL_storage_fileJpeg();
break;
case 0x4b09ebbc:
result = new TL_storage_fileMov();
break;
case 0x40bc6f52:
result = new TL_storage_filePartial();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in storage_FileType", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_storage_fileUnknown extends storage_FileType {
public static int constructor = 0xaa963b05;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileMp4 extends storage_FileType {
public static int constructor = 0xb3cea0e4;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileWebp extends storage_FileType {
public static int constructor = 0x1081464c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_filePng extends storage_FileType {
public static int constructor = 0xa4f63c0;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileGif extends storage_FileType {
public static int constructor = 0xcae1aadf;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_filePdf extends storage_FileType {
public static int constructor = 0xae1e508d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileMp3 extends storage_FileType {
public static int constructor = 0x528a0677;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileJpeg extends storage_FileType {
public static int constructor = 0x7efe0e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_fileMov extends storage_FileType {
public static int constructor = 0x4b09ebbc;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_storage_filePartial extends storage_FileType {
public static int constructor = 0x40bc6f52;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class auth_CodeType extends TLObject {
public static auth_CodeType TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
auth_CodeType result = null;
switch (constructor) {
case 0x72a3158c:
result = new TL_auth_codeTypeSms();
break;
case 0x741cd3e3:
result = new TL_auth_codeTypeCall();
break;
case 0x226ccefb:
result = new TL_auth_codeTypeFlashCall();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in auth_CodeType", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_auth_codeTypeSms extends auth_CodeType {
public static int constructor = 0x72a3158c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_auth_codeTypeCall extends auth_CodeType {
public static int constructor = 0x741cd3e3;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_auth_codeTypeFlashCall extends auth_CodeType {
public static int constructor = 0x226ccefb;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class MessagesFilter extends TLObject {
public int flags;
public boolean missed;
public static MessagesFilter TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessagesFilter result = null;
switch (constructor) {
case 0xffc86587:
result = new TL_inputMessagesFilterGif();
break;
case 0x3751b49e:
result = new TL_inputMessagesFilterMusic();
break;
case 0x3a20ecb8:
result = new TL_inputMessagesFilterChatPhotos();
break;
case 0x9609a51c:
result = new TL_inputMessagesFilterPhotos();
break;
case 0x7ef0dd87:
result = new TL_inputMessagesFilterUrl();
break;
case 0x9eddf188:
result = new TL_inputMessagesFilterDocument();
break;
case 0x56e9f0e4:
result = new TL_inputMessagesFilterPhotoVideo();
break;
case 0xd95e73bb:
result = new TL_inputMessagesFilterPhotoVideoDocuments();
break;
case 0xe7026d0d:
result = new TL_inputMessagesFilterGeo();
break;
case 0x1bb00451:
result = new TL_inputMessagesFilterPinned();
break;
case 0xc1f8e69a:
result = new TL_inputMessagesFilterMyMentions();
break;
case 0x7a7c17a4:
result = new TL_inputMessagesFilterRoundVoice();
break;
case 0xe062db83:
result = new TL_inputMessagesFilterContacts();
break;
case 0x50f5c392:
result = new TL_inputMessagesFilterVoice();
break;
case 0x9fc00e65:
result = new TL_inputMessagesFilterVideo();
break;
case 0x80c99768:
result = new TL_inputMessagesFilterPhoneCalls();
break;
case 0x57e2f66c:
result = new TL_inputMessagesFilterEmpty();
break;
case 0xb549da53:
result = new TL_inputMessagesFilterRoundVideo();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessagesFilter", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputMessagesFilterGif extends MessagesFilter {
public static int constructor = 0xffc86587;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterMusic extends MessagesFilter {
public static int constructor = 0x3751b49e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterChatPhotos extends MessagesFilter {
public static int constructor = 0x3a20ecb8;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterPhotos extends MessagesFilter {
public static int constructor = 0x9609a51c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterUrl extends MessagesFilter {
public static int constructor = 0x7ef0dd87;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterDocument extends MessagesFilter {
public static int constructor = 0x9eddf188;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterPhotoVideo extends MessagesFilter {
public static int constructor = 0x56e9f0e4;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterPhotoVideoDocuments extends MessagesFilter {
public static int constructor = 0xd95e73bb;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterGeo extends MessagesFilter {
public static int constructor = 0xe7026d0d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterPinned extends MessagesFilter {
public static int constructor = 0x1bb00451;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterMyMentions extends MessagesFilter {
public static int constructor = 0xc1f8e69a;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterRoundVoice extends MessagesFilter {
public static int constructor = 0x7a7c17a4;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterVoice extends MessagesFilter {
public static int constructor = 0x50f5c392;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterContacts extends MessagesFilter {
public static int constructor = 0xe062db83;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterVideo extends MessagesFilter {
public static int constructor = 0x9fc00e65;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterPhoneCalls extends MessagesFilter {
public static int constructor = 0x80c99768;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
missed = (flags & 1) != 0;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = missed ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
}
}
public static class TL_inputMessagesFilterEmpty extends MessagesFilter {
public static int constructor = 0x57e2f66c;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputMessagesFilterRoundVideo extends MessagesFilter {
public static int constructor = 0xb549da53;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_phone_groupParticipants extends TLObject {
public static int constructor = 0xf47751b6;
public int count;
public ArrayList<TL_groupCallParticipant> participants = new ArrayList<>();
public String next_offset;
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public int version;
public static TL_phone_groupParticipants TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_phone_groupParticipants.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_phone_groupParticipants", constructor));
} else {
return null;
}
}
TL_phone_groupParticipants result = new TL_phone_groupParticipants();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_groupCallParticipant object = TL_groupCallParticipant.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
participants.add(object);
}
next_offset = stream.readString(exception);
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
version = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = participants.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
participants.get(a).serializeToStream(stream);
}
stream.writeString(next_offset);
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
stream.writeInt32(version);
}
}
public static abstract class PageListOrderedItem extends TLObject {
public static PageListOrderedItem TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PageListOrderedItem result = null;
switch (constructor) {
case 0x5e068047:
result = new TL_pageListOrderedItemText();
break;
case 0x98dd8936:
result = new TL_pageListOrderedItemBlocks();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PageListOrderedItem", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pageListOrderedItemText extends PageListOrderedItem {
public static int constructor = 0x5e068047;
public String num;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
num = stream.readString(exception);
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(num);
text.serializeToStream(stream);
}
}
public static class TL_pageListOrderedItemBlocks extends PageListOrderedItem {
public static int constructor = 0x98dd8936;
public String num;
public ArrayList<PageBlock> blocks = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
num = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(num);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_messageEmpty extends TLObject {
public static int constructor = 0x3f4e0648;
public static TL_messages_messageEmpty TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_messageEmpty.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_messageEmpty", constructor));
} else {
return null;
}
}
TL_messages_messageEmpty result = new TL_messages_messageEmpty();
result.readParams(stream, exception);
return result;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_secureCredentialsEncrypted extends TLObject {
public static int constructor = 0x33f0ea47;
public byte[] data;
public byte[] hash;
public byte[] secret;
public static TL_secureCredentialsEncrypted TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_secureCredentialsEncrypted.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_secureCredentialsEncrypted", constructor));
} else {
return null;
}
}
TL_secureCredentialsEncrypted result = new TL_secureCredentialsEncrypted();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
data = stream.readByteArray(exception);
hash = stream.readByteArray(exception);
secret = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(data);
stream.writeByteArray(hash);
stream.writeByteArray(secret);
}
}
public static abstract class MessageFwdHeader extends TLObject {
public int flags;
public boolean imported;
public Peer from_id;
public String from_name;
public int date;
public int channel_post;
public String post_author;
public Peer saved_from_peer;
public int saved_from_msg_id;
public String psa_type;
public static MessageFwdHeader TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessageFwdHeader result = null;
switch (constructor) {
case 0xc786ddcb:
result = new TL_messageFwdHeader_layer68();
break;
case 0x353a686b:
result = new TL_messageFwdHeader_layer118();
break;
case 0xec338270:
result = new TL_messageFwdHeader_layer112();
break;
case 0xfadff4ac:
result = new TL_messageFwdHeader_layer72();
break;
case 0x5f777dce:
result = new TL_messageFwdHeader();
break;
case 0x559ebe6d:
result = new TL_messageFwdHeader_layer96();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessageFwdHeader", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messageFwdHeader_layer68 extends TL_messageFwdHeader {
public static int constructor = 0xc786ddcb;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.user_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
if ((flags & 2) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(from_id.user_id);
}
stream.writeInt32(date);
if ((flags & 2) != 0) {
stream.writeInt32(from_id.channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
}
}
public static class TL_messageFwdHeader extends MessageFwdHeader {
public static int constructor = 0x5f777dce;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
imported = (flags & 128) != 0;
if ((flags & 1) != 0) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32) != 0) {
from_name = stream.readString(exception);
}
date = stream.readInt32(exception);
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 16) != 0) {
saved_from_peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
saved_from_msg_id = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
psa_type = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = imported ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
from_id.serializeToStream(stream);
}
if ((flags & 32) != 0) {
stream.writeString(from_name);
}
stream.writeInt32(date);
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
if ((flags & 8) != 0) {
stream.writeString(post_author);
}
if ((flags & 16) != 0) {
saved_from_peer.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(saved_from_msg_id);
}
if ((flags & 64) != 0) {
stream.writeString(psa_type);
}
}
}
public static class TL_messageFwdHeader_layer118 extends TL_messageFwdHeader {
public static int constructor = 0x353a686b;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
from_name = stream.readString(exception);
}
date = stream.readInt32(exception);
if ((flags & 2) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 16) != 0) {
saved_from_peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
saved_from_msg_id = stream.readInt32(exception);
}
if ((flags & 64) != 0) {
psa_type = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(from_id.user_id);
}
if ((flags & 32) != 0) {
stream.writeString(from_name);
}
stream.writeInt32(date);
if ((flags & 2) != 0) {
stream.writeInt32(from_id.channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
if ((flags & 8) != 0) {
stream.writeString(post_author);
}
if ((flags & 16) != 0) {
saved_from_peer.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(saved_from_msg_id);
}
if ((flags & 64) != 0) {
stream.writeString(psa_type);
}
}
}
public static class TL_messageFwdHeader_layer112 extends TL_messageFwdHeader {
public static int constructor = 0xec338270;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
if ((flags & 32) != 0) {
from_name = stream.readString(exception);
}
date = stream.readInt32(exception);
if ((flags & 2) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 16) != 0) {
saved_from_peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
saved_from_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(from_id.user_id);
}
if ((flags & 32) != 0) {
stream.writeString(from_name);
}
stream.writeInt32(date);
if ((flags & 2) != 0) {
stream.writeInt32(from_id.channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
if ((flags & 8) != 0) {
stream.writeString(post_author);
}
if ((flags & 16) != 0) {
saved_from_peer.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(saved_from_msg_id);
}
}
}
public static class TL_messageFwdHeader_layer72 extends TL_messageFwdHeader {
public static int constructor = 0xfadff4ac;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
if ((flags & 2) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
post_author = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(from_id.user_id);
}
stream.writeInt32(date);
if ((flags & 2) != 0) {
stream.writeInt32(from_id.channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
if ((flags & 8) != 0) {
stream.writeString(post_author);
}
}
}
public static class TL_messageFwdHeader_layer96 extends TL_messageFwdHeader {
public static int constructor = 0x559ebe6d;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
if ((flags & 2) != 0) {
from_id = new TLRPC.TL_peerChannel();
from_id.channel_id = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
channel_post = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 16) != 0) {
saved_from_peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
saved_from_msg_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(from_id.user_id);
}
stream.writeInt32(date);
if ((flags & 2) != 0) {
stream.writeInt32(from_id.channel_id);
}
if ((flags & 4) != 0) {
stream.writeInt32(channel_post);
}
if ((flags & 8) != 0) {
stream.writeString(post_author);
}
if ((flags & 16) != 0) {
saved_from_peer.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(saved_from_msg_id);
}
}
}
public static abstract class FileLocation extends TLObject {
public int dc_id;
public long volume_id;
public int local_id;
public long secret;
public byte[] file_reference;
public byte[] key;
public byte[] iv;
public static FileLocation TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
FileLocation result = null;
switch (constructor) {
case 0x7c596b46:
result = new TL_fileLocationUnavailable();
break;
case 0x53d69076:
result = new TL_fileLocation_layer82();
break;
case 0x91d11eb:
result = new TL_fileLocation_layer97();
break;
case 0xbc7fc6cd:
result = new TL_fileLocationToBeDeprecated();
break;
case 0x55555554:
result = new TL_fileEncryptedLocation();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in FileLocation", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_fileLocationUnavailable extends FileLocation {
public static int constructor = 0x7c596b46;
public void readParams(AbstractSerializedData stream, boolean exception) {
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
secret = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
stream.writeInt64(secret);
}
}
public static class TL_fileLocation_layer82 extends TL_fileLocation_layer97 {
public static int constructor = 0x53d69076;
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
secret = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
stream.writeInt64(secret);
}
}
public static class TL_fileLocation_layer97 extends FileLocation {
public static int constructor = 0x91d11eb;
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
secret = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
stream.writeInt64(secret);
stream.writeByteArray(file_reference);
}
}
public static class TL_fileLocationToBeDeprecated extends FileLocation {
public static int constructor = 0xbc7fc6cd;
public void readParams(AbstractSerializedData stream, boolean exception) {
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
}
}
public static class TL_fileEncryptedLocation extends FileLocation {
public static int constructor = 0x55555554;
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
volume_id = stream.readInt64(exception);
local_id = stream.readInt32(exception);
secret = stream.readInt64(exception);
key = stream.readByteArray(exception);
iv = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeInt64(volume_id);
stream.writeInt32(local_id);
stream.writeInt64(secret);
stream.writeByteArray(key);
stream.writeByteArray(iv);
}
}
public static abstract class messages_SavedGifs extends TLObject {
public int hash;
public ArrayList<Document> gifs = new ArrayList<>();
public static messages_SavedGifs TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_SavedGifs result = null;
switch (constructor) {
case 0xe8025ca2:
result = new TL_messages_savedGifsNotModified();
break;
case 0x2e0709a5:
result = new TL_messages_savedGifs();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_SavedGifs", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_savedGifsNotModified extends messages_SavedGifs {
public static int constructor = 0xe8025ca2;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_savedGifs extends messages_SavedGifs {
public static int constructor = 0x2e0709a5;
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
gifs.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = gifs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
gifs.get(a).serializeToStream(stream);
}
}
}
public static abstract class PhotoSize extends TLObject {
public String type;
public FileLocation location;
public int w;
public int h;
public int size;
public byte[] bytes;
public static PhotoSize TLdeserialize(long photo_id, long document_id, long sticker_set_id, AbstractSerializedData stream, int constructor, boolean exception) {
PhotoSize result = null;
switch (constructor) {
case 0xd8214d41:
result = new TL_photoPathSize();
break;
case 0x77bfb61b:
result = new TL_photoSize_layer127();
break;
case 0xe17e23c:
result = new TL_photoSizeEmpty();
break;
case 0x5aa86a51:
result = new TL_photoSizeProgressive_layer127();
break;
case 0xe0b0bc2e:
result = new TL_photoStrippedSize();
break;
case 0xe9a734fa:
result = new TL_photoCachedSize_layer127();
break;
case 0x75c78e60:
result = new TL_photoSize();
break;
case 0x21e1ad6:
result = new TL_photoCachedSize();
break;
case 0xfa3efb95:
result = new TL_photoSizeProgressive();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PhotoSize", constructor));
}
if (result != null) {
result.readParams(stream, exception);
if (result.location == null) {
if (!TextUtils.isEmpty(result.type) && (photo_id != 0 || document_id != 0 || sticker_set_id != 0)) {
result.location = new TL_fileLocationToBeDeprecated();
if (photo_id != 0) {
result.location.volume_id = -photo_id;
result.location.local_id = result.type.charAt(0);
} else if (document_id != 0) {
result.location.volume_id = -document_id;
result.location.local_id = 1000 + result.type.charAt(0);
} else if (sticker_set_id != 0) {
result.location.volume_id = -sticker_set_id;
result.location.local_id = 2000 + result.type.charAt(0);
}
} else {
result.location = new TL_fileLocationUnavailable();
}
}
}
return result;
}
}
public static class TL_photoStrippedSize extends PhotoSize {
public static int constructor = 0xe0b0bc2e;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
bytes = stream.readByteArray(exception);
w = h = 50;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
stream.writeByteArray(bytes);
}
}
public static class TL_photoSizeProgressive_layer127 extends TL_photoSizeProgressive {
public static int constructor = 0x5aa86a51;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
location = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
sizes.add(stream.readInt32(exception));
}
if (!sizes.isEmpty()) {
size = sizes.get(sizes.size() - 1);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
location.serializeToStream(stream);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(sizes.get(a));
}
}
}
public static class TL_photoSize_layer127 extends TL_photoSize {
public static int constructor = 0x77bfb61b;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
location = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
location.serializeToStream(stream);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
}
}
public static class TL_photoSizeEmpty extends PhotoSize {
public static int constructor = 0xe17e23c;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
}
}
public static class TL_photoCachedSize_layer127 extends TL_photoCachedSize {
public static int constructor = 0xe9a734fa;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
location = FileLocation.TLdeserialize(stream, stream.readInt32(exception), exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
bytes = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
location.serializeToStream(stream);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeByteArray(bytes);
}
}
public static class TL_photoSize extends PhotoSize {
public static int constructor = 0x75c78e60;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
size = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(size);
}
}
public static class TL_photoCachedSize extends PhotoSize {
public static int constructor = 0x21e1ad6;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
bytes = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeByteArray(bytes);
}
}
public static class TL_photoSizeProgressive extends PhotoSize {
public static int constructor = 0xfa3efb95;
public ArrayList<Integer> sizes = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
w = stream.readInt32(exception);
h = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
sizes.add(stream.readInt32(exception));
}
if (!sizes.isEmpty()) {
size = sizes.get(sizes.size() - 1);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
stream.writeInt32(w);
stream.writeInt32(h);
stream.writeInt32(0x1cb5c415);
int count = sizes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(sizes.get(a));
}
}
}
public static class TL_contactFound extends TLObject {
public static int constructor = 0xea879f95;
public int user_id;
public static TL_contactFound TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_contactFound.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_contactFound", constructor));
} else {
return null;
}
}
TL_contactFound result = new TL_contactFound();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
}
}
public static abstract class ExportedChatInvite extends TLObject {
public static ExportedChatInvite TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
ExportedChatInvite result = null;
switch (constructor) {
case 0x69df3769:
result = new TL_chatInviteEmpty_layer122();
break;
case 0x6e24fc9d:
result = new TL_chatInviteExported();
break;
case 0xfc2e05bc:
result = new TL_chatInviteExported_layer122();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in ExportedChatInvite", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_chatInviteEmpty_layer122 extends ExportedChatInvite {
public static int constructor = 0x69df3769;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_chatInviteExported extends ExportedChatInvite {
public static int constructor = 0x6e24fc9d;
public int flags;
public boolean revoked;
public boolean permanent;
public String link;
public int admin_id;
public int date;
public int start_date;
public int expire_date;
public int usage_limit;
public int usage;
public ArrayList<User> importers; //custom
public boolean expired; //custom
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
revoked = (flags & 1) != 0;
permanent = (flags & 32) != 0;
link = stream.readString(exception);
admin_id = stream.readInt32(exception);
date = stream.readInt32(exception);
if ((flags & 16) != 0) {
start_date = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
expire_date = stream.readInt32(exception);
}
if ((flags & 4) != 0) {
usage_limit = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
usage = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoked ? (flags | 1) : (flags &~ 1);
flags = permanent ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeString(link);
stream.writeInt32(admin_id);
stream.writeInt32(date);
if ((flags & 16) != 0) {
stream.writeInt32(start_date);
}
if ((flags & 2) != 0) {
stream.writeInt32(expire_date);
}
if ((flags & 4) != 0) {
stream.writeInt32(usage_limit);
}
if ((flags & 8) != 0) {
stream.writeInt32(usage);
}
}
}
public static class TL_chatInviteExported_layer122 extends TL_chatInviteExported {
public static int constructor = 0xfc2e05bc;
public void readParams(AbstractSerializedData stream, boolean exception) {
link = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(link);
}
}
public static abstract class InputFile extends TLObject {
public long id;
public int parts;
public String name;
public String md5_checksum;
public static InputFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputFile result = null;
switch (constructor) {
case 0xfa4f0bb5:
result = new TL_inputFileBig();
break;
case 0xf52ff27f:
result = new TL_inputFile();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputFileBig extends InputFile {
public static int constructor = 0xfa4f0bb5;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
parts = stream.readInt32(exception);
name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(parts);
stream.writeString(name);
}
}
public static class TL_inputFile extends InputFile {
public static int constructor = 0xf52ff27f;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
parts = stream.readInt32(exception);
name = stream.readString(exception);
md5_checksum = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt32(parts);
stream.writeString(name);
stream.writeString(md5_checksum);
}
}
public static class TL_account_webAuthorizations extends TLObject {
public static int constructor = 0xed56c9fc;
public ArrayList<TL_webAuthorization> authorizations = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static TL_account_webAuthorizations TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_webAuthorizations.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_webAuthorizations", constructor));
} else {
return null;
}
}
TL_account_webAuthorizations result = new TL_account_webAuthorizations();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_webAuthorization object = TL_webAuthorization.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
authorizations.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = authorizations.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
authorizations.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_updates_state extends TLObject {
public static int constructor = 0xa56c2a3e;
public int pts;
public int qts;
public int date;
public int seq;
public int unread_count;
public static TL_updates_state TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_updates_state.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_updates_state", constructor));
} else {
return null;
}
}
TL_updates_state result = new TL_updates_state();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
pts = stream.readInt32(exception);
qts = stream.readInt32(exception);
date = stream.readInt32(exception);
seq = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pts);
stream.writeInt32(qts);
stream.writeInt32(date);
stream.writeInt32(seq);
stream.writeInt32(unread_count);
}
}
public static class TL_reactionCount extends TLObject {
public static int constructor = 0x6fb250d1;
public int flags;
public boolean chosen;
public String reaction;
public int count;
public static TL_reactionCount TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_reactionCount.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_reactionCount", constructor));
} else {
return null;
}
}
TL_reactionCount result = new TL_reactionCount();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
chosen = (flags & 1) != 0;
reaction = stream.readString(exception);
count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = chosen ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(reaction);
stream.writeInt32(count);
}
}
public static abstract class UserFull extends TLObject {
public int flags;
public boolean blocked;
public boolean phone_calls_available;
public boolean phone_calls_private;
public boolean can_pin_message;
public boolean has_scheduled;
public boolean video_calls_available;
public User user;
public String about;
public TL_contacts_link_layer101 link;
public Photo profile_photo;
public PeerNotifySettings notify_settings;
public BotInfo bot_info;
public int pinned_msg_id;
public int common_chats_count;
public int folder_id;
public int ttl_period;
public TL_peerSettings settings;
public String theme_emoticon;
public static UserFull TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
UserFull result = null;
switch (constructor) {
case 0xd697ff05:
result = new TL_userFull();
break;
case 0x139a9a77:
result = new TL_userFull_layer131();
break;
case 0x745559cc:
result = new TL_userFull_layer101();
break;
case 0x8ea4a881:
result = new TL_userFull_layer98();
break;
case 0xedf17c12:
result = new TL_userFull_layer123();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in UserFull", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_userFull extends UserFull {
public static int constructor = 0xd697ff05;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blocked = (flags & 1) != 0;
phone_calls_available = (flags & 16) != 0;
phone_calls_private = (flags & 32) != 0;
can_pin_message = (flags & 128) != 0;
has_scheduled = (flags & 4096) != 0;
video_calls_available = (flags & 8192) != 0;
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
about = stream.readString(exception);
}
settings = TL_peerSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
profile_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
bot_info = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
common_chats_count = stream.readInt32(exception);
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
ttl_period = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
theme_emoticon = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blocked ? (flags | 1) : (flags &~ 1);
flags = phone_calls_available ? (flags | 16) : (flags &~ 16);
flags = phone_calls_private ? (flags | 32) : (flags &~ 32);
flags = can_pin_message ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 4096) : (flags &~ 4096);
flags = video_calls_available ? (flags | 8192) : (flags &~ 8192);
stream.writeInt32(flags);
user.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(about);
}
settings.serializeToStream(stream);
if ((flags & 4) != 0) {
profile_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8) != 0) {
bot_info.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
stream.writeInt32(common_chats_count);
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(ttl_period);
}
if ((flags & 32768) != 0) {
stream.writeString(theme_emoticon);
}
}
}
public static class TL_userFull_layer101 extends TL_userFull {
public static int constructor = 0x745559cc;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blocked = (flags & 1) != 0;
phone_calls_available = (flags & 16) != 0;
phone_calls_private = (flags & 32) != 0;
can_pin_message = (flags & 128) != 0;
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
about = stream.readString(exception);
}
link = TL_contacts_link_layer101.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
profile_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
bot_info = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
common_chats_count = stream.readInt32(exception);
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blocked ? (flags | 1) : (flags &~ 1);
flags = phone_calls_available ? (flags | 16) : (flags &~ 16);
flags = phone_calls_private ? (flags | 32) : (flags &~ 32);
flags = can_pin_message ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
user.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(about);
}
link.serializeToStream(stream);
if ((flags & 4) != 0) {
profile_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8) != 0) {
bot_info.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
stream.writeInt32(common_chats_count);
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
}
}
public static class TL_userFull_layer98 extends TL_userFull {
public static int constructor = 0x8ea4a881;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blocked = (flags & 1) != 0;
phone_calls_available = (flags & 16) != 0;
phone_calls_private = (flags & 32) != 0;
can_pin_message = (flags & 128) != 0;
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
about = stream.readString(exception);
}
link = TL_contacts_link_layer101.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
profile_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
bot_info = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
common_chats_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blocked ? (flags | 1) : (flags &~ 1);
flags = phone_calls_available ? (flags | 16) : (flags &~ 16);
flags = phone_calls_private ? (flags | 32) : (flags &~ 32);
flags = can_pin_message ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
user.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(about);
}
link.serializeToStream(stream);
if ((flags & 4) != 0) {
profile_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8) != 0) {
bot_info.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
stream.writeInt32(common_chats_count);
}
}
public static class TL_userFull_layer131 extends TL_userFull {
public static int constructor = 0x139a9a77;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blocked = (flags & 1) != 0;
phone_calls_available = (flags & 16) != 0;
phone_calls_private = (flags & 32) != 0;
can_pin_message = (flags & 128) != 0;
has_scheduled = (flags & 4096) != 0;
video_calls_available = (flags & 8192) != 0;
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
about = stream.readString(exception);
}
settings = TL_peerSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
profile_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
bot_info = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
common_chats_count = stream.readInt32(exception);
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
if ((flags & 16384) != 0) {
ttl_period = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blocked ? (flags | 1) : (flags &~ 1);
flags = phone_calls_available ? (flags | 16) : (flags &~ 16);
flags = phone_calls_private ? (flags | 32) : (flags &~ 32);
flags = can_pin_message ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 4096) : (flags &~ 4096);
flags = video_calls_available ? (flags | 8192) : (flags &~ 8192);
stream.writeInt32(flags);
user.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(about);
}
settings.serializeToStream(stream);
if ((flags & 4) != 0) {
profile_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8) != 0) {
bot_info.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
stream.writeInt32(common_chats_count);
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
if ((flags & 16384) != 0) {
stream.writeInt32(ttl_period);
}
}
}
public static class TL_userFull_layer123 extends TL_userFull {
public static int constructor = 0xedf17c12;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blocked = (flags & 1) != 0;
phone_calls_available = (flags & 16) != 0;
phone_calls_private = (flags & 32) != 0;
can_pin_message = (flags & 128) != 0;
has_scheduled = (flags & 4096) != 0;
video_calls_available = (flags & 8192) != 0;
user = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 2) != 0) {
about = stream.readString(exception);
}
settings = TL_peerSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
profile_photo = Photo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
bot_info = BotInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 64) != 0) {
pinned_msg_id = stream.readInt32(exception);
}
common_chats_count = stream.readInt32(exception);
if ((flags & 2048) != 0) {
folder_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blocked ? (flags | 1) : (flags &~ 1);
flags = phone_calls_available ? (flags | 16) : (flags &~ 16);
flags = phone_calls_private ? (flags | 32) : (flags &~ 32);
flags = can_pin_message ? (flags | 128) : (flags &~ 128);
flags = has_scheduled ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
user.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(about);
}
settings.serializeToStream(stream);
if ((flags & 4) != 0) {
profile_photo.serializeToStream(stream);
}
notify_settings.serializeToStream(stream);
if ((flags & 8) != 0) {
bot_info.serializeToStream(stream);
}
if ((flags & 64) != 0) {
stream.writeInt32(pinned_msg_id);
}
stream.writeInt32(common_chats_count);
if ((flags & 2048) != 0) {
stream.writeInt32(folder_id);
}
}
}
public static abstract class Updates extends TLObject {
public ArrayList<Update> updates = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public int date;
public int seq;
public int flags;
public boolean out;
public boolean mentioned;
public boolean media_unread;
public boolean silent;
public int id;
public int user_id;
public String message;
public int pts;
public int pts_count;
public MessageFwdHeader fwd_from;
public int via_bot_id;
public TL_messageReplyHeader reply_to;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public MessageMedia media;
public Update update;
public int from_id;
public int chat_id;
public int seq_start;
public int ttl_period;
public static Updates TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Updates result = null;
switch (constructor) {
case 0x74ae4240:
result = new TL_updates();
break;
case 0xfaeff833:
result = new TL_updateShortMessage();
break;
case 0x9015e101:
result = new TL_updateShortSentMessage();
break;
case 0x78d4dec1:
result = new TL_updateShort();
break;
case 0x1157b858:
result = new TL_updateShortChatMessage();
break;
case 0x725b04c3:
result = new TL_updatesCombined();
break;
case 0xe317af7e:
result = new TL_updatesTooLong();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Updates", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_updates extends Updates {
public static int constructor = 0x74ae4240;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Update object = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
updates.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
date = stream.readInt32(exception);
seq = stream.readInt32(exception);
}
}
public static class TL_updateShortMessage extends Updates {
public static int constructor = 0xfaeff833;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
message = stream.readString(exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
date = stream.readInt32(exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 33554432) != 0) {
ttl_period = stream.readInt32(exception);
}
}
}
public static class TL_updateShortSentMessage extends Updates {
public static int constructor = 0x9015e101;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
id = stream.readInt32(exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
date = stream.readInt32(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 33554432) != 0) {
ttl_period = stream.readInt32(exception);
}
}
}
public static class TL_updateShort extends Updates {
public static int constructor = 0x78d4dec1;
public void readParams(AbstractSerializedData stream, boolean exception) {
update = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
}
}
public static class TL_updateShortChatMessage extends Updates {
public static int constructor = 0x1157b858;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
id = stream.readInt32(exception);
from_id = stream.readInt32(exception);
chat_id = stream.readInt32(exception);
message = stream.readString(exception);
pts = stream.readInt32(exception);
pts_count = stream.readInt32(exception);
date = stream.readInt32(exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 33554432) != 0) {
ttl_period = stream.readInt32(exception);
}
}
}
public static class TL_updatesCombined extends Updates {
public static int constructor = 0x725b04c3;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Update object = Update.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
updates.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
date = stream.readInt32(exception);
seq_start = stream.readInt32(exception);
seq = stream.readInt32(exception);
}
}
public static class TL_updatesTooLong extends Updates {
public static int constructor = 0xe317af7e;
}
public static abstract class WallPaper extends TLObject {
public long id;
public int flags;
public boolean creator;
public boolean isDefault;
public boolean pattern;
public boolean dark;
public long access_hash;
public String slug;
public Document document;
public WallPaperSettings settings;
public static WallPaper TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
WallPaper result = null;
switch (constructor) {
case 0xa437c3ed:
result = new TL_wallPaper();
break;
case 0xf04f91ec:
result = new TL_wallPaper_layer94();
break;
case 0x8af40b25:
result = new TL_wallPaperNoFile_layer128();
break;
case 0xe0804116:
result = new TL_wallPaperNoFile();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in WallPaper", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_wallPaper extends WallPaper {
public static int constructor = 0xa437c3ed;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
pattern = (flags & 8) != 0;
dark = (flags & 16) != 0;
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
settings = WallPaperSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
flags = pattern ? (flags | 8) : (flags &~ 8);
flags = dark ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
stream.writeInt64(access_hash);
stream.writeString(slug);
document.serializeToStream(stream);
if ((flags & 4) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_wallPaper_layer94 extends TL_wallPaper {
public static int constructor = 0xf04f91ec;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(access_hash);
stream.writeString(slug);
document.serializeToStream(stream);
}
}
public static class TL_wallPaperNoFile_layer128 extends TL_wallPaperNoFile {
public static int constructor = 0x8af40b25;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
isDefault = (flags & 2) != 0;
dark = (flags & 16) != 0;
if ((flags & 4) != 0) {
settings = WallPaperSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = isDefault ? (flags | 2) : (flags &~ 2);
flags = dark ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
if ((flags & 4) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_wallPaperNoFile extends WallPaper {
public static int constructor = 0xe0804116;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
isDefault = (flags & 2) != 0;
dark = (flags & 16) != 0;
if ((flags & 4) != 0) {
settings = WallPaperSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = isDefault ? (flags | 2) : (flags &~ 2);
flags = dark ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
if ((flags & 4) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_paymentSavedCredentialsCard extends TLObject {
public static int constructor = 0xcdc27a1f;
public String id;
public String title;
public static TL_paymentSavedCredentialsCard TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_paymentSavedCredentialsCard.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_paymentSavedCredentialsCard", constructor));
} else {
return null;
}
}
TL_paymentSavedCredentialsCard result = new TL_paymentSavedCredentialsCard();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readString(exception);
title = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(id);
stream.writeString(title);
}
}
public static abstract class PageListItem extends TLObject {
public static PageListItem TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PageListItem result = null;
switch (constructor) {
case 0x25e073fc:
result = new TL_pageListItemBlocks();
break;
case 0xb92fb6cd:
result = new TL_pageListItemText();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PageListItem", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pageListItemBlocks extends PageListItem {
public static int constructor = 0x25e073fc;
public ArrayList<PageBlock> blocks = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
}
}
public static class TL_pageListItemText extends PageListItem {
public static int constructor = 0xb92fb6cd;
public RichText text;
public void readParams(AbstractSerializedData stream, boolean exception) {
text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
text.serializeToStream(stream);
}
}
public static class TL_stickerPack extends TLObject {
public static int constructor = 0x12b299d4;
public String emoticon;
public ArrayList<Long> documents = new ArrayList<>();
public static TL_stickerPack TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_stickerPack.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_stickerPack", constructor));
} else {
return null;
}
}
TL_stickerPack result = new TL_stickerPack();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
emoticon = stream.readString(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
documents.add(stream.readInt64(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
stream.writeInt32(0x1cb5c415);
int count = documents.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(documents.get(a));
}
}
}
public static class TL_inputEncryptedChat extends TLObject {
public static int constructor = 0xf141b5e1;
public int chat_id;
public long access_hash;
public static TL_inputEncryptedChat TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputEncryptedChat.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputEncryptedChat", constructor));
} else {
return null;
}
}
TL_inputEncryptedChat result = new TL_inputEncryptedChat();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeInt64(access_hash);
}
}
public static abstract class InputChatPhoto extends TLObject {
public static InputChatPhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputChatPhoto result = null;
switch (constructor) {
case 0x8953ad37:
result = new TL_inputChatPhoto();
break;
case 0x1ca48f57:
result = new TL_inputChatPhotoEmpty();
break;
case 0xc642724e:
result = new TL_inputChatUploadedPhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputChatPhoto", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputChatPhoto extends InputChatPhoto {
public static int constructor = 0x8953ad37;
public InputPhoto id;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = InputPhoto.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_inputChatPhotoEmpty extends InputChatPhoto {
public static int constructor = 0x1ca48f57;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputChatUploadedPhoto extends InputChatPhoto {
public static int constructor = 0xc642724e;
public int flags;
public InputFile file;
public InputFile video;
public double video_start_ts;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
file = InputFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
video = InputFile.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4) != 0) {
video_start_ts = stream.readDouble(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
file.serializeToStream(stream);
}
if ((flags & 2) != 0) {
video.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeDouble(video_start_ts);
}
}
}
public static class TL_nearestDc extends TLObject {
public static int constructor = 0x8e1a1775;
public String country;
public int this_dc;
public int nearest_dc;
public static TL_nearestDc TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_nearestDc.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_nearestDc", constructor));
} else {
return null;
}
}
TL_nearestDc result = new TL_nearestDc();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
country = stream.readString(exception);
this_dc = stream.readInt32(exception);
nearest_dc = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(country);
stream.writeInt32(this_dc);
stream.writeInt32(nearest_dc);
}
}
public static class TL_payments_savedInfo extends TLObject {
public static int constructor = 0xfb8fe43c;
public int flags;
public boolean has_saved_credentials;
public TL_paymentRequestedInfo saved_info;
public static TL_payments_savedInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_payments_savedInfo.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_payments_savedInfo", constructor));
} else {
return null;
}
}
TL_payments_savedInfo result = new TL_payments_savedInfo();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
has_saved_credentials = (flags & 2) != 0;
if ((flags & 1) != 0) {
saved_info = TL_paymentRequestedInfo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = has_saved_credentials ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
saved_info.serializeToStream(stream);
}
}
}
public static abstract class InputPhoto extends TLObject {
public long id;
public long access_hash;
public byte[] file_reference;
public static InputPhoto TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputPhoto result = null;
switch (constructor) {
case 0x1cd7bf0d:
result = new TL_inputPhotoEmpty();
break;
case 0x3bb3b94a:
result = new TL_inputPhoto();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputPhoto", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPhotoEmpty extends InputPhoto {
public static int constructor = 0x1cd7bf0d;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPhoto extends InputPhoto {
public static int constructor = 0x3bb3b94a;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
access_hash = stream.readInt64(exception);
file_reference = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
stream.writeInt64(access_hash);
stream.writeByteArray(file_reference);
}
}
public static class TL_importedContact extends TLObject {
public static int constructor = 0xd0028438;
public int user_id;
public long client_id;
public static TL_importedContact TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_importedContact.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_importedContact", constructor));
} else {
return null;
}
}
TL_importedContact result = new TL_importedContact();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
client_id = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt64(client_id);
}
}
public static class TL_chatOnlines extends TLObject {
public static int constructor = 0xf041e250;
public int onlines;
public static TL_chatOnlines TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_chatOnlines.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_chatOnlines", constructor));
} else {
return null;
}
}
TL_chatOnlines result = new TL_chatOnlines();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
onlines = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(onlines);
}
}
public static abstract class messages_RecentStickers extends TLObject {
public static messages_RecentStickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_RecentStickers result = null;
switch (constructor) {
case 0x22f3afb3:
result = new TL_messages_recentStickers();
break;
case 0xb17f890:
result = new TL_messages_recentStickersNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_RecentStickers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_recentStickers extends messages_RecentStickers {
public static int constructor = 0x22f3afb3;
public int hash;
public ArrayList<TL_stickerPack> packs = new ArrayList<>();
public ArrayList<Document> stickers = new ArrayList<>();
public ArrayList<Integer> dates = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_stickerPack object = TL_stickerPack.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
packs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
stickers.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
dates.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = packs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
packs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = dates.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(dates.get(a));
}
}
}
public static class TL_messages_recentStickersNotModified extends messages_RecentStickers {
public static int constructor = 0xb17f890;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_pageRelatedArticle extends TLObject {
public static int constructor = 0xb390dc08;
public int flags;
public String url;
public long webpage_id;
public String title;
public String description;
public long photo_id;
public String author;
public int published_date;
public static TL_pageRelatedArticle TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pageRelatedArticle.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pageRelatedArticle", constructor));
} else {
return null;
}
}
TL_pageRelatedArticle result = new TL_pageRelatedArticle();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
url = stream.readString(exception);
webpage_id = stream.readInt64(exception);
if ((flags & 1) != 0) {
title = stream.readString(exception);
}
if ((flags & 2) != 0) {
description = stream.readString(exception);
}
if ((flags & 4) != 0) {
photo_id = stream.readInt64(exception);
}
if ((flags & 8) != 0) {
author = stream.readString(exception);
}
if ((flags & 16) != 0) {
published_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(url);
stream.writeInt64(webpage_id);
if ((flags & 1) != 0) {
stream.writeString(title);
}
if ((flags & 2) != 0) {
stream.writeString(description);
}
if ((flags & 4) != 0) {
stream.writeInt64(photo_id);
}
if ((flags & 8) != 0) {
stream.writeString(author);
}
if ((flags & 16) != 0) {
stream.writeInt32(published_date);
}
}
}
public static class TL_accountDaysTTL extends TLObject {
public static int constructor = 0xb8d0afdf;
public int days;
public static TL_accountDaysTTL TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_accountDaysTTL.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_accountDaysTTL", constructor));
} else {
return null;
}
}
TL_accountDaysTTL result = new TL_accountDaysTTL();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
days = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(days);
}
}
public static abstract class messages_Stickers extends TLObject {
public static messages_Stickers TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_Stickers result = null;
switch (constructor) {
case 0xf1749a22:
result = new TL_messages_stickersNotModified();
break;
case 0xe4599bbd:
result = new TL_messages_stickers();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_Stickers", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_stickersNotModified extends messages_Stickers {
public static int constructor = 0xf1749a22;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_stickers extends messages_Stickers {
public static int constructor = 0xe4599bbd;
public int hash;
public ArrayList<Document> stickers = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Document object = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
stickers.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
stream.writeInt32(0x1cb5c415);
int count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
}
}
public static abstract class InputPeer extends TLObject {
public int user_id;
public int chat_id;
public int channel_id;
public long access_hash;
public static InputPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
InputPeer result = null;
switch (constructor) {
case 0x7da07ec9:
result = new TL_inputPeerSelf();
break;
case 0x7b8e7de6:
result = new TL_inputPeerUser();
break;
case 0x179be863:
result = new TL_inputPeerChat();
break;
case 0x17bae2e6:
result = new TL_inputPeerUserFromMessage();
break;
case 0x9c95f7bb:
result = new TL_inputPeerChannelFromMessage();
break;
case 0x20adaef8:
result = new TL_inputPeerChannel();
break;
case 0x7f3b18ea:
result = new TL_inputPeerEmpty();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in InputPeer", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_inputPeerSelf extends InputPeer {
public static int constructor = 0x7da07ec9;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_inputPeerUser extends InputPeer {
public static int constructor = 0x7b8e7de6;
public void readParams(AbstractSerializedData stream, boolean exception) {
user_id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(user_id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputPeerChat extends InputPeer {
public static int constructor = 0x179be863;
public void readParams(AbstractSerializedData stream, boolean exception) {
chat_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_inputPeerUserFromMessage extends InputPeer {
public static int constructor = 0x17bae2e6;
public InputPeer peer;
public int msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
user_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(user_id);
}
}
public static class TL_inputPeerChannelFromMessage extends InputPeer {
public static int constructor = 0x9c95f7bb;
public InputPeer peer;
public int msg_id;
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
msg_id = stream.readInt32(exception);
channel_id = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(channel_id);
}
}
public static class TL_inputPeerChannel extends InputPeer {
public static int constructor = 0x20adaef8;
public void readParams(AbstractSerializedData stream, boolean exception) {
channel_id = stream.readInt32(exception);
access_hash = stream.readInt64(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(channel_id);
stream.writeInt64(access_hash);
}
}
public static class TL_inputPeerEmpty extends InputPeer {
public static int constructor = 0x7f3b18ea;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class help_PassportConfig extends TLObject {
public static help_PassportConfig TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
help_PassportConfig result = null;
switch (constructor) {
case 0xbfb9f457:
result = new TL_help_passportConfigNotModified();
break;
case 0xa098d6af:
result = new TL_help_passportConfig();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in help_PassportConfig", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_help_passportConfigNotModified extends help_PassportConfig {
public static int constructor = 0xbfb9f457;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_passportConfig extends help_PassportConfig {
public static int constructor = 0xa098d6af;
public int hash;
public TL_dataJSON countries_langs;
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
countries_langs = TL_dataJSON.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
countries_langs.serializeToStream(stream);
}
}
public static class TL_phone_exportedGroupCallInvite extends TLObject {
public static int constructor = 0x204bd158;
public String link;
public static TL_phone_exportedGroupCallInvite TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_phone_exportedGroupCallInvite.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_phone_exportedGroupCallInvite", constructor));
} else {
return null;
}
}
TL_phone_exportedGroupCallInvite result = new TL_phone_exportedGroupCallInvite();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
link = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(link);
}
}
public static class TL_account_passwordInputSettings extends TLObject {
public static int constructor = 0xc23727c9;
public int flags;
public PasswordKdfAlgo new_algo;
public byte[] new_password_hash;
public String hint;
public String email;
public TL_secureSecretSettings new_secure_settings;
public static TL_account_passwordInputSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_passwordInputSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_passwordInputSettings", constructor));
} else {
return null;
}
}
TL_account_passwordInputSettings result = new TL_account_passwordInputSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
new_algo = PasswordKdfAlgo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 1) != 0) {
new_password_hash = stream.readByteArray(exception);
}
if ((flags & 1) != 0) {
hint = stream.readString(exception);
}
if ((flags & 2) != 0) {
email = stream.readString(exception);
}
if ((flags & 4) != 0) {
new_secure_settings = TL_secureSecretSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
new_algo.serializeToStream(stream);
}
if ((flags & 1) != 0) {
stream.writeByteArray(new_password_hash);
}
if ((flags & 1) != 0) {
stream.writeString(hint);
}
if ((flags & 2) != 0) {
stream.writeString(email);
}
if ((flags & 4) != 0) {
new_secure_settings.serializeToStream(stream);
}
}
}
public static class TL_dcOption extends TLObject {
public static int constructor = 0x18b7a10d;
public int flags;
public boolean ipv6;
public boolean media_only;
public boolean tcpo_only;
public boolean cdn;
public boolean isStatic;
public int id;
public String ip_address;
public int port;
public byte[] secret;
public static TL_dcOption TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_dcOption.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_dcOption", constructor));
} else {
return null;
}
}
TL_dcOption result = new TL_dcOption();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
ipv6 = (flags & 1) != 0;
media_only = (flags & 2) != 0;
tcpo_only = (flags & 4) != 0;
cdn = (flags & 8) != 0;
isStatic = (flags & 16) != 0;
id = stream.readInt32(exception);
ip_address = stream.readString(exception);
port = stream.readInt32(exception);
if ((flags & 1024) != 0) {
secret = stream.readByteArray(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = ipv6 ? (flags | 1) : (flags &~ 1);
flags = media_only ? (flags | 2) : (flags &~ 2);
flags = tcpo_only ? (flags | 4) : (flags &~ 4);
flags = cdn ? (flags | 8) : (flags &~ 8);
flags = isStatic ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeString(ip_address);
stream.writeInt32(port);
if ((flags & 1024) != 0) {
stream.writeByteArray(secret);
}
}
}
public static class TL_pageTableRow extends TLObject {
public static int constructor = 0xe0c0c5e5;
public ArrayList<TL_pageTableCell> cells = new ArrayList<>();
public static TL_pageTableRow TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_pageTableRow.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_pageTableRow", constructor));
} else {
return null;
}
}
TL_pageTableRow result = new TL_pageTableRow();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_pageTableCell object = TL_pageTableCell.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
cells.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = cells.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
cells.get(a).serializeToStream(stream);
}
}
}
public static class TL_emojiURL extends TLObject {
public static int constructor = 0xa575739d;
public String url;
public static TL_emojiURL TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_emojiURL.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_emojiURL", constructor));
} else {
return null;
}
}
TL_emojiURL result = new TL_emojiURL();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
}
}
public static class TL_decryptedMessageLayer extends TLObject {
public static int constructor = 0x1be31789;
public byte[] random_bytes;
public int layer;
public int in_seq_no;
public int out_seq_no;
public DecryptedMessage message;
public static TL_decryptedMessageLayer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_decryptedMessageLayer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_decryptedMessageLayer", constructor));
} else {
return null;
}
}
TL_decryptedMessageLayer result = new TL_decryptedMessageLayer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
random_bytes = stream.readByteArray(exception);
layer = stream.readInt32(exception);
in_seq_no = stream.readInt32(exception);
out_seq_no = stream.readInt32(exception);
message = DecryptedMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(random_bytes);
stream.writeInt32(layer);
stream.writeInt32(in_seq_no);
stream.writeInt32(out_seq_no);
message.serializeToStream(stream);
}
}
public static class TL_groupCallParticipant extends TLObject {
public static int constructor = 0xeba636fe;
public int flags;
public boolean muted;
public boolean left;
public boolean can_self_unmute;
public boolean just_joined;
public boolean versioned;
public boolean min;
public boolean muted_by_you;
public boolean volume_by_admin;
public boolean self;
public boolean video_joined;
public Peer peer;
public int date;
public int active_date;
public int source;
public int volume;
public String about;
public long raise_hand_rating;
public TL_groupCallParticipantVideo video;
public TL_groupCallParticipantVideo presentation;
public long lastSpeakTime; //custom;
public float amplitude; //custom;
public boolean hasVoice; //custom;
public boolean hasVoiceDelayed; //custom;
public long lastVoiceUpdateTime; //custom;
public long lastActiveDate; //custom
public long lastVisibleDate; //custom
public int lastTypingDate; //custom
public long lastRaiseHandDate; //custom
public String videoEndpoint; //custom
public String presentationEndpoint; //custom
public int videoIndex;//custom
public int hasPresentationFrame;//custom;
public int hasCameraFrame;//custom;
public static TL_groupCallParticipant TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_groupCallParticipant.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_groupCallParticipant", constructor));
} else {
return null;
}
}
TL_groupCallParticipant result = new TL_groupCallParticipant();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
muted = (flags & 1) != 0;
left = (flags & 2) != 0;
can_self_unmute = (flags & 4) != 0;
just_joined = (flags & 16) != 0;
versioned = (flags & 32) != 0;
min = (flags & 256) != 0;
muted_by_you = (flags & 512) != 0;
volume_by_admin = (flags & 1024) != 0;
self = (flags & 4096) != 0;
video_joined = (flags & 32768) != 0;
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
if ((flags & 8) != 0) {
active_date = stream.readInt32(exception);
}
source = stream.readInt32(exception);
if ((flags & 128) != 0) {
volume = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
about = stream.readString(exception);
}
if ((flags & 8192) != 0) {
raise_hand_rating = stream.readInt64(exception);
}
if ((flags & 64) != 0) {
video = TL_groupCallParticipantVideo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16384) != 0) {
presentation = TL_groupCallParticipantVideo.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = muted ? (flags | 1) : (flags &~ 1);
flags = left ? (flags | 2) : (flags &~ 2);
flags = can_self_unmute ? (flags | 4) : (flags &~ 4);
flags = just_joined ? (flags | 16) : (flags &~ 16);
flags = versioned ? (flags | 32) : (flags &~ 32);
flags = min ? (flags | 256) : (flags &~ 256);
flags = muted_by_you ? (flags | 512) : (flags &~ 512);
flags = volume_by_admin ? (flags | 1024) : (flags &~ 1024);
flags = self ? (flags | 4096) : (flags &~ 4096);
flags = video_joined ? (flags | 32768) : (flags &~ 32768);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(date);
if ((flags & 8) != 0) {
stream.writeInt32(active_date);
}
stream.writeInt32(source);
if ((flags & 128) != 0) {
stream.writeInt32(volume);
}
if ((flags & 2048) != 0) {
stream.writeString(about);
}
if ((flags & 8192) != 0) {
stream.writeInt64(raise_hand_rating);
}
if ((flags & 64) != 0) {
video.serializeToStream(stream);
}
if ((flags & 16384) != 0) {
presentation.serializeToStream(stream);
}
}
}
public static class TL_fileHash extends TLObject {
public static int constructor = 0x6242c773;
public int offset;
public int limit;
public byte[] hash;
public static TL_fileHash TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_fileHash.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_fileHash", constructor));
} else {
return null;
}
}
TL_fileHash result = new TL_fileHash();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
offset = stream.readInt32(exception);
limit = stream.readInt32(exception);
hash = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(limit);
stream.writeByteArray(hash);
}
}
public static class TL_messages_peerDialogs extends TLObject {
public static int constructor = 0x3371c354;
public ArrayList<Dialog> dialogs = new ArrayList<>();
public ArrayList<Message> messages = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public TL_updates_state state;
public static TL_messages_peerDialogs TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_peerDialogs.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_peerDialogs", constructor));
} else {
return null;
}
}
TL_messages_peerDialogs result = new TL_messages_peerDialogs();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Dialog object = Dialog.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
dialogs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
state = TL_updates_state.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = dialogs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
dialogs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
state.serializeToStream(stream);
}
}
public static class TL_topPeer extends TLObject {
public static int constructor = 0xedcdc05b;
public Peer peer;
public double rating;
public static TL_topPeer TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_topPeer.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_topPeer", constructor));
} else {
return null;
}
}
TL_topPeer result = new TL_topPeer();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
rating = stream.readDouble(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeDouble(rating);
}
}
public static abstract class account_ResetPasswordResult extends TLObject {
public static account_ResetPasswordResult TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
account_ResetPasswordResult result = null;
switch (constructor) {
case 0xe3779861:
result = new TL_account_resetPasswordFailedWait();
break;
case 0xe9effc7d:
result = new TL_account_resetPasswordRequestedWait();
break;
case 0xe926d63e:
result = new TL_account_resetPasswordOk();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in account_ResetPasswordResult", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_account_resetPasswordFailedWait extends account_ResetPasswordResult {
public static int constructor = 0xe3779861;
public int retry_date;
public void readParams(AbstractSerializedData stream, boolean exception) {
retry_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(retry_date);
}
}
public static class TL_account_resetPasswordRequestedWait extends account_ResetPasswordResult {
public static int constructor = 0xe9effc7d;
public int until_date;
public void readParams(AbstractSerializedData stream, boolean exception) {
until_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(until_date);
}
}
public static class TL_account_resetPasswordOk extends account_ResetPasswordResult {
public static int constructor = 0xe926d63e;
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static abstract class messages_Dialogs extends TLObject {
public int count;
public ArrayList<Dialog> dialogs = new ArrayList<>();
public ArrayList<Message> messages = new ArrayList<>();
public ArrayList<Chat> chats = new ArrayList<>();
public ArrayList<User> users = new ArrayList<>();
public static messages_Dialogs TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
messages_Dialogs result = null;
switch (constructor) {
case 0x15ba6c40:
result = new TL_messages_dialogs();
break;
case 0x71e094f3:
result = new TL_messages_dialogsSlice();
break;
case 0xf0e3e596:
result = new TL_messages_dialogsNotModified();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in messages_Dialogs", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_messages_dialogs extends messages_Dialogs {
public static int constructor = 0x15ba6c40;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Dialog object = Dialog.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
dialogs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = dialogs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
dialogs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_dialogsSlice extends messages_Dialogs {
public static int constructor = 0x71e094f3;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Dialog object = Dialog.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
dialogs.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Message object = Message.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
messages.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
Chat object = Chat.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
chats.add(object);
}
magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
users.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
stream.writeInt32(0x1cb5c415);
int count = dialogs.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
dialogs.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = messages.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
messages.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = chats.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
chats.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_dialogsNotModified extends messages_Dialogs {
public static int constructor = 0xf0e3e596;
public void readParams(AbstractSerializedData stream, boolean exception) {
count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(count);
}
}
public static class TL_account_authorizations extends TLObject {
public static int constructor = 0x1250abde;
public ArrayList<TL_authorization> authorizations = new ArrayList<>();
public static TL_account_authorizations TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_account_authorizations.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_account_authorizations", constructor));
} else {
return null;
}
}
TL_account_authorizations result = new TL_account_authorizations();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_authorization object = TL_authorization.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
authorizations.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = authorizations.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
authorizations.get(a).serializeToStream(stream);
}
}
}
public static class TL_paymentRequestedInfo extends TLObject {
public static int constructor = 0x909c3f94;
public int flags;
public String name;
public String phone;
public String email;
public TL_postAddress shipping_address;
public static TL_paymentRequestedInfo TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_paymentRequestedInfo.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_paymentRequestedInfo", constructor));
} else {
return null;
}
}
TL_paymentRequestedInfo result = new TL_paymentRequestedInfo();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
if ((flags & 1) != 0) {
name = stream.readString(exception);
}
if ((flags & 2) != 0) {
phone = stream.readString(exception);
}
if ((flags & 4) != 0) {
email = stream.readString(exception);
}
if ((flags & 8) != 0) {
shipping_address = TL_postAddress.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(name);
}
if ((flags & 2) != 0) {
stream.writeString(phone);
}
if ((flags & 4) != 0) {
stream.writeString(email);
}
if ((flags & 8) != 0) {
shipping_address.serializeToStream(stream);
}
}
}
public static class TL_auth_sendCode extends TLObject {
public static int constructor = 0xa677244f;
public String phone_number;
public int api_id;
public String api_hash;
public TL_codeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_sentCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeInt32(api_id);
stream.writeString(api_hash);
settings.serializeToStream(stream);
}
}
public static class TL_auth_signUp extends TLObject {
public static int constructor = 0x80eee427;
public String phone_number;
public String phone_code_hash;
public String first_name;
public String last_name;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_Authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
stream.writeString(first_name);
stream.writeString(last_name);
}
}
public static class TL_auth_signIn extends TLObject {
public static int constructor = 0xbcd51581;
public String phone_number;
public String phone_code_hash;
public String phone_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_Authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
stream.writeString(phone_code);
}
}
public static class TL_auth_logOut extends TLObject {
public static int constructor = 0x5717da40;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_auth_resetAuthorizations extends TLObject {
public static int constructor = 0x9fab0d1a;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_auth_exportAuthorization extends TLObject {
public static int constructor = 0xe5bfffcd;
public int dc_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_exportedAuthorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
}
}
public static class TL_auth_importAuthorization extends TLObject {
public static int constructor = 0xe3ef9613;
public int id;
public byte[] bytes;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_Authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeByteArray(bytes);
}
}
public static class TL_auth_exportLoginToken extends TLObject {
public static int constructor = 0xb1b41517;
public int api_id;
public String api_hash;
public ArrayList<Integer> except_ids = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_LoginToken.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(api_id);
stream.writeString(api_hash);
stream.writeInt32(0x1cb5c415);
int count = except_ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(except_ids.get(a));
}
}
}
public static class TL_auth_importLoginToken extends TLObject {
public static int constructor = 0x95ac5ce4;
public byte[] token;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_LoginToken.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(token);
}
}
public static class TL_auth_acceptLoginToken extends TLObject {
public static int constructor = 0xe894ad4d;
public byte[] token;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(token);
}
}
public static class TL_auth_checkRecoveryPassword extends TLObject {
public static int constructor = 0xd36bf79;
public String code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(code);
}
}
public static class TL_account_registerDevice extends TLObject {
public static int constructor = 0x68976c6f;
public int flags;
public boolean no_muted;
public int token_type;
public String token;
public boolean app_sandbox;
public byte[] secret;
public ArrayList<Integer> other_uids = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_muted ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(token_type);
stream.writeString(token);
stream.writeBool(app_sandbox);
stream.writeByteArray(secret);
stream.writeInt32(0x1cb5c415);
int count = other_uids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(other_uids.get(a));
}
}
}
public static class TL_account_unregisterDevice extends TLObject {
public static int constructor = 0x3076c4bf;
public int token_type;
public String token;
public ArrayList<Integer> other_uids = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(token_type);
stream.writeString(token);
stream.writeInt32(0x1cb5c415);
int count = other_uids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(other_uids.get(a));
}
}
}
public static class TL_account_updateNotifySettings extends TLObject {
public static int constructor = 0x84be5b93;
public InputNotifyPeer peer;
public TL_inputPeerNotifySettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
settings.serializeToStream(stream);
}
}
public static class TL_account_getNotifySettings extends TLObject {
public static int constructor = 0x12b3ad31;
public InputNotifyPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return PeerNotifySettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_account_resetNotifySettings extends TLObject {
public static int constructor = 0xdb7e1747;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_updateProfile extends TLObject {
public static int constructor = 0x78515775;
public int flags;
public String first_name;
public String last_name;
public String about;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return User.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeString(first_name);
}
if ((flags & 2) != 0) {
stream.writeString(last_name);
}
if ((flags & 4) != 0) {
stream.writeString(about);
}
}
}
public static class TL_account_updateStatus extends TLObject {
public static int constructor = 0x6628562c;
public boolean offline;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(offline);
}
}
public static class TL_account_getWallPapers extends TLObject {
public static int constructor = 0xaabb1763;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return account_WallPapers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_users_getUsers extends TLObject {
public static int constructor = 0xd91a548;
public ArrayList<InputUser> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
User object = User.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
id.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_reportPeer extends TLObject {
public static int constructor = 0xc5ba3d86;
public InputPeer peer;
public ReportReason reason;
public String message;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
reason.serializeToStream(stream);
stream.writeString(message);
}
}
public static class TL_account_resetPassword extends TLObject {
public static int constructor = 0x9308ce1b;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return account_ResetPasswordResult.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_declinePasswordReset extends TLObject {
public static int constructor = 0x4c9409f6;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getChatThemes extends TLObject {
public static int constructor = 0xd6d71d7b;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return account_ChatThemes.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_users_getFullUser extends TLObject {
public static int constructor = 0xca30a5b1;
public InputUser id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return UserFull.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_contacts_getStatuses extends TLObject {
public static int constructor = 0xc4a353ee;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_contactStatus object = TL_contactStatus.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_getContacts extends TLObject {
public static int constructor = 0xc023849f;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return contacts_Contacts.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_contacts_importContacts extends TLObject {
public static int constructor = 0x2c800be5;
public ArrayList<TL_inputPhoneContact> contacts = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_contacts_importedContacts.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = contacts.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
contacts.get(a).serializeToStream(stream);
}
}
}
public static class TL_contacts_deleteContacts extends TLObject {
public static int constructor = 0x96a0e00;
public ArrayList<InputUser> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
id.get(a).serializeToStream(stream);
}
}
}
public static class TL_contacts_deleteByPhones extends TLObject {
public static int constructor = 0x1013fd9e;
public ArrayList<String> phones = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = phones.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(phones.get(a));
}
}
}
public static class TL_contacts_block extends TLObject {
public static int constructor = 0x68cc1411;
public InputPeer id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_contacts_unblock extends TLObject {
public static int constructor = 0xbea65d50;
public InputPeer id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_contacts_getBlocked extends TLObject {
public static int constructor = 0xf57c350f;
public int offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return contacts_Blocked.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(limit);
}
}
public static class TL_contacts_exportCard extends TLObject {
public static int constructor = 0x84e53737;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
vector.objects.add(stream.readInt32(exception));
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_importCard extends TLObject {
public static int constructor = 0x4fe196fe;
public ArrayList<Integer> export_card = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return User.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = export_card.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(export_card.get(a));
}
}
}
public static class TL_contacts_resetSaved extends TLObject {
public static int constructor = 0x879537f1;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_contacts_toggleTopPeers extends TLObject {
public static int constructor = 0x8514bdda;
public boolean enabled;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(enabled);
}
}
public static class TL_contacts_addContact extends TLObject {
public static int constructor = 0xe8f463d0;
public int flags;
public boolean add_phone_privacy_exception;
public InputUser id;
public String first_name;
public String last_name;
public String phone;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = add_phone_privacy_exception ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
id.serializeToStream(stream);
stream.writeString(first_name);
stream.writeString(last_name);
stream.writeString(phone);
}
}
public static class TL_contacts_acceptContact extends TLObject {
public static int constructor = 0xf831a20f;
public InputUser id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_contacts_getLocated extends TLObject {
public static int constructor = 0xd348bc44;
public int flags;
public boolean background;
public InputGeoPoint geo_point;
public int self_expires;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = background ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
geo_point.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(self_expires);
}
}
}
public static class TL_contacts_blockFromReplies extends TLObject {
public static int constructor = 0x29a8962c;
public int flags;
public boolean delete_message;
public boolean delete_history;
public boolean report_spam;
public int msg_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = delete_message ? (flags | 1) : (flags &~ 1);
flags = delete_history ? (flags | 2) : (flags &~ 2);
flags = report_spam ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt32(msg_id);
}
}
public static class TL_messages_getMessages extends TLObject {
public static int constructor = 0x4222fa74;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_getDialogs extends TLObject {
public static int constructor = 0xa0ee3b73;
public int flags;
public boolean exclude_pinned;
public int folder_id;
public int offset_date;
public int offset_id;
public InputPeer offset_peer;
public int limit;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Dialogs.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = exclude_pinned ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeInt32(folder_id);
}
stream.writeInt32(offset_date);
stream.writeInt32(offset_id);
offset_peer.serializeToStream(stream);
stream.writeInt32(limit);
stream.writeInt32(hash);
}
}
public static class TL_messages_getHistory extends TLObject {
public static int constructor = 0xafa92846;
public InputPeer peer;
public int offset_id;
public int offset_date;
public int add_offset;
public int limit;
public int max_id;
public int min_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(offset_id);
stream.writeInt32(offset_date);
stream.writeInt32(add_offset);
stream.writeInt32(limit);
stream.writeInt32(max_id);
stream.writeInt32(min_id);
}
}
public static class TL_messages_search extends TLObject {
public static int constructor = 0xc352eec;
public int flags;
public InputPeer peer;
public String q;
public InputPeer from_id;
public int top_msg_id;
public MessagesFilter filter;
public int min_date;
public int max_date;
public int offset_id;
public int add_offset;
public int limit;
public int max_id;
public int min_id;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeString(q);
if ((flags & 1) != 0) {
from_id.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(top_msg_id);
}
filter.serializeToStream(stream);
stream.writeInt32(min_date);
stream.writeInt32(max_date);
stream.writeInt32(offset_id);
stream.writeInt32(add_offset);
stream.writeInt32(limit);
stream.writeInt32(max_id);
stream.writeInt32(min_id);
stream.writeInt32(hash);
}
}
public static class TL_help_getTermsOfServiceUpdate extends TLObject {
public static int constructor = 0x2ca51fd1;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_TermsOfServiceUpdate.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_acceptTermsOfService extends TLObject {
public static int constructor = 0xee72f79a;
public TL_dataJSON id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_help_getPassportConfig extends TLObject {
public static int constructor = 0xc661ad08;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_PassportConfig.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_help_getSupportName extends TLObject {
public static int constructor = 0xd360e72c;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_help_supportName.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_getUserInfo extends TLObject {
public static int constructor = 0x38a08d3;
public InputUser user_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_UserInfo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
user_id.serializeToStream(stream);
}
}
public static class TL_help_editUserInfo extends TLObject {
public static int constructor = 0x66b91b70;
public InputUser user_id;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_UserInfo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
user_id.serializeToStream(stream);
stream.writeString(message);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
public static class TL_help_getPromoData extends TLObject {
public static int constructor = 0xc0977421;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_PromoData.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_hidePromoData extends TLObject {
public static int constructor = 0x1e251c95;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_help_dismissSuggestion extends TLObject {
public static int constructor = 0xf50dbaa1;
public InputPeer peer;
public String suggestion;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(suggestion);
}
}
public static class TL_help_getCountriesList extends TLObject {
public static int constructor = 0x735787a8;
public String lang_code;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_CountriesList.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
stream.writeInt32(hash);
}
}
public static class TL_messages_readHistory extends TLObject {
public static int constructor = 0xe306d3a;
public InputPeer peer;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedMessages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(max_id);
}
}
public static class TL_messages_deleteHistory extends TLObject {
public static int constructor = 0x1c015b09;
public int flags;
public boolean just_clear;
public boolean revoke;
public InputPeer peer;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedHistory.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = just_clear ? (flags | 1) : (flags &~ 1);
flags = revoke ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(max_id);
}
}
public static class TL_channels_togglePreHistoryHidden extends TLObject {
public static int constructor = 0xeabbb94c;
public InputChannel channel;
public boolean enabled;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeBool(enabled);
}
}
public static class TL_channels_getGroupsForDiscussion extends TLObject {
public static int constructor = 0xf5dad378;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channels_setDiscussionGroup extends TLObject {
public static int constructor = 0x40582bb2;
public InputChannel broadcast;
public InputChannel group;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
broadcast.serializeToStream(stream);
group.serializeToStream(stream);
}
}
public static class TL_channels_editCreator extends TLObject {
public static int constructor = 0x8f38cd1f;
public InputChannel channel;
public InputUser user_id;
public InputCheckPasswordSRP password;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
user_id.serializeToStream(stream);
password.serializeToStream(stream);
}
}
public static class TL_channels_editLocation extends TLObject {
public static int constructor = 0x58e63f6d;
public InputChannel channel;
public InputGeoPoint geo_point;
public String address;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
geo_point.serializeToStream(stream);
stream.writeString(address);
}
}
public static class TL_messages_editChatAdmin extends TLObject {
public static int constructor = 0xa9e69f2e;
public int chat_id;
public InputUser user_id;
public boolean is_admin;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
user_id.serializeToStream(stream);
stream.writeBool(is_admin);
}
}
public static class TL_messages_migrateChat extends TLObject {
public static int constructor = 0x15a3b8e3;
public int chat_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_messages_searchGlobal extends TLObject {
public static int constructor = 0x4bc6589a;
public int flags;
public int folder_id;
public String q;
public MessagesFilter filter;
public int min_date;
public int max_date;
public int offset_rate;
public InputPeer offset_peer;
public int offset_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(folder_id);
}
stream.writeString(q);
if (filter != null) {
filter.serializeToStream(stream);
}
stream.writeInt32(min_date);
stream.writeInt32(max_date);
stream.writeInt32(offset_rate);
offset_peer.serializeToStream(stream);
stream.writeInt32(offset_id);
stream.writeInt32(limit);
}
}
public static class TL_messages_deleteMessages extends TLObject {
public static int constructor = 0xe58e95d2;
public int flags;
public boolean revoke;
public ArrayList<Integer> id = new ArrayList<>();
public static TL_messages_deleteMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_deleteMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_deleteMessages", constructor));
} else {
return null;
}
}
TL_messages_deleteMessages result = new TL_messages_deleteMessages();
result.readParams(stream, exception);
return result;
}
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedMessages.TLdeserialize(stream, constructor, exception);
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
revoke = (flags & 1) != 0;
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
id.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoke ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_receivedMessages extends TLObject {
public static int constructor = 0x5a954c0;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_receivedNotifyMessage object = TL_receivedNotifyMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(max_id);
}
}
public static class TL_messages_setTyping extends TLObject {
public static int constructor = 0x58943ee2;
public int flags;
public InputPeer peer;
public int top_msg_id;
public SendMessageAction action;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(top_msg_id);
}
action.serializeToStream(stream);
}
}
public static class TL_messages_sendMessage extends TLObject {
public static int constructor = 0x520c3870;
public int flags;
public boolean no_webpage;
public boolean silent;
public boolean background;
public boolean clear_draft;
public InputPeer peer;
public int reply_to_msg_id;
public String message;
public long random_id;
public ReplyMarkup reply_markup;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_webpage ? (flags | 2) : (flags &~ 2);
flags = silent ? (flags | 32) : (flags &~ 32);
flags = background ? (flags | 64) : (flags &~ 64);
flags = clear_draft ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
stream.writeString(message);
stream.writeInt64(random_id);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_sendMedia extends TLObject {
public static int constructor = 0x3491eba9;
public int flags;
public boolean silent;
public boolean background;
public boolean clear_draft;
public InputPeer peer;
public int reply_to_msg_id;
public InputMedia media;
public String message;
public long random_id;
public ReplyMarkup reply_markup;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 32) : (flags &~ 32);
flags = background ? (flags | 64) : (flags &~ 64);
flags = clear_draft ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
media.serializeToStream(stream);
stream.writeString(message);
stream.writeInt64(random_id);
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_forwardMessages extends TLObject {
public static int constructor = 0xd9fee60e;
public int flags;
public boolean silent;
public boolean background;
public boolean with_my_score;
public boolean drop_author;
public boolean drop_media_captions;
public InputPeer from_peer;
public ArrayList<Integer> id = new ArrayList<>();
public ArrayList<Long> random_id = new ArrayList<>();
public InputPeer to_peer;
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 32) : (flags &~ 32);
flags = background ? (flags | 64) : (flags &~ 64);
flags = with_my_score ? (flags | 256) : (flags &~ 256);
flags = drop_author ? (flags | 2048) : (flags &~ 2048);
flags = drop_media_captions ? (flags | 4096) : (flags &~ 4096);
stream.writeInt32(flags);
from_peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
stream.writeInt32(0x1cb5c415);
count = random_id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(random_id.get(a));
}
to_peer.serializeToStream(stream);
if ((flags & 1024) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_reportSpam extends TLObject {
public static int constructor = 0xcf1592db;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getPeerSettings extends TLObject {
public static int constructor = 0x3672e09c;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_peerSettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_report extends TLObject {
public static int constructor = 0x8953ab4e;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public ReportReason reason;
public String message;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
reason.serializeToStream(stream);
stream.writeString(message);
}
}
public static class TL_messages_getChats extends TLObject {
public static int constructor = 0x3c6aa187;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_getFullChat extends TLObject {
public static int constructor = 0x3b831c66;
public int chat_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chatFull.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_messages_editChatTitle extends TLObject {
public static int constructor = 0xdc452855;
public int chat_id;
public String title;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
stream.writeString(title);
}
}
public static class TL_messages_editChatPhoto extends TLObject {
public static int constructor = 0xca4c79d8;
public int chat_id;
public InputChatPhoto photo;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
photo.serializeToStream(stream);
}
}
public static class TL_messages_addChatUser extends TLObject {
public static int constructor = 0xf9a0aa09;
public int chat_id;
public InputUser user_id;
public int fwd_limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
user_id.serializeToStream(stream);
stream.writeInt32(fwd_limit);
}
}
public static class TL_messages_deleteChatUser extends TLObject {
public static int constructor = 0xc534459a;
public int flags;
public boolean revoke_history;
public int chat_id;
public InputUser user_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoke_history ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(chat_id);
user_id.serializeToStream(stream);
}
}
public static class TL_messages_createChat extends TLObject {
public static int constructor = 0x9cb126e;
public ArrayList<InputUser> users = new ArrayList<>();
public String title;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
stream.writeString(title);
}
}
public static class TL_updates_getState extends TLObject {
public static int constructor = 0xedd4882a;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_updates_state.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_updates_getDifference extends TLObject {
public static int constructor = 0x25939651;
public int flags;
public int pts;
public int pts_total_limit;
public int date;
public int qts;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return updates_Difference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(pts);
if ((flags & 1) != 0) {
stream.writeInt32(pts_total_limit);
}
stream.writeInt32(date);
stream.writeInt32(qts);
}
}
public static class TL_updates_getChannelDifference extends TLObject {
public static int constructor = 0x3173d78;
public int flags;
public boolean force;
public InputChannel channel;
public ChannelMessagesFilter filter;
public int pts;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return updates_ChannelDifference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = force ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
channel.serializeToStream(stream);
filter.serializeToStream(stream);
stream.writeInt32(pts);
stream.writeInt32(limit);
}
}
public static class TL_photos_updateProfilePhoto extends TLObject {
public static int constructor = 0x72d4742c;
public InputPhoto id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_photos_photo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
}
}
public static class TL_photos_uploadProfilePhoto extends TLObject {
public static int constructor = 0x89f30f69;
public int flags;
public InputFile file;
public InputFile video;
public double video_start_ts;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_photos_photo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
file.serializeToStream(stream);
}
if ((flags & 2) != 0) {
video.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeDouble(video_start_ts);
}
}
}
public static class TL_photos_deletePhotos extends TLObject {
public static int constructor = 0x87cf7f2f;
public ArrayList<InputPhoto> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
vector.objects.add(stream.readInt64(exception));
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
id.get(a).serializeToStream(stream);
}
}
}
public static class TL_upload_getFile extends TLObject {
public static int constructor = 0xb15a9afc;
public int flags;
public boolean precise;
public boolean cdn_supported;
public InputFileLocation location;
public int offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return upload_File.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = precise ? (flags | 1) : (flags &~ 1);
flags = cdn_supported ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
location.serializeToStream(stream);
stream.writeInt32(offset);
stream.writeInt32(limit);
}
}
public static class TL_help_getConfig extends TLObject {
public static int constructor = 0xc4f9186b;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_config.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_getNearestDc extends TLObject {
public static int constructor = 0x1fb33026;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_nearestDc.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_getAppUpdate extends TLObject {
public static int constructor = 0x522d5a7d;
public String source;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_AppUpdate.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(source);
}
}
public static class TL_help_getAppConfig extends TLObject {
public static int constructor = 0x98914110;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return JSONValue.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_saveAppLog extends TLObject {
public static int constructor = 0x6f02f748;
public ArrayList<TL_inputAppEvent> events = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = events.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
events.get(a).serializeToStream(stream);
}
}
}
public static class TL_help_getInviteText extends TLObject {
public static int constructor = 0x4d392343;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_help_inviteText.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_photos_getUserPhotos extends TLObject {
public static int constructor = 0x91cd32a8;
public InputUser user_id;
public int offset;
public long max_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return photos_Photos.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
user_id.serializeToStream(stream);
stream.writeInt32(offset);
stream.writeInt64(max_id);
stream.writeInt32(limit);
}
}
public static class TL_messages_forwardMessage extends TLObject {
public static int constructor = 0x33963bf9;
public InputPeer peer;
public int id;
public long random_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(id);
stream.writeInt64(random_id);
}
}
public static class TL_messages_getDhConfig extends TLObject {
public static int constructor = 0x26cf8950;
public int version;
public int random_length;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_DhConfig.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(version);
stream.writeInt32(random_length);
}
}
public static class TL_messages_requestEncryption extends TLObject {
public static int constructor = 0xf64daf43;
public InputUser user_id;
public int random_id;
public byte[] g_a;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return EncryptedChat.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
user_id.serializeToStream(stream);
stream.writeInt32(random_id);
stream.writeByteArray(g_a);
}
}
public static class TL_messages_acceptEncryption extends TLObject {
public static int constructor = 0x3dbc0415;
public TL_inputEncryptedChat peer;
public byte[] g_b;
public long key_fingerprint;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return EncryptedChat.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeByteArray(g_b);
stream.writeInt64(key_fingerprint);
}
}
public static class TL_messages_discardEncryption extends TLObject {
public static int constructor = 0xf393aea0;
public int flags;
public boolean delete_history;
public int chat_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = delete_history ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(chat_id);
}
}
public static class TL_messages_setEncryptedTyping extends TLObject {
public static int constructor = 0x791451ed;
public TL_inputEncryptedChat peer;
public boolean typing;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeBool(typing);
}
}
public static class TL_messages_readEncryptedHistory extends TLObject {
public static int constructor = 0x7f4b690a;
public TL_inputEncryptedChat peer;
public int max_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(max_date);
}
}
public static class TL_messages_receivedQueue extends TLObject {
public static int constructor = 0x55a5bb66;
public int max_qts;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
vector.objects.add(stream.readInt64(exception));
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(max_qts);
}
}
public static class TL_messages_reportEncryptedSpam extends TLObject {
public static int constructor = 0x4b0c8c0f;
public TL_inputEncryptedChat peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_help_getSupport extends TLObject {
public static int constructor = 0x9cdf08cd;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_help_support.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_readMessageContents extends TLObject {
public static int constructor = 0x36a73f77;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedMessages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_account_checkUsername extends TLObject {
public static int constructor = 0x2714d86c;
public String username;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(username);
}
}
public static class TL_account_updateUsername extends TLObject {
public static int constructor = 0x3e0bdd7c;
public String username;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return User.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(username);
}
}
public static class TL_contacts_search extends TLObject {
public static int constructor = 0x11f812d8;
public String q;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_contacts_found.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
stream.writeInt32(limit);
}
}
public static class TL_account_getPrivacy extends TLObject {
public static int constructor = 0xdadbc950;
public InputPrivacyKey key;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_privacyRules.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
key.serializeToStream(stream);
}
}
public static class TL_account_setPrivacy extends TLObject {
public static int constructor = 0xc9f81ce8;
public InputPrivacyKey key;
public ArrayList<InputPrivacyRule> rules = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_privacyRules.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
key.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = rules.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
rules.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_deleteAccount extends TLObject {
public static int constructor = 0x418d4e0b;
public String reason;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(reason);
}
}
public static class TL_account_getAccountTTL extends TLObject {
public static int constructor = 0x8fc711d;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_accountDaysTTL.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_setAccountTTL extends TLObject {
public static int constructor = 0x2442485e;
public TL_accountDaysTTL ttl;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
ttl.serializeToStream(stream);
}
}
public static class TL_contacts_resolveUsername extends TLObject {
public static int constructor = 0xf93ccba3;
public String username;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_contacts_resolvedPeer.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(username);
}
}
public static class TL_contacts_getTopPeers extends TLObject {
public static int constructor = 0xd4982db5;
public int flags;
public boolean correspondents;
public boolean bots_pm;
public boolean bots_inline;
public boolean phone_calls;
public boolean forward_users;
public boolean forward_chats;
public boolean groups;
public boolean channels;
public int offset;
public int limit;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return contacts_TopPeers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = correspondents ? (flags | 1) : (flags &~ 1);
flags = bots_pm ? (flags | 2) : (flags &~ 2);
flags = bots_inline ? (flags | 4) : (flags &~ 4);
flags = phone_calls ? (flags | 8) : (flags &~ 8);
flags = forward_users ? (flags | 16) : (flags &~ 16);
flags = forward_chats ? (flags | 32) : (flags &~ 32);
flags = groups ? (flags | 1024) : (flags &~ 1024);
flags = channels ? (flags | 32768) : (flags &~ 32768);
stream.writeInt32(flags);
stream.writeInt32(offset);
stream.writeInt32(limit);
stream.writeInt32(hash);
}
}
public static class TL_contacts_resetTopPeerRating extends TLObject {
public static int constructor = 0x1ae373ac;
public TopPeerCategory category;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
category.serializeToStream(stream);
peer.serializeToStream(stream);
}
}
public static class TL_account_sendChangePhoneCode extends TLObject {
public static int constructor = 0x82574ae5;
public String phone_number;
public TL_codeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_sentCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
settings.serializeToStream(stream);
}
}
public static class TL_account_changePhone extends TLObject {
public static int constructor = 0x70c32edb;
public String phone_number;
public String phone_code_hash;
public String phone_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return User.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
stream.writeString(phone_code);
}
}
public static class TL_account_getWebAuthorizations extends TLObject {
public static int constructor = 0x182e6d6f;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_webAuthorizations.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_resetWebAuthorization extends TLObject {
public static int constructor = 0x2d01b9ef;
public long hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(hash);
}
}
public static class TL_account_resetWebAuthorizations extends TLObject {
public static int constructor = 0x682d2594;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getMultiWallPapers extends TLObject {
public static int constructor = 0x65ad71dc;
public ArrayList<InputWallPaper> wallpapers = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
WallPaper object = WallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = wallpapers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
wallpapers.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_getGlobalPrivacySettings extends TLObject {
public static int constructor = 0xeb2b4cf6;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_globalPrivacySettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_setGlobalPrivacySettings extends TLObject {
public static int constructor = 0x1edaaac2;
public TL_globalPrivacySettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_globalPrivacySettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
settings.serializeToStream(stream);
}
}
public static class TL_account_reportProfilePhoto extends TLObject {
public static int constructor = 0xfa8cc6f5;
public InputPeer peer;
public InputPhoto photo_id;
public ReportReason reason;
public String message;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
photo_id.serializeToStream(stream);
reason.serializeToStream(stream);
stream.writeString(message);
}
}
public static class TL_account_getAllSecureValues extends TLObject {
public static int constructor = 0xb288bc7d;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_secureValue object = TL_secureValue.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getSecureValue extends TLObject {
public static int constructor = 0x73665bc2;
public ArrayList<SecureValueType> types = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_secureValue object = TL_secureValue.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = types.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
types.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_saveSecureValue extends TLObject {
public static int constructor = 0x899fe31d;
public TL_inputSecureValue value;
public long secure_secret_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_secureValue.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
value.serializeToStream(stream);
stream.writeInt64(secure_secret_id);
}
}
public static class TL_account_deleteSecureValue extends TLObject {
public static int constructor = 0xb880bc4b;
public ArrayList<SecureValueType> types = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = types.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
types.get(a).serializeToStream(stream);
}
}
}
public static class TL_account_getAuthorizationForm extends TLObject {
public static int constructor = 0xb86ba8e1;
public int bot_id;
public String scope;
public String public_key;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_authorizationForm.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(bot_id);
stream.writeString(scope);
stream.writeString(public_key);
}
}
public static class TL_account_acceptAuthorization extends TLObject {
public static int constructor = 0xe7027c94;
public int bot_id;
public String scope;
public String public_key;
public ArrayList<TL_secureValueHash> value_hashes = new ArrayList<>();
public TL_secureCredentialsEncrypted credentials;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(bot_id);
stream.writeString(scope);
stream.writeString(public_key);
stream.writeInt32(0x1cb5c415);
int count = value_hashes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
value_hashes.get(a).serializeToStream(stream);
}
credentials.serializeToStream(stream);
}
}
public static class TL_account_sendVerifyPhoneCode extends TLObject {
public static int constructor = 0xa5a356f9;
public String phone_number;
public TL_codeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_sentCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
settings.serializeToStream(stream);
}
}
public static class TL_account_verifyPhone extends TLObject {
public static int constructor = 0x4dd3a7f6;
public String phone_number;
public String phone_code_hash;
public String phone_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
stream.writeString(phone_code);
}
}
public static class TL_account_sendVerifyEmailCode extends TLObject {
public static int constructor = 0x7011509f;
public String email;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_sentEmailCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(email);
}
}
public static class TL_account_verifyEmail extends TLObject {
public static int constructor = 0xecba39db;
public String email;
public String code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(email);
stream.writeString(code);
}
}
public static class TL_account_confirmPasswordEmail extends TLObject {
public static int constructor = 0x8fdf1920;
public String code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(code);
}
}
public static class TL_account_resendPasswordEmail extends TLObject {
public static int constructor = 0x7a7f2a15;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_cancelPasswordEmail extends TLObject {
public static int constructor = 0xc1cbd5b6;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getContactSignUpNotification extends TLObject {
public static int constructor = 0x9f07c728;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_setContactSignUpNotification extends TLObject {
public static int constructor = 0xcff43f61;
public boolean silent;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(silent);
}
}
public static class TL_account_getNotifyExceptions extends TLObject {
public static int constructor = 0x53577479;
public int flags;
public boolean compare_sound;
public InputNotifyPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = compare_sound ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
peer.serializeToStream(stream);
}
}
}
public static class TL_account_getWallPaper extends TLObject {
public static int constructor = 0xfc8ddbea;
public InputWallPaper wallpaper;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return WallPaper.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
wallpaper.serializeToStream(stream);
}
}
public static class TL_account_uploadWallPaper extends TLObject {
public static int constructor = 0xdd853661;
public InputFile file;
public String mime_type;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return WallPaper.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
file.serializeToStream(stream);
stream.writeString(mime_type);
settings.serializeToStream(stream);
}
}
public static class TL_account_saveWallPaper extends TLObject {
public static int constructor = 0x6c5a5b37;
public InputWallPaper wallpaper;
public boolean unsave;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
wallpaper.serializeToStream(stream);
stream.writeBool(unsave);
settings.serializeToStream(stream);
}
}
public static class TL_account_installWallPaper extends TLObject {
public static int constructor = 0xfeed5769;
public InputWallPaper wallpaper;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
wallpaper.serializeToStream(stream);
settings.serializeToStream(stream);
}
}
public static class TL_account_resetWallPapers extends TLObject {
public static int constructor = 0xbb3b9804;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getAutoDownloadSettings extends TLObject {
public static int constructor = 0x56da0b3f;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_autoDownloadSettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_saveAutoDownloadSettings extends TLObject {
public static int constructor = 0x76f36233;
public int flags;
public boolean low;
public boolean high;
public TL_autoDownloadSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = low ? (flags | 1) : (flags &~ 1);
flags = high ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
settings.serializeToStream(stream);
}
}
public static class TL_account_uploadTheme extends TLObject {
public static int constructor = 0x1c3db333;
public int flags;
public InputFile file;
public InputFile thumb;
public String file_name;
public String mime_type;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Document.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
file.serializeToStream(stream);
if ((flags & 1) != 0) {
thumb.serializeToStream(stream);
}
stream.writeString(file_name);
stream.writeString(mime_type);
}
}
public static class TL_account_createTheme extends TLObject {
public static int constructor = 0x8432c21f;
public int flags;
public String slug;
public String title;
public InputDocument document;
public TL_inputThemeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Theme.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(slug);
stream.writeString(title);
if ((flags & 4) != 0) {
document.serializeToStream(stream);
}
if ((flags & 8) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_account_updateTheme extends TLObject {
public static int constructor = 0x5cb367d5;
public int flags;
public String format;
public InputTheme theme;
public String slug;
public String title;
public InputDocument document;
public TL_inputThemeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Theme.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(format);
theme.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeString(slug);
}
if ((flags & 2) != 0) {
stream.writeString(title);
}
if ((flags & 4) != 0) {
document.serializeToStream(stream);
}
if ((flags & 8) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_account_saveTheme extends TLObject {
public static int constructor = 0xf257106c;
public InputTheme theme;
public boolean unsave;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
theme.serializeToStream(stream);
stream.writeBool(unsave);
}
}
public static class TL_account_installTheme extends TLObject {
public static int constructor = 0x7ae43737;
public int flags;
public boolean dark;
public String format;
public InputTheme theme;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = dark ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeString(format);
}
if ((flags & 2) != 0) {
theme.serializeToStream(stream);
}
}
}
public static class TL_account_getTheme extends TLObject {
public static int constructor = 0x8d9d742b;
public String format;
public InputTheme theme;
public long document_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Theme.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(format);
theme.serializeToStream(stream);
stream.writeInt64(document_id);
}
}
public static class TL_account_getThemes extends TLObject {
public static int constructor = 0x285946f8;
public String format;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return account_Themes.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(format);
stream.writeInt32(hash);
}
}
public static class TL_messages_getAllStickers extends TLObject {
public static int constructor = 0x1c9618b1;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_AllStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_account_updateDeviceLocked extends TLObject {
public static int constructor = 0x38df3532;
public int period;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(period);
}
}
public static class TL_messages_getWebPagePreview extends TLObject {
public static int constructor = 0x8b68b0cc;
public int flags;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return MessageMedia.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(message);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_account_getAuthorizations extends TLObject {
public static int constructor = 0xe320c158;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_authorizations.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_resetAuthorization extends TLObject {
public static int constructor = 0xdf77f3bc;
public long hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(hash);
}
}
public static class TL_account_getPassword extends TLObject {
public static int constructor = 0x548a30f5;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_password.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_account_getPasswordSettings extends TLObject {
public static int constructor = 0x9cd4eaf9;
public InputCheckPasswordSRP password;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_passwordSettings.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
password.serializeToStream(stream);
}
}
public static class TL_account_updatePasswordSettings extends TLObject {
public static int constructor = 0xa59b102f;
public InputCheckPasswordSRP password;
public TL_account_passwordInputSettings new_settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
password.serializeToStream(stream);
new_settings.serializeToStream(stream);
}
}
public static class TL_account_sendConfirmPhoneCode extends TLObject {
public static int constructor = 0x1b3faa88;
public String hash;
public TL_codeSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_sentCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(hash);
settings.serializeToStream(stream);
}
}
public static class TL_account_confirmPhone extends TLObject {
public static int constructor = 0x5f2178c3;
public String phone_code_hash;
public String phone_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_code_hash);
stream.writeString(phone_code);
}
}
public static class TL_account_getTmpPassword extends TLObject {
public static int constructor = 0x449e0b51;
public InputCheckPasswordSRP password;
public int period;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_account_tmpPassword.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
password.serializeToStream(stream);
stream.writeInt32(period);
}
}
public static class TL_auth_checkPassword extends TLObject {
public static int constructor = 0xd18b4d16;
public InputCheckPasswordSRP password;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_Authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
password.serializeToStream(stream);
}
}
public static class TL_auth_requestPasswordRecovery extends TLObject {
public static int constructor = 0xd897bc66;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_passwordRecovery.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_auth_recoverPassword extends TLObject {
public static int constructor = 0x37096c70;
public int flags;
public String code;
public TL_account_passwordInputSettings new_settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return auth_Authorization.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(code);
if ((flags & 1) != 0) {
new_settings.serializeToStream(stream);
}
}
}
public static class TL_auth_resendCode extends TLObject {
public static int constructor = 0x3ef1a9bf;
public String phone_number;
public String phone_code_hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_auth_sentCode.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
}
}
public static class TL_auth_cancelCode extends TLObject {
public static int constructor = 0x1f040578;
public String phone_number;
public String phone_code_hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(phone_number);
stream.writeString(phone_code_hash);
}
}
public static class TL_messages_exportChatInvite extends TLObject {
public static int constructor = 0x14b9bcd7;
public int flags;
public boolean legacy_revoke_permanent;
public InputPeer peer;
public int expire_date;
public int usage_limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return ExportedChatInvite.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = legacy_revoke_permanent ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(expire_date);
}
if ((flags & 2) != 0) {
stream.writeInt32(usage_limit);
}
}
}
public static class TL_messages_checkChatInvite extends TLObject {
public static int constructor = 0x3eadb1bb;
public String hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return ChatInvite.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(hash);
}
}
public static class TL_messages_importChatInvite extends TLObject {
public static int constructor = 0x6c50051c;
public String hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(hash);
}
}
public static class TL_messages_getStickerSet extends TLObject {
public static int constructor = 0x2619a90e;
public InputStickerSet stickerset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_stickerSet.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stickerset.serializeToStream(stream);
}
}
public static class TL_messages_installStickerSet extends TLObject {
public static int constructor = 0xc78fe460;
public InputStickerSet stickerset;
public boolean archived;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_StickerSetInstallResult.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stickerset.serializeToStream(stream);
stream.writeBool(archived);
}
}
public static class TL_messages_uninstallStickerSet extends TLObject {
public static int constructor = 0xf96e55de;
public InputStickerSet stickerset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stickerset.serializeToStream(stream);
}
}
public static class TL_messages_startBot extends TLObject {
public static int constructor = 0xe6df7378;
public InputUser bot;
public InputPeer peer;
public long random_id;
public String start_param;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
bot.serializeToStream(stream);
peer.serializeToStream(stream);
stream.writeInt64(random_id);
stream.writeString(start_param);
}
}
public static class TL_messages_getMessagesViews extends TLObject {
public static int constructor = 0x5784d3e1;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public boolean increment;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_messageViews.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
stream.writeBool(increment);
}
}
public static class TL_messages_getSavedGifs extends TLObject {
public static int constructor = 0x83bf3d52;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_SavedGifs.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_messages_saveGif extends TLObject {
public static int constructor = 0x327a30cb;
public InputDocument id;
public boolean unsave;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
stream.writeBool(unsave);
}
}
public static class TL_messages_getInlineBotResults extends TLObject {
public static int constructor = 0x514e999d;
public int flags;
public InputUser bot;
public InputPeer peer;
public InputGeoPoint geo_point;
public String query;
public String offset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_BotResults.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
bot.serializeToStream(stream);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
geo_point.serializeToStream(stream);
}
stream.writeString(query);
stream.writeString(offset);
}
}
public static class TL_messages_sendInlineBotResult extends TLObject {
public static int constructor = 0x220815b0;
public int flags;
public boolean silent;
public boolean background;
public boolean clear_draft;
public boolean hide_via;
public InputPeer peer;
public int reply_to_msg_id;
public long random_id;
public long query_id;
public String id;
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 32) : (flags &~ 32);
flags = background ? (flags | 64) : (flags &~ 64);
flags = clear_draft ? (flags | 128) : (flags &~ 128);
flags = hide_via ? (flags | 2048) : (flags &~ 2048);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
stream.writeInt64(random_id);
stream.writeInt64(query_id);
stream.writeString(id);
if ((flags & 1024) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_getMessageEditData extends TLObject {
public static int constructor = 0xfda68d36;
public InputPeer peer;
public int id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_messageEditData.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(id);
}
}
public static class TL_messages_editMessage extends TLObject {
public static int constructor = 0x48f71778;
public int flags;
public boolean no_webpage;
public InputPeer peer;
public int id;
public String message;
public InputMedia media;
public ReplyMarkup reply_markup;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_webpage ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(id);
if ((flags & 2048) != 0) {
stream.writeString(message);
}
if ((flags & 16384) != 0) {
media.serializeToStream(stream);
}
if ((flags & 4) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 32768) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_getBotCallbackAnswer extends TLObject {
public static int constructor = 0x9342ca07;
public int flags;
public boolean game;
public InputPeer peer;
public int msg_id;
public byte[] data;
public InputCheckPasswordSRP password;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_botCallbackAnswer.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = game ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
if ((flags & 1) != 0) {
stream.writeByteArray(data);
}
if ((flags & 4) != 0) {
password.serializeToStream(stream);
}
}
}
public static class TL_messages_setBotCallbackAnswer extends TLObject {
public static int constructor = 0xd58f130a;
public int flags;
public boolean alert;
public long query_id;
public String message;
public String url;
public int cache_time;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = alert ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(query_id);
if ((flags & 1) != 0) {
stream.writeString(message);
}
if ((flags & 4) != 0) {
stream.writeString(url);
}
stream.writeInt32(cache_time);
}
}
public static class TL_messages_getPeerDialogs extends TLObject {
public static int constructor = 0xe470bcfd;
public ArrayList<InputDialogPeer> peers = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_peerDialogs.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
peers.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_saveDraft extends TLObject {
public static int constructor = 0xbc39e14b;
public int flags;
public boolean no_webpage;
public int reply_to_msg_id;
public InputPeer peer;
public String message;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = no_webpage ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
peer.serializeToStream(stream);
stream.writeString(message);
if ((flags & 8) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
}
}
public static class TL_messages_getAllDrafts extends TLObject {
public static int constructor = 0x6a3f8d65;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_getFeaturedStickers extends TLObject {
public static int constructor = 0x2dacca4f;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_FeaturedStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_messages_readFeaturedStickers extends TLObject {
public static int constructor = 0x5b118126;
public ArrayList<Long> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(id.get(a));
}
}
}
public static class TL_messages_getRecentStickers extends TLObject {
public static int constructor = 0x5ea192c9;
public int flags;
public boolean attached;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_RecentStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = attached ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(hash);
}
}
public static class TL_messages_saveRecentSticker extends TLObject {
public static int constructor = 0x392718f8;
public int flags;
public boolean attached;
public InputDocument id;
public boolean unsave;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = attached ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
id.serializeToStream(stream);
stream.writeBool(unsave);
}
}
public static class TL_messages_clearRecentStickers extends TLObject {
public static int constructor = 0x8999602d;
public int flags;
public boolean attached;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = attached ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
}
}
public static class TL_messages_getArchivedStickers extends TLObject {
public static int constructor = 0x57f17692;
public int flags;
public boolean masks;
public long offset_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_archivedStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = masks ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt64(offset_id);
stream.writeInt32(limit);
}
}
public static class TL_messages_setGameScore extends TLObject {
public static int constructor = 0x8ef8ecc0;
public int flags;
public boolean edit_message;
public boolean force;
public InputPeer peer;
public int id;
public InputUser user_id;
public int score;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = edit_message ? (flags | 1) : (flags &~ 1);
flags = force ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(id);
user_id.serializeToStream(stream);
stream.writeInt32(score);
}
}
public static class TL_messages_setInlineGameScore extends TLObject {
public static int constructor = 0x15ad9f64;
public int flags;
public boolean edit_message;
public boolean force;
public TL_inputBotInlineMessageID id;
public InputUser user_id;
public int score;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = edit_message ? (flags | 1) : (flags &~ 1);
flags = force ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
id.serializeToStream(stream);
user_id.serializeToStream(stream);
stream.writeInt32(score);
}
}
public static class TL_messages_getMaskStickers extends TLObject {
public static int constructor = 0x65b8c79f;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_AllStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_messages_getGameHighScores extends TLObject {
public static int constructor = 0xe822649d;
public InputPeer peer;
public int id;
public InputUser user_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_highScores.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(id);
user_id.serializeToStream(stream);
}
}
public static class TL_messages_getInlineGameHighScores extends TLObject {
public static int constructor = 0xf635e1b;
public TL_inputBotInlineMessageID id;
public InputUser user_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_highScores.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
user_id.serializeToStream(stream);
}
}
public static class TL_messages_getAttachedStickers extends TLObject {
public static int constructor = 0xcc5b67cc;
public InputStickeredMedia media;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
StickerSetCovered object = StickerSetCovered.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
media.serializeToStream(stream);
}
}
public static class TL_messages_getCommonChats extends TLObject {
public static int constructor = 0xd0a48c4;
public InputUser user_id;
public int max_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
user_id.serializeToStream(stream);
stream.writeInt32(max_id);
stream.writeInt32(limit);
}
}
public static class TL_messages_getAllChats extends TLObject {
public static int constructor = 0xeba80ff0;
public ArrayList<Integer> except_ids = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = except_ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(except_ids.get(a));
}
}
}
public static class TL_messages_getWebPage extends TLObject {
public static int constructor = 0x32ca8f91;
public String url;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return WebPage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt32(hash);
}
}
public static class TL_messages_toggleDialogPin extends TLObject {
public static int constructor = 0xa731e257;
public int flags;
public boolean pinned;
public InputDialogPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
}
}
public static class TL_messages_reorderPinnedDialogs extends TLObject {
public static int constructor = 0x3b1adf37;
public int flags;
public boolean force;
public int folder_id;
public ArrayList<InputDialogPeer> order = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = force ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(folder_id);
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
order.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_getPinnedDialogs extends TLObject {
public static int constructor = 0xd6b94df2;
public int folder_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_peerDialogs.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(folder_id);
}
}
public static class TL_messages_uploadMedia extends TLObject {
public static int constructor = 0x519bc2b1;
public InputPeer peer;
public InputMedia media;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return MessageMedia.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
media.serializeToStream(stream);
}
}
public static class TL_messages_sendScreenshotNotification extends TLObject {
public static int constructor = 0xc97df020;
public InputPeer peer;
public int reply_to_msg_id;
public long random_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(reply_to_msg_id);
stream.writeInt64(random_id);
}
}
public static class TL_messages_getFavedStickers extends TLObject {
public static int constructor = 0x21ce0b0e;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_FavedStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(hash);
}
}
public static class TL_messages_faveSticker extends TLObject {
public static int constructor = 0xb9ffc55b;
public InputDocument id;
public boolean unfave;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
id.serializeToStream(stream);
stream.writeBool(unfave);
}
}
public static class TL_messages_getUnreadMentions extends TLObject {
public static int constructor = 0x46578472;
public InputPeer peer;
public int offset_id;
public int add_offset;
public int limit;
public int max_id;
public int min_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(offset_id);
stream.writeInt32(add_offset);
stream.writeInt32(limit);
stream.writeInt32(max_id);
stream.writeInt32(min_id);
}
}
public static class TL_messages_readMentions extends TLObject {
public static int constructor = 0xf0189d3;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedHistory.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getRecentLocations extends TLObject {
public static int constructor = 0xbbc45b09;
public InputPeer peer;
public int limit;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(limit);
stream.writeInt32(hash);
}
}
public static class TL_messages_sendMultiMedia extends TLObject {
public static int constructor = 0xcc0110cb;
public int flags;
public boolean silent;
public boolean background;
public boolean clear_draft;
public InputPeer peer;
public int reply_to_msg_id;
public ArrayList<TL_inputSingleMedia> multi_media = new ArrayList<>();
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 32) : (flags &~ 32);
flags = background ? (flags | 64) : (flags &~ 64);
flags = clear_draft ? (flags | 128) : (flags &~ 128);
stream.writeInt32(flags);
peer.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(reply_to_msg_id);
}
stream.writeInt32(0x1cb5c415);
int count = multi_media.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
multi_media.get(a).serializeToStream(stream);
}
if ((flags & 1024) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_messages_clearAllDrafts extends TLObject {
public static int constructor = 0x7e58ee9c;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_updatePinnedMessage extends TLObject {
public static int constructor = 0xd2aaf7ec;
public int flags;
public boolean silent;
public boolean unpin;
public boolean pm_oneside;
public InputPeer peer;
public int id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 1) : (flags &~ 1);
flags = unpin ? (flags | 2) : (flags &~ 2);
flags = pm_oneside ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(id);
}
}
public static class TL_messages_sendVote extends TLObject {
public static int constructor = 0x10ea6184;
public InputPeer peer;
public int msg_id;
public ArrayList<byte[]> options = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(0x1cb5c415);
int count = options.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeByteArray(options.get(a));
}
}
}
public static class TL_messages_getPollResults extends TLObject {
public static int constructor = 0x73bb643b;
public InputPeer peer;
public int msg_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
}
}
public static class TL_messages_getOnlines extends TLObject {
public static int constructor = 0x6e2be050;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_chatOnlines.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getStatsURL extends TLObject {
public static int constructor = 0x812c2ae6;
public int flags;
public boolean dark;
public InputPeer peer;
public String params;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_statsURL.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = dark ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeString(params);
}
}
public static class TL_messages_editChatAbout extends TLObject {
public static int constructor = 0xdef60797;
public InputPeer peer;
public String about;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(about);
}
}
public static class TL_messages_editChatDefaultBannedRights extends TLObject {
public static int constructor = 0xa5866b41;
public InputPeer peer;
public TL_chatBannedRights banned_rights;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
banned_rights.serializeToStream(stream);
}
}
public static class TL_messages_getEmojiKeywords extends TLObject {
public static int constructor = 0x35a0e062;
public String lang_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_emojiKeywordsDifference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
}
}
public static class TL_messages_getEmojiKeywordsDifference extends TLObject {
public static int constructor = 0x1508b6af;
public String lang_code;
public int from_version;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_emojiKeywordsDifference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
stream.writeInt32(from_version);
}
}
public static class TL_messages_getEmojiKeywordsLanguages extends TLObject {
public static int constructor = 0x4e9963b2;
public ArrayList<String> lang_codes = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_emojiLanguage object = TL_emojiLanguage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = lang_codes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(lang_codes.get(a));
}
}
}
public static class TL_messages_getEmojiURL extends TLObject {
public static int constructor = 0xd5b10c26;
public String lang_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_emojiURL.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
}
}
public static class TL_messages_getSearchCounters extends TLObject {
public static int constructor = 0x732eef00;
public InputPeer peer;
public ArrayList<MessagesFilter> filters = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_messages_searchCounter object = TL_messages_searchCounter.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = filters.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
filters.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_requestUrlAuth extends TLObject {
public static int constructor = 0x198fb446;
public int flags;
public InputPeer peer;
public int msg_id;
public int button_id;
public String url;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return UrlAuthResult.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
peer.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(msg_id);
}
if ((flags & 2) != 0) {
stream.writeInt32(button_id);
}
if ((flags & 4) != 0) {
stream.writeString(url);
}
}
}
public static class TL_messages_acceptUrlAuth extends TLObject {
public static int constructor = 0xb12c7125;
public int flags;
public boolean write_allowed;
public InputPeer peer;
public int msg_id;
public int button_id;
public String url;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return UrlAuthResult.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = write_allowed ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
peer.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(msg_id);
}
if ((flags & 2) != 0) {
stream.writeInt32(button_id);
}
if ((flags & 4) != 0) {
stream.writeString(url);
}
}
}
public static class TL_messages_hidePeerSettingsBar extends TLObject {
public static int constructor = 0x4facb138;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getScheduledHistory extends TLObject {
public static int constructor = 0xe2c2685b;
public InputPeer peer;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(hash);
}
}
public static class TL_messages_getScheduledMessages extends TLObject {
public static int constructor = 0xbdbb0464;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_sendScheduledMessages extends TLObject {
public static int constructor = 0xbd38850a;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_deleteScheduledMessages extends TLObject {
public static int constructor = 0x59ae2b16;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public static TL_messages_deleteScheduledMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_messages_deleteScheduledMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_messages_deleteScheduledMessages", constructor));
} else {
return null;
}
}
TL_messages_deleteScheduledMessages result = new TL_messages_deleteScheduledMessages();
result.readParams(stream, exception);
return result;
}
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void readParams(AbstractSerializedData stream, boolean exception) {
peer = InputPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
id.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_sendReaction extends TLObject {
public static int constructor = 0x25690ce4;
public int flags;
public InputPeer peer;
public int msg_id;
public String reaction;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
if ((flags & 1) != 0) {
stream.writeString(reaction);
}
}
}
public static class TL_messages_getMessagesReactions extends TLObject {
public static int constructor = 0x8bba90e6;
public InputPeer peer;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_messages_getMessageReactionsList extends TLObject {
public static int constructor = 0x15b1376a;
public int flags;
public InputPeer peer;
public int id;
public String reaction;
public String offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messageReactionsList.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeString(reaction);
}
if ((flags & 2) != 0) {
stream.writeString(offset);
}
stream.writeInt32(limit);
}
}
public static class TL_messages_getPollVotes extends TLObject {
public static int constructor = 0xb86e380e;
public int flags;
public InputPeer peer;
public int id;
public byte[] option;
public String offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_votesList.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(id);
if ((flags & 1) != 0) {
stream.writeByteArray(option);
}
if ((flags & 2) != 0) {
stream.writeString(offset);
}
stream.writeInt32(limit);
}
}
public static class TL_messages_getDialogFilters extends TLObject {
public static int constructor = 0xf19ed96d;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_dialogFilter object = TL_dialogFilter.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_getSuggestedDialogFilters extends TLObject {
public static int constructor = 0xa29cd42c;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_dialogFilterSuggested object = TL_dialogFilterSuggested.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_messages_updateDialogFilter extends TLObject {
public static int constructor = 0x1ad4a04a;
public int flags;
public int id;
public TL_dialogFilter filter;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
filter.serializeToStream(stream);
}
}
}
public static class TL_messages_updateDialogFiltersOrder extends TLObject {
public static int constructor = 0xc563c1e4;
public ArrayList<Integer> order = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(order.get(a));
}
}
}
public static class TL_messages_getOldFeaturedStickers extends TLObject {
public static int constructor = 0x5fe7025b;
public int offset;
public int limit;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_FeaturedStickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(offset);
stream.writeInt32(limit);
stream.writeInt32(hash);
}
}
public static class TL_messages_getReplies extends TLObject {
public static int constructor = 0x24b581ba;
public InputPeer peer;
public int msg_id;
public int offset_id;
public int offset_date;
public int add_offset;
public int limit;
public int max_id;
public int min_id;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(offset_id);
stream.writeInt32(offset_date);
stream.writeInt32(add_offset);
stream.writeInt32(limit);
stream.writeInt32(max_id);
stream.writeInt32(min_id);
stream.writeInt32(hash);
}
}
public static class TL_messages_getDiscussionMessage extends TLObject {
public static int constructor = 0x446972fd;
public InputPeer peer;
public int msg_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_discussionMessage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
}
}
public static class TL_messages_readDiscussion extends TLObject {
public static int constructor = 0xf731a9f4;
public InputPeer peer;
public int msg_id;
public int read_max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(read_max_id);
}
}
public static class TL_messages_unpinAllMessages extends TLObject {
public static int constructor = 0xf025bc8b;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedHistory.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getExportedChatInvites extends TLObject {
public static int constructor = 0xa2b5a3f6;
public int flags;
public boolean revoked;
public InputPeer peer;
public InputUser admin_id;
public int offset_date;
public String offset_link;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_exportedChatInvites.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoked ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
peer.serializeToStream(stream);
admin_id.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(offset_date);
}
if ((flags & 4) != 0) {
stream.writeString(offset_link);
}
stream.writeInt32(limit);
}
}
public static class TL_messages_getExportedChatInvite extends TLObject {
public static int constructor = 0x73746f5c;
public InputPeer peer;
public String link;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_ExportedChatInvite.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(link);
}
}
public static class TL_messages_editExportedChatInvite extends TLObject {
public static int constructor = 0x2e4ffbe;
public int flags;
public boolean revoked;
public InputPeer peer;
public String link;
public int expire_date;
public int usage_limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_ExportedChatInvite.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoked ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeString(link);
if ((flags & 1) != 0) {
stream.writeInt32(expire_date);
}
if ((flags & 2) != 0) {
stream.writeInt32(usage_limit);
}
}
}
public static class TL_messages_deleteRevokedExportedChatInvites extends TLObject {
public static int constructor = 0x56987bd5;
public InputPeer peer;
public InputUser admin_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
admin_id.serializeToStream(stream);
}
}
public static class TL_messages_deleteExportedChatInvite extends TLObject {
public static int constructor = 0xd464a42b;
public InputPeer peer;
public String link;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(link);
}
}
public static class TL_messages_getAdminsWithInvites extends TLObject {
public static int constructor = 0x3920e6ef;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chatAdminsWithInvites.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getChatInviteImporters extends TLObject {
public static int constructor = 0x26fb7289;
public InputPeer peer;
public String link;
public int offset_date;
public InputUser offset_user;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chatInviteImporters.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(link);
stream.writeInt32(offset_date);
offset_user.serializeToStream(stream);
stream.writeInt32(limit);
}
}
public static class TL_messages_setHistoryTTL extends TLObject {
public static int constructor = 0xb80e5fe4;
public InputPeer peer;
public int period;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(period);
}
}
public static class TL_messages_deleteChat extends TLObject {
public static int constructor = 0x83247d11;
public int chat_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(chat_id);
}
}
public static class TL_messages_deletePhoneCallHistory extends TLObject {
public static int constructor = 0xf9cbe409;
public int flags;
public boolean revoke;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedFoundMessages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = revoke ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
}
}
public static class TL_messages_checkHistoryImport extends TLObject {
public static int constructor = 0x43fe19f3;
public String import_head;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_historyImportParsed.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(import_head);
}
}
public static class TL_messages_initHistoryImport extends TLObject {
public static int constructor = 0x34090c3b;
public InputPeer peer;
public InputFile file;
public int media_count;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_historyImport.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
file.serializeToStream(stream);
stream.writeInt32(media_count);
}
}
public static class TL_messages_uploadImportedMedia extends TLObject {
public static int constructor = 0x2a862092;
public InputPeer peer;
public long import_id;
public String file_name;
public InputMedia media;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return MessageMedia.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt64(import_id);
stream.writeString(file_name);
media.serializeToStream(stream);
}
}
public static class TL_messages_startHistoryImport extends TLObject {
public static int constructor = 0xb43df344;
public InputPeer peer;
public long import_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt64(import_id);
}
}
public static class TL_messages_checkHistoryImportPeer extends TLObject {
public static int constructor = 0x5dc60f03;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_checkedHistoryImportPeer.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_messages_setChatTheme extends TLObject {
public static int constructor = 0xe63be13f;
public InputPeer peer;
public String emoticon;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeString(emoticon);
}
}
public static class TL_help_getAppChangelog extends TLObject {
public static int constructor = 0x9010ef6f;
public String prev_app_version;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(prev_app_version);
}
}
public static class TL_messages_toggleStickerSets extends TLObject {
public static int constructor = 0xb5052fea;
public int flags;
public boolean uninstall;
public boolean archive;
public boolean unarchive;
public ArrayList<InputStickerSet> stickersets = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = uninstall ? (flags | 1) : (flags &~ 1);
flags = archive ? (flags | 2) : (flags &~ 2);
flags = unarchive ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = stickersets.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickersets.get(a).serializeToStream(stream);
}
}
}
public static class TL_messages_uploadEncryptedFile extends TLObject {
public static int constructor = 0x5057c497;
public TL_inputEncryptedChat peer;
public InputEncryptedFile file;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return EncryptedFile.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
file.serializeToStream(stream);
}
}
public static class TL_messages_searchStickerSets extends TLObject {
public static int constructor = 0xc2b7d08b;
public int flags;
public boolean exclude_featured;
public String q;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_FoundStickerSets.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = exclude_featured ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeString(q);
stream.writeInt32(hash);
}
}
public static class TL_messages_markDialogUnread extends TLObject {
public static int constructor = 0xc286d98f;
public int flags;
public boolean unread;
public InputDialogPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
}
}
public static class TL_messages_getDialogUnreadMarks extends TLObject {
public static int constructor = 0x22e24e22;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
DialogPeer object = DialogPeer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_help_setBotUpdatesStatus extends TLObject {
public static int constructor = 0xec22cfcd;
public int pending_updates_count;
public String message;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(pending_updates_count);
stream.writeString(message);
}
}
public static class TL_messages_reorderStickerSets extends TLObject {
public static int constructor = 0x78337739;
public int flags;
public boolean masks;
public ArrayList<Long> order = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = masks ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
stream.writeInt32(0x1cb5c415);
int count = order.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt64(order.get(a));
}
}
}
public static class TL_messages_getDocumentByHash extends TLObject {
public static int constructor = 0x338e2464;
public byte[] sha256;
public int size;
public String mime_type;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Document.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(sha256);
stream.writeInt32(size);
stream.writeString(mime_type);
}
}
public static class TL_help_getRecentMeUrls extends TLObject {
public static int constructor = 0x3dc0f114;
public String referer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_help_recentMeUrls.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(referer);
}
}
public static class TL_help_getDeepLinkInfo extends TLObject {
public static int constructor = 0x3fedc75f;
public String path;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return help_DeepLinkInfo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(path);
}
}
public static class TL_channels_readHistory extends TLObject {
public static int constructor = 0xcc104937;
public InputChannel channel;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(max_id);
}
}
public static class TL_channels_deleteMessages extends TLObject {
public static int constructor = 0x84c1fd4e;
public InputChannel channel;
public ArrayList<Integer> id = new ArrayList<>();
public static TL_channels_deleteMessages TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_channels_deleteMessages.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_channels_deleteMessages", constructor));
} else {
return null;
}
}
TL_channels_deleteMessages result = new TL_channels_deleteMessages();
result.readParams(stream, exception);
return result;
}
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedMessages.TLdeserialize(stream, constructor, exception);
}
public void readParams(AbstractSerializedData stream, boolean exception) {
channel = InputChannel.TLdeserialize(stream, stream.readInt32(exception), exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
id.add(stream.readInt32(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_channels_deleteUserHistory extends TLObject {
public static int constructor = 0xd10dd71b;
public InputChannel channel;
public InputUser user_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_affectedHistory.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
user_id.serializeToStream(stream);
}
}
public static class TL_channels_reportSpam extends TLObject {
public static int constructor = 0xfe087810;
public InputChannel channel;
public InputUser user_id;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
user_id.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_channels_getMessages extends TLObject {
public static int constructor = 0x93d7b347;
public InputChannel channel;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_channels_getParticipants extends TLObject {
public static int constructor = 0x123e05e9;
public InputChannel channel;
public ChannelParticipantsFilter filter;
public int offset;
public int limit;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return channels_ChannelParticipants.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
filter.serializeToStream(stream);
stream.writeInt32(offset);
stream.writeInt32(limit);
stream.writeInt32(hash);
}
}
public static class TL_channels_getParticipant extends TLObject {
public static int constructor = 0xa0ab6cc6;
public InputChannel channel;
public InputPeer participant;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_channels_channelParticipant.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
participant.serializeToStream(stream);
}
}
public static class TL_channels_getChannels extends TLObject {
public static int constructor = 0xa7f6bbb;
public ArrayList<InputChannel> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
id.get(a).serializeToStream(stream);
}
}
}
public static class TL_channels_getFullChannel extends TLObject {
public static int constructor = 0x8736a09;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_chatFull.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_channels_createChannel extends TLObject {
public static int constructor = 0x3d5fb10f;
public int flags;
public boolean broadcast;
public boolean megagroup;
public boolean for_import;
public String title;
public String about;
public InputGeoPoint geo_point;
public String address;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = broadcast ? (flags | 1) : (flags &~ 1);
flags = megagroup ? (flags | 2) : (flags &~ 2);
flags = for_import ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
stream.writeString(title);
stream.writeString(about);
if ((flags & 4) != 0) {
geo_point.serializeToStream(stream);
}
if ((flags & 4) != 0) {
stream.writeString(address);
}
}
}
public static class TL_channels_editAdmin extends TLObject {
public static int constructor = 0xd33c8902;
public InputChannel channel;
public InputUser user_id;
public TL_chatAdminRights admin_rights;
public String rank;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
user_id.serializeToStream(stream);
admin_rights.serializeToStream(stream);
stream.writeString(rank);
}
}
public static class TL_channels_editTitle extends TLObject {
public static int constructor = 0x566decd0;
public InputChannel channel;
public String title;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeString(title);
}
}
public static class TL_channels_editPhoto extends TLObject {
public static int constructor = 0xf12e57c9;
public InputChannel channel;
public InputChatPhoto photo;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
photo.serializeToStream(stream);
}
}
public static class TL_channels_checkUsername extends TLObject {
public static int constructor = 0x10e6bd2c;
public InputChannel channel;
public String username;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeString(username);
}
}
public static class TL_channels_updateUsername extends TLObject {
public static int constructor = 0x3514b3de;
public InputChannel channel;
public String username;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeString(username);
}
}
public static class TL_channels_joinChannel extends TLObject {
public static int constructor = 0x24b524c5;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_channels_leaveChannel extends TLObject {
public static int constructor = 0xf836aa95;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_channels_inviteToChannel extends TLObject {
public static int constructor = 0x199f3a6c;
public InputChannel channel;
public ArrayList<InputUser> users = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_channels_deleteChannel extends TLObject {
public static int constructor = 0xc0111fe3;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_channels_exportMessageLink extends TLObject {
public static int constructor = 0xe63fadeb;
public int flags;
public boolean grouped;
public boolean thread;
public InputChannel channel;
public int id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_exportedMessageLink.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = grouped ? (flags | 1) : (flags &~ 1);
flags = thread ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
channel.serializeToStream(stream);
stream.writeInt32(id);
}
}
public static class TL_channels_toggleSignatures extends TLObject {
public static int constructor = 0x1f69b606;
public InputChannel channel;
public boolean enabled;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeBool(enabled);
}
}
public static class TL_channels_getAdminedPublicChannels extends TLObject {
public static int constructor = 0xf8b036af;
public int flags;
public boolean by_location;
public boolean check_limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Chats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = by_location ? (flags | 1) : (flags &~ 1);
flags = check_limit ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
}
}
public static class TL_channels_editBanned extends TLObject {
public static int constructor = 0x96e6cd81;
public InputChannel channel;
public InputPeer participant;
public TL_chatBannedRights banned_rights;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
participant.serializeToStream(stream);
banned_rights.serializeToStream(stream);
}
}
public static class TL_channels_getAdminLog extends TLObject {
public static int constructor = 0x33ddf480;
public int flags;
public InputChannel channel;
public String q;
public TL_channelAdminLogEventsFilter events_filter;
public ArrayList<InputUser> admins = new ArrayList<>();
public long max_id;
public long min_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_channels_adminLogResults.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
channel.serializeToStream(stream);
stream.writeString(q);
if ((flags & 1) != 0) {
events_filter.serializeToStream(stream);
}
if ((flags & 2) != 0) {
stream.writeInt32(0x1cb5c415);
int count = admins.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
admins.get(a).serializeToStream(stream);
}
}
stream.writeInt64(max_id);
stream.writeInt64(min_id);
stream.writeInt32(limit);
}
}
public static class TL_channels_setStickers extends TLObject {
public static int constructor = 0xea8ca4f9;
public InputChannel channel;
public InputStickerSet stickerset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stickerset.serializeToStream(stream);
}
}
public static class TL_channels_readMessageContents extends TLObject {
public static int constructor = 0xeab5dc38;
public InputChannel channel;
public ArrayList<Integer> id = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = id.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(id.get(a));
}
}
}
public static class TL_channels_deleteHistory extends TLObject {
public static int constructor = 0xaf369d42;
public InputChannel channel;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(max_id);
}
}
public static class TL_channels_searchPosts extends TLObject {
public static int constructor = 0x43a0a7e2;
public String q;
public int offset_rate;
public InputPeer offset_peer;
public int offset_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(q);
stream.writeInt32(offset_rate);
offset_peer.serializeToStream(stream);
stream.writeInt32(offset_id);
stream.writeInt32(limit);
}
}
public static class TL_channels_toggleSlowMode extends TLObject {
public static int constructor = 0xedd49ef0;
public InputChannel channel;
public int seconds;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(seconds);
}
}
public static class TL_channels_getInactiveChannels extends TLObject {
public static int constructor = 0x11e831ee;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_inactiveChats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_channels_convertToGigagroup extends TLObject {
public static int constructor = 0xb290c69;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_channels_viewSponsoredMessage extends TLObject {
public static int constructor = 0xbeaedb94;
public InputChannel channel;
public byte[] random_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeByteArray(random_id);
}
}
public static class TL_channels_getSponsoredMessages extends TLObject {
public static int constructor = 0xec210fbf;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_sponsoredMessages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
}
}
public static class TL_stickers_createStickerSet extends TLObject {
public static int constructor = 0x9021ab67;
public int flags;
public boolean masks;
public boolean animated;
public InputUser user_id;
public String title;
public String short_name;
public InputDocument thumb;
public ArrayList<TL_inputStickerSetItem> stickers = new ArrayList<>();
public String software;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_messages_stickerSet.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = masks ? (flags | 1) : (flags &~ 1);
flags = animated ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
user_id.serializeToStream(stream);
stream.writeString(title);
stream.writeString(short_name);
if ((flags & 4) != 0) {
thumb.serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
int count = stickers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stickers.get(a).serializeToStream(stream);
}
if ((flags & 8) != 0) {
stream.writeString(software);
}
}
}
public static class TL_stickers_checkShortName extends TLObject {
public static int constructor = 0x284b3639;
public String short_name;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(short_name);
}
}
public static class TL_stickers_suggestShortName extends TLObject {
public static int constructor = 0x4dafc503;
public String title;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_stickers_suggestedShortName.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(title);
}
}
public static class TL_phone_getCallConfig extends TLObject {
public static int constructor = 0x55451fa9;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_dataJSON.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_phone_requestCall extends TLObject {
public static int constructor = 0x42ff96ed;
public int flags;
public boolean video;
public InputUser user_id;
public int random_id;
public byte[] g_a_hash;
public TL_phoneCallProtocol protocol;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_phoneCall.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
user_id.serializeToStream(stream);
stream.writeInt32(random_id);
stream.writeByteArray(g_a_hash);
protocol.serializeToStream(stream);
}
}
public static class TL_phone_acceptCall extends TLObject {
public static int constructor = 0x3bd2b4a0;
public TL_inputPhoneCall peer;
public byte[] g_b;
public TL_phoneCallProtocol protocol;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_phoneCall.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeByteArray(g_b);
protocol.serializeToStream(stream);
}
}
public static class TL_phone_confirmCall extends TLObject {
public static int constructor = 0x2efe1722;
public TL_inputPhoneCall peer;
public byte[] g_a;
public long key_fingerprint;
public TL_phoneCallProtocol protocol;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_phoneCall.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeByteArray(g_a);
stream.writeInt64(key_fingerprint);
protocol.serializeToStream(stream);
}
}
public static class TL_phone_receivedCall extends TLObject {
public static int constructor = 0x17d54f61;
public TL_inputPhoneCall peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_phone_discardCall extends TLObject {
public static int constructor = 0xb2cbc1c0;
public int flags;
public boolean video;
public TL_inputPhoneCall peer;
public int duration;
public PhoneCallDiscardReason reason;
public long connection_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = video ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(duration);
reason.serializeToStream(stream);
stream.writeInt64(connection_id);
}
}
public static class TL_phone_setCallRating extends TLObject {
public static int constructor = 0x59ead627;
public int flags;
public boolean user_initiative;
public TL_inputPhoneCall peer;
public int rating;
public String comment;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = user_initiative ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(rating);
stream.writeString(comment);
}
}
public static class TL_phone_saveCallDebug extends TLObject {
public static int constructor = 0x277add7e;
public TL_inputPhoneCall peer;
public TL_dataJSON debug;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
debug.serializeToStream(stream);
}
}
public static class TL_phone_sendSignalingData extends TLObject {
public static int constructor = 0xff7a9383;
public TL_inputPhoneCall peer;
public byte[] data;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeByteArray(data);
}
}
public static class TL_phone_createGroupCall extends TLObject {
public static int constructor = 0x48cdc6d8;
public int flags;
public InputPeer peer;
public int random_id;
public String title;
public int schedule_date;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(random_id);
if ((flags & 1) != 0) {
stream.writeString(title);
}
if ((flags & 2) != 0) {
stream.writeInt32(schedule_date);
}
}
}
public static class TL_phone_joinGroupCall extends TLObject {
public static int constructor = 0xb132ff7b;
public int flags;
public boolean muted;
public boolean video_stopped;
public TL_inputGroupCall call;
public InputPeer join_as;
public String invite_hash;
public TL_dataJSON params;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = muted ? (flags | 1) : (flags &~ 1);
flags = video_stopped ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
call.serializeToStream(stream);
join_as.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(invite_hash);
}
params.serializeToStream(stream);
}
}
public static class TL_phone_leaveGroupCall extends TLObject {
public static int constructor = 0x500377f9;
public TL_inputGroupCall call;
public int source;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(source);
}
}
public static class TL_phone_inviteToGroupCall extends TLObject {
public static int constructor = 0x7b393160;
public TL_inputGroupCall call;
public ArrayList<InputUser> users = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = users.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
users.get(a).serializeToStream(stream);
}
}
}
public static class TL_phone_discardGroupCall extends TLObject {
public static int constructor = 0x7a777135;
public TL_inputGroupCall call;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
}
}
public static class TL_phone_toggleGroupCallSettings extends TLObject {
public static int constructor = 0x74bbb43d;
public int flags;
public boolean reset_invite_hash;
public TL_inputGroupCall call;
public boolean join_muted;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = reset_invite_hash ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
call.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeBool(join_muted);
}
}
}
public static class TL_phone_getGroupCall extends TLObject {
public static int constructor = 0x41845db;
public TL_inputGroupCall call;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_groupCall.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(limit);
}
}
public static class TL_phone_getGroupParticipants extends TLObject {
public static int constructor = 0xc558d8ab;
public TL_inputGroupCall call;
public ArrayList<InputPeer> ids = new ArrayList<>();
public ArrayList<Integer> sources = new ArrayList<>();
public String offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_groupParticipants.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = ids.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
ids.get(a).serializeToStream(stream);
}
stream.writeInt32(0x1cb5c415);
count = sources.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(sources.get(a));
}
stream.writeString(offset);
stream.writeInt32(limit);
}
}
public static class TL_phone_checkGroupCall extends TLObject {
public static int constructor = 0xb59cf977;
public TL_inputGroupCall call;
public ArrayList<Integer> sources = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
vector.objects.add(stream.readInt32(exception));
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = sources.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(sources.get(a));
}
}
}
public static class TL_phone_toggleGroupCallRecord extends TLObject {
public static int constructor = 0xf128c708;
public int flags;
public boolean start;
public boolean video;
public TL_inputGroupCall call;
public String title;
public boolean video_portrait;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = start ? (flags | 1) : (flags &~ 1);
flags = video ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
call.serializeToStream(stream);
if ((flags & 2) != 0) {
stream.writeString(title);
}
if ((flags & 4) != 0) {
stream.writeBool(video_portrait);
}
}
}
public static class TL_phone_editGroupCallParticipant extends TLObject {
public static int constructor = 0xa5273abf;
public int flags;
public TL_inputGroupCall call;
public InputPeer participant;
public boolean muted;
public int volume;
public boolean raise_hand;
public boolean video_stopped;
public boolean video_paused;
public boolean presentation_paused;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
call.serializeToStream(stream);
participant.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeBool(muted);
}
if ((flags & 2) != 0) {
stream.writeInt32(volume);
}
if ((flags & 4) != 0) {
stream.writeBool(raise_hand);
}
if ((flags & 8) != 0) {
stream.writeBool(video_stopped);
}
if ((flags & 16) != 0) {
stream.writeBool(video_paused);
}
if ((flags & 32) != 0) {
stream.writeBool(presentation_paused);
}
}
}
public static class TL_phone_editGroupCallTitle extends TLObject {
public static int constructor = 0x1ca6ac0a;
public TL_inputGroupCall call;
public String title;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeString(title);
}
}
public static class TL_phone_getGroupCallJoinAs extends TLObject {
public static int constructor = 0xef7c213a;
public InputPeer peer;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_joinAsPeers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
}
}
public static class TL_phone_exportGroupCallInvite extends TLObject {
public static int constructor = 0xe6aa647f;
public int flags;
public boolean can_self_unmute;
public TL_inputGroupCall call;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_phone_exportedGroupCallInvite.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = can_self_unmute ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
call.serializeToStream(stream);
}
}
public static class TL_phone_toggleGroupCallStartSubscription extends TLObject {
public static int constructor = 0x219c34e6;
public TL_inputGroupCall call;
public boolean subscribed;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
stream.writeBool(subscribed);
}
}
public static class TL_phone_startScheduledGroupCall extends TLObject {
public static int constructor = 0x5680e342;
public TL_inputGroupCall call;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
}
}
public static class TL_phone_saveDefaultGroupCallJoinAs extends TLObject {
public static int constructor = 0x575e1f8c;
public InputPeer peer;
public InputPeer join_as;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
join_as.serializeToStream(stream);
}
}
public static class TL_phone_joinGroupCallPresentation extends TLObject {
public static int constructor = 0xcbea6bc4;
public TL_inputGroupCall call;
public TL_dataJSON params;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
params.serializeToStream(stream);
}
}
public static class TL_phone_leaveGroupCallPresentation extends TLObject {
public static int constructor = 0x1c50d144;
public TL_inputGroupCall call;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
call.serializeToStream(stream);
}
}
public static class TL_payments_getPaymentForm extends TLObject {
public static int constructor = 0x8a333c8d;
public int flags;
public InputPeer peer;
public int msg_id;
public TL_dataJSON theme_params;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_payments_paymentForm.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
if ((flags & 1) != 0) {
theme_params.serializeToStream(stream);
}
}
}
public static class TL_payments_getPaymentReceipt extends TLObject {
public static int constructor = 0x2478d1cc;
public InputPeer peer;
public int msg_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_payments_paymentReceipt.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
}
}
public static class TL_payments_validateRequestedInfo extends TLObject {
public static int constructor = 0xdb103170;
public int flags;
public boolean save;
public InputPeer peer;
public int msg_id;
public TL_paymentRequestedInfo info;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_payments_validatedRequestedInfo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = save ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
info.serializeToStream(stream);
}
}
public static class TL_payments_sendPaymentForm extends TLObject {
public static int constructor = 0x30c3bc9d;
public int flags;
public long form_id;
public InputPeer peer;
public int msg_id;
public String requested_info_id;
public String shipping_option_id;
public InputPaymentCredentials credentials;
public long tip_amount;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return payments_PaymentResult.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt64(form_id);
peer.serializeToStream(stream);
stream.writeInt32(msg_id);
if ((flags & 1) != 0) {
stream.writeString(requested_info_id);
}
if ((flags & 2) != 0) {
stream.writeString(shipping_option_id);
}
credentials.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt64(tip_amount);
}
}
}
public static class TL_help_supportName extends TLObject {
public static int constructor = 0x8c05f1c9;
public String name;
public static TL_help_supportName TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_help_supportName.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_help_supportName", constructor));
} else {
return null;
}
}
TL_help_supportName result = new TL_help_supportName();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
name = stream.readString(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(name);
}
}
public static class TL_inputThemeSettings extends TLObject {
public static int constructor = 0xff38f912;
public int flags;
public boolean message_colors_animated;
public BaseTheme base_theme;
public int accent_color;
public ArrayList<Integer> message_colors = new ArrayList<>();
public InputWallPaper wallpaper;
public WallPaperSettings wallpaper_settings;
public static TL_inputThemeSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_inputThemeSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_inputThemeSettings", constructor));
} else {
return null;
}
}
TL_inputThemeSettings result = new TL_inputThemeSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
message_colors_animated = (flags & 4) != 0;
base_theme = BaseTheme.TLdeserialize(stream, stream.readInt32(exception), exception);
accent_color = stream.readInt32(exception);
if ((flags & 1) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
message_colors.add(stream.readInt32(exception));
}
}
if ((flags & 2) != 0) {
wallpaper = InputWallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2) != 0) {
wallpaper_settings = WallPaperSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = message_colors_animated ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
base_theme.serializeToStream(stream);
stream.writeInt32(accent_color);
if ((flags & 1) != 0) {
stream.writeInt32(0x1cb5c415);
int count = message_colors.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeInt32(message_colors.get(a));
}
}
if ((flags & 2) != 0) {
wallpaper.serializeToStream(stream);
}
if ((flags & 2) != 0) {
wallpaper_settings.serializeToStream(stream);
}
}
}
public static class TL_payments_getSavedInfo extends TLObject {
public static int constructor = 0x227d824b;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_payments_savedInfo.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_payments_clearSavedInfo extends TLObject {
public static int constructor = 0xd83d70c1;
public int flags;
public boolean credentials;
public boolean info;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = credentials ? (flags | 1) : (flags &~ 1);
flags = info ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
}
}
public static class TL_payments_getBankCardData extends TLObject {
public static int constructor = 0x2e79d779;
public String number;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_payments_bankCardData.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(number);
}
}
public static class TL_langpack_getLangPack extends TLObject {
public static int constructor = 0x9ab5c58e;
public String lang_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_langPackDifference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
}
}
public static class TL_langpack_getStrings extends TLObject {
public static int constructor = 0x2e1ee318;
public String lang_code;
public ArrayList<String> keys = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
LangPackString object = LangPackString.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_code);
stream.writeInt32(0x1cb5c415);
int count = keys.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(keys.get(a));
}
}
}
public static class TL_langpack_getDifference extends TLObject {
public static int constructor = 0xcd984aa5;
public String lang_pack;
public String lang_code;
public int from_version;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_langPackDifference.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_pack);
stream.writeString(lang_code);
stream.writeInt32(from_version);
}
}
public static class TL_langpack_getLanguages extends TLObject {
public static int constructor = 0x800fd57d;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_langPackLanguage object = TL_langPackLanguage.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
public static class TL_langpack_getLanguage extends TLObject {
public static int constructor = 0x6a596502;
public String lang_pack;
public String lang_code;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_langPackLanguage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(lang_pack);
stream.writeString(lang_code);
}
}
public static class TL_folders_editPeerFolders extends TLObject {
public static int constructor = 0x6847d0ab;
public ArrayList<TL_inputFolderPeer> folder_peers = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = folder_peers.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
folder_peers.get(a).serializeToStream(stream);
}
}
}
public static class TL_folders_deleteFolder extends TLObject {
public static int constructor = 0x1c295881;
public int folder_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Updates.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(folder_id);
}
}
public static class TL_stats_getBroadcastStats extends TLObject {
public static int constructor = 0xab42441a;
public int flags;
public boolean dark;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_stats_broadcastStats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = dark ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
channel.serializeToStream(stream);
}
}
public static class TL_stats_loadAsyncGraph extends TLObject {
public static int constructor = 0x621d5fa0;
public int flags;
public String token;
public long x;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return StatsGraph.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeString(token);
if ((flags & 1) != 0) {
stream.writeInt64(x);
}
}
}
public static class TL_stats_getMegagroupStats extends TLObject {
public static int constructor = 0xdcdf8607;
public int flags;
public boolean dark;
public InputChannel channel;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_stats_megagroupStats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = dark ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
channel.serializeToStream(stream);
}
}
public static class TL_stats_getMessagePublicForwards extends TLObject {
public static int constructor = 0x5630281b;
public InputChannel channel;
public int msg_id;
public int offset_rate;
public InputPeer offset_peer;
public int offset_id;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Messages.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
channel.serializeToStream(stream);
stream.writeInt32(msg_id);
stream.writeInt32(offset_rate);
offset_peer.serializeToStream(stream);
stream.writeInt32(offset_id);
stream.writeInt32(limit);
}
}
public static class TL_stats_getMessageStats extends TLObject {
public static int constructor = 0xb6e0a3f5;
public int flags;
public boolean dark;
public InputChannel channel;
public int msg_id;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_stats_messageStats.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = dark ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
channel.serializeToStream(stream);
stream.writeInt32(msg_id);
}
}
//manually created
public static class TL_photoPathSize extends PhotoSize {
public static int constructor = 0xd8214d41;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = stream.readString(exception);
bytes = stream.readByteArray(exception);
w = h = 50;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(type);
stream.writeByteArray(bytes);
}
}
//RichText start
public static abstract class RichText extends TLObject {
public String url;
public long webpage_id;
public String email;
public ArrayList<RichText> texts = new ArrayList<>();
public RichText parentRichText;
public static RichText TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
RichText result = null;
switch (constructor) {
case 0x1ccb966a:
result = new TL_textPhone();
break;
case 0xc7fb5e01:
result = new TL_textSuperscript();
break;
case 0x81ccf4f:
result = new TL_textImage();
break;
case 0xc12622c4:
result = new TL_textUnderline();
break;
case 0xed6a8504:
result = new TL_textSubscript();
break;
case 0x3c2884c1:
result = new TL_textUrl();
break;
case 0x35553762:
result = new TL_textAnchor();
break;
case 0xdc3d824f:
result = new TL_textEmpty();
break;
case 0xde5a0dd6:
result = new TL_textEmail();
break;
case 0x744694e0:
result = new TL_textPlain();
break;
case 0x6724abc4:
result = new TL_textBold();
break;
case 0x9bf8bb95:
result = new TL_textStrike();
break;
case 0x7e6260d7:
result = new TL_textConcat();
break;
case 0xd912a59c:
result = new TL_textItalic();
break;
case 0x34b8621:
result = new TL_textMarked();
break;
case 0x6c3f19b9:
result = new TL_textFixed();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in RichText", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_pageBlockList_layer82 extends TL_pageBlockList {
public static int constructor = 0x3a58c7f4;
public void readParams(AbstractSerializedData stream, boolean exception) {
ordered = stream.readBool(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
RichText object = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
TL_pageListItemText item = new TL_pageListItemText();
item.text = object;
items.add(item);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeBool(ordered);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
TL_pageListItemText item = (TL_pageListItemText) items.get(a);
item.text.serializeToStream(stream);
}
}
}
//RichText end
//MessageMedia start
public static abstract class MessageMedia extends TLObject {
public byte[] bytes;
public Audio audio_unused;
public int flags;
public boolean shipping_address_requested;
public Photo photo;
public GeoPoint geo;
public int heading;
public String currency;
public String description;
public int receipt_msg_id;
public long total_amount;
public String start_param;
public String title;
public String address;
public String provider;
public String venue_id;
public Video video_unused;
public Document document;
public String captionLegacy;
public TL_game game;
public String phone_number;
public String first_name;
public String last_name;
public String vcard;
public int user_id;
public WebPage webpage;
public String venue_type;
public boolean test;
public int period;
public int ttl_seconds;
public int proximity_notification_radius;
public static MessageMedia TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
MessageMedia result = null;
switch (constructor) {
case 0x29632a36:
result = new TL_messageMediaUnsupported_old();
break;
case 0xc6b68300:
result = new TL_messageMediaAudio_layer45();
break;
case 0xc8c45a2a:
result = new TL_messageMediaPhoto_old();
break;
case 0x84551347:
result = new TL_messageMediaInvoice();
break;
case 0x9f84f49e:
result = new TL_messageMediaUnsupported();
break;
case 0x3ded6320:
result = new TL_messageMediaEmpty();
break;
case 0x7912b71f:
result = new TL_messageMediaVenue_layer71();
break;
case 0xb940c666:
result = new TL_messageMediaGeoLive();
break;
case 0x7c3c2609:
result = new TL_messageMediaGeoLive_layer119();
break;
case 0x2ec0533f:
result = new TL_messageMediaVenue();
break;
case 0xa2d24290:
result = new TL_messageMediaVideo_old();
break;
case 0x2fda2204:
result = new TL_messageMediaDocument_old();
break;
case 0xf3e02ea8:
result = new TL_messageMediaDocument_layer68();
break;
case 0xfdb19008:
result = new TL_messageMediaGame();
break;
case 0x7c4414d3:
result = new TL_messageMediaDocument_layer74();
break;
case 0x5e7d2f39:
result = new TL_messageMediaContact_layer81();
break;
case 0x695150d7:
result = new TL_messageMediaPhoto();
break;
case 0x4bd6e798:
result = new TL_messageMediaPoll();
break;
case 0xb5223b0f:
result = new TL_messageMediaPhoto_layer74();
break;
case 0x3d8ce53d:
result = new TL_messageMediaPhoto_layer68();
break;
case 0x5bcf1675:
result = new TL_messageMediaVideo_layer45();
break;
case 0x3f7ee58b:
result = new TL_messageMediaDice();
break;
case 0x638fe46b:
result = new TL_messageMediaDice_layer111();
break;
case 0x56e0d474:
result = new TL_messageMediaGeo();
break;
case 0xa32dd600:
result = new TL_messageMediaWebPage();
break;
case 0x9cb070d7:
result = new TL_messageMediaDocument();
break;
case 0xcbf24940:
result = new TL_messageMediaContact();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in MessageMedia", constructor));
}
if (result != null) {
result.readParams(stream, exception);
if (result.video_unused != null) {
TL_messageMediaDocument mediaDocument = new TL_messageMediaDocument();
if (result.video_unused instanceof TL_videoEncrypted) {
mediaDocument.document = new TL_documentEncrypted();
mediaDocument.document.key = result.video_unused.key;
mediaDocument.document.iv = result.video_unused.iv;
} else {
mediaDocument.document = new TL_document();
}
mediaDocument.flags = 3;
mediaDocument.document.file_reference = new byte[0];
mediaDocument.document.id = result.video_unused.id;
mediaDocument.document.access_hash = result.video_unused.access_hash;
mediaDocument.document.date = result.video_unused.date;
if (result.video_unused.mime_type != null) {
mediaDocument.document.mime_type = result.video_unused.mime_type;
} else {
mediaDocument.document.mime_type = "video/mp4";
}
mediaDocument.document.size = result.video_unused.size;
mediaDocument.document.thumbs.add(result.video_unused.thumb);
mediaDocument.document.dc_id = result.video_unused.dc_id;
mediaDocument.captionLegacy = result.captionLegacy;
TL_documentAttributeVideo attributeVideo = new TL_documentAttributeVideo();
attributeVideo.w = result.video_unused.w;
attributeVideo.h = result.video_unused.h;
attributeVideo.duration = result.video_unused.duration;
mediaDocument.document.attributes.add(attributeVideo);
result = mediaDocument;
if (mediaDocument.captionLegacy == null) {
mediaDocument.captionLegacy = "";
}
} else if (result.audio_unused != null) {
TL_messageMediaDocument mediaDocument = new TL_messageMediaDocument();
if (result.audio_unused instanceof TL_audioEncrypted) {
mediaDocument.document = new TL_documentEncrypted();
mediaDocument.document.key = result.audio_unused.key;
mediaDocument.document.iv = result.audio_unused.iv;
} else {
mediaDocument.document = new TL_document();
}
mediaDocument.flags = 3;
mediaDocument.document.file_reference = new byte[0];
mediaDocument.document.id = result.audio_unused.id;
mediaDocument.document.access_hash = result.audio_unused.access_hash;
mediaDocument.document.date = result.audio_unused.date;
if (result.audio_unused.mime_type != null) {
mediaDocument.document.mime_type = result.audio_unused.mime_type;
} else {
mediaDocument.document.mime_type = "audio/ogg";
}
mediaDocument.document.size = result.audio_unused.size;
TL_photoSizeEmpty thumb = new TL_photoSizeEmpty();
thumb.type = "s";
mediaDocument.document.thumbs.add(thumb);
mediaDocument.document.dc_id = result.audio_unused.dc_id;
mediaDocument.captionLegacy = result.captionLegacy;
TL_documentAttributeAudio attributeAudio = new TL_documentAttributeAudio();
attributeAudio.duration = result.audio_unused.duration;
attributeAudio.voice = true;
mediaDocument.document.attributes.add(attributeAudio);
result = mediaDocument;
if (mediaDocument.captionLegacy == null) {
mediaDocument.captionLegacy = "";
}
}
}
return result;
}
}
//MessageMedia end
//PageBlock start
public static class TL_pageBlockAuthorDate_layer60 extends TL_pageBlockAuthorDate {
public static int constructor = 0x3d5b64f2;
public void readParams(AbstractSerializedData stream, boolean exception) {
String authorString = stream.readString(exception);
author = new TL_textPlain();
((TL_textPlain) author).text = authorString;
published_date = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(((TL_textPlain) author).text);
stream.writeInt32(published_date);
}
}
public static class TL_pageBlockEmbedPost_layer82 extends TL_pageBlockEmbedPost {
public static int constructor = 0x292c7be9;
public void readParams(AbstractSerializedData stream, boolean exception) {
url = stream.readString(exception);
webpage_id = stream.readInt64(exception);
author_photo_id = stream.readInt64(exception);
author = stream.readString(exception);
date = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
blocks.add(object);
}
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(url);
stream.writeInt64(webpage_id);
stream.writeInt64(author_photo_id);
stream.writeString(author);
stream.writeInt32(date);
stream.writeInt32(0x1cb5c415);
int count = blocks.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
blocks.get(a).serializeToStream(stream);
}
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockEmbed_layer82 extends TL_pageBlockEmbed {
public static int constructor = 0xcde200d1;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
full_width = (flags & 1) != 0;
allow_scrolling = (flags & 8) != 0;
if ((flags & 2) != 0) {
url = stream.readString(exception);
}
if ((flags & 4) != 0) {
html = stream.readString(exception);
}
if ((flags & 16) != 0) {
poster_photo_id = stream.readInt64(exception);
}
w = stream.readInt32(exception);
h = stream.readInt32(exception);
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = full_width ? (flags | 1) : (flags &~ 1);
flags = allow_scrolling ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
if ((flags & 2) != 0) {
stream.writeString(url);
}
if ((flags & 4) != 0) {
stream.writeString(html);
}
if ((flags & 16) != 0) {
stream.writeInt64(poster_photo_id);
}
stream.writeInt32(w);
stream.writeInt32(h);
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockVideo_layer82 extends TL_pageBlockVideo {
public static int constructor = 0xd9d71866;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
autoplay = (flags & 1) != 0;
loop = (flags & 2) != 0;
video_id = stream.readInt64(exception);
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = autoplay ? (flags | 1) : (flags &~ 1);
flags = loop ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt64(video_id);
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockSlideshow_layer82 extends TL_pageBlockSlideshow {
public static int constructor = 0x130c8963;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockPhoto_layer82 extends TL_pageBlockPhoto {
public static int constructor = 0xe9c69982;
public void readParams(AbstractSerializedData stream, boolean exception) {
photo_id = stream.readInt64(exception);
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(photo_id);
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockCollage_layer82 extends TL_pageBlockCollage {
public static int constructor = 0x8b31c4f;
public void readParams(AbstractSerializedData stream, boolean exception) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
PageBlock object = PageBlock.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
items.add(object);
}
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(0x1cb5c415);
int count = items.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
items.get(a).serializeToStream(stream);
}
caption.text.serializeToStream(stream);
}
}
public static class TL_pageBlockAudio_layer82 extends TL_pageBlockAudio {
public static int constructor = 0x31b81a7f;
public void readParams(AbstractSerializedData stream, boolean exception) {
audio_id = stream.readInt64(exception);
caption = new TL_pageCaption();
caption.text = RichText.TLdeserialize(stream, stream.readInt32(exception), exception);
caption.credit = new TL_textEmpty();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(audio_id);
caption.text.serializeToStream(stream);
}
}
//PageBlock end
//EncryptedChat start
public static abstract class EncryptedChat extends TLObject {
public int flags;
public int folder_id;
public int id;
public long access_hash;
public int date;
public int admin_id;
public int participant_id;
public byte[] g_a;
public byte[] nonce;
public byte[] g_a_or_b;
public long key_fingerprint;
public boolean history_deleted;
public byte[] a_or_b; //custom
public byte[] auth_key; //custom
public int user_id; //custom
public int ttl; //custom
public int layer; //custom
public int seq_in; //custom
public int seq_out; //custom
public int in_seq_no; //custom
public int mtproto_seq; //custom
public byte[] key_hash; //custom
public short key_use_count_in; //custom
public short key_use_count_out; //custom
public long exchange_id; //custom
public int key_create_date; //custom
public long future_key_fingerprint; //custom
public byte[] future_auth_key; //custom
public static EncryptedChat TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
EncryptedChat result = null;
switch (constructor) {
case 0xfda9a7b7:
result = new TL_encryptedChatRequested_old();
break;
case 0xc878527e:
result = new TL_encryptedChatRequested_layer115();
break;
case 0xfa56ce36:
result = new TL_encryptedChat();
break;
case 0x62718a82:
result = new TL_encryptedChatRequested();
break;
case 0x6601d14f:
result = new TL_encryptedChat_old();
break;
case 0xab7ec0a0:
result = new TL_encryptedChatEmpty();
break;
case 0x3bf703dc:
result = new TL_encryptedChatWaiting();
break;
case 0x13d6dd27:
result = new TL_encryptedChatDiscarded_layer122();
break;
case 0x1e1c7c45:
result = new TL_encryptedChatDiscarded();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in EncryptedChat", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
//EncryptedChat end
//Message start
public static abstract class Message extends TLObject {
public int id;
public Peer from_id;
public Peer peer_id;
public int date;
public int expire_date;
public MessageAction action;
public String message;
public MessageMedia media;
public int flags;
public boolean mentioned;
public boolean media_unread;
public boolean out;
public boolean unread;
public ArrayList<MessageEntity> entities = new ArrayList<>();
public String via_bot_name;
public ReplyMarkup reply_markup;
public int views;
public int forwards;
public TL_messageReplies replies;
public int edit_date;
public boolean silent;
public boolean post;
public boolean from_scheduled;
public boolean legacy;
public boolean edit_hide;
public boolean pinned;
public MessageFwdHeader fwd_from;
public int via_bot_id;
public TL_messageReplyHeader reply_to;
public String post_author;
public long grouped_id;
public TL_messageReactions reactions;
public ArrayList<TL_restrictionReason> restriction_reason = new ArrayList<>();
public int ttl_period;
public int send_state = 0; //custom
public int fwd_msg_id = 0; //custom
public String attachPath = ""; //custom
public HashMap<String, String> params; //custom
public long random_id; //custom
public int local_id = 0; //custom
public long dialog_id; //custom
public int ttl; //custom
public int destroyTime; //custom
public int layer; //custom
public int seq_in; //custom
public int seq_out; //custom
public boolean with_my_score;
public Message replyMessage; //custom
public int reqId; //custom
public int realId; //custom
public int stickerVerified = 1; //custom
public boolean isThreadMessage; //custom
public static Message TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Message result = null;
switch (constructor) {
case 0x1d86f70e:
result = new TL_messageService_old2();
break;
case 0xa7ab1991:
result = new TL_message_old3();
break;
case 0xc3060325:
result = new TL_message_old4();
break;
case 0x555555fa:
result = new TL_message_secret();
break;
case 0x555555f9:
result = new TL_message_secret_layer72();
break;
case 0x90dddc11:
result = new TL_message_layer72();
break;
case 0xc09be45f:
result = new TL_message_layer68();
break;
case 0xc992e15c:
result = new TL_message_layer47();
break;
case 0x5ba66c13:
result = new TL_message_old7();
break;
case 0xc06b9607:
result = new TL_messageService_layer48();
break;
case 0x83e5de54:
result = new TL_messageEmpty_layer122();
break;
case 0x2bebfa86:
result = new TL_message_old6();
break;
case 0x44f9b43d:
result = new TL_message_layer104();
break;
case 0x90a6ca84:
result = new TL_messageEmpty();
break;
case 0x1c9b1027:
result = new TL_message_layer104_2();
break;
case 0xa367e716:
result = new TL_messageForwarded_old2();
break;
case 0x5f46804:
result = new TL_messageForwarded_old();
break;
case 0x567699b3:
result = new TL_message_old2();
break;
case 0x9f8d60bb:
result = new TL_messageService_old();
break;
case 0x22eb6aba:
result = new TL_message_old();
break;
case 0x555555F8:
result = new TL_message_secret_old();
break;
case 0x9789dac4:
result = new TL_message_layer104_3();
break;
case 0x452c0e65:
result = new TL_message_layer117();
break;
case 0xf52e6b7f:
result = new TL_message_layer118();
break;
case 0x58ae39c9:
result = new TL_message_layer123();
break;
case 0xbce383d2:
result = new TL_message();
break;
case 0x9e19a1f6:
result = new TL_messageService_layer118();
break;
case 0x286fa604:
result = new TL_messageService_layer123();
break;
case 0x2b085862:
result = new TL_messageService();
break;
case 0xf07814c8:
result = new TL_message_old5();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Message", constructor));
}
if (result != null) {
result.readParams(stream, exception);
if (result.from_id == null) {
result.from_id = result.peer_id;
}
}
return result;
}
public void readAttachPath(AbstractSerializedData stream, int currentUserId) {
boolean hasMedia = media != null && !(media instanceof TL_messageMediaEmpty) && !(media instanceof TL_messageMediaWebPage);
boolean fixCaption = !TextUtils.isEmpty(message) &&
(media instanceof TL_messageMediaPhoto_old ||
media instanceof TL_messageMediaPhoto_layer68 ||
media instanceof TL_messageMediaPhoto_layer74 ||
media instanceof TL_messageMediaDocument_old ||
media instanceof TL_messageMediaDocument_layer68 ||
media instanceof TL_messageMediaDocument_layer74)
&& message.startsWith("-1");
if ((out || peer_id != null && from_id != null && peer_id.user_id != 0 && peer_id.user_id == from_id.user_id && from_id.user_id == currentUserId) && (id < 0 || hasMedia || send_state == 3) || legacy) {
if (hasMedia && fixCaption) {
if (message.length() > 6 && message.charAt(2) == '_') {
params = new HashMap<>();
params.put("ve", message);
}
if (params != null || message.length() == 2) {
message = "";
}
}
if (stream.remaining() > 0) {
attachPath = stream.readString(false);
if (attachPath != null) {
if ((id < 0 || send_state == 3 || legacy) && attachPath.startsWith("||")) {
String args[] = attachPath.split("\\|\\|");
if (args.length > 0) {
if (params == null) {
params = new HashMap<>();
}
for (int a = 1; a < args.length - 1; a++) {
String args2[] = args[a].split("\\|=\\|");
if (args2.length == 2) {
params.put(args2[0], args2[1]);
}
}
attachPath = args[args.length - 1].trim();
if (legacy) {
layer = Utilities.parseInt(params.get("legacy_layer"));
}
}
} else {
attachPath = attachPath.trim();
}
}
}
}
if ((flags & MESSAGE_FLAG_FWD) != 0 && id < 0) {
fwd_msg_id = stream.readInt32(false);
}
}
protected void writeAttachPath(AbstractSerializedData stream) {
if (this instanceof TL_message_secret || this instanceof TL_message_secret_layer72) {
String path = attachPath != null ? attachPath : "";
if (send_state == 1 && params != null && params.size() > 0) {
for (HashMap.Entry<String, String> entry : params.entrySet()) {
path = entry.getKey() + "|=|" + entry.getValue() + "||" + path;
}
path = "||" + path;
}
stream.writeString(path);
} else {
String path = !TextUtils.isEmpty(attachPath) ? attachPath : " ";
if (legacy) {
if (params == null) {
params = new HashMap<>();
}
layer = LAYER;
params.put("legacy_layer", "" + LAYER);
}
if ((id < 0 || send_state == 3 || legacy) && params != null && params.size() > 0) {
for (HashMap.Entry<String, String> entry : params.entrySet()) {
path = entry.getKey() + "|=|" + entry.getValue() + "||" + path;
}
path = "||" + path;
}
stream.writeString(path);
if ((flags & MESSAGE_FLAG_FWD) != 0 && id < 0) {
stream.writeInt32(fwd_msg_id);
}
}
}
}
public static class TL_messageEmpty_layer122 extends TL_messageEmpty {
public static int constructor = 0x83e5de54;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
peer_id = new TL_peerUser();
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
}
}
public static class TL_messageEmpty extends Message {
public static int constructor = 0x90a6ca84;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
id = stream.readInt32(exception);
if ((flags & 1) != 0) {
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
} else {
peer_id = new TL_peerUser();
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 1) != 0) {
peer_id.serializeToStream(stream);
}
}
}
public static class TL_messageService_old2 extends TL_messageService {
public static int constructor = 0x1d86f70e;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
flags |= MESSAGE_FLAG_HAS_FROM_ID;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
action.serializeToStream(stream);
}
}
public static class TL_message_layer72 extends TL_message {
public static int constructor = 0x90dddc11;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds;
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
writeAttachPath(stream);
}
}
public static class TL_message_layer68 extends TL_message {
public static int constructor = 0xc09be45f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
with_my_score = (flags & 1073741824) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (from_id == null) {
from_id = peer_id;
}
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
} else {
media = new TL_messageMediaEmpty();
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = with_my_score ? (flags | 1073741824) : (flags &~ 1073741824);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
writeAttachPath(stream);
}
}
public static class TL_message_layer47 extends TL_message {
public static int constructor = 0xc992e15c;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (from_id == null) {
from_id = peer_id;
}
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
Peer peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (peer != null) {
fwd_from.from_id = peer;
fwd_from.flags |= 1;
}
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
} else {
media = new TL_messageMediaEmpty();
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
if (fwd_from.from_id != null) {
fwd_from.from_id.serializeToStream(stream);
}
stream.writeInt32(fwd_from.date);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
writeAttachPath(stream);
}
}
public static class TL_message_old7 extends TL_message {
public static int constructor = 0x5ba66c13;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (from_id == null) {
from_id = peer_id;
}
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
Peer peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (peer != null) {
fwd_from.from_id = peer;
fwd_from.flags |= 1;
}
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
} else {
media = new TL_messageMediaEmpty();
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
if (fwd_from.from_id != null) {
fwd_from.from_id.serializeToStream(stream);
}
stream.writeInt32(fwd_from.date);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
writeAttachPath(stream);
}
}
public static class TL_messageForwarded_old2 extends Message {
public static int constructor = 0xa367e716;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
message = stream.readString(exception);
flags |= MESSAGE_FLAG_FWD | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
}
}
public static class TL_message extends Message {
public static int constructor = 0xbce383d2;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
pinned = (flags & 16777216) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 1024) != 0) {
forwards = stream.readInt32(exception);
}
if ((flags & 8388608) != 0) {
replies = TL_messageReplies.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 4194304) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
if ((flags & 33554432) != 0) {
ttl_period = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
flags = pinned ? (flags | 16777216) : (flags &~ 16777216);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
from_id.serializeToStream(stream);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
reply_to.serializeToStream(stream);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 1024) != 0) {
stream.writeInt32(forwards);
}
if ((flags & 8388608) != 0) {
replies.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 4194304) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
if ((flags & 33554432) != 0) {
stream.writeInt32(ttl_period);
}
writeAttachPath(stream); //custom
}
}
public static class TL_message_layer123 extends TL_message {
public static int constructor = 0x58ae39c9;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
pinned = (flags & 16777216) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 1024) != 0) {
forwards = stream.readInt32(exception);
}
if ((flags & 8388608) != 0) {
replies = TL_messageReplies.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 4194304) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
flags = pinned ? (flags | 16777216) : (flags &~ 16777216);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
from_id.serializeToStream(stream);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
reply_to.serializeToStream(stream);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 1024) != 0) {
stream.writeInt32(forwards);
}
if ((flags & 8388608) != 0) {
replies.serializeToStream(stream);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 4194304) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_message_layer118 extends TL_message {
public static int constructor = 0xf52e6b7f;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 1024) != 0) {
forwards = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 4194304) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 1024) != 0) {
stream.writeInt32(forwards);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 4194304) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_message_layer117 extends TL_message {
public static int constructor = 0x452c0e65;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 4194304) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 4194304) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_message_layer104_3 extends TL_message {
public static int constructor = 0x9789dac4;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 1048576) != 0) {
reactions = TL_messageReactions.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4194304) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_restrictionReason object = TL_restrictionReason.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
restriction_reason.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 1048576) != 0) {
reactions.serializeToStream(stream);
}
if ((flags & 4194304) != 0) {
stream.writeInt32(0x1cb5c415);
int count = restriction_reason.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
restriction_reason.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_message_layer104_2 extends TL_message {
public static int constructor = 0x1c9b1027;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
edit_hide = (flags & 2097152) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
if ((flags & 1048576) != 0) {
reactions = TL_messageReactions.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 4194304) != 0) {
stream.readString(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
flags = edit_hide ? (flags | 2097152) : (flags &~ 2097152);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
if ((flags & 1048576) != 0) {
reactions.serializeToStream(stream);
}
if ((flags & 4194304) != 0) {
stream.writeString("");
}
writeAttachPath(stream);
}
}
public static class TL_message_layer104 extends TL_message {
public static int constructor = 0x44f9b43d;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
from_scheduled = (flags & 262144) != 0;
legacy = (flags & 524288) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = MessageFwdHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 2048) != 0) {
via_bot_id = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null) {
ttl = media.ttl_seconds; //custom
}
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
if ((flags & 1024) != 0) {
views = stream.readInt32(exception);
}
if ((flags & 32768) != 0) {
edit_date = stream.readInt32(exception);
}
if ((flags & 65536) != 0) {
post_author = stream.readString(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = from_scheduled ? (flags | 262144) : (flags &~ 262144);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
fwd_from.serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeInt32(via_bot_id);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
if ((flags & 1024) != 0) {
stream.writeInt32(views);
}
if ((flags & 32768) != 0) {
stream.writeInt32(edit_date);
}
if ((flags & 65536) != 0) {
stream.writeString(post_author);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
writeAttachPath(stream);
}
}
public static class TL_message_old6 extends TL_message {
public static int constructor = 0x2bebfa86;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
if ((flags & 512) != 0) {
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
} else {
media = new TL_messageMediaEmpty();
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
if ((flags & 512) != 0) {
media.serializeToStream(stream);
}
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_message_old5 extends TL_message {
public static int constructor = 0xf07814c8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 128) != 0) {
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
if ((flags & 128) != 0) {
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
}
writeAttachPath(stream);
}
}
public static class TL_messageService_layer48 extends TL_messageService {
public static int constructor = 0xc06b9607;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if (from_id == null) {
from_id = peer_id;
}
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
stream.writeInt32(date);
action.serializeToStream(stream);
}
}
public static class TL_message_old4 extends TL_message {
public static int constructor = 0xc3060325;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
if ((flags & 64) != 0) {
reply_markup = ReplyMarkup.TLdeserialize(stream, stream.readInt32(exception), exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
if ((flags & 64) != 0) {
reply_markup.serializeToStream(stream);
}
writeAttachPath(stream);
}
}
public static class TL_message_old3 extends TL_message {
public static int constructor = 0xa7ab1991;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
if ((flags & 4) != 0) {
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
}
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_message_old2 extends TL_message {
public static int constructor = 0x567699b3;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_messageService_old extends TL_messageService {
public static int constructor = 0x9f8d60bb;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
out = stream.readBool(exception);
unread = stream.readBool(exception);
flags |= MESSAGE_FLAG_HAS_FROM_ID;
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeBool(out);
stream.writeBool(unread);
stream.writeInt32(date);
action.serializeToStream(stream);
}
}
public static class TL_messageForwarded_old extends TL_messageForwarded_old2 {
public static int constructor = 0x5f46804;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
fwd_from = new TL_messageFwdHeader();
fwd_from.from_id = new TLRPC.TL_peerUser();
fwd_from.from_id.user_id = stream.readInt32(exception);
fwd_from.flags |= 1;
fwd_from.date = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
out = stream.readBool(exception);
unread = stream.readBool(exception);
flags |= MESSAGE_FLAG_FWD | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt32(fwd_from.from_id.user_id);
stream.writeInt32(fwd_from.date);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeBool(out);
stream.writeBool(unread);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_message_old extends TL_message {
public static int constructor = 0x22eb6aba;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
out = stream.readBool(exception);
unread = stream.readBool(exception);
flags |= MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeBool(out);
stream.writeBool(unread);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_message_secret extends TL_message {
public static int constructor = 0x555555fa;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
ttl = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
if ((flags & 2048) != 0) {
via_bot_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
reply_to = new TL_messageReplyHeader();
reply_to.reply_to_random_id = stream.readInt64(exception);
}
if ((flags & 131072) != 0) {
grouped_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(ttl);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeString(via_bot_name);
}
if ((flags & 8) != 0) {
stream.writeInt64(reply_to.reply_to_random_id);
}
if ((flags & 131072) != 0) {
stream.writeInt64(grouped_id);
}
writeAttachPath(stream);
}
}
public static class TL_message_secret_layer72 extends TL_message {
public static int constructor = 0x555555f9;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
ttl = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
MessageEntity object = MessageEntity.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
entities.add(object);
}
if ((flags & 2048) != 0) {
via_bot_name = stream.readString(exception);
}
if ((flags & 8) != 0) {
reply_to = new TL_messageReplyHeader();
reply_to.reply_to_random_id = stream.readInt64(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(ttl);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
stream.writeInt32(0x1cb5c415);
int count = entities.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
entities.get(a).serializeToStream(stream);
}
if ((flags & 2048) != 0) {
stream.writeString(via_bot_name);
}
if ((flags & 8) != 0) {
stream.writeInt64(reply_to.reply_to_random_id);
}
writeAttachPath(stream);
}
}
public static class TL_message_secret_old extends TL_message_secret {
public static int constructor = 0x555555F8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception) | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA;
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
id = stream.readInt32(exception);
ttl = stream.readInt32(exception);
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
date = stream.readInt32(exception);
message = stream.readString(exception);
media = MessageMedia.TLdeserialize(stream, stream.readInt32(exception), exception);
if (media != null && !TextUtils.isEmpty(media.captionLegacy)) {
message = media.captionLegacy;
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
stream.writeInt32(flags);
stream.writeInt32(id);
stream.writeInt32(ttl);
stream.writeInt32(from_id.user_id);
peer_id.serializeToStream(stream);
stream.writeInt32(date);
stream.writeString(message);
media.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_messageService_layer123 extends TL_messageService {
public static int constructor = 0x286fa604;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
legacy = (flags & 524288) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
from_id.serializeToStream(stream);
}
peer_id.serializeToStream(stream);
if ((flags & 8) != 0) {
reply_to.serializeToStream(stream);
}
stream.writeInt32(date);
action.serializeToStream(stream);
writeAttachPath(stream);
}
}
public static class TL_messageService extends Message {
public static int constructor = 0x2b085862;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
legacy = (flags & 524288) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
reply_to = TL_messageReplyHeader.TLdeserialize(stream, stream.readInt32(exception), exception);
}
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 33554432) != 0) {
ttl_period = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
from_id.serializeToStream(stream);
}
peer_id.serializeToStream(stream);
if ((flags & 8) != 0) {
reply_to.serializeToStream(stream);
}
stream.writeInt32(date);
action.serializeToStream(stream);
if ((flags & 33554432) != 0) {
stream.writeInt32(ttl_period);
}
}
}
public static class TL_messageService_layer118 extends TL_messageService {
public static int constructor = 0x9e19a1f6;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
unread = (flags & 1) != 0;
out = (flags & 2) != 0;
mentioned = (flags & 16) != 0;
media_unread = (flags & 32) != 0;
silent = (flags & 8192) != 0;
post = (flags & 16384) != 0;
legacy = (flags & 524288) != 0;
id = stream.readInt32(exception);
if ((flags & 256) != 0) {
from_id = new TLRPC.TL_peerUser();
from_id.user_id = stream.readInt32(exception);
}
peer_id = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 8) != 0) {
reply_to = new TLRPC.TL_messageReplyHeader();
reply_to.reply_to_msg_id = stream.readInt32(exception);
}
date = stream.readInt32(exception);
action = MessageAction.TLdeserialize(stream, stream.readInt32(exception), exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = unread ? (flags | 1) : (flags &~ 1);
flags = out ? (flags | 2) : (flags &~ 2);
flags = mentioned ? (flags | 16) : (flags &~ 16);
flags = media_unread ? (flags | 32) : (flags &~ 32);
flags = silent ? (flags | 8192) : (flags &~ 8192);
flags = post ? (flags | 16384) : (flags &~ 16384);
flags = legacy ? (flags | 524288) : (flags &~ 524288);
stream.writeInt32(flags);
stream.writeInt32(id);
if ((flags & 256) != 0) {
stream.writeInt32(from_id.user_id);
}
peer_id.serializeToStream(stream);
if ((flags & 8) != 0) {
stream.writeInt32(reply_to.reply_to_msg_id);
}
stream.writeInt32(date);
action.serializeToStream(stream);
writeAttachPath(stream);
}
}
//Message end
//TL_dialog start
public static abstract class Dialog extends TLObject {
public int flags;
public boolean pinned;
public boolean unread_mark;
public Peer peer;
public int top_message;
public int read_inbox_max_id;
public int read_outbox_max_id;
public int unread_count;
public int unread_mentions_count;
public PeerNotifySettings notify_settings;
public int pts;
public DraftMessage draft;
public int folder_id;
public int last_message_date; //custom
public long id; //custom
public int pinnedNum; //custom
public static Dialog TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
Dialog result = null;
switch (constructor) {
case 0x2c171f72:
result = new TL_dialog();
break;
case 0x71bd134c:
result = new TL_dialogFolder();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in Dialog", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_dialog extends Dialog {
public static int constructor = 0x2c171f72;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pinned = (flags & 4) != 0;
unread_mark = (flags & 8) != 0;
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
top_message = stream.readInt32(exception);
read_inbox_max_id = stream.readInt32(exception);
read_outbox_max_id = stream.readInt32(exception);
unread_count = stream.readInt32(exception);
unread_mentions_count = stream.readInt32(exception);
notify_settings = PeerNotifySettings.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 1) != 0) {
pts = stream.readInt32(exception);
}
if ((flags & 2) != 0) {
draft = DraftMessage.TLdeserialize(stream, stream.readInt32(exception), exception);
}
if ((flags & 16) != 0) {
folder_id = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 4) : (flags &~ 4);
flags = unread_mark ? (flags | 8) : (flags &~ 8);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt32(top_message);
stream.writeInt32(read_inbox_max_id);
stream.writeInt32(read_outbox_max_id);
stream.writeInt32(unread_count);
stream.writeInt32(unread_mentions_count);
notify_settings.serializeToStream(stream);
if ((flags & 1) != 0) {
stream.writeInt32(pts);
}
if ((flags & 2) != 0) {
draft.serializeToStream(stream);
}
if ((flags & 16) != 0) {
stream.writeInt32(folder_id);
}
}
}
public static class TL_dialogFolder extends Dialog {
public static int constructor = 0x71bd134c;
public TL_folder folder;
public int unread_muted_peers_count;
public int unread_unmuted_peers_count;
public int unread_muted_messages_count;
public int unread_unmuted_messages_count;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
pinned = (flags & 4) != 0;
folder = TL_folder.TLdeserialize(stream, stream.readInt32(exception), exception);
peer = Peer.TLdeserialize(stream, stream.readInt32(exception), exception);
top_message = stream.readInt32(exception);
unread_muted_peers_count = stream.readInt32(exception);
unread_unmuted_peers_count = stream.readInt32(exception);
unread_muted_messages_count = stream.readInt32(exception);
unread_unmuted_messages_count = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = pinned ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
folder.serializeToStream(stream);
peer.serializeToStream(stream);
stream.writeInt32(top_message);
stream.writeInt32(unread_muted_peers_count);
stream.writeInt32(unread_unmuted_peers_count);
stream.writeInt32(unread_muted_messages_count);
stream.writeInt32(unread_unmuted_messages_count);
}
}
//TL_dialog end
//ChatParticipant start
public static class TL_chatChannelParticipant extends ChatParticipant {
public static int constructor = 0xc8d7493e;
public ChannelParticipant channelParticipant;
}
//ChatParticipant end
//Chat start
public static class TL_chatEmpty extends Chat {
public static int constructor = 0x9ba2d800;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt32(exception);
title = "DELETED";
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(id);
}
}
//Chat end
//functions memory optimize
public static class TL_upload_saveFilePart extends TLObject {
public static int constructor = 0xb304a621;
public long file_id;
public int file_part;
public NativeByteBuffer bytes;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(file_id);
stream.writeInt32(file_part);
stream.writeByteBuffer(bytes);
}
@Override
public void freeResources() {
if (disableFree) {
return;
}
if (bytes != null) {
bytes.reuse();
bytes = null;
}
}
}
public static class TL_messages_getStickers extends TLObject {
public static int constructor = 0x43d4f2c;
public String emoticon;
public int hash;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_Stickers.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeString(emoticon);
stream.writeInt32(hash);
}
}
public static class TL_upload_saveBigFilePart extends TLObject {
public static int constructor = 0xde7b673d;
public long file_id;
public int file_part;
public int file_total_parts;
public NativeByteBuffer bytes;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(file_id);
stream.writeInt32(file_part);
stream.writeInt32(file_total_parts);
stream.writeByteBuffer(bytes);
}
@Override
public void freeResources() {
if (disableFree) {
return;
}
if (bytes != null) {
bytes.reuse();
bytes = null;
}
}
}
public static class TL_upload_getWebFile extends TLObject {
public static int constructor = 0x24e6818d;
public InputWebFileLocation location;
public int offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_upload_webFile.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
location.serializeToStream(stream);
stream.writeInt32(offset);
stream.writeInt32(limit);
}
}
public static class TL_upload_getCdnFile extends TLObject {
public static int constructor = 0x2000bcc3;
public byte[] file_token;
public int offset;
public int limit;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return upload_CdnFile.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(file_token);
stream.writeInt32(offset);
stream.writeInt32(limit);
}
}
public static class TL_upload_reuploadCdnFile extends TLObject {
public static int constructor = 0x9b2754a8;
public byte[] file_token;
public byte[] request_token;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_fileHash object = TL_fileHash.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(file_token);
stream.writeByteArray(request_token);
}
}
public static class TL_upload_getCdnFileHashes extends TLObject {
public static int constructor = 0x4da54231;
public byte[] file_token;
public int offset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_fileHash object = TL_fileHash.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(file_token);
stream.writeInt32(offset);
}
}
public static class TL_upload_getFileHashes extends TLObject {
public static int constructor = 0xc7025931;
public InputFileLocation location;
public int offset;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
Vector vector = new Vector();
int size = stream.readInt32(exception);
for (int a = 0; a < size; a++) {
TL_fileHash object = TL_fileHash.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return vector;
}
vector.objects.add(object);
}
return vector;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
location.serializeToStream(stream);
stream.writeInt32(offset);
}
}
public static class TL_upload_webFile extends TLObject {
public static int constructor = 0x21e753bc;
public int size;
public String mime_type;
public storage_FileType file_type;
public int mtime;
public NativeByteBuffer bytes;
public static TL_upload_webFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_upload_webFile.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_upload_webFile", constructor));
} else {
return null;
}
}
TL_upload_webFile result = new TL_upload_webFile();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
size = stream.readInt32(exception);
mime_type = stream.readString(exception);
file_type = storage_FileType.TLdeserialize(stream, stream.readInt32(exception), exception);
mtime = stream.readInt32(exception);
bytes = stream.readByteBuffer(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(size);
stream.writeString(mime_type);
file_type.serializeToStream(stream);
stream.writeInt32(mtime);
stream.writeByteBuffer(bytes);
}
@Override
public void freeResources() {
if (disableFree) {
return;
}
if (bytes != null) {
bytes.reuse();
bytes = null;
}
}
}
public static abstract class upload_File extends TLObject {
public storage_FileType type;
public int mtime;
public NativeByteBuffer bytes;
public int dc_id;
public byte[] file_token;
public byte[] encryption_key;
public byte[] encryption_iv;
public ArrayList<TL_fileHash> file_hashes = new ArrayList<>();
public static upload_File TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
upload_File result = null;
switch (constructor) {
case 0x96a18d5:
result = new TL_upload_file();
break;
case 0xf18cda44:
result = new TL_upload_fileCdnRedirect();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in upload_File", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static abstract class upload_CdnFile extends TLObject {
public NativeByteBuffer bytes;
public byte[] request_token;
public static upload_CdnFile TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
upload_CdnFile result = null;
switch (constructor) {
case 0xa99fca4f:
result = new TL_upload_cdnFile();
break;
case 0xeea8e46e:
result = new TL_upload_cdnFileReuploadNeeded();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in upload_CdnFile", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_upload_cdnFile extends upload_CdnFile {
public static int constructor = 0xa99fca4f;
public void readParams(AbstractSerializedData stream, boolean exception) {
bytes = stream.readByteBuffer(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteBuffer(bytes);
}
@Override
public void freeResources() {
if (disableFree) {
return;
}
if (bytes != null) {
bytes.reuse();
bytes = null;
}
}
}
public static class TL_upload_cdnFileReuploadNeeded extends upload_CdnFile {
public static int constructor = 0xeea8e46e;
public void readParams(AbstractSerializedData stream, boolean exception) {
request_token = stream.readByteArray(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeByteArray(request_token);
}
}
public static class TL_upload_file extends upload_File {
public static int constructor = 0x96a18d5;
public void readParams(AbstractSerializedData stream, boolean exception) {
type = storage_FileType.TLdeserialize(stream, stream.readInt32(exception), exception);
mtime = stream.readInt32(exception);
bytes = stream.readByteBuffer(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
type.serializeToStream(stream);
stream.writeInt32(mtime);
stream.writeByteBuffer(bytes);
}
@Override
public void freeResources() {
if (disableFree) {
return;
}
if (bytes != null) {
bytes.reuse();
bytes = null;
}
}
}
public static class TL_upload_fileCdnRedirect extends upload_File {
public static int constructor = 0xf18cda44;
public void readParams(AbstractSerializedData stream, boolean exception) {
dc_id = stream.readInt32(exception);
file_token = stream.readByteArray(exception);
encryption_key = stream.readByteArray(exception);
encryption_iv = stream.readByteArray(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_fileHash object = TL_fileHash.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
file_hashes.add(object);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt32(dc_id);
stream.writeByteArray(file_token);
stream.writeByteArray(encryption_key);
stream.writeByteArray(encryption_iv);
stream.writeInt32(0x1cb5c415);
int count = file_hashes.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
file_hashes.get(a).serializeToStream(stream);
}
}
}
public static abstract class PhoneCallProtocol extends TLObject {
public int flags;
public boolean udp_p2p;
public boolean udp_reflector;
public int min_layer;
public int max_layer;
public ArrayList<String> library_versions = new ArrayList<>();
public static PhoneCallProtocol TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
PhoneCallProtocol result = null;
switch (constructor) {
case 0xfc878fc8:
result = new TL_phoneCallProtocol();
break;
case 0xa2bb35cb:
result = new TL_phoneCallProtocol_layer110();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in PhoneCallProtocol", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_phoneCallProtocol extends PhoneCallProtocol {
public static int constructor = 0xfc878fc8;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
udp_p2p = (flags & 1) != 0;
udp_reflector = (flags & 2) != 0;
min_layer = stream.readInt32(exception);
max_layer = stream.readInt32(exception);
int magic = stream.readInt32(exception);
if (magic != 0x1cb5c415) {
if (exception) {
throw new RuntimeException(String.format("wrong Vector magic, got %x", magic));
}
return;
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
library_versions.add(stream.readString(exception));
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = udp_p2p ? (flags | 1) : (flags &~ 1);
flags = udp_reflector ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(min_layer);
stream.writeInt32(max_layer);
stream.writeInt32(0x1cb5c415);
int count = library_versions.size();
stream.writeInt32(count);
for (int a = 0; a < count; a++) {
stream.writeString(library_versions.get(a));
}
}
}
public static class TL_phoneCallProtocol_layer110 extends TL_phoneCallProtocol {
public static int constructor = 0xa2bb35cb;
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
udp_p2p = (flags & 1) != 0;
udp_reflector = (flags & 2) != 0;
min_layer = stream.readInt32(exception);
max_layer = stream.readInt32(exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = udp_p2p ? (flags | 1) : (flags &~ 1);
flags = udp_reflector ? (flags | 2) : (flags &~ 2);
stream.writeInt32(flags);
stream.writeInt32(min_layer);
stream.writeInt32(max_layer);
}
}
public static class TL_messages_sendEncryptedFile extends TLObject {
public static int constructor = 0x5559481d;
public int flags;
public boolean silent;
public TL_inputEncryptedChat peer;
public long random_id;
public NativeByteBuffer data;
public InputEncryptedFile file;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_SentEncryptedMessage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt64(random_id);
stream.writeByteBuffer(data);
file.serializeToStream(stream);
}
@Override
public void freeResources() {
if (data != null) {
data.reuse();
data = null;
}
}
}
public static class TL_messages_sendEncryptedMultiMedia extends TLObject {
public static int constructor = 0xcacacaca;
public ArrayList<TL_decryptedMessage> messages = new ArrayList<>();
public ArrayList<InputEncryptedFile> files = new ArrayList<>();
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_SentEncryptedMessage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
}
@Override
public void freeResources() {
}
}
public static class TL_messages_sendEncrypted extends TLObject {
public static int constructor = 0x44fa7a15;
public int flags;
public boolean silent;
public TL_inputEncryptedChat peer;
public long random_id;
public NativeByteBuffer data;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_SentEncryptedMessage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = silent ? (flags | 1) : (flags &~ 1);
stream.writeInt32(flags);
peer.serializeToStream(stream);
stream.writeInt64(random_id);
stream.writeByteBuffer(data);
}
@Override
public void freeResources() {
if (data != null) {
data.reuse();
data = null;
}
}
}
public static class TL_messages_sendEncryptedService extends TLObject {
public static int constructor = 0x32d439a4;
public TL_inputEncryptedChat peer;
public long random_id;
public NativeByteBuffer data;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return messages_SentEncryptedMessage.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
peer.serializeToStream(stream);
stream.writeInt64(random_id);
stream.writeByteBuffer(data);
}
@Override
public void freeResources() {
if (data != null) {
data.reuse();
data = null;
}
}
}
//functions
public static class Vector extends TLObject {
public static int constructor = 0x1cb5c415;
public ArrayList<Object> objects = new ArrayList<>();
}
}