package im.actor.core.api.rpc; /* * Generated by the Actor API Scheme generator. DO NOT EDIT! */ import im.actor.runtime.bser.*; import im.actor.runtime.collections.*; import static im.actor.runtime.bser.Utils.*; import im.actor.core.network.parser.*; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.NotNull; import com.google.j2objc.annotations.ObjectiveCName; import java.io.IOException; import java.util.List; import java.util.ArrayList; import im.actor.core.api.*; public class ResponseLoadGroupedDialogs extends Response { public static final int HEADER = 0xe2; public static ResponseLoadGroupedDialogs fromBytes(byte[] data) throws IOException { return Bser.parse(new ResponseLoadGroupedDialogs(), data); } private List<ApiDialogGroup> dialogs; private List<ApiUser> users; private List<ApiGroup> groups; private Boolean showArchived; private Boolean showInvite; private List<ApiUserOutPeer> userPeers; private List<ApiGroupOutPeer> groupPeers; public ResponseLoadGroupedDialogs(@NotNull List<ApiDialogGroup> dialogs, @NotNull List<ApiUser> users, @NotNull List<ApiGroup> groups, @Nullable Boolean showArchived, @Nullable Boolean showInvite, @NotNull List<ApiUserOutPeer> userPeers, @NotNull List<ApiGroupOutPeer> groupPeers) { this.dialogs = dialogs; this.users = users; this.groups = groups; this.showArchived = showArchived; this.showInvite = showInvite; this.userPeers = userPeers; this.groupPeers = groupPeers; } public ResponseLoadGroupedDialogs() { } @NotNull public List<ApiDialogGroup> getDialogs() { return this.dialogs; } @NotNull public List<ApiUser> getUsers() { return this.users; } @NotNull public List<ApiGroup> getGroups() { return this.groups; } @Nullable public Boolean showArchived() { return this.showArchived; } @Nullable public Boolean showInvite() { return this.showInvite; } @NotNull public List<ApiUserOutPeer> getUserPeers() { return this.userPeers; } @NotNull public List<ApiGroupOutPeer> getGroupPeers() { return this.groupPeers; } @Override public void parse(BserValues values) throws IOException { List<ApiDialogGroup> _dialogs = new ArrayList<ApiDialogGroup>(); for (int i = 0; i < values.getRepeatedCount(1); i ++) { _dialogs.add(new ApiDialogGroup()); } this.dialogs = values.getRepeatedObj(1, _dialogs); List<ApiUser> _users = new ArrayList<ApiUser>(); for (int i = 0; i < values.getRepeatedCount(2); i ++) { _users.add(new ApiUser()); } this.users = values.getRepeatedObj(2, _users); List<ApiGroup> _groups = new ArrayList<ApiGroup>(); for (int i = 0; i < values.getRepeatedCount(3); i ++) { _groups.add(new ApiGroup()); } this.groups = values.getRepeatedObj(3, _groups); this.showArchived = values.optBool(4); this.showInvite = values.optBool(5); List<ApiUserOutPeer> _userPeers = new ArrayList<ApiUserOutPeer>(); for (int i = 0; i < values.getRepeatedCount(6); i ++) { _userPeers.add(new ApiUserOutPeer()); } this.userPeers = values.getRepeatedObj(6, _userPeers); List<ApiGroupOutPeer> _groupPeers = new ArrayList<ApiGroupOutPeer>(); for (int i = 0; i < values.getRepeatedCount(7); i ++) { _groupPeers.add(new ApiGroupOutPeer()); } this.groupPeers = values.getRepeatedObj(7, _groupPeers); } @Override public void serialize(BserWriter writer) throws IOException { writer.writeRepeatedObj(1, this.dialogs); writer.writeRepeatedObj(2, this.users); writer.writeRepeatedObj(3, this.groups); if (this.showArchived != null) { writer.writeBool(4, this.showArchived); } if (this.showInvite != null) { writer.writeBool(5, this.showInvite); } writer.writeRepeatedObj(6, this.userPeers); writer.writeRepeatedObj(7, this.groupPeers); } @Override public String toString() { String res = "tuple LoadGroupedDialogs{"; res += "}"; return res; } @Override public int getHeaderKey() { return HEADER; } }