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 RequestSendEncryptedPackage extends Request<ResponseSendEncryptedPackage> {
  
      public static final int HEADER = 0xa61;
      public static RequestSendEncryptedPackage fromBytes(byte[] data) throws IOException {
          return Bser.parse(new RequestSendEncryptedPackage(), data);
      }
  
      private long randomId;
      private List<ApiUserOutPeer> destPeers;
      private List<ApiKeyGroupId> ignoredKeyGroups;
      private ApiEncryptedBox encryptedBox;
  
      public RequestSendEncryptedPackage(long randomId, @NotNull List<ApiUserOutPeer> destPeers, @NotNull List<ApiKeyGroupId> ignoredKeyGroups, @NotNull ApiEncryptedBox encryptedBox) {
          this.randomId = randomId;
          this.destPeers = destPeers;
          this.ignoredKeyGroups = ignoredKeyGroups;
          this.encryptedBox = encryptedBox;
      }
  
      public RequestSendEncryptedPackage() {
  
      }
  
      public long getRandomId() {
          return this.randomId;
      }
  
      @NotNull
      public List<ApiUserOutPeer> getDestPeers() {
          return this.destPeers;
      }
  
      @NotNull
      public List<ApiKeyGroupId> getIgnoredKeyGroups() {
          return this.ignoredKeyGroups;
      }
  
      @NotNull
      public ApiEncryptedBox getEncryptedBox() {
          return this.encryptedBox;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          this.randomId = values.getLong(1);
          List<ApiUserOutPeer> _destPeers = new ArrayList<ApiUserOutPeer>();
          for (int i = 0; i < values.getRepeatedCount(2); i ++) {
              _destPeers.add(new ApiUserOutPeer());
          }
          this.destPeers = values.getRepeatedObj(2, _destPeers);
          List<ApiKeyGroupId> _ignoredKeyGroups = new ArrayList<ApiKeyGroupId>();
          for (int i = 0; i < values.getRepeatedCount(3); i ++) {
              _ignoredKeyGroups.add(new ApiKeyGroupId());
          }
          this.ignoredKeyGroups = values.getRepeatedObj(3, _ignoredKeyGroups);
          this.encryptedBox = values.getObj(4, new ApiEncryptedBox());
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          writer.writeLong(1, this.randomId);
          writer.writeRepeatedObj(2, this.destPeers);
          writer.writeRepeatedObj(3, this.ignoredKeyGroups);
          if (this.encryptedBox == null) {
              throw new IOException();
          }
          writer.writeObject(4, this.encryptedBox);
      }
  
      @Override
      public String toString() {
          String res = "rpc SendEncryptedPackage{";
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  