content: 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 ResponseGetDifference extends Response {
  
      public static final int HEADER = 0xc;
      public static ResponseGetDifference fromBytes(byte[] data) throws IOException {
          return Bser.parse(new ResponseGetDifference(), data);
      }
  
      private int seq;
      private byte[] state;
      private List<ApiUser> users;
      private List<ApiGroup> groups;
      private List<ApiUpdateContainer> updates;
      private List<ApiMessageContainer> messages;
      private boolean needMore;
      private List<ApiUserOutPeer> usersRefs;
      private List<ApiGroupOutPeer> groupsRefs;
  
      public ResponseGetDifference(int seq, @NotNull byte[] state, @NotNull List<ApiUser> users, @NotNull List<ApiGroup> groups, @NotNull List<ApiUpdateContainer> updates, @NotNull List<ApiMessageContainer> messages, boolean needMore, @NotNull List<ApiUserOutPeer> usersRefs, @NotNull List<ApiGroupOutPeer> groupsRefs) {
          this.seq = seq;
          this.state = state;
          this.users = users;
          this.groups = groups;
          this.updates = updates;
          this.messages = messages;
          this.needMore = needMore;
          this.usersRefs = usersRefs;
          this.groupsRefs = groupsRefs;
      }
  
      public ResponseGetDifference() {
  
      }
  
      public int getSeq() {
          return this.seq;
      }
  
      @NotNull
      public byte[] getState() {
          return this.state;
      }
  
      @NotNull
      public List<ApiUser> getUsers() {
          return this.users;
      }
  
      @NotNull
      public List<ApiGroup> getGroups() {
          return this.groups;
      }
  
      @NotNull
      public List<ApiUpdateContainer> getUpdates() {
          return this.updates;
      }
  
      @NotNull
      public List<ApiMessageContainer> getMessages() {
          return this.messages;
      }
  
      public boolean needMore() {
          return this.needMore;
      }
  
      @NotNull
      public List<ApiUserOutPeer> getUsersRefs() {
          return this.usersRefs;
      }
  
      @NotNull
      public List<ApiGroupOutPeer> getGroupsRefs() {
          return this.groupsRefs;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          this.seq = values.getInt(1);
          this.state = values.getBytes(2);
          List<ApiUser> _users = new ArrayList<ApiUser>();
          for (int i = 0; i < values.getRepeatedCount(3); i ++) {
              _users.add(new ApiUser());
          }
          this.users = values.getRepeatedObj(3, _users);
          List<ApiGroup> _groups = new ArrayList<ApiGroup>();
          for (int i = 0; i < values.getRepeatedCount(6); i ++) {
              _groups.add(new ApiGroup());
          }
          this.groups = values.getRepeatedObj(6, _groups);
          List<ApiUpdateContainer> _updates = new ArrayList<ApiUpdateContainer>();
          for (int i = 0; i < values.getRepeatedCount(4); i ++) {
              _updates.add(new ApiUpdateContainer());
          }
          this.updates = values.getRepeatedObj(4, _updates);
          List<ApiMessageContainer> _messages = new ArrayList<ApiMessageContainer>();
          for (int i = 0; i < values.getRepeatedCount(7); i ++) {
              _messages.add(new ApiMessageContainer());
          }
          this.messages = values.getRepeatedObj(7, _messages);
          this.needMore = values.getBool(5);
          List<ApiUserOutPeer> _usersRefs = new ArrayList<ApiUserOutPeer>();
          for (int i = 0; i < values.getRepeatedCount(8); i ++) {
              _usersRefs.add(new ApiUserOutPeer());
          }
          this.usersRefs = values.getRepeatedObj(8, _usersRefs);
          List<ApiGroupOutPeer> _groupsRefs = new ArrayList<ApiGroupOutPeer>();
          for (int i = 0; i < values.getRepeatedCount(9); i ++) {
              _groupsRefs.add(new ApiGroupOutPeer());
          }
          this.groupsRefs = values.getRepeatedObj(9, _groupsRefs);
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          writer.writeInt(1, this.seq);
          if (this.state == null) {
              throw new IOException();
          }
          writer.writeBytes(2, this.state);
          writer.writeRepeatedObj(3, this.users);
          writer.writeRepeatedObj(6, this.groups);
          writer.writeRepeatedObj(4, this.updates);
          writer.writeRepeatedObj(7, this.messages);
          writer.writeBool(5, this.needMore);
          writer.writeRepeatedObj(8, this.usersRefs);
          writer.writeRepeatedObj(9, this.groupsRefs);
      }
  
      @Override
      public String toString() {
          String res = "tuple GetDifference{";
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  