@Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.nextOffset != null) {
     writer.writeBytes(1, this.nextOffset);
   }
   writer.writeInt(2, this.limit);
   for (ApiUpdateOptimization i : this.optimizations) {
     writer.writeInt(3, i.getValue());
   }
 }
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.groupPeer == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.groupPeer);
   writer.writeLong(2, this.rid);
   for (ApiUpdateOptimization i : this.optimizations) {
     writer.writeInt(3, i.getValue());
   }
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.nextOffset = values.optBytes(1);
   this.limit = values.getInt(2);
   this.optimizations = new ArrayList<ApiUpdateOptimization>();
   for (int b : values.getRepeatedInt(3)) {
     optimizations.add(ApiUpdateOptimization.parse(b));
   }
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.groupPeer = values.getObj(1, new ApiGroupOutPeer());
   this.rid = values.getLong(2);
   this.optimizations = new ArrayList<ApiUpdateOptimization>();
   for (int b : values.getRepeatedInt(3)) {
     optimizations.add(ApiUpdateOptimization.parse(b));
   }
 }