package im.actor.core.api; /* * 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; public class ApiActiveCall extends BserObject { private long callId; private ApiPeer peer; private List<ApiCallMember> callMembers; public ApiActiveCall(long callId, @NotNull ApiPeer peer, @NotNull List<ApiCallMember> callMembers) { this.callId = callId; this.peer = peer; this.callMembers = callMembers; } public ApiActiveCall() { } public long getCallId() { return this.callId; } @NotNull public ApiPeer getPeer() { return this.peer; } @NotNull public List<ApiCallMember> getCallMembers() { return this.callMembers; } @Override public void parse(BserValues values) throws IOException { this.callId = values.getLong(1); this.peer = values.getObj(2, new ApiPeer()); List<ApiCallMember> _callMembers = new ArrayList<ApiCallMember>(); for (int i = 0; i < values.getRepeatedCount(3); i ++) { _callMembers.add(new ApiCallMember()); } this.callMembers = values.getRepeatedObj(3, _callMembers); } @Override public void serialize(BserWriter writer) throws IOException { writer.writeLong(1, this.callId); if (this.peer == null) { throw new IOException(); } writer.writeObject(2, this.peer); writer.writeRepeatedObj(3, this.callMembers); } @Override public String toString() { String res = "struct ActiveCall{"; res += "callId=" + this.callId; res += ", peer=" + this.peer; res += ", callMembers=" + this.callMembers; res += "}"; return res; } }