@Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeLong(1, this.fileId);
   writer.writeLong(2, this.accessHash);
   writer.writeInt(3, this.fileSize);
   if (this.name == null) {
     throw new IOException();
   }
   writer.writeString(4, this.name);
   if (this.mimeType == null) {
     throw new IOException();
   }
   writer.writeString(5, this.mimeType);
   if (this.thumb != null) {
     writer.writeObject(6, this.thumb);
   }
   if (this.ext != null) {
     writer.writeBytes(8, this.ext.buildContainer());
   }
   if (this.getUnmappedObjects() != null) {
     SparseArray<Object> unmapped = this.getUnmappedObjects();
     for (int i = 0; i < unmapped.size(); i++) {
       int key = unmapped.keyAt(i);
       writer.writeUnmapped(key, unmapped.get(key));
     }
   }
 }
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.peer == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.peer);
   writer.writeLong(2, this.rid);
   writer.writeLong(3, this.date);
 }
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeLong(1, this.projectId);
   if (this.token == null) {
     throw new IOException();
   }
   writer.writeString(2, this.token);
 }