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 RequestOptimizeSDP extends Request<ResponseOptimizeSDP> {
  
      public static final int HEADER = 0xa7d;
      public static RequestOptimizeSDP fromBytes(byte[] data) throws IOException {
          return Bser.parse(new RequestOptimizeSDP(), data);
      }
  
      private String type;
      private String sdp;
      private ApiPeerSettings ownSettings;
      private ApiPeerSettings theirSettings;
  
      public RequestOptimizeSDP(@NotNull String type, @NotNull String sdp, @NotNull ApiPeerSettings ownSettings, @NotNull ApiPeerSettings theirSettings) {
          this.type = type;
          this.sdp = sdp;
          this.ownSettings = ownSettings;
          this.theirSettings = theirSettings;
      }
  
      public RequestOptimizeSDP() {
  
      }
  
      @NotNull
      public String getType() {
          return this.type;
      }
  
      @NotNull
      public String getSdp() {
          return this.sdp;
      }
  
      @NotNull
      public ApiPeerSettings getOwnSettings() {
          return this.ownSettings;
      }
  
      @NotNull
      public ApiPeerSettings getTheirSettings() {
          return this.theirSettings;
      }
  
      @Override
      public void parse(BserValues values) throws IOException {
          this.type = values.getString(1);
          this.sdp = values.getString(2);
          this.ownSettings = values.getObj(3, new ApiPeerSettings());
          this.theirSettings = values.getObj(4, new ApiPeerSettings());
      }
  
      @Override
      public void serialize(BserWriter writer) throws IOException {
          if (this.type == null) {
              throw new IOException();
          }
          writer.writeString(1, this.type);
          if (this.sdp == null) {
              throw new IOException();
          }
          writer.writeString(2, this.sdp);
          if (this.ownSettings == null) {
              throw new IOException();
          }
          writer.writeObject(3, this.ownSettings);
          if (this.theirSettings == null) {
              throw new IOException();
          }
          writer.writeObject(4, this.theirSettings);
      }
  
      @Override
      public String toString() {
          String res = "rpc OptimizeSDP{";
          res += "type=" + this.type;
          res += ", sdp=" + this.sdp;
          res += ", ownSettings=" + this.ownSettings;
          res += ", theirSettings=" + this.theirSettings;
          res += "}";
          return res;
      }
  
      @Override
      public int getHeaderKey() {
          return HEADER;
      }
  }
  