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

package im.tox.proto;

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

    /**
     * <code>optional bytes peer_pk = 1;</code>
     */
    com.google.protobuf.ByteString getPeerPk();

    /**
     * <code>optional bytes peer_name = 2;</code>
     */
    com.google.protobuf.ByteString getPeerName();
  }
  /**
   * Protobuf type {@code im.tox.proto.GroupPeer}
   */
  public  static final class GroupPeer extends
      com.google.protobuf.GeneratedMessageLite<
          GroupPeer, GroupPeer.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupPeer)
      GroupPeerOrBuilder {
    private GroupPeer() {
      peerPk_ = com.google.protobuf.ByteString.EMPTY;
      peerName_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int PEER_PK_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString peerPk_;
    /**
     * <code>optional bytes peer_pk = 1;</code>
     */
    public com.google.protobuf.ByteString getPeerPk() {
      return peerPk_;
    }
    /**
     * <code>optional bytes peer_pk = 1;</code>
     */
    private void setPeerPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      peerPk_ = value;
    }
    /**
     * <code>optional bytes peer_pk = 1;</code>
     */
    private void clearPeerPk() {
      
      peerPk_ = getDefaultInstance().getPeerPk();
    }

    public static final int PEER_NAME_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString peerName_;
    /**
     * <code>optional bytes peer_name = 2;</code>
     */
    public com.google.protobuf.ByteString getPeerName() {
      return peerName_;
    }
    /**
     * <code>optional bytes peer_name = 2;</code>
     */
    private void setPeerName(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      peerName_ = value;
    }
    /**
     * <code>optional bytes peer_name = 2;</code>
     */
    private void clearPeerName() {
      
      peerName_ = getDefaultInstance().getPeerName();
    }

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

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

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

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

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


      /**
       * <code>optional bytes peer_pk = 1;</code>
       */
      public com.google.protobuf.ByteString getPeerPk() {
        return instance.getPeerPk();
      }
      /**
       * <code>optional bytes peer_pk = 1;</code>
       */
      public Builder setPeerPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPeerPk(value);
        return this;
      }
      /**
       * <code>optional bytes peer_pk = 1;</code>
       */
      public Builder clearPeerPk() {
        copyOnWrite();
        instance.clearPeerPk();
        return this;
      }

      /**
       * <code>optional bytes peer_name = 2;</code>
       */
      public com.google.protobuf.ByteString getPeerName() {
        return instance.getPeerName();
      }
      /**
       * <code>optional bytes peer_name = 2;</code>
       */
      public Builder setPeerName(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setPeerName(value);
        return this;
      }
      /**
       * <code>optional bytes peer_name = 2;</code>
       */
      public Builder clearPeerName() {
        copyOnWrite();
        instance.clearPeerName();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupPeer)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupPeer();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupPeer other = (GroupPeer) arg1;
          peerPk_ = visitor.visitByteString(peerPk_ != com.google.protobuf.ByteString.EMPTY, peerPk_,
              other.peerPk_ != com.google.protobuf.ByteString.EMPTY, other.peerPk_);
          peerName_ = visitor.visitByteString(peerName_ != com.google.protobuf.ByteString.EMPTY, peerName_,
              other.peerName_ != com.google.protobuf.ByteString.EMPTY, other.peerName_);
          if (visitor == 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: {

                  peerPk_ = input.readBytes();
                  break;
                }
                case 18: {

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


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

    public static GroupPeer getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    int getGroupId();

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

    /**
     * <code>optional bytes invite_fr_pk = 3;</code>
     */
    com.google.protobuf.ByteString getInviteFrPk();

    /**
     * <code>optional bytes group_name = 4;</code>
     */
    com.google.protobuf.ByteString getGroupName();
  }
  /**
   * Protobuf type {@code im.tox.proto.GroupInvite}
   */
  public  static final class GroupInvite extends
      com.google.protobuf.GeneratedMessageLite<
          GroupInvite, GroupInvite.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupInvite)
      GroupInviteOrBuilder {
    private GroupInvite() {
      inviteToPk_ = com.google.protobuf.ByteString.EMPTY;
      inviteFrPk_ = com.google.protobuf.ByteString.EMPTY;
      groupName_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int GROUP_ID_FIELD_NUMBER = 1;
    private int groupId_;
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    public int getGroupId() {
      return groupId_;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void setGroupId(int value) {

      groupId_ = value;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void clearGroupId() {

      groupId_ = 0;
    }

    public static final int INVITE_TO_PK_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString inviteToPk_;
    /**
     * <code>optional bytes invite_to_pk = 2;</code>
     */
    public com.google.protobuf.ByteString getInviteToPk() {
      return inviteToPk_;
    }
    /**
     * <code>optional bytes invite_to_pk = 2;</code>
     */
    private void setInviteToPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      inviteToPk_ = value;
    }
    /**
     * <code>optional bytes invite_to_pk = 2;</code>
     */
    private void clearInviteToPk() {

      inviteToPk_ = getDefaultInstance().getInviteToPk();
    }

    public static final int INVITE_FR_PK_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString inviteFrPk_;
    /**
     * <code>optional bytes invite_fr_pk = 3;</code>
     */
    public com.google.protobuf.ByteString getInviteFrPk() {
      return inviteFrPk_;
    }
    /**
     * <code>optional bytes invite_fr_pk = 3;</code>
     */
    private void setInviteFrPk(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      inviteFrPk_ = value;
    }
    /**
     * <code>optional bytes invite_fr_pk = 3;</code>
     */
    private void clearInviteFrPk() {

      inviteFrPk_ = getDefaultInstance().getInviteFrPk();
    }

    public static final int GROUP_NAME_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString groupName_;
    /**
     * <code>optional bytes group_name = 4;</code>
     */
    public com.google.protobuf.ByteString getGroupName() {
      return groupName_;
    }
    /**
     * <code>optional bytes group_name = 4;</code>
     */
    private void setGroupName(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      groupName_ = value;
    }
    /**
     * <code>optional bytes group_name = 4;</code>
     */
    private void clearGroupName() {

      groupName_ = getDefaultInstance().getGroupName();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (groupId_ != 0) {
        output.writeUInt32(1, groupId_);
      }
      if (!inviteToPk_.isEmpty()) {
        output.writeBytes(2, inviteToPk_);
      }
      if (!inviteFrPk_.isEmpty()) {
        output.writeBytes(3, inviteFrPk_);
      }
      if (!groupName_.isEmpty()) {
        output.writeBytes(4, groupName_);
      }
    }

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

      size = 0;
      if (groupId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, groupId_);
      }
      if (!inviteToPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, inviteToPk_);
      }
      if (!inviteFrPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, inviteFrPk_);
      }
      if (!groupName_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, groupName_);
      }
      memoizedSerializedSize = size;
      return size;
    }

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

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


      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public int getGroupId() {
        return instance.getGroupId();
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder setGroupId(int value) {
        copyOnWrite();
        instance.setGroupId(value);
        return this;
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder clearGroupId() {
        copyOnWrite();
        instance.clearGroupId();
        return this;
      }

      /**
       * <code>optional bytes invite_to_pk = 2;</code>
       */
      public com.google.protobuf.ByteString getInviteToPk() {
        return instance.getInviteToPk();
      }
      /**
       * <code>optional bytes invite_to_pk = 2;</code>
       */
      public Builder setInviteToPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setInviteToPk(value);
        return this;
      }
      /**
       * <code>optional bytes invite_to_pk = 2;</code>
       */
      public Builder clearInviteToPk() {
        copyOnWrite();
        instance.clearInviteToPk();
        return this;
      }

      /**
       * <code>optional bytes invite_fr_pk = 3;</code>
       */
      public com.google.protobuf.ByteString getInviteFrPk() {
        return instance.getInviteFrPk();
      }
      /**
       * <code>optional bytes invite_fr_pk = 3;</code>
       */
      public Builder setInviteFrPk(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setInviteFrPk(value);
        return this;
      }
      /**
       * <code>optional bytes invite_fr_pk = 3;</code>
       */
      public Builder clearInviteFrPk() {
        copyOnWrite();
        instance.clearInviteFrPk();
        return this;
      }

      /**
       * <code>optional bytes group_name = 4;</code>
       */
      public com.google.protobuf.ByteString getGroupName() {
        return instance.getGroupName();
      }
      /**
       * <code>optional bytes group_name = 4;</code>
       */
      public Builder setGroupName(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setGroupName(value);
        return this;
      }
      /**
       * <code>optional bytes group_name = 4;</code>
       */
      public Builder clearGroupName() {
        copyOnWrite();
        instance.clearGroupName();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupInvite)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupInvite();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupInvite other = (GroupInvite) arg1;
          groupId_ = visitor.visitInt(groupId_ != 0, groupId_,
              other.groupId_ != 0, other.groupId_);
          inviteToPk_ = visitor.visitByteString(inviteToPk_ != com.google.protobuf.ByteString.EMPTY, inviteToPk_,
              other.inviteToPk_ != com.google.protobuf.ByteString.EMPTY, other.inviteToPk_);
          inviteFrPk_ = visitor.visitByteString(inviteFrPk_ != com.google.protobuf.ByteString.EMPTY, inviteFrPk_,
              other.inviteFrPk_ != com.google.protobuf.ByteString.EMPTY, other.inviteFrPk_);
          groupName_ = visitor.visitByteString(groupName_ != com.google.protobuf.ByteString.EMPTY, groupName_,
              other.groupName_ != com.google.protobuf.ByteString.EMPTY, other.groupName_);
          if (visitor == 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: {

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

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

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

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


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

    public static GroupInvite getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint32 platform = 1;</code>
     */
    int getPlatform();

    /**
     * <code>optional string token = 2;</code>
     */
    String getToken();
    /**
     * <code>optional string token = 2;</code>
     */
    com.google.protobuf.ByteString
        getTokenBytes();
  }
  /**
   * <pre>
   *for ios
   * </pre>
   *
   * Protobuf type {@code im.tox.proto.GroupTokenPush}
   */
  public  static final class GroupTokenPush extends
      com.google.protobuf.GeneratedMessageLite<
          GroupTokenPush, GroupTokenPush.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupTokenPush)
      GroupTokenPushOrBuilder {
    private GroupTokenPush() {
      token_ = "";
    }
    public static final int PLATFORM_FIELD_NUMBER = 1;
    private int platform_;
    /**
     * <code>optional uint32 platform = 1;</code>
     */
    public int getPlatform() {
      return platform_;
    }
    /**
     * <code>optional uint32 platform = 1;</code>
     */
    private void setPlatform(int value) {

      platform_ = value;
    }
    /**
     * <code>optional uint32 platform = 1;</code>
     */
    private void clearPlatform() {

      platform_ = 0;
    }

    public static final int TOKEN_FIELD_NUMBER = 2;
    private String token_;
    /**
     * <code>optional string token = 2;</code>
     */
    public String getToken() {
      return token_;
    }
    /**
     * <code>optional string token = 2;</code>
     */
    public com.google.protobuf.ByteString
        getTokenBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(token_);
    }
    /**
     * <code>optional string token = 2;</code>
     */
    private void setToken(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }

      token_ = value;
    }
    /**
     * <code>optional string token = 2;</code>
     */
    private void clearToken() {

      token_ = getDefaultInstance().getToken();
    }
    /**
     * <code>optional string token = 2;</code>
     */
    private void setTokenBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

      token_ = value.toStringUtf8();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (platform_ != 0) {
        output.writeUInt32(1, platform_);
      }
      if (!token_.isEmpty()) {
        output.writeString(2, getToken());
      }
    }

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

      size = 0;
      if (platform_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, platform_);
      }
      if (!token_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(2, getToken());
      }
      memoizedSerializedSize = size;
      return size;
    }

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

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


      /**
       * <code>optional uint32 platform = 1;</code>
       */
      public int getPlatform() {
        return instance.getPlatform();
      }
      /**
       * <code>optional uint32 platform = 1;</code>
       */
      public Builder setPlatform(int value) {
        copyOnWrite();
        instance.setPlatform(value);
        return this;
      }
      /**
       * <code>optional uint32 platform = 1;</code>
       */
      public Builder clearPlatform() {
        copyOnWrite();
        instance.clearPlatform();
        return this;
      }

      /**
       * <code>optional string token = 2;</code>
       */
      public String getToken() {
        return instance.getToken();
      }
      /**
       * <code>optional string token = 2;</code>
       */
      public com.google.protobuf.ByteString
          getTokenBytes() {
        return instance.getTokenBytes();
      }
      /**
       * <code>optional string token = 2;</code>
       */
      public Builder setToken(
          String value) {
        copyOnWrite();
        instance.setToken(value);
        return this;
      }
      /**
       * <code>optional string token = 2;</code>
       */
      public Builder clearToken() {
        copyOnWrite();
        instance.clearToken();
        return this;
      }
      /**
       * <code>optional string token = 2;</code>
       */
      public Builder setTokenBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setTokenBytes(value);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupTokenPush)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupTokenPush();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupTokenPush other = (GroupTokenPush) arg1;
          platform_ = visitor.visitInt(platform_ != 0, platform_,
              other.platform_ != 0, other.platform_);
          token_ = visitor.visitString(!token_.isEmpty(), token_,
              !other.token_.isEmpty(), other.token_);
          if (visitor == 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: {

                  platform_ = input.readUInt32();
                  break;
                }
                case 18: {
                  String s = input.readStringRequireUtf8();

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


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

    public static GroupTokenPush getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    int getGroupId();

    /**
     * <code>optional bytes group_name = 2;</code>
     */
    com.google.protobuf.ByteString getGroupName();
  }
  /**
   * Protobuf type {@code im.tox.proto.GroupCreate}
   */
  public  static final class GroupCreate extends
      com.google.protobuf.GeneratedMessageLite<
          GroupCreate, GroupCreate.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupCreate)
      GroupCreateOrBuilder {
    private GroupCreate() {
      groupName_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int GROUP_ID_FIELD_NUMBER = 1;
    private int groupId_;
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    public int getGroupId() {
      return groupId_;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void setGroupId(int value) {

      groupId_ = value;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void clearGroupId() {

      groupId_ = 0;
    }

    public static final int GROUP_NAME_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString groupName_;
    /**
     * <code>optional bytes group_name = 2;</code>
     */
    public com.google.protobuf.ByteString getGroupName() {
      return groupName_;
    }
    /**
     * <code>optional bytes group_name = 2;</code>
     */
    private void setGroupName(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      groupName_ = value;
    }
    /**
     * <code>optional bytes group_name = 2;</code>
     */
    private void clearGroupName() {

      groupName_ = getDefaultInstance().getGroupName();
    }

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

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

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

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

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


      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public int getGroupId() {
        return instance.getGroupId();
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder setGroupId(int value) {
        copyOnWrite();
        instance.setGroupId(value);
        return this;
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder clearGroupId() {
        copyOnWrite();
        instance.clearGroupId();
        return this;
      }

      /**
       * <code>optional bytes group_name = 2;</code>
       */
      public com.google.protobuf.ByteString getGroupName() {
        return instance.getGroupName();
      }
      /**
       * <code>optional bytes group_name = 2;</code>
       */
      public Builder setGroupName(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setGroupName(value);
        return this;
      }
      /**
       * <code>optional bytes group_name = 2;</code>
       */
      public Builder clearGroupName() {
        copyOnWrite();
        instance.clearGroupName();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupCreate)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupCreate();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupCreate other = (GroupCreate) arg1;
          groupId_ = visitor.visitInt(groupId_ != 0, groupId_,
              other.groupId_ != 0, other.groupId_);
          groupName_ = visitor.visitByteString(groupName_ != com.google.protobuf.ByteString.EMPTY, groupName_,
              other.groupName_ != com.google.protobuf.ByteString.EMPTY, other.groupName_);
          if (visitor == 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: {

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

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


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

    public static GroupCreate getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    int getGroupId();

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

    /**
     * <code>optional bytes fr_pk = 3;</code>
     */
    com.google.protobuf.ByteString getFrPk();

    /**
     * <code>optional uint64 create_time = 4;</code>
     */
    long getCreateTime();
  }
  /**
   * Protobuf type {@code im.tox.proto.GroupRealMsg}
   */
  public  static final class GroupRealMsg extends
      com.google.protobuf.GeneratedMessageLite<
          GroupRealMsg, GroupRealMsg.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupRealMsg)
      GroupRealMsgOrBuilder {
    private GroupRealMsg() {
      msg_ = com.google.protobuf.ByteString.EMPTY;
      frPk_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int GROUP_ID_FIELD_NUMBER = 1;
    private int groupId_;
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    public int getGroupId() {
      return groupId_;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void setGroupId(int value) {

      groupId_ = value;
    }
    /**
     * <code>optional uint32 group_id = 1;</code>
     */
    private void clearGroupId() {

      groupId_ = 0;
    }

    public static final int MSG_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString msg_;
    /**
     * <code>optional bytes msg = 2;</code>
     */
    public com.google.protobuf.ByteString getMsg() {
      return msg_;
    }
    /**
     * <code>optional bytes msg = 2;</code>
     */
    private void setMsg(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      msg_ = value;
    }
    /**
     * <code>optional bytes msg = 2;</code>
     */
    private void clearMsg() {

      msg_ = getDefaultInstance().getMsg();
    }

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

      frPk_ = value;
    }
    /**
     * <code>optional bytes fr_pk = 3;</code>
     */
    private void clearFrPk() {

      frPk_ = getDefaultInstance().getFrPk();
    }

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

      createTime_ = value;
    }
    /**
     * <code>optional uint64 create_time = 4;</code>
     */
    private void clearCreateTime() {

      createTime_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (groupId_ != 0) {
        output.writeUInt32(1, groupId_);
      }
      if (!msg_.isEmpty()) {
        output.writeBytes(2, msg_);
      }
      if (!frPk_.isEmpty()) {
        output.writeBytes(3, frPk_);
      }
      if (createTime_ != 0L) {
        output.writeUInt64(4, createTime_);
      }
    }

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

      size = 0;
      if (groupId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, groupId_);
      }
      if (!msg_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, msg_);
      }
      if (!frPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, frPk_);
      }
      if (createTime_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(4, createTime_);
      }
      memoizedSerializedSize = size;
      return size;
    }

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

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


      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public int getGroupId() {
        return instance.getGroupId();
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder setGroupId(int value) {
        copyOnWrite();
        instance.setGroupId(value);
        return this;
      }
      /**
       * <code>optional uint32 group_id = 1;</code>
       */
      public Builder clearGroupId() {
        copyOnWrite();
        instance.clearGroupId();
        return this;
      }

      /**
       * <code>optional bytes msg = 2;</code>
       */
      public com.google.protobuf.ByteString getMsg() {
        return instance.getMsg();
      }
      /**
       * <code>optional bytes msg = 2;</code>
       */
      public Builder setMsg(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setMsg(value);
        return this;
      }
      /**
       * <code>optional bytes msg = 2;</code>
       */
      public Builder clearMsg() {
        copyOnWrite();
        instance.clearMsg();
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupRealMsg)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupRealMsg();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupRealMsg other = (GroupRealMsg) arg1;
          groupId_ = visitor.visitInt(groupId_ != 0, groupId_,
              other.groupId_ != 0, other.groupId_);
          msg_ = visitor.visitByteString(msg_ != com.google.protobuf.ByteString.EMPTY, msg_,
              other.msg_ != com.google.protobuf.ByteString.EMPTY, other.msg_);
          frPk_ = visitor.visitByteString(frPk_ != com.google.protobuf.ByteString.EMPTY, frPk_,
              other.frPk_ != com.google.protobuf.ByteString.EMPTY, other.frPk_);
          createTime_ = visitor.visitLong(createTime_ != 0L, createTime_,
              other.createTime_ != 0L, other.createTime_);
          if (visitor == 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: {

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

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

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

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


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

    public static GroupRealMsg getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <code>optional int32 file_type = 1;</code>
     */
    int getFileType();

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

    /**
     * <code>optional uint32 to_group = 3;</code>
     */
    int getToGroup();

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

    /**
     * <code>optional uint64 create_time = 5;</code>
     */
    long getCreateTime();
  }
  /**
   * Protobuf type {@code im.tox.proto.FileTransfer}
   */
  public  static final class FileTransfer extends
      com.google.protobuf.GeneratedMessageLite<
          FileTransfer, FileTransfer.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.FileTransfer)
      FileTransferOrBuilder {
    private FileTransfer() {
      toPk_ = com.google.protobuf.ByteString.EMPTY;
      realName_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int FILE_TYPE_FIELD_NUMBER = 1;
    private int fileType_;
    /**
     * <code>optional int32 file_type = 1;</code>
     */
    public int getFileType() {
      return fileType_;
    }
    /**
     * <code>optional int32 file_type = 1;</code>
     */
    private void setFileType(int value) {

      fileType_ = value;
    }
    /**
     * <code>optional int32 file_type = 1;</code>
     */
    private void clearFileType() {

      fileType_ = 0;
    }

    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 TO_GROUP_FIELD_NUMBER = 3;
    private int toGroup_;
    /**
     * <code>optional uint32 to_group = 3;</code>
     */
    public int getToGroup() {
      return toGroup_;
    }
    /**
     * <code>optional uint32 to_group = 3;</code>
     */
    private void setToGroup(int value) {

      toGroup_ = value;
    }
    /**
     * <code>optional uint32 to_group = 3;</code>
     */
    private void clearToGroup() {

      toGroup_ = 0;
    }

    public static final int REAL_NAME_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString realName_;
    /**
     * <code>optional bytes real_name = 4;</code>
     */
    public com.google.protobuf.ByteString getRealName() {
      return realName_;
    }
    /**
     * <code>optional bytes real_name = 4;</code>
     */
    private void setRealName(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      realName_ = value;
    }
    /**
     * <code>optional bytes real_name = 4;</code>
     */
    private void clearRealName() {

      realName_ = getDefaultInstance().getRealName();
    }

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

      createTime_ = value;
    }
    /**
     * <code>optional uint64 create_time = 5;</code>
     */
    private void clearCreateTime() {

      createTime_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (fileType_ != 0) {
        output.writeInt32(1, fileType_);
      }
      if (!toPk_.isEmpty()) {
        output.writeBytes(2, toPk_);
      }
      if (toGroup_ != 0) {
        output.writeUInt32(3, toGroup_);
      }
      if (!realName_.isEmpty()) {
        output.writeBytes(4, realName_);
      }
      if (createTime_ != 0L) {
        output.writeUInt64(5, createTime_);
      }
    }

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

      size = 0;
      if (fileType_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, fileType_);
      }
      if (!toPk_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, toPk_);
      }
      if (toGroup_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(3, toGroup_);
      }
      if (!realName_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, realName_);
      }
      if (createTime_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(5, createTime_);
      }
      memoizedSerializedSize = size;
      return size;
    }

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

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


      /**
       * <code>optional int32 file_type = 1;</code>
       */
      public int getFileType() {
        return instance.getFileType();
      }
      /**
       * <code>optional int32 file_type = 1;</code>
       */
      public Builder setFileType(int value) {
        copyOnWrite();
        instance.setFileType(value);
        return this;
      }
      /**
       * <code>optional int32 file_type = 1;</code>
       */
      public Builder clearFileType() {
        copyOnWrite();
        instance.clearFileType();
        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 uint32 to_group = 3;</code>
       */
      public int getToGroup() {
        return instance.getToGroup();
      }
      /**
       * <code>optional uint32 to_group = 3;</code>
       */
      public Builder setToGroup(int value) {
        copyOnWrite();
        instance.setToGroup(value);
        return this;
      }
      /**
       * <code>optional uint32 to_group = 3;</code>
       */
      public Builder clearToGroup() {
        copyOnWrite();
        instance.clearToGroup();
        return this;
      }

      /**
       * <code>optional bytes real_name = 4;</code>
       */
      public com.google.protobuf.ByteString getRealName() {
        return instance.getRealName();
      }
      /**
       * <code>optional bytes real_name = 4;</code>
       */
      public Builder setRealName(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setRealName(value);
        return this;
      }
      /**
       * <code>optional bytes real_name = 4;</code>
       */
      public Builder clearRealName() {
        copyOnWrite();
        instance.clearRealName();
        return this;
      }

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

      // @@protoc_insertion_point(builder_scope:im.tox.proto.FileTransfer)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new FileTransfer();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          FileTransfer other = (FileTransfer) arg1;
          fileType_ = visitor.visitInt(fileType_ != 0, fileType_,
              other.fileType_ != 0, other.fileType_);
          toPk_ = visitor.visitByteString(toPk_ != com.google.protobuf.ByteString.EMPTY, toPk_,
              other.toPk_ != com.google.protobuf.ByteString.EMPTY, other.toPk_);
          toGroup_ = visitor.visitInt(toGroup_ != 0, toGroup_,
              other.toGroup_ != 0, other.toGroup_);
          realName_ = visitor.visitByteString(realName_ != com.google.protobuf.ByteString.EMPTY, realName_,
              other.realName_ != com.google.protobuf.ByteString.EMPTY, other.realName_);
          createTime_ = visitor.visitLong(createTime_ != 0L, createTime_,
              other.createTime_ != 0L, other.createTime_);
          if (visitor == 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: {

                  fileType_ = input.readInt32();
                  break;
                }
                case 18: {

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

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

                  realName_ = input.readBytes();
                  break;
                }
                case 40: {

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


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

    public static FileTransfer getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    /**
     * <pre>
     *group order number
     * </pre>
     *
     * <code>optional uint32 cmd = 1;</code>
     */
    int getCmd();

    /**
     * <pre>
     *group number
     * </pre>
     *
     * <code>optional uint32 group_id = 2;</code>
     */
    int getGroupId();

    /**
     * <code>optional bytes group_name = 3;</code>
     */
    com.google.protobuf.ByteString getGroupName();

    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    boolean hasGroupInvite();
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    GroupInvite getGroupInvite();

    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    boolean hasGroupTokenPush();
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    GroupTokenPush getGroupTokenPush();

    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    boolean hasGroupCreate();
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    GroupCreate getGroupCreate();

    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    boolean hasGroupRealMsg();
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    GroupRealMsg getGroupRealMsg();

    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    java.util.List<GroupPeer>
        getGroupPeersList();
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    GroupPeer getGroupPeers(int index);
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    int getGroupPeersCount();
  }
  /**
   * Protobuf type {@code im.tox.proto.GroupMessage}
   */
  public  static final class GroupMessage extends
      com.google.protobuf.GeneratedMessageLite<
          GroupMessage, GroupMessage.Builder> implements
      // @@protoc_insertion_point(message_implements:im.tox.proto.GroupMessage)
      GroupMessageOrBuilder {
    private GroupMessage() {
      groupName_ = com.google.protobuf.ByteString.EMPTY;
      groupPeers_ = emptyProtobufList();
    }
    private int bitField0_;
    public static final int CMD_FIELD_NUMBER = 1;
    private int cmd_;
    /**
     * <pre>
     *group order number
     * </pre>
     *
     * <code>optional uint32 cmd = 1;</code>
     */
    public int getCmd() {
      return cmd_;
    }
    /**
     * <pre>
     *group order number
     * </pre>
     *
     * <code>optional uint32 cmd = 1;</code>
     */
    private void setCmd(int value) {

      cmd_ = value;
    }
    /**
     * <pre>
     *group order number
     * </pre>
     *
     * <code>optional uint32 cmd = 1;</code>
     */
    private void clearCmd() {

      cmd_ = 0;
    }

    public static final int GROUP_ID_FIELD_NUMBER = 2;
    private int groupId_;
    /**
     * <pre>
     *group number
     * </pre>
     *
     * <code>optional uint32 group_id = 2;</code>
     */
    public int getGroupId() {
      return groupId_;
    }
    /**
     * <pre>
     *group number
     * </pre>
     *
     * <code>optional uint32 group_id = 2;</code>
     */
    private void setGroupId(int value) {

      groupId_ = value;
    }
    /**
     * <pre>
     *group number
     * </pre>
     *
     * <code>optional uint32 group_id = 2;</code>
     */
    private void clearGroupId() {

      groupId_ = 0;
    }

    public static final int GROUP_NAME_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString groupName_;
    /**
     * <code>optional bytes group_name = 3;</code>
     */
    public com.google.protobuf.ByteString getGroupName() {
      return groupName_;
    }
    /**
     * <code>optional bytes group_name = 3;</code>
     */
    private void setGroupName(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      groupName_ = value;
    }
    /**
     * <code>optional bytes group_name = 3;</code>
     */
    private void clearGroupName() {

      groupName_ = getDefaultInstance().getGroupName();
    }

    public static final int GROUPINVITE_FIELD_NUMBER = 4;
    private GroupInvite groupInvite_;
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    public boolean hasGroupInvite() {
      return groupInvite_ != null;
    }
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    public GroupInvite getGroupInvite() {
      return groupInvite_ == null ? GroupInvite.getDefaultInstance() : groupInvite_;
    }
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    private void setGroupInvite(GroupInvite value) {
      if (value == null) {
        throw new NullPointerException();
      }
      groupInvite_ = value;

      }
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    private void setGroupInvite(
        GroupInvite.Builder builderForValue) {
      groupInvite_ = builderForValue.build();

    }
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    private void mergeGroupInvite(GroupInvite value) {
      if (groupInvite_ != null &&
          groupInvite_ != GroupInvite.getDefaultInstance()) {
        groupInvite_ =
          GroupInvite.newBuilder(groupInvite_).mergeFrom(value).buildPartial();
      } else {
        groupInvite_ = value;
      }

    }
    /**
     * <pre>
     *invite peer infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
     */
    private void clearGroupInvite() {  groupInvite_ = null;

    }

    public static final int GROUPTOKENPUSH_FIELD_NUMBER = 5;
    private GroupTokenPush groupTokenPush_;
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    public boolean hasGroupTokenPush() {
      return groupTokenPush_ != null;
    }
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    public GroupTokenPush getGroupTokenPush() {
      return groupTokenPush_ == null ? GroupTokenPush.getDefaultInstance() : groupTokenPush_;
    }
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    private void setGroupTokenPush(GroupTokenPush value) {
      if (value == null) {
        throw new NullPointerException();
      }
      groupTokenPush_ = value;

      }
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    private void setGroupTokenPush(
        GroupTokenPush.Builder builderForValue) {
      groupTokenPush_ = builderForValue.build();

    }
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    private void mergeGroupTokenPush(GroupTokenPush value) {
      if (groupTokenPush_ != null &&
          groupTokenPush_ != GroupTokenPush.getDefaultInstance()) {
        groupTokenPush_ =
          GroupTokenPush.newBuilder(groupTokenPush_).mergeFrom(value).buildPartial();
      } else {
        groupTokenPush_ = value;
      }

    }
    /**
     * <pre>
     *token for ios
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
     */
    private void clearGroupTokenPush() {  groupTokenPush_ = null;

    }

    public static final int GROUPCREATE_FIELD_NUMBER = 6;
    private GroupCreate groupCreate_;
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    public boolean hasGroupCreate() {
      return groupCreate_ != null;
    }
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    public GroupCreate getGroupCreate() {
      return groupCreate_ == null ? GroupCreate.getDefaultInstance() : groupCreate_;
    }
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    private void setGroupCreate(GroupCreate value) {
      if (value == null) {
        throw new NullPointerException();
      }
      groupCreate_ = value;

      }
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    private void setGroupCreate(
        GroupCreate.Builder builderForValue) {
      groupCreate_ = builderForValue.build();

    }
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    private void mergeGroupCreate(GroupCreate value) {
      if (groupCreate_ != null &&
          groupCreate_ != GroupCreate.getDefaultInstance()) {
        groupCreate_ =
          GroupCreate.newBuilder(groupCreate_).mergeFrom(value).buildPartial();
      } else {
        groupCreate_ = value;
      }

    }
    /**
     * <pre>
     *create group infor
     * </pre>
     *
     * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
     */
    private void clearGroupCreate() {  groupCreate_ = null;

    }

    public static final int GROUPREALMSG_FIELD_NUMBER = 7;
    private GroupRealMsg groupRealMsg_;
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    public boolean hasGroupRealMsg() {
      return groupRealMsg_ != null;
    }
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    public GroupRealMsg getGroupRealMsg() {
      return groupRealMsg_ == null ? GroupRealMsg.getDefaultInstance() : groupRealMsg_;
    }
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    private void setGroupRealMsg(GroupRealMsg value) {
      if (value == null) {
        throw new NullPointerException();
      }
      groupRealMsg_ = value;

      }
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    private void setGroupRealMsg(
        GroupRealMsg.Builder builderForValue) {
      groupRealMsg_ = builderForValue.build();

    }
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    private void mergeGroupRealMsg(GroupRealMsg value) {
      if (groupRealMsg_ != null &&
          groupRealMsg_ != GroupRealMsg.getDefaultInstance()) {
        groupRealMsg_ =
          GroupRealMsg.newBuilder(groupRealMsg_).mergeFrom(value).buildPartial();
      } else {
        groupRealMsg_ = value;
      }

    }
    /**
     * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
     */
    private void clearGroupRealMsg() {  groupRealMsg_ = null;

    }

    public static final int GROUP_PEERS_FIELD_NUMBER = 8;
    private com.google.protobuf.Internal.ProtobufList<GroupPeer> groupPeers_;
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    public java.util.List<GroupPeer> getGroupPeersList() {
      return groupPeers_;
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    public java.util.List<? extends GroupPeerOrBuilder>
        getGroupPeersOrBuilderList() {
      return groupPeers_;
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    public int getGroupPeersCount() {
      return groupPeers_.size();
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    public GroupPeer getGroupPeers(int index) {
      return groupPeers_.get(index);
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    public GroupPeerOrBuilder getGroupPeersOrBuilder(
        int index) {
      return groupPeers_.get(index);
    }
    private void ensureGroupPeersIsMutable() {
      if (!groupPeers_.isModifiable()) {
        groupPeers_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(groupPeers_);
       }
    }

    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void setGroupPeers(
        int index, GroupPeer value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureGroupPeersIsMutable();
      groupPeers_.set(index, value);
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void setGroupPeers(
        int index, GroupPeer.Builder builderForValue) {
      ensureGroupPeersIsMutable();
      groupPeers_.set(index, builderForValue.build());
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void addGroupPeers(GroupPeer value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureGroupPeersIsMutable();
      groupPeers_.add(value);
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void addGroupPeers(
        int index, GroupPeer value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureGroupPeersIsMutable();
      groupPeers_.add(index, value);
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void addGroupPeers(
        GroupPeer.Builder builderForValue) {
      ensureGroupPeersIsMutable();
      groupPeers_.add(builderForValue.build());
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void addGroupPeers(
        int index, GroupPeer.Builder builderForValue) {
      ensureGroupPeersIsMutable();
      groupPeers_.add(index, builderForValue.build());
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void addAllGroupPeers(
        Iterable<? extends GroupPeer> values) {
      ensureGroupPeersIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, groupPeers_);
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void clearGroupPeers() {
      groupPeers_ = emptyProtobufList();
    }
    /**
     * <pre>
     *group peer info
     * </pre>
     *
     * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
     */
    private void removeGroupPeers(int index) {
      ensureGroupPeersIsMutable();
      groupPeers_.remove(index);
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (cmd_ != 0) {
        output.writeUInt32(1, cmd_);
      }
      if (groupId_ != 0) {
        output.writeUInt32(2, groupId_);
      }
      if (!groupName_.isEmpty()) {
        output.writeBytes(3, groupName_);
      }
      if (groupInvite_ != null) {
        output.writeMessage(4, getGroupInvite());
      }
      if (groupTokenPush_ != null) {
        output.writeMessage(5, getGroupTokenPush());
      }
      if (groupCreate_ != null) {
        output.writeMessage(6, getGroupCreate());
      }
      if (groupRealMsg_ != null) {
        output.writeMessage(7, getGroupRealMsg());
      }
      for (int i = 0; i < groupPeers_.size(); i++) {
        output.writeMessage(8, groupPeers_.get(i));
      }
    }

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

      size = 0;
      if (cmd_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(1, cmd_);
      }
      if (groupId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, groupId_);
      }
      if (!groupName_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, groupName_);
      }
      if (groupInvite_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getGroupInvite());
      }
      if (groupTokenPush_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getGroupTokenPush());
      }
      if (groupCreate_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, getGroupCreate());
      }
      if (groupRealMsg_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(7, getGroupRealMsg());
      }
      for (int i = 0; i < groupPeers_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(8, groupPeers_.get(i));
      }
      memoizedSerializedSize = size;
      return size;
    }

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

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


      /**
       * <pre>
       *group order number
       * </pre>
       *
       * <code>optional uint32 cmd = 1;</code>
       */
      public int getCmd() {
        return instance.getCmd();
      }
      /**
       * <pre>
       *group order number
       * </pre>
       *
       * <code>optional uint32 cmd = 1;</code>
       */
      public Builder setCmd(int value) {
        copyOnWrite();
        instance.setCmd(value);
        return this;
      }
      /**
       * <pre>
       *group order number
       * </pre>
       *
       * <code>optional uint32 cmd = 1;</code>
       */
      public Builder clearCmd() {
        copyOnWrite();
        instance.clearCmd();
        return this;
      }

      /**
       * <pre>
       *group number
       * </pre>
       *
       * <code>optional uint32 group_id = 2;</code>
       */
      public int getGroupId() {
        return instance.getGroupId();
      }
      /**
       * <pre>
       *group number
       * </pre>
       *
       * <code>optional uint32 group_id = 2;</code>
       */
      public Builder setGroupId(int value) {
        copyOnWrite();
        instance.setGroupId(value);
        return this;
      }
      /**
       * <pre>
       *group number
       * </pre>
       *
       * <code>optional uint32 group_id = 2;</code>
       */
      public Builder clearGroupId() {
        copyOnWrite();
        instance.clearGroupId();
        return this;
      }

      /**
       * <code>optional bytes group_name = 3;</code>
       */
      public com.google.protobuf.ByteString getGroupName() {
        return instance.getGroupName();
      }
      /**
       * <code>optional bytes group_name = 3;</code>
       */
      public Builder setGroupName(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setGroupName(value);
        return this;
      }
      /**
       * <code>optional bytes group_name = 3;</code>
       */
      public Builder clearGroupName() {
        copyOnWrite();
        instance.clearGroupName();
        return this;
      }

      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public boolean hasGroupInvite() {
        return instance.hasGroupInvite();
      }
      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public GroupInvite getGroupInvite() {
        return instance.getGroupInvite();
      }
      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public Builder setGroupInvite(GroupInvite value) {
        copyOnWrite();
        instance.setGroupInvite(value);
        return this;
        }
      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public Builder setGroupInvite(
          GroupInvite.Builder builderForValue) {
        copyOnWrite();
        instance.setGroupInvite(builderForValue);
        return this;
      }
      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public Builder mergeGroupInvite(GroupInvite value) {
        copyOnWrite();
        instance.mergeGroupInvite(value);
        return this;
      }
      /**
       * <pre>
       *invite peer infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupInvite groupInvite = 4;</code>
       */
      public Builder clearGroupInvite() {  copyOnWrite();
        instance.clearGroupInvite();
        return this;
      }

      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public boolean hasGroupTokenPush() {
        return instance.hasGroupTokenPush();
      }
      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public GroupTokenPush getGroupTokenPush() {
        return instance.getGroupTokenPush();
      }
      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public Builder setGroupTokenPush(GroupTokenPush value) {
        copyOnWrite();
        instance.setGroupTokenPush(value);
        return this;
        }
      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public Builder setGroupTokenPush(
          GroupTokenPush.Builder builderForValue) {
        copyOnWrite();
        instance.setGroupTokenPush(builderForValue);
        return this;
      }
      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public Builder mergeGroupTokenPush(GroupTokenPush value) {
        copyOnWrite();
        instance.mergeGroupTokenPush(value);
        return this;
      }
      /**
       * <pre>
       *token for ios
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupTokenPush groupTokenPush = 5;</code>
       */
      public Builder clearGroupTokenPush() {  copyOnWrite();
        instance.clearGroupTokenPush();
        return this;
      }

      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public boolean hasGroupCreate() {
        return instance.hasGroupCreate();
      }
      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public GroupCreate getGroupCreate() {
        return instance.getGroupCreate();
      }
      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public Builder setGroupCreate(GroupCreate value) {
        copyOnWrite();
        instance.setGroupCreate(value);
        return this;
        }
      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public Builder setGroupCreate(
          GroupCreate.Builder builderForValue) {
        copyOnWrite();
        instance.setGroupCreate(builderForValue);
        return this;
      }
      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public Builder mergeGroupCreate(GroupCreate value) {
        copyOnWrite();
        instance.mergeGroupCreate(value);
        return this;
      }
      /**
       * <pre>
       *create group infor
       * </pre>
       *
       * <code>optional .im.tox.proto.GroupCreate groupCreate = 6;</code>
       */
      public Builder clearGroupCreate() {  copyOnWrite();
        instance.clearGroupCreate();
        return this;
      }

      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public boolean hasGroupRealMsg() {
        return instance.hasGroupRealMsg();
      }
      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public GroupRealMsg getGroupRealMsg() {
        return instance.getGroupRealMsg();
      }
      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public Builder setGroupRealMsg(GroupRealMsg value) {
        copyOnWrite();
        instance.setGroupRealMsg(value);
        return this;
        }
      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public Builder setGroupRealMsg(
          GroupRealMsg.Builder builderForValue) {
        copyOnWrite();
        instance.setGroupRealMsg(builderForValue);
        return this;
      }
      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public Builder mergeGroupRealMsg(GroupRealMsg value) {
        copyOnWrite();
        instance.mergeGroupRealMsg(value);
        return this;
      }
      /**
       * <code>optional .im.tox.proto.GroupRealMsg groupRealMsg = 7;</code>
       */
      public Builder clearGroupRealMsg() {  copyOnWrite();
        instance.clearGroupRealMsg();
        return this;
      }

      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public java.util.List<GroupPeer> getGroupPeersList() {
        return java.util.Collections.unmodifiableList(
            instance.getGroupPeersList());
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public int getGroupPeersCount() {
        return instance.getGroupPeersCount();
      }/**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public GroupPeer getGroupPeers(int index) {
        return instance.getGroupPeers(index);
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder setGroupPeers(
          int index, GroupPeer value) {
        copyOnWrite();
        instance.setGroupPeers(index, value);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder setGroupPeers(
          int index, GroupPeer.Builder builderForValue) {
        copyOnWrite();
        instance.setGroupPeers(index, builderForValue);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder addGroupPeers(GroupPeer value) {
        copyOnWrite();
        instance.addGroupPeers(value);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder addGroupPeers(
          int index, GroupPeer value) {
        copyOnWrite();
        instance.addGroupPeers(index, value);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder addGroupPeers(
          GroupPeer.Builder builderForValue) {
        copyOnWrite();
        instance.addGroupPeers(builderForValue);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder addGroupPeers(
          int index, GroupPeer.Builder builderForValue) {
        copyOnWrite();
        instance.addGroupPeers(index, builderForValue);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder addAllGroupPeers(
          Iterable<? extends GroupPeer> values) {
        copyOnWrite();
        instance.addAllGroupPeers(values);
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder clearGroupPeers() {
        copyOnWrite();
        instance.clearGroupPeers();
        return this;
      }
      /**
       * <pre>
       *group peer info
       * </pre>
       *
       * <code>repeated .im.tox.proto.GroupPeer group_peers = 8;</code>
       */
      public Builder removeGroupPeers(int index) {
        copyOnWrite();
        instance.removeGroupPeers(index);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:im.tox.proto.GroupMessage)
    }
    protected final Object dynamicMethod(
        MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new GroupMessage();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          groupPeers_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          GroupMessage other = (GroupMessage) arg1;
          cmd_ = visitor.visitInt(cmd_ != 0, cmd_,
              other.cmd_ != 0, other.cmd_);
          groupId_ = visitor.visitInt(groupId_ != 0, groupId_,
              other.groupId_ != 0, other.groupId_);
          groupName_ = visitor.visitByteString(groupName_ != com.google.protobuf.ByteString.EMPTY, groupName_,
              other.groupName_ != com.google.protobuf.ByteString.EMPTY, other.groupName_);
          groupInvite_ = visitor.visitMessage(groupInvite_, other.groupInvite_);
          groupTokenPush_ = visitor.visitMessage(groupTokenPush_, other.groupTokenPush_);
          groupCreate_ = visitor.visitMessage(groupCreate_, other.groupCreate_);
          groupRealMsg_ = visitor.visitMessage(groupRealMsg_, other.groupRealMsg_);
          groupPeers_= visitor.visitList(groupPeers_, other.groupPeers_);
          if (visitor == MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {

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

                  groupId_ = input.readUInt32();
                  break;
                }
                case 26: {

                  groupName_ = input.readBytes();
                  break;
                }
                case 34: {
                  GroupInvite.Builder subBuilder = null;
                  if (groupInvite_ != null) {
                    subBuilder = groupInvite_.toBuilder();
                  }
                  groupInvite_ = input.readMessage(GroupInvite.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(groupInvite_);
                    groupInvite_ = subBuilder.buildPartial();
                  }

                  break;
                }
                case 42: {
                  GroupTokenPush.Builder subBuilder = null;
                  if (groupTokenPush_ != null) {
                    subBuilder = groupTokenPush_.toBuilder();
                  }
                  groupTokenPush_ = input.readMessage(GroupTokenPush.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(groupTokenPush_);
                    groupTokenPush_ = subBuilder.buildPartial();
                  }

                  break;
                }
                case 50: {
                  GroupCreate.Builder subBuilder = null;
                  if (groupCreate_ != null) {
                    subBuilder = groupCreate_.toBuilder();
                  }
                  groupCreate_ = input.readMessage(GroupCreate.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(groupCreate_);
                    groupCreate_ = subBuilder.buildPartial();
                  }

                  break;
                }
                case 58: {
                  GroupRealMsg.Builder subBuilder = null;
                  if (groupRealMsg_ != null) {
                    subBuilder = groupRealMsg_.toBuilder();
                  }
                  groupRealMsg_ = input.readMessage(GroupRealMsg.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(groupRealMsg_);
                    groupRealMsg_ = subBuilder.buildPartial();
                  }

                  break;
                }
                case 66: {
                  if (!groupPeers_.isModifiable()) {
                    groupPeers_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(groupPeers_);
                  }
                  groupPeers_.add(
                      input.readMessage(GroupPeer.parser(), extensionRegistry));
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (GroupMessage.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


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

    public static GroupMessage getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}
