content: package im.actor.core.api.updates;
  /*
   *  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 UpdateEncryptedPackage extends Update {
  
      public static final int HEADER = 0xb1;
      public static UpdateEncryptedPackage fromBytes(byte[] data) throws IOException {
          return Bser.parse(new UpdateEncryptedPackage(), data);
      }
  
      private long randomId;
      private long date;
      private int senderId;
      private ApiEncryptedBox encryptedBox;
  
      public UpdateEncryptedPackage(long randomId, long date, int senderId, @NotNull ApiEncryptedBox encryptedBox) {
          this.randomId = randomId;
          this.date = date;
          this.senderId = senderId;
          this.encryptedBox = encryptedBox;
      }
  
      public UpdateEncryptedPackage() {
  
      }
  
      public long getRandomId() {
          return this.randomId;
      }
  
      public long getDate() {
          return this.date;
      }
  
      public int getSenderId() {
          return this.senderId;
      }
  
      @NotNull
      public ApiEncryptedBox getEncryptedBox() {
          return this.encryptedBox;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          this.randomId = values.getLong(1);
          this.date = values.getLong(2);
          this.senderId = values.getInt(3);
          this.encryptedBox = values.getObj(4, new ApiEncryptedBox());
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          writer.writeLong(1, this.randomId);
          writer.writeLong(2, this.date);
          writer.writeInt(3, this.senderId);
          if (this.encryptedBox == null) {
              throw new IOException();
          }
          writer.writeObject(4, this.encryptedBox);
      }
  
      @Override
      public String toString() {
          String res = "update EncryptedPackage{";
          res += "randomId=" + this.randomId;
          res += ", date=" + this.date;
          res += ", senderId=" + this.senderId;
          res += ", encryptedBox=" + this.encryptedBox;
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  