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 RequestImportContacts extends Request<ResponseImportContacts> {
  
      public static final int HEADER = 0x7;
      public static RequestImportContacts fromBytes(byte[] data) throws IOException {
          return Bser.parse(new RequestImportContacts(), data);
      }
  
      private List<ApiPhoneToImport> phones;
      private List<ApiEmailToImport> emails;
      private List<ApiUpdateOptimization> optimizations;
  
      public RequestImportContacts(@NotNull List<ApiPhoneToImport> phones, @NotNull List<ApiEmailToImport> emails, @NotNull List<ApiUpdateOptimization> optimizations) {
          this.phones = phones;
          this.emails = emails;
          this.optimizations = optimizations;
      }
  
      public RequestImportContacts() {
  
      }
  
      @NotNull
      public List<ApiPhoneToImport> getPhones() {
          return this.phones;
      }
  
      @NotNull
      public List<ApiEmailToImport> getEmails() {
          return this.emails;
      }
  
      @NotNull
      public List<ApiUpdateOptimization> getOptimizations() {
          return this.optimizations;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          List<ApiPhoneToImport> _phones = new ArrayList<ApiPhoneToImport>();
          for (int i = 0; i < values.getRepeatedCount(1); i ++) {
              _phones.add(new ApiPhoneToImport());
          }
          this.phones = values.getRepeatedObj(1, _phones);
          List<ApiEmailToImport> _emails = new ArrayList<ApiEmailToImport>();
          for (int i = 0; i < values.getRepeatedCount(2); i ++) {
              _emails.add(new ApiEmailToImport());
          }
          this.emails = values.getRepeatedObj(2, _emails);
          this.optimizations = new ArrayList<ApiUpdateOptimization>();
          for (int b : values.getRepeatedInt(3)) {
              optimizations.add(ApiUpdateOptimization.parse(b));
          }
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          writer.writeRepeatedObj(1, this.phones);
          writer.writeRepeatedObj(2, this.emails);
          for (ApiUpdateOptimization i : this.optimizations) {
              writer.writeInt(3, i.getValue());
          }
      }
  
      @Override
      public String toString() {
          String res = "rpc ImportContacts{";
          res += "phones=" + this.phones.size();
          res += ", emails=" + this.emails.size();
          res += ", optimizations=" + this.optimizations;
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  