/FileExtraction/Java_unseen/InsightIM_Tok-Android/ChatCore/src/main/java/debug/proto/im/tox/proto/Av.java
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Av.proto

package im.tox.proto;

public final class Av {
  private Av() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  public interface CallOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.Call)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional int32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>optional bool audio_enabled = 2;</code>
     */
    boolean getAudioEnabled();

    /**
     * <code>optional bool video_enabled = 3;</code>
     */
    boolean getVideoEnabled();
  }
  /**
   * Protobuf type {@code im.tox.proto.Call}
   */
  public  static final class Call extends
      com.google.protobuf.GeneratedMessageLite<
          Call, Call.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.Call)
      CallOrBuilder {
    private Call() {
    }
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional int32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional int32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional int32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int AUDIO_ENABLED_FIELD_NUMBER = 2;
    private boolean audioEnabled_;
    /**
     * <code>optional bool audio_enabled = 2;</code>
     */
    public boolean getAudioEnabled() {
      return audioEnabled_;
    }
    /**
     * <code>optional bool audio_enabled = 2;</code>
     */
    private void setAudioEnabled(boolean value) {
      
      audioEnabled_ = value;
    }
    /**
     * <code>optional bool audio_enabled = 2;</code>
     */
    private void clearAudioEnabled() {
      
      audioEnabled_ = false;
    }

    public static final int VIDEO_ENABLED_FIELD_NUMBER = 3;
    private boolean videoEnabled_;
    /**
     * <code>optional bool video_enabled = 3;</code>
     */
    public boolean getVideoEnabled() {
      return videoEnabled_;
    }
    /**
     * <code>optional bool video_enabled = 3;</code>
     */
    private void setVideoEnabled(boolean value) {
      
      videoEnabled_ = value;
    }
    /**
     * <code>optional bool video_enabled = 3;</code>
     */
    private void clearVideoEnabled() {
      
      videoEnabled_ = false;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (friendNumber_ != 0) {
        output.writeInt32(1, friendNumber_);
      }
      if (audioEnabled_ != false) {
        output.writeBool(2, audioEnabled_);
      }
      if (videoEnabled_ != false) {
        output.writeBool(3, videoEnabled_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, friendNumber_);
      }
      if (audioEnabled_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, audioEnabled_);
      }
      if (videoEnabled_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(3, videoEnabled_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.Call parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.Call parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.Call parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.Call parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.Call parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.Call parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.Call parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.Call parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.Call parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.Call parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.Call prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.Call}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.Call, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.Call)
        im.tox.proto.Av.CallOrBuilder {
      // Construct using im.tox.proto.Av.Call.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional int32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional int32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional int32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>optional bool audio_enabled = 2;</code>
       */
      public boolean getAudioEnabled() {
        return instance.getAudioEnabled();
      }
      /**
       * <code>optional bool audio_enabled = 2;</code>
       */
      public Builder setAudioEnabled(boolean value) {
        copyOnWrite();
        instance.setAudioEnabled(value);
        return this;
      }
      /**
       * <code>optional bool audio_enabled = 2;</code>
       */
      public Builder clearAudioEnabled() {
        copyOnWrite();
        instance.clearAudioEnabled();
        return this;
      }

      /**
       * <code>optional bool video_enabled = 3;</code>
       */
      public boolean getVideoEnabled() {
        return instance.getVideoEnabled();
      }
      /**
       * <code>optional bool video_enabled = 3;</code>
       */
      public Builder setVideoEnabled(boolean value) {
        copyOnWrite();
        instance.setVideoEnabled(value);
        return this;
      }
      /**
       * <code>optional bool video_enabled = 3;</code>
       */
      public Builder clearVideoEnabled() {
        copyOnWrite();
        instance.clearVideoEnabled();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.Call)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.Call();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.Call other = (im.tox.proto.Av.Call) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          audioEnabled_ = visitor.visitBoolean(audioEnabled_ != false, audioEnabled_,
              other.audioEnabled_ != false, other.audioEnabled_);
          videoEnabled_ = visitor.visitBoolean(videoEnabled_ != false, videoEnabled_,
              other.videoEnabled_ != false, other.videoEnabled_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readInt32();
                  break;
                }
                case 16: {

                  audioEnabled_ = input.readBool();
                  break;
                }
                case 24: {

                  videoEnabled_ = input.readBool();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.Call.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.Call)
    private static final im.tox.proto.Av.Call DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Call();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.Call getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Call> PARSER;

    public static com.google.protobuf.Parser<Call> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface CallStateOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.CallState)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    java.util.List<im.tox.proto.Av.CallState.Kind> getCallStateList();
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    int getCallStateCount();
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    im.tox.proto.Av.CallState.Kind getCallState(int index);
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    java.util.List<java.lang.Integer>
    getCallStateValueList();
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    int getCallStateValue(int index);
  }
  /**
   * Protobuf type {@code im.tox.proto.CallState}
   */
  public  static final class CallState extends
      com.google.protobuf.GeneratedMessageLite<
          CallState, CallState.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.CallState)
      CallStateOrBuilder {
    private CallState() {
      callState_ = emptyIntList();
    }
    /**
     * Protobuf enum {@code im.tox.proto.CallState.Kind}
     */
    public enum Kind
        implements com.google.protobuf.Internal.EnumLite {
      /**
       * <code>ERROR = 0;</code>
       */
      ERROR(0),
      /**
       * <code>FINISHED = 1;</code>
       */
      FINISHED(1),
      /**
       * <code>SENDING_A = 2;</code>
       */
      SENDING_A(2),
      /**
       * <code>SENDING_V = 3;</code>
       */
      SENDING_V(3),
      /**
       * <code>ACCEPTING_A = 4;</code>
       */
      ACCEPTING_A(4),
      /**
       * <code>ACCEPTING_V = 5;</code>
       */
      ACCEPTING_V(5),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>ERROR = 0;</code>
       */
      public static final int ERROR_VALUE = 0;
      /**
       * <code>FINISHED = 1;</code>
       */
      public static final int FINISHED_VALUE = 1;
      /**
       * <code>SENDING_A = 2;</code>
       */
      public static final int SENDING_A_VALUE = 2;
      /**
       * <code>SENDING_V = 3;</code>
       */
      public static final int SENDING_V_VALUE = 3;
      /**
       * <code>ACCEPTING_A = 4;</code>
       */
      public static final int ACCEPTING_A_VALUE = 4;
      /**
       * <code>ACCEPTING_V = 5;</code>
       */
      public static final int ACCEPTING_V_VALUE = 5;


      public final int getNumber() {
        return value;
      }

      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static Kind valueOf(int value) {
        return forNumber(value);
      }

      public static Kind forNumber(int value) {
        switch (value) {
          case 0: return ERROR;
          case 1: return FINISHED;
          case 2: return SENDING_A;
          case 3: return SENDING_V;
          case 4: return ACCEPTING_A;
          case 5: return ACCEPTING_V;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<Kind>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          Kind> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<Kind>() {
              public Kind findValueByNumber(int number) {
                return Kind.forNumber(number);
              }
            };

      private final int value;

      private Kind(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:im.tox.proto.CallState.Kind)
    }

    private int bitField0_;
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int CALL_STATE_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.IntList callState_;
    private static final com.google.protobuf.Internal.ListAdapter.Converter<
        java.lang.Integer, im.tox.proto.Av.CallState.Kind> callState_converter_ =
            new com.google.protobuf.Internal.ListAdapter.Converter<
                java.lang.Integer, im.tox.proto.Av.CallState.Kind>() {
              public im.tox.proto.Av.CallState.Kind convert(java.lang.Integer from) {
                im.tox.proto.Av.CallState.Kind result = im.tox.proto.Av.CallState.Kind.forNumber(from);
                return result == null ? im.tox.proto.Av.CallState.Kind.UNRECOGNIZED : result;
              }
            };
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    public java.util.List<im.tox.proto.Av.CallState.Kind> getCallStateList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, im.tox.proto.Av.CallState.Kind>(callState_, callState_converter_);
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    public int getCallStateCount() {
      return callState_.size();
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    public im.tox.proto.Av.CallState.Kind getCallState(int index) {
      return callState_converter_.convert(callState_.getInt(index));
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    public java.util.List<java.lang.Integer>
    getCallStateValueList() {
      return callState_;
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    public int getCallStateValue(int index) {
      return callState_.getInt(index);
    }
    private void ensureCallStateIsMutable() {
      if (!callState_.isModifiable()) {
        callState_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(callState_);
      }
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void setCallState(
        int index, im.tox.proto.Av.CallState.Kind value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallStateIsMutable();
      callState_.setInt(index, value.getNumber());
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void addCallState(im.tox.proto.Av.CallState.Kind value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallStateIsMutable();
      callState_.addInt(value.getNumber());
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void addAllCallState(
        java.lang.Iterable<? extends im.tox.proto.Av.CallState.Kind> values) {
      ensureCallStateIsMutable();
      for (im.tox.proto.Av.CallState.Kind value : values) {
        callState_.addInt(value.getNumber());
      }
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void clearCallState() {
      callState_ = emptyIntList();
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void setCallStateValue(
        int index, int value) {
      ensureCallStateIsMutable();
      callState_.setInt(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void addCallStateValue(int value) {
      ensureCallStateIsMutable();
      callState_.addInt(value);
    }
    /**
     * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
     */
    private void addAllCallStateValue(
        java.lang.Iterable<java.lang.Integer> values) {
      ensureCallStateIsMutable();
      for (int value : values) {
        callState_.addInt(value);
      }
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (friendNumber_ != 0) {
        output.writeUInt32(1, friendNumber_);
      }
      for (int i = 0; i < callState_.size(); i++) {
        output.writeEnum(2, callState_.getInt(i));
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, friendNumber_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < callState_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeEnumSizeNoTag(callState_.getInt(i));
        }
        size += dataSize;
        size += 1 * callState_.size();
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.CallState parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.CallState parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.CallState parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.CallState parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.CallState parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.CallState parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.CallState parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.CallState parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.CallState parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.CallState parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.CallState prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.CallState}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.CallState, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.CallState)
        im.tox.proto.Av.CallStateOrBuilder {
      // Construct using im.tox.proto.Av.CallState.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public java.util.List<im.tox.proto.Av.CallState.Kind> getCallStateList() {
        return instance.getCallStateList();
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public int getCallStateCount() {
        return instance.getCallStateCount();
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public im.tox.proto.Av.CallState.Kind getCallState(int index) {
        return instance.getCallState(index);
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder setCallState(
          int index, im.tox.proto.Av.CallState.Kind value) {
        copyOnWrite();
        instance.setCallState(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder addCallState(im.tox.proto.Av.CallState.Kind value) {
        copyOnWrite();
        instance.addCallState(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder addAllCallState(
          java.lang.Iterable<? extends im.tox.proto.Av.CallState.Kind> values) {
        copyOnWrite();
        instance.addAllCallState(values);  return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder clearCallState() {
        copyOnWrite();
        instance.clearCallState();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public java.util.List<java.lang.Integer>
      getCallStateValueList() {
        return java.util.Collections.unmodifiableList(
            instance.getCallStateValueList());
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public int getCallStateValue(int index) {
        return instance.getCallStateValue(index);
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder setCallStateValue(
          int index, int value) {
        copyOnWrite();
        instance.setCallStateValue(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder addCallStateValue(int value) {
        instance.addCallStateValue(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState.Kind call_state = 2;</code>
       */
      public Builder addAllCallStateValue(
          java.lang.Iterable<java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllCallStateValue(values);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.CallState)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.CallState();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          callState_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.CallState other = (im.tox.proto.Av.CallState) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          callState_= visitor.visitIntList(callState_, other.callState_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readUInt32();
                  break;
                }
                case 16: {
                  if (!callState_.isModifiable()) {
                    callState_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(callState_);
                  }
                  callState_.addInt(input.readEnum());
                  break;
                }
                case 18: {
                  if (!callState_.isModifiable()) {
                    callState_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(callState_);
                  }
                  int length = input.readRawVarint32();
                  int oldLimit = input.pushLimit(length);
                  while(input.getBytesUntilLimit() > 0) {
                    callState_.addInt(input.readEnum());
                  }
                  input.popLimit(oldLimit);
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.CallState.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.CallState)
    private static final im.tox.proto.Av.CallState DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new CallState();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.CallState getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<CallState> PARSER;

    public static com.google.protobuf.Parser<CallState> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface AudioBitRateOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.AudioBitRate)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>optional uint32 audio_bit_rate = 2;</code>
     */
    int getAudioBitRate();
  }
  /**
   * Protobuf type {@code im.tox.proto.AudioBitRate}
   */
  public  static final class AudioBitRate extends
      com.google.protobuf.GeneratedMessageLite<
          AudioBitRate, AudioBitRate.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.AudioBitRate)
      AudioBitRateOrBuilder {
    private AudioBitRate() {
    }
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int AUDIO_BIT_RATE_FIELD_NUMBER = 2;
    private int audioBitRate_;
    /**
     * <code>optional uint32 audio_bit_rate = 2;</code>
     */
    public int getAudioBitRate() {
      return audioBitRate_;
    }
    /**
     * <code>optional uint32 audio_bit_rate = 2;</code>
     */
    private void setAudioBitRate(int value) {
      
      audioBitRate_ = value;
    }
    /**
     * <code>optional uint32 audio_bit_rate = 2;</code>
     */
    private void clearAudioBitRate() {
      
      audioBitRate_ = 0;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (friendNumber_ != 0) {
        output.writeUInt32(1, friendNumber_);
      }
      if (audioBitRate_ != 0) {
        output.writeUInt32(2, audioBitRate_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, friendNumber_);
      }
      if (audioBitRate_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, audioBitRate_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.AudioBitRate parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioBitRate parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioBitRate parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioBitRate parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.AudioBitRate prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.AudioBitRate}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.AudioBitRate, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.AudioBitRate)
        im.tox.proto.Av.AudioBitRateOrBuilder {
      // Construct using im.tox.proto.Av.AudioBitRate.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>optional uint32 audio_bit_rate = 2;</code>
       */
      public int getAudioBitRate() {
        return instance.getAudioBitRate();
      }
      /**
       * <code>optional uint32 audio_bit_rate = 2;</code>
       */
      public Builder setAudioBitRate(int value) {
        copyOnWrite();
        instance.setAudioBitRate(value);
        return this;
      }
      /**
       * <code>optional uint32 audio_bit_rate = 2;</code>
       */
      public Builder clearAudioBitRate() {
        copyOnWrite();
        instance.clearAudioBitRate();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.AudioBitRate)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.AudioBitRate();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.AudioBitRate other = (im.tox.proto.Av.AudioBitRate) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          audioBitRate_ = visitor.visitInt(audioBitRate_ != 0, audioBitRate_,
              other.audioBitRate_ != 0, other.audioBitRate_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readUInt32();
                  break;
                }
                case 16: {

                  audioBitRate_ = input.readUInt32();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.AudioBitRate.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.AudioBitRate)
    private static final im.tox.proto.Av.AudioBitRate DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new AudioBitRate();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.AudioBitRate getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<AudioBitRate> PARSER;

    public static com.google.protobuf.Parser<AudioBitRate> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface VideoBitRateOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.VideoBitRate)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>optional uint32 video_bit_rate = 2;</code>
     */
    int getVideoBitRate();
  }
  /**
   * Protobuf type {@code im.tox.proto.VideoBitRate}
   */
  public  static final class VideoBitRate extends
      com.google.protobuf.GeneratedMessageLite<
          VideoBitRate, VideoBitRate.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.VideoBitRate)
      VideoBitRateOrBuilder {
    private VideoBitRate() {
    }
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int VIDEO_BIT_RATE_FIELD_NUMBER = 2;
    private int videoBitRate_;
    /**
     * <code>optional uint32 video_bit_rate = 2;</code>
     */
    public int getVideoBitRate() {
      return videoBitRate_;
    }
    /**
     * <code>optional uint32 video_bit_rate = 2;</code>
     */
    private void setVideoBitRate(int value) {
      
      videoBitRate_ = value;
    }
    /**
     * <code>optional uint32 video_bit_rate = 2;</code>
     */
    private void clearVideoBitRate() {
      
      videoBitRate_ = 0;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (friendNumber_ != 0) {
        output.writeUInt32(1, friendNumber_);
      }
      if (videoBitRate_ != 0) {
        output.writeUInt32(2, videoBitRate_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, friendNumber_);
      }
      if (videoBitRate_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, videoBitRate_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.VideoBitRate parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoBitRate parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoBitRate parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoBitRate parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.VideoBitRate prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.VideoBitRate}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.VideoBitRate, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.VideoBitRate)
        im.tox.proto.Av.VideoBitRateOrBuilder {
      // Construct using im.tox.proto.Av.VideoBitRate.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>optional uint32 video_bit_rate = 2;</code>
       */
      public int getVideoBitRate() {
        return instance.getVideoBitRate();
      }
      /**
       * <code>optional uint32 video_bit_rate = 2;</code>
       */
      public Builder setVideoBitRate(int value) {
        copyOnWrite();
        instance.setVideoBitRate(value);
        return this;
      }
      /**
       * <code>optional uint32 video_bit_rate = 2;</code>
       */
      public Builder clearVideoBitRate() {
        copyOnWrite();
        instance.clearVideoBitRate();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.VideoBitRate)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.VideoBitRate();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.VideoBitRate other = (im.tox.proto.Av.VideoBitRate) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          videoBitRate_ = visitor.visitInt(videoBitRate_ != 0, videoBitRate_,
              other.videoBitRate_ != 0, other.videoBitRate_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readUInt32();
                  break;
                }
                case 16: {

                  videoBitRate_ = input.readUInt32();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.VideoBitRate.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.VideoBitRate)
    private static final im.tox.proto.Av.VideoBitRate DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new VideoBitRate();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.VideoBitRate getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<VideoBitRate> PARSER;

    public static com.google.protobuf.Parser<VideoBitRate> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface AudioReceiveFrameOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.AudioReceiveFrame)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>optional bytes pcm = 2;</code>
     */
    com.google.protobuf.ByteString getPcm();

    /**
     * <code>optional uint32 channels = 3;</code>
     */
    int getChannels();

    /**
     * <code>optional uint32 sampling_rate = 4;</code>
     */
    int getSamplingRate();
  }
  /**
   * Protobuf type {@code im.tox.proto.AudioReceiveFrame}
   */
  public  static final class AudioReceiveFrame extends
      com.google.protobuf.GeneratedMessageLite<
          AudioReceiveFrame, AudioReceiveFrame.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.AudioReceiveFrame)
      AudioReceiveFrameOrBuilder {
    private AudioReceiveFrame() {
      pcm_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int PCM_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString pcm_;
    /**
     * <code>optional bytes pcm = 2;</code>
     */
    public com.google.protobuf.ByteString getPcm() {
      return pcm_;
    }
    /**
     * <code>optional bytes pcm = 2;</code>
     */
    private void setPcm(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pcm_ = value;
    }
    /**
     * <code>optional bytes pcm = 2;</code>
     */
    private void clearPcm() {
      
      pcm_ = getDefaultInstance().getPcm();
    }

    public static final int CHANNELS_FIELD_NUMBER = 3;
    private int channels_;
    /**
     * <code>optional uint32 channels = 3;</code>
     */
    public int getChannels() {
      return channels_;
    }
    /**
     * <code>optional uint32 channels = 3;</code>
     */
    private void setChannels(int value) {
      
      channels_ = value;
    }
    /**
     * <code>optional uint32 channels = 3;</code>
     */
    private void clearChannels() {
      
      channels_ = 0;
    }

    public static final int SAMPLING_RATE_FIELD_NUMBER = 4;
    private int samplingRate_;
    /**
     * <code>optional uint32 sampling_rate = 4;</code>
     */
    public int getSamplingRate() {
      return samplingRate_;
    }
    /**
     * <code>optional uint32 sampling_rate = 4;</code>
     */
    private void setSamplingRate(int value) {
      
      samplingRate_ = value;
    }
    /**
     * <code>optional uint32 sampling_rate = 4;</code>
     */
    private void clearSamplingRate() {
      
      samplingRate_ = 0;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (friendNumber_ != 0) {
        output.writeUInt32(1, friendNumber_);
      }
      if (!pcm_.isEmpty()) {
        output.writeBytes(2, pcm_);
      }
      if (channels_ != 0) {
        output.writeUInt32(3, channels_);
      }
      if (samplingRate_ != 0) {
        output.writeUInt32(4, samplingRate_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, friendNumber_);
      }
      if (!pcm_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, pcm_);
      }
      if (channels_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(3, channels_);
      }
      if (samplingRate_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(4, samplingRate_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AudioReceiveFrame parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.AudioReceiveFrame prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.AudioReceiveFrame}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.AudioReceiveFrame, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.AudioReceiveFrame)
        im.tox.proto.Av.AudioReceiveFrameOrBuilder {
      // Construct using im.tox.proto.Av.AudioReceiveFrame.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>optional bytes pcm = 2;</code>
       */
      public com.google.protobuf.ByteString getPcm() {
        return instance.getPcm();
      }
      /**
       * <code>optional bytes pcm = 2;</code>
       */
      public Builder setPcm(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPcm(value);
        return this;
      }
      /**
       * <code>optional bytes pcm = 2;</code>
       */
      public Builder clearPcm() {
        copyOnWrite();
        instance.clearPcm();
        return this;
      }

      /**
       * <code>optional uint32 channels = 3;</code>
       */
      public int getChannels() {
        return instance.getChannels();
      }
      /**
       * <code>optional uint32 channels = 3;</code>
       */
      public Builder setChannels(int value) {
        copyOnWrite();
        instance.setChannels(value);
        return this;
      }
      /**
       * <code>optional uint32 channels = 3;</code>
       */
      public Builder clearChannels() {
        copyOnWrite();
        instance.clearChannels();
        return this;
      }

      /**
       * <code>optional uint32 sampling_rate = 4;</code>
       */
      public int getSamplingRate() {
        return instance.getSamplingRate();
      }
      /**
       * <code>optional uint32 sampling_rate = 4;</code>
       */
      public Builder setSamplingRate(int value) {
        copyOnWrite();
        instance.setSamplingRate(value);
        return this;
      }
      /**
       * <code>optional uint32 sampling_rate = 4;</code>
       */
      public Builder clearSamplingRate() {
        copyOnWrite();
        instance.clearSamplingRate();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.AudioReceiveFrame)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.AudioReceiveFrame();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.AudioReceiveFrame other = (im.tox.proto.Av.AudioReceiveFrame) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          pcm_ = visitor.visitByteString(pcm_ != com.google.protobuf.ByteString.EMPTY, pcm_,
              other.pcm_ != com.google.protobuf.ByteString.EMPTY, other.pcm_);
          channels_ = visitor.visitInt(channels_ != 0, channels_,
              other.channels_ != 0, other.channels_);
          samplingRate_ = visitor.visitInt(samplingRate_ != 0, samplingRate_,
              other.samplingRate_ != 0, other.samplingRate_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readUInt32();
                  break;
                }
                case 18: {

                  pcm_ = input.readBytes();
                  break;
                }
                case 24: {

                  channels_ = input.readUInt32();
                  break;
                }
                case 32: {

                  samplingRate_ = input.readUInt32();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.AudioReceiveFrame.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.AudioReceiveFrame)
    private static final im.tox.proto.Av.AudioReceiveFrame DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new AudioReceiveFrame();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.AudioReceiveFrame getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<AudioReceiveFrame> PARSER;

    public static com.google.protobuf.Parser<AudioReceiveFrame> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface VideoReceiveFrameOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.VideoReceiveFrame)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    int getFriendNumber();

    /**
     * <code>optional uint32 width = 2;</code>
     */
    int getWidth();

    /**
     * <code>optional uint32 height = 3;</code>
     */
    int getHeight();

    /**
     * <code>optional bytes y = 4;</code>
     */
    com.google.protobuf.ByteString getY();

    /**
     * <code>optional bytes u = 5;</code>
     */
    com.google.protobuf.ByteString getU();

    /**
     * <code>optional bytes v = 6;</code>
     */
    com.google.protobuf.ByteString getV();

    /**
     * <code>optional int32 y_stride = 7;</code>
     */
    int getYStride();

    /**
     * <code>optional int32 u_stride = 8;</code>
     */
    int getUStride();

    /**
     * <code>optional int32 v_stride = 9;</code>
     */
    int getVStride();
  }
  /**
   * Protobuf type {@code im.tox.proto.VideoReceiveFrame}
   */
  public  static final class VideoReceiveFrame extends
      com.google.protobuf.GeneratedMessageLite<
          VideoReceiveFrame, VideoReceiveFrame.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.VideoReceiveFrame)
      VideoReceiveFrameOrBuilder {
    private VideoReceiveFrame() {
      y_ = com.google.protobuf.ByteString.EMPTY;
      u_ = com.google.protobuf.ByteString.EMPTY;
      v_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int FRIEND_NUMBER_FIELD_NUMBER = 1;
    private int friendNumber_;
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    public int getFriendNumber() {
      return friendNumber_;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void setFriendNumber(int value) {
      
      friendNumber_ = value;
    }
    /**
     * <code>optional uint32 friend_number = 1;</code>
     */
    private void clearFriendNumber() {
      
      friendNumber_ = 0;
    }

    public static final int WIDTH_FIELD_NUMBER = 2;
    private int width_;
    /**
     * <code>optional uint32 width = 2;</code>
     */
    public int getWidth() {
      return width_;
    }
    /**
     * <code>optional uint32 width = 2;</code>
     */
    private void setWidth(int value) {
      
      width_ = value;
    }
    /**
     * <code>optional uint32 width = 2;</code>
     */
    private void clearWidth() {
      
      width_ = 0;
    }

    public static final int HEIGHT_FIELD_NUMBER = 3;
    private int height_;
    /**
     * <code>optional uint32 height = 3;</code>
     */
    public int getHeight() {
      return height_;
    }
    /**
     * <code>optional uint32 height = 3;</code>
     */
    private void setHeight(int value) {
      
      height_ = value;
    }
    /**
     * <code>optional uint32 height = 3;</code>
     */
    private void clearHeight() {
      
      height_ = 0;
    }

    public static final int Y_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString y_;
    /**
     * <code>optional bytes y = 4;</code>
     */
    public com.google.protobuf.ByteString getY() {
      return y_;
    }
    /**
     * <code>optional bytes y = 4;</code>
     */
    private void setY(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      y_ = value;
    }
    /**
     * <code>optional bytes y = 4;</code>
     */
    private void clearY() {
      
      y_ = getDefaultInstance().getY();
    }

    public static final int U_FIELD_NUMBER = 5;
    private com.google.protobuf.ByteString u_;
    /**
     * <code>optional bytes u = 5;</code>
     */
    public com.google.protobuf.ByteString getU() {
      return u_;
    }
    /**
     * <code>optional bytes u = 5;</code>
     */
    private void setU(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      u_ = value;
    }
    /**
     * <code>optional bytes u = 5;</code>
     */
    private void clearU() {
      
      u_ = getDefaultInstance().getU();
    }

    public static final int V_FIELD_NUMBER = 6;
    private com.google.protobuf.ByteString v_;
    /**
     * <code>optional bytes v = 6;</code>
     */
    public com.google.protobuf.ByteString getV() {
      return v_;
    }
    /**
     * <code>optional bytes v = 6;</code>
     */
    private void setV(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      v_ = value;
    }
    /**
     * <code>optional bytes v = 6;</code>
     */
    private void clearV() {
      
      v_ = getDefaultInstance().getV();
    }

    public static final int Y_STRIDE_FIELD_NUMBER = 7;
    private int yStride_;
    /**
     * <code>optional int32 y_stride = 7;</code>
     */
    public int getYStride() {
      return yStride_;
    }
    /**
     * <code>optional int32 y_stride = 7;</code>
     */
    private void setYStride(int value) {
      
      yStride_ = value;
    }
    /**
     * <code>optional int32 y_stride = 7;</code>
     */
    private void clearYStride() {
      
      yStride_ = 0;
    }

    public static final int U_STRIDE_FIELD_NUMBER = 8;
    private int uStride_;
    /**
     * <code>optional int32 u_stride = 8;</code>
     */
    public int getUStride() {
      return uStride_;
    }
    /**
     * <code>optional int32 u_stride = 8;</code>
     */
    private void setUStride(int value) {
      
      uStride_ = value;
    }
    /**
     * <code>optional int32 u_stride = 8;</code>
     */
    private void clearUStride() {
      
      uStride_ = 0;
    }

    public static final int V_STRIDE_FIELD_NUMBER = 9;
    private int vStride_;
    /**
     * <code>optional int32 v_stride = 9;</code>
     */
    public int getVStride() {
      return vStride_;
    }
    /**
     * <code>optional int32 v_stride = 9;</code>
     */
    private void setVStride(int value) {
      
      vStride_ = value;
    }
    /**
     * <code>optional int32 v_stride = 9;</code>
     */
    private void clearVStride() {
      
      vStride_ = 0;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (friendNumber_ != 0) {
        output.writeUInt32(1, friendNumber_);
      }
      if (width_ != 0) {
        output.writeUInt32(2, width_);
      }
      if (height_ != 0) {
        output.writeUInt32(3, height_);
      }
      if (!y_.isEmpty()) {
        output.writeBytes(4, y_);
      }
      if (!u_.isEmpty()) {
        output.writeBytes(5, u_);
      }
      if (!v_.isEmpty()) {
        output.writeBytes(6, v_);
      }
      if (yStride_ != 0) {
        output.writeInt32(7, yStride_);
      }
      if (uStride_ != 0) {
        output.writeInt32(8, uStride_);
      }
      if (vStride_ != 0) {
        output.writeInt32(9, vStride_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (friendNumber_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, friendNumber_);
      }
      if (width_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, width_);
      }
      if (height_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(3, height_);
      }
      if (!y_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, y_);
      }
      if (!u_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(5, u_);
      }
      if (!v_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(6, v_);
      }
      if (yStride_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(7, yStride_);
      }
      if (uStride_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(8, uStride_);
      }
      if (vStride_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(9, vStride_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.VideoReceiveFrame parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.VideoReceiveFrame prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.VideoReceiveFrame}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.VideoReceiveFrame, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.VideoReceiveFrame)
        im.tox.proto.Av.VideoReceiveFrameOrBuilder {
      // Construct using im.tox.proto.Av.VideoReceiveFrame.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public int getFriendNumber() {
        return instance.getFriendNumber();
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder setFriendNumber(int value) {
        copyOnWrite();
        instance.setFriendNumber(value);
        return this;
      }
      /**
       * <code>optional uint32 friend_number = 1;</code>
       */
      public Builder clearFriendNumber() {
        copyOnWrite();
        instance.clearFriendNumber();
        return this;
      }

      /**
       * <code>optional uint32 width = 2;</code>
       */
      public int getWidth() {
        return instance.getWidth();
      }
      /**
       * <code>optional uint32 width = 2;</code>
       */
      public Builder setWidth(int value) {
        copyOnWrite();
        instance.setWidth(value);
        return this;
      }
      /**
       * <code>optional uint32 width = 2;</code>
       */
      public Builder clearWidth() {
        copyOnWrite();
        instance.clearWidth();
        return this;
      }

      /**
       * <code>optional uint32 height = 3;</code>
       */
      public int getHeight() {
        return instance.getHeight();
      }
      /**
       * <code>optional uint32 height = 3;</code>
       */
      public Builder setHeight(int value) {
        copyOnWrite();
        instance.setHeight(value);
        return this;
      }
      /**
       * <code>optional uint32 height = 3;</code>
       */
      public Builder clearHeight() {
        copyOnWrite();
        instance.clearHeight();
        return this;
      }

      /**
       * <code>optional bytes y = 4;</code>
       */
      public com.google.protobuf.ByteString getY() {
        return instance.getY();
      }
      /**
       * <code>optional bytes y = 4;</code>
       */
      public Builder setY(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setY(value);
        return this;
      }
      /**
       * <code>optional bytes y = 4;</code>
       */
      public Builder clearY() {
        copyOnWrite();
        instance.clearY();
        return this;
      }

      /**
       * <code>optional bytes u = 5;</code>
       */
      public com.google.protobuf.ByteString getU() {
        return instance.getU();
      }
      /**
       * <code>optional bytes u = 5;</code>
       */
      public Builder setU(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setU(value);
        return this;
      }
      /**
       * <code>optional bytes u = 5;</code>
       */
      public Builder clearU() {
        copyOnWrite();
        instance.clearU();
        return this;
      }

      /**
       * <code>optional bytes v = 6;</code>
       */
      public com.google.protobuf.ByteString getV() {
        return instance.getV();
      }
      /**
       * <code>optional bytes v = 6;</code>
       */
      public Builder setV(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setV(value);
        return this;
      }
      /**
       * <code>optional bytes v = 6;</code>
       */
      public Builder clearV() {
        copyOnWrite();
        instance.clearV();
        return this;
      }

      /**
       * <code>optional int32 y_stride = 7;</code>
       */
      public int getYStride() {
        return instance.getYStride();
      }
      /**
       * <code>optional int32 y_stride = 7;</code>
       */
      public Builder setYStride(int value) {
        copyOnWrite();
        instance.setYStride(value);
        return this;
      }
      /**
       * <code>optional int32 y_stride = 7;</code>
       */
      public Builder clearYStride() {
        copyOnWrite();
        instance.clearYStride();
        return this;
      }

      /**
       * <code>optional int32 u_stride = 8;</code>
       */
      public int getUStride() {
        return instance.getUStride();
      }
      /**
       * <code>optional int32 u_stride = 8;</code>
       */
      public Builder setUStride(int value) {
        copyOnWrite();
        instance.setUStride(value);
        return this;
      }
      /**
       * <code>optional int32 u_stride = 8;</code>
       */
      public Builder clearUStride() {
        copyOnWrite();
        instance.clearUStride();
        return this;
      }

      /**
       * <code>optional int32 v_stride = 9;</code>
       */
      public int getVStride() {
        return instance.getVStride();
      }
      /**
       * <code>optional int32 v_stride = 9;</code>
       */
      public Builder setVStride(int value) {
        copyOnWrite();
        instance.setVStride(value);
        return this;
      }
      /**
       * <code>optional int32 v_stride = 9;</code>
       */
      public Builder clearVStride() {
        copyOnWrite();
        instance.clearVStride();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.VideoReceiveFrame)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.VideoReceiveFrame();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.VideoReceiveFrame other = (im.tox.proto.Av.VideoReceiveFrame) arg1;
          friendNumber_ = visitor.visitInt(friendNumber_ != 0, friendNumber_,
              other.friendNumber_ != 0, other.friendNumber_);
          width_ = visitor.visitInt(width_ != 0, width_,
              other.width_ != 0, other.width_);
          height_ = visitor.visitInt(height_ != 0, height_,
              other.height_ != 0, other.height_);
          y_ = visitor.visitByteString(y_ != com.google.protobuf.ByteString.EMPTY, y_,
              other.y_ != com.google.protobuf.ByteString.EMPTY, other.y_);
          u_ = visitor.visitByteString(u_ != com.google.protobuf.ByteString.EMPTY, u_,
              other.u_ != com.google.protobuf.ByteString.EMPTY, other.u_);
          v_ = visitor.visitByteString(v_ != com.google.protobuf.ByteString.EMPTY, v_,
              other.v_ != com.google.protobuf.ByteString.EMPTY, other.v_);
          yStride_ = visitor.visitInt(yStride_ != 0, yStride_,
              other.yStride_ != 0, other.yStride_);
          uStride_ = visitor.visitInt(uStride_ != 0, uStride_,
              other.uStride_ != 0, other.uStride_);
          vStride_ = visitor.visitInt(vStride_ != 0, vStride_,
              other.vStride_ != 0, other.vStride_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

                  friendNumber_ = input.readUInt32();
                  break;
                }
                case 16: {

                  width_ = input.readUInt32();
                  break;
                }
                case 24: {

                  height_ = input.readUInt32();
                  break;
                }
                case 34: {

                  y_ = input.readBytes();
                  break;
                }
                case 42: {

                  u_ = input.readBytes();
                  break;
                }
                case 50: {

                  v_ = input.readBytes();
                  break;
                }
                case 56: {

                  yStride_ = input.readInt32();
                  break;
                }
                case 64: {

                  uStride_ = input.readInt32();
                  break;
                }
                case 72: {

                  vStride_ = input.readInt32();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.VideoReceiveFrame.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.VideoReceiveFrame)
    private static final im.tox.proto.Av.VideoReceiveFrame DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new VideoReceiveFrame();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.VideoReceiveFrame getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<VideoReceiveFrame> PARSER;

    public static com.google.protobuf.Parser<VideoReceiveFrame> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface AvEventsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.AvEvents)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    java.util.List<im.tox.proto.Av.Call> 
        getCallList();
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    im.tox.proto.Av.Call getCall(int index);
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    int getCallCount();

    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    java.util.List<im.tox.proto.Av.CallState> 
        getCallStateList();
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    im.tox.proto.Av.CallState getCallState(int index);
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    int getCallStateCount();

    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    java.util.List<im.tox.proto.Av.AudioBitRate> 
        getAudioBitRateList();
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    im.tox.proto.Av.AudioBitRate getAudioBitRate(int index);
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    int getAudioBitRateCount();

    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    java.util.List<im.tox.proto.Av.VideoBitRate> 
        getVideoBitRateList();
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    im.tox.proto.Av.VideoBitRate getVideoBitRate(int index);
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    int getVideoBitRateCount();

    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    java.util.List<im.tox.proto.Av.AudioReceiveFrame> 
        getAudioReceiveFrameList();
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    im.tox.proto.Av.AudioReceiveFrame getAudioReceiveFrame(int index);
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    int getAudioReceiveFrameCount();

    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    java.util.List<im.tox.proto.Av.VideoReceiveFrame> 
        getVideoReceiveFrameList();
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    im.tox.proto.Av.VideoReceiveFrame getVideoReceiveFrame(int index);
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    int getVideoReceiveFrameCount();
  }
  /**
   * Protobuf type {@code im.tox.proto.AvEvents}
   */
  public  static final class AvEvents extends
      com.google.protobuf.GeneratedMessageLite<
          AvEvents, AvEvents.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.AvEvents)
      AvEventsOrBuilder {
    private AvEvents() {
      call_ = emptyProtobufList();
      callState_ = emptyProtobufList();
      audioBitRate_ = emptyProtobufList();
      videoBitRate_ = emptyProtobufList();
      audioReceiveFrame_ = emptyProtobufList();
      videoReceiveFrame_ = emptyProtobufList();
    }
    public static final int CALL_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.Call> call_;
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    public java.util.List<im.tox.proto.Av.Call> getCallList() {
      return call_;
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.CallOrBuilder> 
        getCallOrBuilderList() {
      return call_;
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    public int getCallCount() {
      return call_.size();
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    public im.tox.proto.Av.Call getCall(int index) {
      return call_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    public im.tox.proto.Av.CallOrBuilder getCallOrBuilder(
        int index) {
      return call_.get(index);
    }
    private void ensureCallIsMutable() {
      if (!call_.isModifiable()) {
        call_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(call_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void setCall(
        int index, im.tox.proto.Av.Call value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallIsMutable();
      call_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void setCall(
        int index, im.tox.proto.Av.Call.Builder builderForValue) {
      ensureCallIsMutable();
      call_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void addCall(im.tox.proto.Av.Call value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallIsMutable();
      call_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void addCall(
        int index, im.tox.proto.Av.Call value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallIsMutable();
      call_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void addCall(
        im.tox.proto.Av.Call.Builder builderForValue) {
      ensureCallIsMutable();
      call_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void addCall(
        int index, im.tox.proto.Av.Call.Builder builderForValue) {
      ensureCallIsMutable();
      call_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void addAllCall(
        java.lang.Iterable<? extends im.tox.proto.Av.Call> values) {
      ensureCallIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, call_);
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void clearCall() {
      call_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.Call call = 1;</code>
     */
    private void removeCall(int index) {
      ensureCallIsMutable();
      call_.remove(index);
    }

    public static final int CALL_STATE_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.CallState> callState_;
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    public java.util.List<im.tox.proto.Av.CallState> getCallStateList() {
      return callState_;
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.CallStateOrBuilder> 
        getCallStateOrBuilderList() {
      return callState_;
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    public int getCallStateCount() {
      return callState_.size();
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    public im.tox.proto.Av.CallState getCallState(int index) {
      return callState_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    public im.tox.proto.Av.CallStateOrBuilder getCallStateOrBuilder(
        int index) {
      return callState_.get(index);
    }
    private void ensureCallStateIsMutable() {
      if (!callState_.isModifiable()) {
        callState_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(callState_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void setCallState(
        int index, im.tox.proto.Av.CallState value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallStateIsMutable();
      callState_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void setCallState(
        int index, im.tox.proto.Av.CallState.Builder builderForValue) {
      ensureCallStateIsMutable();
      callState_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void addCallState(im.tox.proto.Av.CallState value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallStateIsMutable();
      callState_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void addCallState(
        int index, im.tox.proto.Av.CallState value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureCallStateIsMutable();
      callState_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void addCallState(
        im.tox.proto.Av.CallState.Builder builderForValue) {
      ensureCallStateIsMutable();
      callState_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void addCallState(
        int index, im.tox.proto.Av.CallState.Builder builderForValue) {
      ensureCallStateIsMutable();
      callState_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void addAllCallState(
        java.lang.Iterable<? extends im.tox.proto.Av.CallState> values) {
      ensureCallStateIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, callState_);
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void clearCallState() {
      callState_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
     */
    private void removeCallState(int index) {
      ensureCallStateIsMutable();
      callState_.remove(index);
    }

    public static final int AUDIO_BIT_RATE_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.AudioBitRate> audioBitRate_;
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    public java.util.List<im.tox.proto.Av.AudioBitRate> getAudioBitRateList() {
      return audioBitRate_;
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.AudioBitRateOrBuilder> 
        getAudioBitRateOrBuilderList() {
      return audioBitRate_;
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    public int getAudioBitRateCount() {
      return audioBitRate_.size();
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    public im.tox.proto.Av.AudioBitRate getAudioBitRate(int index) {
      return audioBitRate_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    public im.tox.proto.Av.AudioBitRateOrBuilder getAudioBitRateOrBuilder(
        int index) {
      return audioBitRate_.get(index);
    }
    private void ensureAudioBitRateIsMutable() {
      if (!audioBitRate_.isModifiable()) {
        audioBitRate_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(audioBitRate_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void setAudioBitRate(
        int index, im.tox.proto.Av.AudioBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioBitRateIsMutable();
      audioBitRate_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void setAudioBitRate(
        int index, im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
      ensureAudioBitRateIsMutable();
      audioBitRate_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void addAudioBitRate(im.tox.proto.Av.AudioBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioBitRateIsMutable();
      audioBitRate_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void addAudioBitRate(
        int index, im.tox.proto.Av.AudioBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioBitRateIsMutable();
      audioBitRate_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void addAudioBitRate(
        im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
      ensureAudioBitRateIsMutable();
      audioBitRate_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void addAudioBitRate(
        int index, im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
      ensureAudioBitRateIsMutable();
      audioBitRate_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void addAllAudioBitRate(
        java.lang.Iterable<? extends im.tox.proto.Av.AudioBitRate> values) {
      ensureAudioBitRateIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, audioBitRate_);
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void clearAudioBitRate() {
      audioBitRate_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
     */
    private void removeAudioBitRate(int index) {
      ensureAudioBitRateIsMutable();
      audioBitRate_.remove(index);
    }

    public static final int VIDEO_BIT_RATE_FIELD_NUMBER = 4;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.VideoBitRate> videoBitRate_;
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    public java.util.List<im.tox.proto.Av.VideoBitRate> getVideoBitRateList() {
      return videoBitRate_;
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.VideoBitRateOrBuilder> 
        getVideoBitRateOrBuilderList() {
      return videoBitRate_;
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    public int getVideoBitRateCount() {
      return videoBitRate_.size();
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    public im.tox.proto.Av.VideoBitRate getVideoBitRate(int index) {
      return videoBitRate_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    public im.tox.proto.Av.VideoBitRateOrBuilder getVideoBitRateOrBuilder(
        int index) {
      return videoBitRate_.get(index);
    }
    private void ensureVideoBitRateIsMutable() {
      if (!videoBitRate_.isModifiable()) {
        videoBitRate_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(videoBitRate_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void setVideoBitRate(
        int index, im.tox.proto.Av.VideoBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoBitRateIsMutable();
      videoBitRate_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void setVideoBitRate(
        int index, im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
      ensureVideoBitRateIsMutable();
      videoBitRate_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void addVideoBitRate(im.tox.proto.Av.VideoBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoBitRateIsMutable();
      videoBitRate_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void addVideoBitRate(
        int index, im.tox.proto.Av.VideoBitRate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoBitRateIsMutable();
      videoBitRate_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void addVideoBitRate(
        im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
      ensureVideoBitRateIsMutable();
      videoBitRate_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void addVideoBitRate(
        int index, im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
      ensureVideoBitRateIsMutable();
      videoBitRate_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void addAllVideoBitRate(
        java.lang.Iterable<? extends im.tox.proto.Av.VideoBitRate> values) {
      ensureVideoBitRateIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, videoBitRate_);
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void clearVideoBitRate() {
      videoBitRate_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
     */
    private void removeVideoBitRate(int index) {
      ensureVideoBitRateIsMutable();
      videoBitRate_.remove(index);
    }

    public static final int AUDIO_RECEIVE_FRAME_FIELD_NUMBER = 5;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.AudioReceiveFrame> audioReceiveFrame_;
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    public java.util.List<im.tox.proto.Av.AudioReceiveFrame> getAudioReceiveFrameList() {
      return audioReceiveFrame_;
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.AudioReceiveFrameOrBuilder> 
        getAudioReceiveFrameOrBuilderList() {
      return audioReceiveFrame_;
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    public int getAudioReceiveFrameCount() {
      return audioReceiveFrame_.size();
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    public im.tox.proto.Av.AudioReceiveFrame getAudioReceiveFrame(int index) {
      return audioReceiveFrame_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    public im.tox.proto.Av.AudioReceiveFrameOrBuilder getAudioReceiveFrameOrBuilder(
        int index) {
      return audioReceiveFrame_.get(index);
    }
    private void ensureAudioReceiveFrameIsMutable() {
      if (!audioReceiveFrame_.isModifiable()) {
        audioReceiveFrame_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(audioReceiveFrame_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void setAudioReceiveFrame(
        int index, im.tox.proto.Av.AudioReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void setAudioReceiveFrame(
        int index, im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void addAudioReceiveFrame(im.tox.proto.Av.AudioReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void addAudioReceiveFrame(
        int index, im.tox.proto.Av.AudioReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void addAudioReceiveFrame(
        im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void addAudioReceiveFrame(
        int index, im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void addAllAudioReceiveFrame(
        java.lang.Iterable<? extends im.tox.proto.Av.AudioReceiveFrame> values) {
      ensureAudioReceiveFrameIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, audioReceiveFrame_);
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void clearAudioReceiveFrame() {
      audioReceiveFrame_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
     */
    private void removeAudioReceiveFrame(int index) {
      ensureAudioReceiveFrameIsMutable();
      audioReceiveFrame_.remove(index);
    }

    public static final int VIDEO_RECEIVE_FRAME_FIELD_NUMBER = 6;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Av.VideoReceiveFrame> videoReceiveFrame_;
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    public java.util.List<im.tox.proto.Av.VideoReceiveFrame> getVideoReceiveFrameList() {
      return videoReceiveFrame_;
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    public java.util.List<? extends im.tox.proto.Av.VideoReceiveFrameOrBuilder> 
        getVideoReceiveFrameOrBuilderList() {
      return videoReceiveFrame_;
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    public int getVideoReceiveFrameCount() {
      return videoReceiveFrame_.size();
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    public im.tox.proto.Av.VideoReceiveFrame getVideoReceiveFrame(int index) {
      return videoReceiveFrame_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    public im.tox.proto.Av.VideoReceiveFrameOrBuilder getVideoReceiveFrameOrBuilder(
        int index) {
      return videoReceiveFrame_.get(index);
    }
    private void ensureVideoReceiveFrameIsMutable() {
      if (!videoReceiveFrame_.isModifiable()) {
        videoReceiveFrame_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(videoReceiveFrame_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void setVideoReceiveFrame(
        int index, im.tox.proto.Av.VideoReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void setVideoReceiveFrame(
        int index, im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void addVideoReceiveFrame(im.tox.proto.Av.VideoReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void addVideoReceiveFrame(
        int index, im.tox.proto.Av.VideoReceiveFrame value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void addVideoReceiveFrame(
        im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void addVideoReceiveFrame(
        int index, im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void addAllVideoReceiveFrame(
        java.lang.Iterable<? extends im.tox.proto.Av.VideoReceiveFrame> values) {
      ensureVideoReceiveFrameIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, videoReceiveFrame_);
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void clearVideoReceiveFrame() {
      videoReceiveFrame_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
     */
    private void removeVideoReceiveFrame(int index) {
      ensureVideoReceiveFrameIsMutable();
      videoReceiveFrame_.remove(index);
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < call_.size(); i++) {
        output.writeMessage(1, call_.get(i));
      }
      for (int i = 0; i < callState_.size(); i++) {
        output.writeMessage(2, callState_.get(i));
      }
      for (int i = 0; i < audioBitRate_.size(); i++) {
        output.writeMessage(3, audioBitRate_.get(i));
      }
      for (int i = 0; i < videoBitRate_.size(); i++) {
        output.writeMessage(4, videoBitRate_.get(i));
      }
      for (int i = 0; i < audioReceiveFrame_.size(); i++) {
        output.writeMessage(5, audioReceiveFrame_.get(i));
      }
      for (int i = 0; i < videoReceiveFrame_.size(); i++) {
        output.writeMessage(6, videoReceiveFrame_.get(i));
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < call_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, call_.get(i));
      }
      for (int i = 0; i < callState_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, callState_.get(i));
      }
      for (int i = 0; i < audioBitRate_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, audioBitRate_.get(i));
      }
      for (int i = 0; i < videoBitRate_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, videoBitRate_.get(i));
      }
      for (int i = 0; i < audioReceiveFrame_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, audioReceiveFrame_.get(i));
      }
      for (int i = 0; i < videoReceiveFrame_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, videoReceiveFrame_.get(i));
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Av.AvEvents parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AvEvents parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AvEvents parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Av.AvEvents parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(im.tox.proto.Av.AvEvents prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code im.tox.proto.AvEvents}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          im.tox.proto.Av.AvEvents, Builder> implements
        // @@protoc_insertion_point(builder_implements:im.tox.proto.AvEvents)
        im.tox.proto.Av.AvEventsOrBuilder {
      // Construct using im.tox.proto.Av.AvEvents.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public java.util.List<im.tox.proto.Av.Call> getCallList() {
        return java.util.Collections.unmodifiableList(
            instance.getCallList());
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public int getCallCount() {
        return instance.getCallCount();
      }/**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public im.tox.proto.Av.Call getCall(int index) {
        return instance.getCall(index);
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder setCall(
          int index, im.tox.proto.Av.Call value) {
        copyOnWrite();
        instance.setCall(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder setCall(
          int index, im.tox.proto.Av.Call.Builder builderForValue) {
        copyOnWrite();
        instance.setCall(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder addCall(im.tox.proto.Av.Call value) {
        copyOnWrite();
        instance.addCall(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder addCall(
          int index, im.tox.proto.Av.Call value) {
        copyOnWrite();
        instance.addCall(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder addCall(
          im.tox.proto.Av.Call.Builder builderForValue) {
        copyOnWrite();
        instance.addCall(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder addCall(
          int index, im.tox.proto.Av.Call.Builder builderForValue) {
        copyOnWrite();
        instance.addCall(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder addAllCall(
          java.lang.Iterable<? extends im.tox.proto.Av.Call> values) {
        copyOnWrite();
        instance.addAllCall(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder clearCall() {
        copyOnWrite();
        instance.clearCall();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.Call call = 1;</code>
       */
      public Builder removeCall(int index) {
        copyOnWrite();
        instance.removeCall(index);
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public java.util.List<im.tox.proto.Av.CallState> getCallStateList() {
        return java.util.Collections.unmodifiableList(
            instance.getCallStateList());
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public int getCallStateCount() {
        return instance.getCallStateCount();
      }/**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public im.tox.proto.Av.CallState getCallState(int index) {
        return instance.getCallState(index);
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder setCallState(
          int index, im.tox.proto.Av.CallState value) {
        copyOnWrite();
        instance.setCallState(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder setCallState(
          int index, im.tox.proto.Av.CallState.Builder builderForValue) {
        copyOnWrite();
        instance.setCallState(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder addCallState(im.tox.proto.Av.CallState value) {
        copyOnWrite();
        instance.addCallState(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder addCallState(
          int index, im.tox.proto.Av.CallState value) {
        copyOnWrite();
        instance.addCallState(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder addCallState(
          im.tox.proto.Av.CallState.Builder builderForValue) {
        copyOnWrite();
        instance.addCallState(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder addCallState(
          int index, im.tox.proto.Av.CallState.Builder builderForValue) {
        copyOnWrite();
        instance.addCallState(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder addAllCallState(
          java.lang.Iterable<? extends im.tox.proto.Av.CallState> values) {
        copyOnWrite();
        instance.addAllCallState(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder clearCallState() {
        copyOnWrite();
        instance.clearCallState();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.CallState call_state = 2;</code>
       */
      public Builder removeCallState(int index) {
        copyOnWrite();
        instance.removeCallState(index);
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public java.util.List<im.tox.proto.Av.AudioBitRate> getAudioBitRateList() {
        return java.util.Collections.unmodifiableList(
            instance.getAudioBitRateList());
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public int getAudioBitRateCount() {
        return instance.getAudioBitRateCount();
      }/**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public im.tox.proto.Av.AudioBitRate getAudioBitRate(int index) {
        return instance.getAudioBitRate(index);
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder setAudioBitRate(
          int index, im.tox.proto.Av.AudioBitRate value) {
        copyOnWrite();
        instance.setAudioBitRate(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder setAudioBitRate(
          int index, im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.setAudioBitRate(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder addAudioBitRate(im.tox.proto.Av.AudioBitRate value) {
        copyOnWrite();
        instance.addAudioBitRate(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder addAudioBitRate(
          int index, im.tox.proto.Av.AudioBitRate value) {
        copyOnWrite();
        instance.addAudioBitRate(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder addAudioBitRate(
          im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.addAudioBitRate(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder addAudioBitRate(
          int index, im.tox.proto.Av.AudioBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.addAudioBitRate(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder addAllAudioBitRate(
          java.lang.Iterable<? extends im.tox.proto.Av.AudioBitRate> values) {
        copyOnWrite();
        instance.addAllAudioBitRate(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder clearAudioBitRate() {
        copyOnWrite();
        instance.clearAudioBitRate();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioBitRate audio_bit_rate = 3;</code>
       */
      public Builder removeAudioBitRate(int index) {
        copyOnWrite();
        instance.removeAudioBitRate(index);
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public java.util.List<im.tox.proto.Av.VideoBitRate> getVideoBitRateList() {
        return java.util.Collections.unmodifiableList(
            instance.getVideoBitRateList());
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public int getVideoBitRateCount() {
        return instance.getVideoBitRateCount();
      }/**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public im.tox.proto.Av.VideoBitRate getVideoBitRate(int index) {
        return instance.getVideoBitRate(index);
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder setVideoBitRate(
          int index, im.tox.proto.Av.VideoBitRate value) {
        copyOnWrite();
        instance.setVideoBitRate(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder setVideoBitRate(
          int index, im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.setVideoBitRate(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder addVideoBitRate(im.tox.proto.Av.VideoBitRate value) {
        copyOnWrite();
        instance.addVideoBitRate(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder addVideoBitRate(
          int index, im.tox.proto.Av.VideoBitRate value) {
        copyOnWrite();
        instance.addVideoBitRate(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder addVideoBitRate(
          im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.addVideoBitRate(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder addVideoBitRate(
          int index, im.tox.proto.Av.VideoBitRate.Builder builderForValue) {
        copyOnWrite();
        instance.addVideoBitRate(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder addAllVideoBitRate(
          java.lang.Iterable<? extends im.tox.proto.Av.VideoBitRate> values) {
        copyOnWrite();
        instance.addAllVideoBitRate(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder clearVideoBitRate() {
        copyOnWrite();
        instance.clearVideoBitRate();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoBitRate video_bit_rate = 4;</code>
       */
      public Builder removeVideoBitRate(int index) {
        copyOnWrite();
        instance.removeVideoBitRate(index);
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public java.util.List<im.tox.proto.Av.AudioReceiveFrame> getAudioReceiveFrameList() {
        return java.util.Collections.unmodifiableList(
            instance.getAudioReceiveFrameList());
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public int getAudioReceiveFrameCount() {
        return instance.getAudioReceiveFrameCount();
      }/**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public im.tox.proto.Av.AudioReceiveFrame getAudioReceiveFrame(int index) {
        return instance.getAudioReceiveFrame(index);
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder setAudioReceiveFrame(
          int index, im.tox.proto.Av.AudioReceiveFrame value) {
        copyOnWrite();
        instance.setAudioReceiveFrame(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder setAudioReceiveFrame(
          int index, im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.setAudioReceiveFrame(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder addAudioReceiveFrame(im.tox.proto.Av.AudioReceiveFrame value) {
        copyOnWrite();
        instance.addAudioReceiveFrame(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder addAudioReceiveFrame(
          int index, im.tox.proto.Av.AudioReceiveFrame value) {
        copyOnWrite();
        instance.addAudioReceiveFrame(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder addAudioReceiveFrame(
          im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.addAudioReceiveFrame(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder addAudioReceiveFrame(
          int index, im.tox.proto.Av.AudioReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.addAudioReceiveFrame(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder addAllAudioReceiveFrame(
          java.lang.Iterable<? extends im.tox.proto.Av.AudioReceiveFrame> values) {
        copyOnWrite();
        instance.addAllAudioReceiveFrame(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder clearAudioReceiveFrame() {
        copyOnWrite();
        instance.clearAudioReceiveFrame();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.AudioReceiveFrame audio_receive_frame = 5;</code>
       */
      public Builder removeAudioReceiveFrame(int index) {
        copyOnWrite();
        instance.removeAudioReceiveFrame(index);
        return this;
      }

      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public java.util.List<im.tox.proto.Av.VideoReceiveFrame> getVideoReceiveFrameList() {
        return java.util.Collections.unmodifiableList(
            instance.getVideoReceiveFrameList());
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public int getVideoReceiveFrameCount() {
        return instance.getVideoReceiveFrameCount();
      }/**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public im.tox.proto.Av.VideoReceiveFrame getVideoReceiveFrame(int index) {
        return instance.getVideoReceiveFrame(index);
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder setVideoReceiveFrame(
          int index, im.tox.proto.Av.VideoReceiveFrame value) {
        copyOnWrite();
        instance.setVideoReceiveFrame(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder setVideoReceiveFrame(
          int index, im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.setVideoReceiveFrame(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder addVideoReceiveFrame(im.tox.proto.Av.VideoReceiveFrame value) {
        copyOnWrite();
        instance.addVideoReceiveFrame(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder addVideoReceiveFrame(
          int index, im.tox.proto.Av.VideoReceiveFrame value) {
        copyOnWrite();
        instance.addVideoReceiveFrame(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder addVideoReceiveFrame(
          im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.addVideoReceiveFrame(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder addVideoReceiveFrame(
          int index, im.tox.proto.Av.VideoReceiveFrame.Builder builderForValue) {
        copyOnWrite();
        instance.addVideoReceiveFrame(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder addAllVideoReceiveFrame(
          java.lang.Iterable<? extends im.tox.proto.Av.VideoReceiveFrame> values) {
        copyOnWrite();
        instance.addAllVideoReceiveFrame(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder clearVideoReceiveFrame() {
        copyOnWrite();
        instance.clearVideoReceiveFrame();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.VideoReceiveFrame video_receive_frame = 6;</code>
       */
      public Builder removeVideoReceiveFrame(int index) {
        copyOnWrite();
        instance.removeVideoReceiveFrame(index);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.AvEvents)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new im.tox.proto.Av.AvEvents();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          call_.makeImmutable();
          callState_.makeImmutable();
          audioBitRate_.makeImmutable();
          videoBitRate_.makeImmutable();
          audioReceiveFrame_.makeImmutable();
          videoReceiveFrame_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Av.AvEvents other = (im.tox.proto.Av.AvEvents) arg1;
          call_= visitor.visitList(call_, other.call_);
          callState_= visitor.visitList(callState_, other.callState_);
          audioBitRate_= visitor.visitList(audioBitRate_, other.audioBitRate_);
          videoBitRate_= visitor.visitList(videoBitRate_, other.videoBitRate_);
          audioReceiveFrame_= visitor.visitList(audioReceiveFrame_, other.audioReceiveFrame_);
          videoReceiveFrame_= visitor.visitList(videoReceiveFrame_, other.videoReceiveFrame_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  if (!call_.isModifiable()) {
                    call_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(call_);
                  }
                  call_.add(
                      input.readMessage(im.tox.proto.Av.Call.parser(), extensionRegistry));
                  break;
                }
                case 18: {
                  if (!callState_.isModifiable()) {
                    callState_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(callState_);
                  }
                  callState_.add(
                      input.readMessage(im.tox.proto.Av.CallState.parser(), extensionRegistry));
                  break;
                }
                case 26: {
                  if (!audioBitRate_.isModifiable()) {
                    audioBitRate_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(audioBitRate_);
                  }
                  audioBitRate_.add(
                      input.readMessage(im.tox.proto.Av.AudioBitRate.parser(), extensionRegistry));
                  break;
                }
                case 34: {
                  if (!videoBitRate_.isModifiable()) {
                    videoBitRate_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(videoBitRate_);
                  }
                  videoBitRate_.add(
                      input.readMessage(im.tox.proto.Av.VideoBitRate.parser(), extensionRegistry));
                  break;
                }
                case 42: {
                  if (!audioReceiveFrame_.isModifiable()) {
                    audioReceiveFrame_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(audioReceiveFrame_);
                  }
                  audioReceiveFrame_.add(
                      input.readMessage(im.tox.proto.Av.AudioReceiveFrame.parser(), extensionRegistry));
                  break;
                }
                case 50: {
                  if (!videoReceiveFrame_.isModifiable()) {
                    videoReceiveFrame_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(videoReceiveFrame_);
                  }
                  videoReceiveFrame_.add(
                      input.readMessage(im.tox.proto.Av.VideoReceiveFrame.parser(), extensionRegistry));
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (im.tox.proto.Av.AvEvents.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:im.tox.proto.AvEvents)
    private static final im.tox.proto.Av.AvEvents DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new AvEvents();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static im.tox.proto.Av.AvEvents getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<AvEvents> PARSER;

    public static com.google.protobuf.Parser<AvEvents> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}
