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

package im.tox.proto;

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

    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 1;</code>
     */
    com.google.protobuf.ByteString getPk();
  }
  /**
   * Protobuf type {@code im.tox.proto.QueryFriendReq}
   */
  public  static final class QueryFriendReq extends
      com.google.protobuf.GeneratedMessageLite<
          QueryFriendReq, QueryFriendReq.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.QueryFriendReq)
      QueryFriendReqOrBuilder {
    private QueryFriendReq() {
      pk_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int PK_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString pk_;
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 1;</code>
     */
    public com.google.protobuf.ByteString getPk() {
      return pk_;
    }
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 1;</code>
     */
    private void setPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pk_ = value;
    }
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 1;</code>
     */
    private void clearPk() {
      
      pk_ = getDefaultInstance().getPk();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!pk_.isEmpty()) {
        output.writeBytes(1, pk_);
      }
    }

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

      size = 0;
      if (!pk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, pk_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.QueryFriendReq 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.Offline.QueryFriendReq 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.Offline.QueryFriendReq parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.QueryFriendReq 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.Offline.QueryFriendReq parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendReq 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.Offline.QueryFriendReq parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendReq 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.Offline.QueryFriendReq parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendReq 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.Offline.QueryFriendReq prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 1;</code>
       */
      public com.google.protobuf.ByteString getPk() {
        return instance.getPk();
      }
      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 1;</code>
       */
      public Builder setPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPk(value);
        return this;
      }
      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 1;</code>
       */
      public Builder clearPk() {
        copyOnWrite();
        instance.clearPk();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.QueryFriendReq)
    }
    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.Offline.QueryFriendReq();
        }
        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.Offline.QueryFriendReq other = (im.tox.proto.Offline.QueryFriendReq) arg1;
          pk_ = visitor.visitByteString(pk_ != com.google.protobuf.ByteString.EMPTY, pk_,
              other.pk_ != com.google.protobuf.ByteString.EMPTY, other.pk_);
          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: {

                  pk_ = input.readBytes();
                  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.Offline.QueryFriendReq.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.QueryFriendReq getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint32 exist = 1;</code>
     */
    int getExist();

    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 2;</code>
     */
    com.google.protobuf.ByteString getPk();
  }
  /**
   * Protobuf type {@code im.tox.proto.QueryFriendRes}
   */
  public  static final class QueryFriendRes extends
      com.google.protobuf.GeneratedMessageLite<
          QueryFriendRes, QueryFriendRes.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.QueryFriendRes)
      QueryFriendResOrBuilder {
    private QueryFriendRes() {
      pk_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int EXIST_FIELD_NUMBER = 1;
    private int exist_;
    /**
     * <code>optional uint32 exist = 1;</code>
     */
    public int getExist() {
      return exist_;
    }
    /**
     * <code>optional uint32 exist = 1;</code>
     */
    private void setExist(int value) {
      
      exist_ = value;
    }
    /**
     * <code>optional uint32 exist = 1;</code>
     */
    private void clearExist() {
      
      exist_ = 0;
    }

    public static final int PK_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString pk_;
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 2;</code>
     */
    public com.google.protobuf.ByteString getPk() {
      return pk_;
    }
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 2;</code>
     */
    private void setPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pk_ = value;
    }
    /**
     * <pre>
     * hex show
     * </pre>
     *
     * <code>optional bytes pk = 2;</code>
     */
    private void clearPk() {
      
      pk_ = getDefaultInstance().getPk();
    }

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

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

      size = 0;
      if (exist_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, exist_);
      }
      if (!pk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, pk_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.QueryFriendRes 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.Offline.QueryFriendRes 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.Offline.QueryFriendRes parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.QueryFriendRes 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.Offline.QueryFriendRes parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendRes 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.Offline.QueryFriendRes parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendRes 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.Offline.QueryFriendRes parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.QueryFriendRes 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.Offline.QueryFriendRes prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <code>optional uint32 exist = 1;</code>
       */
      public int getExist() {
        return instance.getExist();
      }
      /**
       * <code>optional uint32 exist = 1;</code>
       */
      public Builder setExist(int value) {
        copyOnWrite();
        instance.setExist(value);
        return this;
      }
      /**
       * <code>optional uint32 exist = 1;</code>
       */
      public Builder clearExist() {
        copyOnWrite();
        instance.clearExist();
        return this;
      }

      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 2;</code>
       */
      public com.google.protobuf.ByteString getPk() {
        return instance.getPk();
      }
      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 2;</code>
       */
      public Builder setPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPk(value);
        return this;
      }
      /**
       * <pre>
       * hex show
       * </pre>
       *
       * <code>optional bytes pk = 2;</code>
       */
      public Builder clearPk() {
        copyOnWrite();
        instance.clearPk();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.QueryFriendRes)
    }
    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.Offline.QueryFriendRes();
        }
        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.Offline.QueryFriendRes other = (im.tox.proto.Offline.QueryFriendRes) arg1;
          exist_ = visitor.visitInt(exist_ != 0, exist_,
              other.exist_ != 0, other.exist_);
          pk_ = visitor.visitByteString(pk_ != com.google.protobuf.ByteString.EMPTY, pk_,
              other.pk_ != com.google.protobuf.ByteString.EMPTY, other.pk_);
          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: {

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

                  pk_ = input.readBytes();
                  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.Offline.QueryFriendRes.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.QueryFriendRes getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    long getLocalMsgId();

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

    /**
     * <code>optional bytes crypto_message = 3;</code>
     */
    com.google.protobuf.ByteString getCryptoMessage();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessageReq}
   */
  public  static final class OfflineMessageReq extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessageReq, OfflineMessageReq.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessageReq)
      OfflineMessageReqOrBuilder {
    private OfflineMessageReq() {
      toPk_ = com.google.protobuf.ByteString.EMPTY;
      cryptoMessage_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int LOCAL_MSG_ID_FIELD_NUMBER = 1;
    private long localMsgId_;
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    public long getLocalMsgId() {
      return localMsgId_;
    }
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void setLocalMsgId(long value) {
      
      localMsgId_ = value;
    }
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void clearLocalMsgId() {
      
      localMsgId_ = 0L;
    }

    public static final int TO_PK_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString toPk_;
    /**
     * <code>optional bytes to_pk = 2;</code>
     */
    public com.google.protobuf.ByteString getToPk() {
      return toPk_;
    }
    /**
     * <code>optional bytes to_pk = 2;</code>
     */
    private void setToPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      toPk_ = value;
    }
    /**
     * <code>optional bytes to_pk = 2;</code>
     */
    private void clearToPk() {
      
      toPk_ = getDefaultInstance().getToPk();
    }

    public static final int CRYPTO_MESSAGE_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString cryptoMessage_;
    /**
     * <code>optional bytes crypto_message = 3;</code>
     */
    public com.google.protobuf.ByteString getCryptoMessage() {
      return cryptoMessage_;
    }
    /**
     * <code>optional bytes crypto_message = 3;</code>
     */
    private void setCryptoMessage(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      cryptoMessage_ = value;
    }
    /**
     * <code>optional bytes crypto_message = 3;</code>
     */
    private void clearCryptoMessage() {
      
      cryptoMessage_ = getDefaultInstance().getCryptoMessage();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (localMsgId_ != 0L) {
        output.writeInt64(1, localMsgId_);
      }
      if (!toPk_.isEmpty()) {
        output.writeBytes(2, toPk_);
      }
      if (!cryptoMessage_.isEmpty()) {
        output.writeBytes(3, cryptoMessage_);
      }
    }

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

      size = 0;
      if (localMsgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, localMsgId_);
      }
      if (!toPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, toPk_);
      }
      if (!cryptoMessage_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, cryptoMessage_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReq 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.Offline.OfflineMessageReq prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public long getLocalMsgId() {
        return instance.getLocalMsgId();
      }
      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder setLocalMsgId(long value) {
        copyOnWrite();
        instance.setLocalMsgId(value);
        return this;
      }
      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder clearLocalMsgId() {
        copyOnWrite();
        instance.clearLocalMsgId();
        return this;
      }

      /**
       * <code>optional bytes to_pk = 2;</code>
       */
      public com.google.protobuf.ByteString getToPk() {
        return instance.getToPk();
      }
      /**
       * <code>optional bytes to_pk = 2;</code>
       */
      public Builder setToPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setToPk(value);
        return this;
      }
      /**
       * <code>optional bytes to_pk = 2;</code>
       */
      public Builder clearToPk() {
        copyOnWrite();
        instance.clearToPk();
        return this;
      }

      /**
       * <code>optional bytes crypto_message = 3;</code>
       */
      public com.google.protobuf.ByteString getCryptoMessage() {
        return instance.getCryptoMessage();
      }
      /**
       * <code>optional bytes crypto_message = 3;</code>
       */
      public Builder setCryptoMessage(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setCryptoMessage(value);
        return this;
      }
      /**
       * <code>optional bytes crypto_message = 3;</code>
       */
      public Builder clearCryptoMessage() {
        copyOnWrite();
        instance.clearCryptoMessage();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessageReq)
    }
    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.Offline.OfflineMessageReq();
        }
        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.Offline.OfflineMessageReq other = (im.tox.proto.Offline.OfflineMessageReq) arg1;
          localMsgId_ = visitor.visitLong(localMsgId_ != 0L, localMsgId_,
              other.localMsgId_ != 0L, other.localMsgId_);
          toPk_ = visitor.visitByteString(toPk_ != com.google.protobuf.ByteString.EMPTY, toPk_,
              other.toPk_ != com.google.protobuf.ByteString.EMPTY, other.toPk_);
          cryptoMessage_ = visitor.visitByteString(cryptoMessage_ != com.google.protobuf.ByteString.EMPTY, cryptoMessage_,
              other.cryptoMessage_ != com.google.protobuf.ByteString.EMPTY, other.cryptoMessage_);
          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: {

                  localMsgId_ = input.readInt64();
                  break;
                }
                case 18: {

                  toPk_ = input.readBytes();
                  break;
                }
                case 26: {

                  cryptoMessage_ = input.readBytes();
                  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.Offline.OfflineMessageReq.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessageReq getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    long getLocalMsgId();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessageRes}
   */
  public  static final class OfflineMessageRes extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessageRes, OfflineMessageRes.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessageRes)
      OfflineMessageResOrBuilder {
    private OfflineMessageRes() {
    }
    public static final int LOCAL_MSG_ID_FIELD_NUMBER = 1;
    private long localMsgId_;
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    public long getLocalMsgId() {
      return localMsgId_;
    }
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void setLocalMsgId(long value) {
      
      localMsgId_ = value;
    }
    /**
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void clearLocalMsgId() {
      
      localMsgId_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (localMsgId_ != 0L) {
        output.writeInt64(1, localMsgId_);
      }
    }

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

      size = 0;
      if (localMsgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, localMsgId_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageRes 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.Offline.OfflineMessageRes prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public long getLocalMsgId() {
        return instance.getLocalMsgId();
      }
      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder setLocalMsgId(long value) {
        copyOnWrite();
        instance.setLocalMsgId(value);
        return this;
      }
      /**
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder clearLocalMsgId() {
        copyOnWrite();
        instance.clearLocalMsgId();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessageRes)
    }
    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.Offline.OfflineMessageRes();
        }
        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.Offline.OfflineMessageRes other = (im.tox.proto.Offline.OfflineMessageRes) arg1;
          localMsgId_ = visitor.visitLong(localMsgId_ != 0L, localMsgId_,
              other.localMsgId_ != 0L, other.localMsgId_);
          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: {

                  localMsgId_ = input.readInt64();
                  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.Offline.OfflineMessageRes.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessageRes getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint64 latest_msg_id = 1;</code>
     */
    long getLatestMsgId();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessageReadNotice}
   */
  public  static final class OfflineMessageReadNotice extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessageReadNotice, OfflineMessageReadNotice.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessageReadNotice)
      OfflineMessageReadNoticeOrBuilder {
    private OfflineMessageReadNotice() {
    }
    public static final int LATEST_MSG_ID_FIELD_NUMBER = 1;
    private long latestMsgId_;
    /**
     * <code>optional uint64 latest_msg_id = 1;</code>
     */
    public long getLatestMsgId() {
      return latestMsgId_;
    }
    /**
     * <code>optional uint64 latest_msg_id = 1;</code>
     */
    private void setLatestMsgId(long value) {
      
      latestMsgId_ = value;
    }
    /**
     * <code>optional uint64 latest_msg_id = 1;</code>
     */
    private void clearLatestMsgId() {
      
      latestMsgId_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (latestMsgId_ != 0L) {
        output.writeUInt64(1, latestMsgId_);
      }
    }

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

      size = 0;
      if (latestMsgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, latestMsgId_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageReadNotice 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.Offline.OfflineMessageReadNotice prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <code>optional uint64 latest_msg_id = 1;</code>
       */
      public long getLatestMsgId() {
        return instance.getLatestMsgId();
      }
      /**
       * <code>optional uint64 latest_msg_id = 1;</code>
       */
      public Builder setLatestMsgId(long value) {
        copyOnWrite();
        instance.setLatestMsgId(value);
        return this;
      }
      /**
       * <code>optional uint64 latest_msg_id = 1;</code>
       */
      public Builder clearLatestMsgId() {
        copyOnWrite();
        instance.clearLatestMsgId();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessageReadNotice)
    }
    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.Offline.OfflineMessageReadNotice();
        }
        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.Offline.OfflineMessageReadNotice other = (im.tox.proto.Offline.OfflineMessageReadNotice) arg1;
          latestMsgId_ = visitor.visitLong(latestMsgId_ != 0L, latestMsgId_,
              other.latestMsgId_ != 0L, other.latestMsgId_);
          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: {

                  latestMsgId_ = input.readUInt64();
                  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.Offline.OfflineMessageReadNotice.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessageReadNotice getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <pre>
     *general by local
     * </pre>
     *
     * <code>optional int64 local_msg_id = 1;</code>
     */
    long getLocalMsgId();

    /**
     * <pre>
     *general by offlinebot, may be local_msg_id and msg_id are duplicated
     * </pre>
     *
     * <code>optional uint64 msg_id = 2;</code>
     */
    long getMsgId();

    /**
     * <pre>
     *which friend does this message from
     * </pre>
     *
     * <code>optional bytes fr_pk = 3;</code>
     */
    com.google.protobuf.ByteString getFrPk();

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

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

    /**
     * <code>optional uint64 create_time = 6;</code>
     */
    long getCreateTime();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessage}
   */
  public  static final class OfflineMessage extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessage, OfflineMessage.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessage)
      OfflineMessageOrBuilder {
    private OfflineMessage() {
      frPk_ = com.google.protobuf.ByteString.EMPTY;
      toPk_ = com.google.protobuf.ByteString.EMPTY;
      content_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int LOCAL_MSG_ID_FIELD_NUMBER = 1;
    private long localMsgId_;
    /**
     * <pre>
     *general by local
     * </pre>
     *
     * <code>optional int64 local_msg_id = 1;</code>
     */
    public long getLocalMsgId() {
      return localMsgId_;
    }
    /**
     * <pre>
     *general by local
     * </pre>
     *
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void setLocalMsgId(long value) {
      
      localMsgId_ = value;
    }
    /**
     * <pre>
     *general by local
     * </pre>
     *
     * <code>optional int64 local_msg_id = 1;</code>
     */
    private void clearLocalMsgId() {
      
      localMsgId_ = 0L;
    }

    public static final int MSG_ID_FIELD_NUMBER = 2;
    private long msgId_;
    /**
     * <pre>
     *general by offlinebot, may be local_msg_id and msg_id are duplicated
     * </pre>
     *
     * <code>optional uint64 msg_id = 2;</code>
     */
    public long getMsgId() {
      return msgId_;
    }
    /**
     * <pre>
     *general by offlinebot, may be local_msg_id and msg_id are duplicated
     * </pre>
     *
     * <code>optional uint64 msg_id = 2;</code>
     */
    private void setMsgId(long value) {
      
      msgId_ = value;
    }
    /**
     * <pre>
     *general by offlinebot, may be local_msg_id and msg_id are duplicated
     * </pre>
     *
     * <code>optional uint64 msg_id = 2;</code>
     */
    private void clearMsgId() {
      
      msgId_ = 0L;
    }

    public static final int FR_PK_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString frPk_;
    /**
     * <pre>
     *which friend does this message from
     * </pre>
     *
     * <code>optional bytes fr_pk = 3;</code>
     */
    public com.google.protobuf.ByteString getFrPk() {
      return frPk_;
    }
    /**
     * <pre>
     *which friend does this message from
     * </pre>
     *
     * <code>optional bytes fr_pk = 3;</code>
     */
    private void setFrPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      frPk_ = value;
    }
    /**
     * <pre>
     *which friend does this message from
     * </pre>
     *
     * <code>optional bytes fr_pk = 3;</code>
     */
    private void clearFrPk() {
      
      frPk_ = getDefaultInstance().getFrPk();
    }

    public static final int TO_PK_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString toPk_;
    /**
     * <code>optional bytes to_pk = 4;</code>
     */
    public com.google.protobuf.ByteString getToPk() {
      return toPk_;
    }
    /**
     * <code>optional bytes to_pk = 4;</code>
     */
    private void setToPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      toPk_ = value;
    }
    /**
     * <code>optional bytes to_pk = 4;</code>
     */
    private void clearToPk() {
      
      toPk_ = getDefaultInstance().getToPk();
    }

    public static final int CONTENT_FIELD_NUMBER = 5;
    private com.google.protobuf.ByteString content_;
    /**
     * <code>optional bytes content = 5;</code>
     */
    public com.google.protobuf.ByteString getContent() {
      return content_;
    }
    /**
     * <code>optional bytes content = 5;</code>
     */
    private void setContent(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      content_ = value;
    }
    /**
     * <code>optional bytes content = 5;</code>
     */
    private void clearContent() {
      
      content_ = getDefaultInstance().getContent();
    }

    public static final int CREATE_TIME_FIELD_NUMBER = 6;
    private long createTime_;
    /**
     * <code>optional uint64 create_time = 6;</code>
     */
    public long getCreateTime() {
      return createTime_;
    }
    /**
     * <code>optional uint64 create_time = 6;</code>
     */
    private void setCreateTime(long value) {
      
      createTime_ = value;
    }
    /**
     * <code>optional uint64 create_time = 6;</code>
     */
    private void clearCreateTime() {
      
      createTime_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (localMsgId_ != 0L) {
        output.writeInt64(1, localMsgId_);
      }
      if (msgId_ != 0L) {
        output.writeUInt64(2, msgId_);
      }
      if (!frPk_.isEmpty()) {
        output.writeBytes(3, frPk_);
      }
      if (!toPk_.isEmpty()) {
        output.writeBytes(4, toPk_);
      }
      if (!content_.isEmpty()) {
        output.writeBytes(5, content_);
      }
      if (createTime_ != 0L) {
        output.writeUInt64(6, createTime_);
      }
    }

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

      size = 0;
      if (localMsgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, localMsgId_);
      }
      if (msgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, msgId_);
      }
      if (!frPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, frPk_);
      }
      if (!toPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, toPk_);
      }
      if (!content_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(5, content_);
      }
      if (createTime_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(6, createTime_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessage 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.Offline.OfflineMessage 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.Offline.OfflineMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessage 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.Offline.OfflineMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessage 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.Offline.OfflineMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessage 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.Offline.OfflineMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessage 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.Offline.OfflineMessage prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <pre>
       *general by local
       * </pre>
       *
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public long getLocalMsgId() {
        return instance.getLocalMsgId();
      }
      /**
       * <pre>
       *general by local
       * </pre>
       *
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder setLocalMsgId(long value) {
        copyOnWrite();
        instance.setLocalMsgId(value);
        return this;
      }
      /**
       * <pre>
       *general by local
       * </pre>
       *
       * <code>optional int64 local_msg_id = 1;</code>
       */
      public Builder clearLocalMsgId() {
        copyOnWrite();
        instance.clearLocalMsgId();
        return this;
      }

      /**
       * <pre>
       *general by offlinebot, may be local_msg_id and msg_id are duplicated
       * </pre>
       *
       * <code>optional uint64 msg_id = 2;</code>
       */
      public long getMsgId() {
        return instance.getMsgId();
      }
      /**
       * <pre>
       *general by offlinebot, may be local_msg_id and msg_id are duplicated
       * </pre>
       *
       * <code>optional uint64 msg_id = 2;</code>
       */
      public Builder setMsgId(long value) {
        copyOnWrite();
        instance.setMsgId(value);
        return this;
      }
      /**
       * <pre>
       *general by offlinebot, may be local_msg_id and msg_id are duplicated
       * </pre>
       *
       * <code>optional uint64 msg_id = 2;</code>
       */
      public Builder clearMsgId() {
        copyOnWrite();
        instance.clearMsgId();
        return this;
      }

      /**
       * <pre>
       *which friend does this message from
       * </pre>
       *
       * <code>optional bytes fr_pk = 3;</code>
       */
      public com.google.protobuf.ByteString getFrPk() {
        return instance.getFrPk();
      }
      /**
       * <pre>
       *which friend does this message from
       * </pre>
       *
       * <code>optional bytes fr_pk = 3;</code>
       */
      public Builder setFrPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setFrPk(value);
        return this;
      }
      /**
       * <pre>
       *which friend does this message from
       * </pre>
       *
       * <code>optional bytes fr_pk = 3;</code>
       */
      public Builder clearFrPk() {
        copyOnWrite();
        instance.clearFrPk();
        return this;
      }

      /**
       * <code>optional bytes to_pk = 4;</code>
       */
      public com.google.protobuf.ByteString getToPk() {
        return instance.getToPk();
      }
      /**
       * <code>optional bytes to_pk = 4;</code>
       */
      public Builder setToPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setToPk(value);
        return this;
      }
      /**
       * <code>optional bytes to_pk = 4;</code>
       */
      public Builder clearToPk() {
        copyOnWrite();
        instance.clearToPk();
        return this;
      }

      /**
       * <code>optional bytes content = 5;</code>
       */
      public com.google.protobuf.ByteString getContent() {
        return instance.getContent();
      }
      /**
       * <code>optional bytes content = 5;</code>
       */
      public Builder setContent(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setContent(value);
        return this;
      }
      /**
       * <code>optional bytes content = 5;</code>
       */
      public Builder clearContent() {
        copyOnWrite();
        instance.clearContent();
        return this;
      }

      /**
       * <code>optional uint64 create_time = 6;</code>
       */
      public long getCreateTime() {
        return instance.getCreateTime();
      }
      /**
       * <code>optional uint64 create_time = 6;</code>
       */
      public Builder setCreateTime(long value) {
        copyOnWrite();
        instance.setCreateTime(value);
        return this;
      }
      /**
       * <code>optional uint64 create_time = 6;</code>
       */
      public Builder clearCreateTime() {
        copyOnWrite();
        instance.clearCreateTime();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessage)
    }
    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.Offline.OfflineMessage();
        }
        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.Offline.OfflineMessage other = (im.tox.proto.Offline.OfflineMessage) arg1;
          localMsgId_ = visitor.visitLong(localMsgId_ != 0L, localMsgId_,
              other.localMsgId_ != 0L, other.localMsgId_);
          msgId_ = visitor.visitLong(msgId_ != 0L, msgId_,
              other.msgId_ != 0L, other.msgId_);
          frPk_ = visitor.visitByteString(frPk_ != com.google.protobuf.ByteString.EMPTY, frPk_,
              other.frPk_ != com.google.protobuf.ByteString.EMPTY, other.frPk_);
          toPk_ = visitor.visitByteString(toPk_ != com.google.protobuf.ByteString.EMPTY, toPk_,
              other.toPk_ != com.google.protobuf.ByteString.EMPTY, other.toPk_);
          content_ = visitor.visitByteString(content_ != com.google.protobuf.ByteString.EMPTY, content_,
              other.content_ != com.google.protobuf.ByteString.EMPTY, other.content_);
          createTime_ = visitor.visitLong(createTime_ != 0L, createTime_,
              other.createTime_ != 0L, other.createTime_);
          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: {

                  localMsgId_ = input.readInt64();
                  break;
                }
                case 16: {

                  msgId_ = input.readUInt64();
                  break;
                }
                case 26: {

                  frPk_ = input.readBytes();
                  break;
                }
                case 34: {

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

                  content_ = input.readBytes();
                  break;
                }
                case 48: {

                  createTime_ = input.readUInt64();
                  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.Offline.OfflineMessage.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessage getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

  public interface OfflineMessagePullReqOrBuilder extends
      // @@protoc_insertion_point(interface_extends:im.tox.proto.OfflineMessagePullReq)
      com.google.protobuf.MessageLiteOrBuilder {
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessagePullReq}
   */
  public  static final class OfflineMessagePullReq extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessagePullReq, OfflineMessagePullReq.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessagePullReq)
      OfflineMessagePullReqOrBuilder {
    private OfflineMessagePullReq() {
    }
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
    }

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

      size = 0;
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullReq 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.Offline.OfflineMessagePullReq prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessagePullReq)
    }
    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.Offline.OfflineMessagePullReq();
        }
        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.Offline.OfflineMessagePullReq other = (im.tox.proto.Offline.OfflineMessagePullReq) arg1;
          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;
                }
              }
            }
          } 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.Offline.OfflineMessagePullReq.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessagePullReq getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    java.util.List<im.tox.proto.Offline.OfflineMessage> 
        getMsgList();
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    im.tox.proto.Offline.OfflineMessage getMsg(int index);
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    int getMsgCount();

    /**
     * <code>optional uint32 left_count = 2;</code>
     */
    int getLeftCount();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessagePullRes}
   */
  public  static final class OfflineMessagePullRes extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessagePullRes, OfflineMessagePullRes.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessagePullRes)
      OfflineMessagePullResOrBuilder {
    private OfflineMessagePullRes() {
      msg_ = emptyProtobufList();
    }
    private int bitField0_;
    public static final int MSG_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.ProtobufList<im.tox.proto.Offline.OfflineMessage> msg_;
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    public java.util.List<im.tox.proto.Offline.OfflineMessage> getMsgList() {
      return msg_;
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    public java.util.List<? extends im.tox.proto.Offline.OfflineMessageOrBuilder> 
        getMsgOrBuilderList() {
      return msg_;
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    public int getMsgCount() {
      return msg_.size();
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    public im.tox.proto.Offline.OfflineMessage getMsg(int index) {
      return msg_.get(index);
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    public im.tox.proto.Offline.OfflineMessageOrBuilder getMsgOrBuilder(
        int index) {
      return msg_.get(index);
    }
    private void ensureMsgIsMutable() {
      if (!msg_.isModifiable()) {
        msg_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(msg_);
       }
    }

    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void setMsg(
        int index, im.tox.proto.Offline.OfflineMessage value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureMsgIsMutable();
      msg_.set(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void setMsg(
        int index, im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
      ensureMsgIsMutable();
      msg_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void addMsg(im.tox.proto.Offline.OfflineMessage value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureMsgIsMutable();
      msg_.add(value);
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void addMsg(
        int index, im.tox.proto.Offline.OfflineMessage value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureMsgIsMutable();
      msg_.add(index, value);
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void addMsg(
        im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
      ensureMsgIsMutable();
      msg_.add(builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void addMsg(
        int index, im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
      ensureMsgIsMutable();
      msg_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void addAllMsg(
        java.lang.Iterable<? extends im.tox.proto.Offline.OfflineMessage> values) {
      ensureMsgIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, msg_);
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void clearMsg() {
      msg_ = emptyProtobufList();
    }
    /**
     * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
     */
    private void removeMsg(int index) {
      ensureMsgIsMutable();
      msg_.remove(index);
    }

    public static final int LEFT_COUNT_FIELD_NUMBER = 2;
    private int leftCount_;
    /**
     * <code>optional uint32 left_count = 2;</code>
     */
    public int getLeftCount() {
      return leftCount_;
    }
    /**
     * <code>optional uint32 left_count = 2;</code>
     */
    private void setLeftCount(int value) {
      
      leftCount_ = value;
    }
    /**
     * <code>optional uint32 left_count = 2;</code>
     */
    private void clearLeftCount() {
      
      leftCount_ = 0;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < msg_.size(); i++) {
        output.writeMessage(1, msg_.get(i));
      }
      if (leftCount_ != 0) {
        output.writeUInt32(2, leftCount_);
      }
    }

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

      size = 0;
      for (int i = 0; i < msg_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, msg_.get(i));
      }
      if (leftCount_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, leftCount_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessagePullRes 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.Offline.OfflineMessagePullRes prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public java.util.List<im.tox.proto.Offline.OfflineMessage> getMsgList() {
        return java.util.Collections.unmodifiableList(
            instance.getMsgList());
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public int getMsgCount() {
        return instance.getMsgCount();
      }/**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public im.tox.proto.Offline.OfflineMessage getMsg(int index) {
        return instance.getMsg(index);
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder setMsg(
          int index, im.tox.proto.Offline.OfflineMessage value) {
        copyOnWrite();
        instance.setMsg(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder setMsg(
          int index, im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
        copyOnWrite();
        instance.setMsg(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder addMsg(im.tox.proto.Offline.OfflineMessage value) {
        copyOnWrite();
        instance.addMsg(value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder addMsg(
          int index, im.tox.proto.Offline.OfflineMessage value) {
        copyOnWrite();
        instance.addMsg(index, value);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder addMsg(
          im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
        copyOnWrite();
        instance.addMsg(builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder addMsg(
          int index, im.tox.proto.Offline.OfflineMessage.Builder builderForValue) {
        copyOnWrite();
        instance.addMsg(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder addAllMsg(
          java.lang.Iterable<? extends im.tox.proto.Offline.OfflineMessage> values) {
        copyOnWrite();
        instance.addAllMsg(values);
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder clearMsg() {
        copyOnWrite();
        instance.clearMsg();
        return this;
      }
      /**
       * <code>repeated .im.tox.proto.OfflineMessage msg = 1;</code>
       */
      public Builder removeMsg(int index) {
        copyOnWrite();
        instance.removeMsg(index);
        return this;
      }

      /**
       * <code>optional uint32 left_count = 2;</code>
       */
      public int getLeftCount() {
        return instance.getLeftCount();
      }
      /**
       * <code>optional uint32 left_count = 2;</code>
       */
      public Builder setLeftCount(int value) {
        copyOnWrite();
        instance.setLeftCount(value);
        return this;
      }
      /**
       * <code>optional uint32 left_count = 2;</code>
       */
      public Builder clearLeftCount() {
        copyOnWrite();
        instance.clearLeftCount();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessagePullRes)
    }
    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.Offline.OfflineMessagePullRes();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          msg_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          im.tox.proto.Offline.OfflineMessagePullRes other = (im.tox.proto.Offline.OfflineMessagePullRes) arg1;
          msg_= visitor.visitList(msg_, other.msg_);
          leftCount_ = visitor.visitInt(leftCount_ != 0, leftCount_,
              other.leftCount_ != 0, other.leftCount_);
          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 10: {
                  if (!msg_.isModifiable()) {
                    msg_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(msg_);
                  }
                  msg_.add(
                      input.readMessage(im.tox.proto.Offline.OfflineMessage.parser(), extensionRegistry));
                  break;
                }
                case 16: {

                  leftCount_ = 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.Offline.OfflineMessagePullRes.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessagePullRes getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <pre>
     * last of message id to be deleted
     * </pre>
     *
     * <code>optional uint64 last_msg_id = 2;</code>
     */
    long getLastMsgId();
  }
  /**
   * Protobuf type {@code im.tox.proto.OfflineMessageDelReq}
   */
  public  static final class OfflineMessageDelReq extends
      com.google.protobuf.GeneratedMessageLite<
          OfflineMessageDelReq, OfflineMessageDelReq.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.OfflineMessageDelReq)
      OfflineMessageDelReqOrBuilder {
    private OfflineMessageDelReq() {
    }
    public static final int LAST_MSG_ID_FIELD_NUMBER = 2;
    private long lastMsgId_;
    /**
     * <pre>
     * last of message id to be deleted
     * </pre>
     *
     * <code>optional uint64 last_msg_id = 2;</code>
     */
    public long getLastMsgId() {
      return lastMsgId_;
    }
    /**
     * <pre>
     * last of message id to be deleted
     * </pre>
     *
     * <code>optional uint64 last_msg_id = 2;</code>
     */
    private void setLastMsgId(long value) {
      
      lastMsgId_ = value;
    }
    /**
     * <pre>
     * last of message id to be deleted
     * </pre>
     *
     * <code>optional uint64 last_msg_id = 2;</code>
     */
    private void clearLastMsgId() {
      
      lastMsgId_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (lastMsgId_ != 0L) {
        output.writeUInt64(2, lastMsgId_);
      }
    }

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

      size = 0;
      if (lastMsgId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, lastMsgId_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.OfflineMessageDelReq 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.Offline.OfflineMessageDelReq prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <pre>
       * last of message id to be deleted
       * </pre>
       *
       * <code>optional uint64 last_msg_id = 2;</code>
       */
      public long getLastMsgId() {
        return instance.getLastMsgId();
      }
      /**
       * <pre>
       * last of message id to be deleted
       * </pre>
       *
       * <code>optional uint64 last_msg_id = 2;</code>
       */
      public Builder setLastMsgId(long value) {
        copyOnWrite();
        instance.setLastMsgId(value);
        return this;
      }
      /**
       * <pre>
       * last of message id to be deleted
       * </pre>
       *
       * <code>optional uint64 last_msg_id = 2;</code>
       */
      public Builder clearLastMsgId() {
        copyOnWrite();
        instance.clearLastMsgId();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.OfflineMessageDelReq)
    }
    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.Offline.OfflineMessageDelReq();
        }
        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.Offline.OfflineMessageDelReq other = (im.tox.proto.Offline.OfflineMessageDelReq) arg1;
          lastMsgId_ = visitor.visitLong(lastMsgId_ != 0L, lastMsgId_,
              other.lastMsgId_ != 0L, other.lastMsgId_);
          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 16: {

                  lastMsgId_ = input.readUInt64();
                  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.Offline.OfflineMessageDelReq.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.OfflineMessageDelReq getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <pre>
     * for push, 1 is ios, 2 is android
     * </pre>
     *
     * <code>optional uint32 type = 1;</code>
     */
    int getType();

    /**
     * <code>optional bytes identifier = 2;</code>
     */
    com.google.protobuf.ByteString getIdentifier();
  }
  /**
   * Protobuf type {@code im.tox.proto.DeviceUpdateReq}
   */
  public  static final class DeviceUpdateReq extends
      com.google.protobuf.GeneratedMessageLite<
          DeviceUpdateReq, DeviceUpdateReq.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.DeviceUpdateReq)
      DeviceUpdateReqOrBuilder {
    private DeviceUpdateReq() {
      identifier_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_;
    /**
     * <pre>
     * for push, 1 is ios, 2 is android
     * </pre>
     *
     * <code>optional uint32 type = 1;</code>
     */
    public int getType() {
      return type_;
    }
    /**
     * <pre>
     * for push, 1 is ios, 2 is android
     * </pre>
     *
     * <code>optional uint32 type = 1;</code>
     */
    private void setType(int value) {
      
      type_ = value;
    }
    /**
     * <pre>
     * for push, 1 is ios, 2 is android
     * </pre>
     *
     * <code>optional uint32 type = 1;</code>
     */
    private void clearType() {
      
      type_ = 0;
    }

    public static final int IDENTIFIER_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString identifier_;
    /**
     * <code>optional bytes identifier = 2;</code>
     */
    public com.google.protobuf.ByteString getIdentifier() {
      return identifier_;
    }
    /**
     * <code>optional bytes identifier = 2;</code>
     */
    private void setIdentifier(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      identifier_ = value;
    }
    /**
     * <code>optional bytes identifier = 2;</code>
     */
    private void clearIdentifier() {
      
      identifier_ = getDefaultInstance().getIdentifier();
    }

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

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

      size = 0;
      if (type_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, type_);
      }
      if (!identifier_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, identifier_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static im.tox.proto.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static im.tox.proto.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static im.tox.proto.Offline.DeviceUpdateReq 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.Offline.DeviceUpdateReq prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

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


      /**
       * <pre>
       * for push, 1 is ios, 2 is android
       * </pre>
       *
       * <code>optional uint32 type = 1;</code>
       */
      public int getType() {
        return instance.getType();
      }
      /**
       * <pre>
       * for push, 1 is ios, 2 is android
       * </pre>
       *
       * <code>optional uint32 type = 1;</code>
       */
      public Builder setType(int value) {
        copyOnWrite();
        instance.setType(value);
        return this;
      }
      /**
       * <pre>
       * for push, 1 is ios, 2 is android
       * </pre>
       *
       * <code>optional uint32 type = 1;</code>
       */
      public Builder clearType() {
        copyOnWrite();
        instance.clearType();
        return this;
      }

      /**
       * <code>optional bytes identifier = 2;</code>
       */
      public com.google.protobuf.ByteString getIdentifier() {
        return instance.getIdentifier();
      }
      /**
       * <code>optional bytes identifier = 2;</code>
       */
      public Builder setIdentifier(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setIdentifier(value);
        return this;
      }
      /**
       * <code>optional bytes identifier = 2;</code>
       */
      public Builder clearIdentifier() {
        copyOnWrite();
        instance.clearIdentifier();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.DeviceUpdateReq)
    }
    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.Offline.DeviceUpdateReq();
        }
        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.Offline.DeviceUpdateReq other = (im.tox.proto.Offline.DeviceUpdateReq) arg1;
          type_ = visitor.visitInt(type_ != 0, type_,
              other.type_ != 0, other.type_);
          identifier_ = visitor.visitByteString(identifier_ != com.google.protobuf.ByteString.EMPTY, identifier_,
              other.identifier_ != com.google.protobuf.ByteString.EMPTY, other.identifier_);
          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: {

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

                  identifier_ = input.readBytes();
                  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.Offline.DeviceUpdateReq.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static im.tox.proto.Offline.DeviceUpdateReq getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}
