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 ResponseMessageSearchResponse extends Response {
  
      public static final int HEADER = 0xda;
      public static ResponseMessageSearchResponse fromBytes(byte[] data) throws IOException {
          return Bser.parse(new ResponseMessageSearchResponse(), data);
      }
  
      private List<ApiMessageSearchItem> searchResults;
      private List<ApiUser> users;
      private List<ApiGroup> groups;
      private byte[] loadMoreState;
      private List<ApiUserOutPeer> userOutPeers;
      private List<ApiGroupOutPeer> groupOutPeers;
  
      public ResponseMessageSearchResponse(@NotNull List<ApiMessageSearchItem> searchResults, @NotNull List<ApiUser> users, @NotNull List<ApiGroup> groups, @Nullable byte[] loadMoreState, @NotNull List<ApiUserOutPeer> userOutPeers, @NotNull List<ApiGroupOutPeer> groupOutPeers) {
          this.searchResults = searchResults;
          this.users = users;
          this.groups = groups;
          this.loadMoreState = loadMoreState;
          this.userOutPeers = userOutPeers;
          this.groupOutPeers = groupOutPeers;
      }
  
      public ResponseMessageSearchResponse() {
  
      }
  
      @NotNull
      public List<ApiMessageSearchItem> getSearchResults() {
          return this.searchResults;
      }
  
      @NotNull
      public List<ApiUser> getUsers() {
          return this.users;
      }
  
      @NotNull
      public List<ApiGroup> getGroups() {
          return this.groups;
      }
  
      @Nullable
      public byte[] getLoadMoreState() {
          return this.loadMoreState;
      }
  
      @NotNull
      public List<ApiUserOutPeer> getUserOutPeers() {
          return this.userOutPeers;
      }
  
      @NotNull
      public List<ApiGroupOutPeer> getGroupOutPeers() {
          return this.groupOutPeers;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          List<ApiMessageSearchItem> _searchResults = new ArrayList<ApiMessageSearchItem>();
          for (int i = 0; i < values.getRepeatedCount(1); i ++) {
              _searchResults.add(new ApiMessageSearchItem());
          }
          this.searchResults = values.getRepeatedObj(1, _searchResults);
          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.loadMoreState = values.optBytes(4);
          List<ApiUserOutPeer> _userOutPeers = new ArrayList<ApiUserOutPeer>();
          for (int i = 0; i < values.getRepeatedCount(5); i ++) {
              _userOutPeers.add(new ApiUserOutPeer());
          }
          this.userOutPeers = values.getRepeatedObj(5, _userOutPeers);
          List<ApiGroupOutPeer> _groupOutPeers = new ArrayList<ApiGroupOutPeer>();
          for (int i = 0; i < values.getRepeatedCount(6); i ++) {
              _groupOutPeers.add(new ApiGroupOutPeer());
          }
          this.groupOutPeers = values.getRepeatedObj(6, _groupOutPeers);
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          writer.writeRepeatedObj(1, this.searchResults);
          writer.writeRepeatedObj(2, this.users);
          writer.writeRepeatedObj(3, this.groups);
          if (this.loadMoreState != null) {
              writer.writeBytes(4, this.loadMoreState);
          }
          writer.writeRepeatedObj(5, this.userOutPeers);
          writer.writeRepeatedObj(6, this.groupOutPeers);
      }
  
      @Override
      public String toString() {
          String res = "response MessageSearchResponse{";
          res += "searchResults=" + this.searchResults;
          res += ", users=" + this.users;
          res += ", groups=" + this.groups;
          res += ", userOutPeers=" + this.userOutPeers;
          res += ", groupOutPeers=" + this.groupOutPeers;
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  