// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: greptime/v1/index/inverted_index.proto

package greptime.v1.index;

public final class InvertedIndex {
  private InvertedIndex() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * <pre>
   * BitmapType defines the type of bitmap used for indexing.
   * </pre>
   *
   * Protobuf enum {@code greptime.v1.index.BitmapType}
   */
  public enum BitmapType
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>BitVec = 0;</code>
     */
    BitVec(0),
    /**
     * <code>Roaring = 1;</code>
     */
    Roaring(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <code>BitVec = 0;</code>
     */
    public static final int BitVec_VALUE = 0;
    /**
     * <code>Roaring = 1;</code>
     */
    public static final int Roaring_VALUE = 1;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static BitmapType valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static BitmapType forNumber(int value) {
      switch (value) {
        case 0: return BitVec;
        case 1: return Roaring;
        default: return null;
      }
    }

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

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return greptime.v1.index.InvertedIndex.getDescriptor().getEnumTypes().get(0);
    }

    private static final BitmapType[] VALUES = values();

    public static BitmapType valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:greptime.v1.index.BitmapType)
  }

  public interface InvertedIndexMetasOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexMetas)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    int getMetasCount();
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    boolean containsMetas(
        java.lang.String key);
    /**
     * Use {@link #getMetasMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
    getMetas();
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
    getMetasMap();
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */

    /* nullable */
greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault(
        java.lang.String key,
        /* nullable */
greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue);
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */

    greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow(
        java.lang.String key);

    /**
     * <pre>
     * The total count of rows within the inverted index blob.
     * This is used to determine the number of segments within the bitmap.
     * </pre>
     *
     * <code>uint64 total_row_count = 2;</code>
     * @return The totalRowCount.
     */
    long getTotalRowCount();

    /**
     * <pre>
     * The number of rows per group for bitmap indexing which determines how rows are
     * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
     * for efficient retrieval during queries by reducing the search space.
     * </pre>
     *
     * <code>uint64 segment_row_count = 3;</code>
     * @return The segmentRowCount.
     */
    long getSegmentRowCount();
  }
  /**
   * <pre>
   * InvertedIndexMetas defines the metadata for an inverted index
   * within an inverted index blob.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.index.InvertedIndexMetas}
   */
  public static final class InvertedIndexMetas extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexMetas)
      InvertedIndexMetasOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InvertedIndexMetas.newBuilder() to construct.
    private InvertedIndexMetas(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InvertedIndexMetas() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new InvertedIndexMetas();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InvertedIndexMetas(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                metas_ = com.google.protobuf.MapField.newMapField(
                    MetasDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000001;
              }
              com.google.protobuf.MapEntry<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
              metas__ = input.readMessage(
                  MetasDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              metas_.getMutableMap().put(
                  metas__.getKey(), metas__.getValue());
              break;
            }
            case 16: {

              totalRowCount_ = input.readUInt64();
              break;
            }
            case 24: {

              segmentRowCount_ = input.readUInt64();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    @java.lang.Override
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetMetas();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.index.InvertedIndex.InvertedIndexMetas.class, greptime.v1.index.InvertedIndex.InvertedIndexMetas.Builder.class);
    }

    public static final int METAS_FIELD_NUMBER = 1;
    private static final class MetasDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>newDefaultInstance(
                  greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.MESSAGE,
                  greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance());
    }
    private com.google.protobuf.MapField<
        java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_;
    private com.google.protobuf.MapField<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
    internalGetMetas() {
      if (metas_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            MetasDefaultEntryHolder.defaultEntry);
      }
      return metas_;
    }

    public int getMetasCount() {
      return internalGetMetas().getMap().size();
    }
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */

    @java.lang.Override
    public boolean containsMetas(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetMetas().getMap().containsKey(key);
    }
    /**
     * Use {@link #getMetasMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> getMetas() {
      return getMetasMap();
    }
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    @java.lang.Override

    public java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> getMetasMap() {
      return internalGetMetas().getMap();
    }
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    @java.lang.Override

    public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault(
        java.lang.String key,
        greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> map =
          internalGetMetas().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * A map of tag names to their respective metadata corresponding to an individual
     * inverted index within the inverted index blob.
     * </pre>
     *
     * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
     */
    @java.lang.Override

    public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> map =
          internalGetMetas().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public static final int TOTAL_ROW_COUNT_FIELD_NUMBER = 2;
    private long totalRowCount_;
    /**
     * <pre>
     * The total count of rows within the inverted index blob.
     * This is used to determine the number of segments within the bitmap.
     * </pre>
     *
     * <code>uint64 total_row_count = 2;</code>
     * @return The totalRowCount.
     */
    @java.lang.Override
    public long getTotalRowCount() {
      return totalRowCount_;
    }

    public static final int SEGMENT_ROW_COUNT_FIELD_NUMBER = 3;
    private long segmentRowCount_;
    /**
     * <pre>
     * The number of rows per group for bitmap indexing which determines how rows are
     * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
     * for efficient retrieval during queries by reducing the search space.
     * </pre>
     *
     * <code>uint64 segment_row_count = 3;</code>
     * @return The segmentRowCount.
     */
    @java.lang.Override
    public long getSegmentRowCount() {
      return segmentRowCount_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetMetas(),
          MetasDefaultEntryHolder.defaultEntry,
          1);
      if (totalRowCount_ != 0L) {
        output.writeUInt64(2, totalRowCount_);
      }
      if (segmentRowCount_ != 0L) {
        output.writeUInt64(3, segmentRowCount_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      for (java.util.Map.Entry<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> entry
           : internalGetMetas().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
        metas__ = MetasDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(1, metas__);
      }
      if (totalRowCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, totalRowCount_);
      }
      if (segmentRowCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(3, segmentRowCount_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexMetas)) {
        return super.equals(obj);
      }
      greptime.v1.index.InvertedIndex.InvertedIndexMetas other = (greptime.v1.index.InvertedIndex.InvertedIndexMetas) obj;

      if (!internalGetMetas().equals(
          other.internalGetMetas())) return false;
      if (getTotalRowCount()
          != other.getTotalRowCount()) return false;
      if (getSegmentRowCount()
          != other.getSegmentRowCount()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (!internalGetMetas().getMap().isEmpty()) {
        hash = (37 * hash) + METAS_FIELD_NUMBER;
        hash = (53 * hash) + internalGetMetas().hashCode();
      }
      hash = (37 * hash) + TOTAL_ROW_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getTotalRowCount());
      hash = (37 * hash) + SEGMENT_ROW_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getSegmentRowCount());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexMetas prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * InvertedIndexMetas defines the metadata for an inverted index
     * within an inverted index blob.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.index.InvertedIndexMetas}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexMetas)
        greptime.v1.index.InvertedIndex.InvertedIndexMetasOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 1:
            return internalGetMetas();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 1:
            return internalGetMutableMetas();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.index.InvertedIndex.InvertedIndexMetas.class, greptime.v1.index.InvertedIndex.InvertedIndexMetas.Builder.class);
      }

      // Construct using greptime.v1.index.InvertedIndex.InvertedIndexMetas.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        internalGetMutableMetas().clear();
        totalRowCount_ = 0L;

        segmentRowCount_ = 0L;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMetas_descriptor;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstanceForType() {
        return greptime.v1.index.InvertedIndex.InvertedIndexMetas.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMetas build() {
        greptime.v1.index.InvertedIndex.InvertedIndexMetas result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMetas buildPartial() {
        greptime.v1.index.InvertedIndex.InvertedIndexMetas result = new greptime.v1.index.InvertedIndex.InvertedIndexMetas(this);
        int from_bitField0_ = bitField0_;
        result.metas_ = internalGetMetas();
        result.metas_.makeImmutable();
        result.totalRowCount_ = totalRowCount_;
        result.segmentRowCount_ = segmentRowCount_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexMetas) {
          return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexMetas)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexMetas other) {
        if (other == greptime.v1.index.InvertedIndex.InvertedIndexMetas.getDefaultInstance()) return this;
        internalGetMutableMetas().mergeFrom(
            other.internalGetMetas());
        if (other.getTotalRowCount() != 0L) {
          setTotalRowCount(other.getTotalRowCount());
        }
        if (other.getSegmentRowCount() != 0L) {
          setSegmentRowCount(other.getSegmentRowCount());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        greptime.v1.index.InvertedIndex.InvertedIndexMetas parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexMetas) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.MapField<
          java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_;
      private com.google.protobuf.MapField<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
      internalGetMetas() {
        if (metas_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              MetasDefaultEntryHolder.defaultEntry);
        }
        return metas_;
      }
      private com.google.protobuf.MapField<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
      internalGetMutableMetas() {
        onChanged();;
        if (metas_ == null) {
          metas_ = com.google.protobuf.MapField.newMapField(
              MetasDefaultEntryHolder.defaultEntry);
        }
        if (!metas_.isMutable()) {
          metas_ = metas_.copy();
        }
        return metas_;
      }

      public int getMetasCount() {
        return internalGetMetas().getMap().size();
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */

      @java.lang.Override
      public boolean containsMetas(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        return internalGetMetas().getMap().containsKey(key);
      }
      /**
       * Use {@link #getMetasMap()} instead.
       */
      @java.lang.Override
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> getMetas() {
        return getMetasMap();
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */
      @java.lang.Override

      public java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> getMetasMap() {
        return internalGetMetas().getMap();
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */
      @java.lang.Override

      public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault(
          java.lang.String key,
          greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> map =
            internalGetMetas().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */
      @java.lang.Override

      public greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> map =
            internalGetMetas().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }

      public Builder clearMetas() {
        internalGetMutableMetas().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */

      public Builder removeMetas(
          java.lang.String key) {
        if (key == null) { throw new NullPointerException("map key"); }
        internalGetMutableMetas().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta>
      getMutableMetas() {
        return internalGetMutableMetas().getMutableMap();
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */
      public Builder putMetas(
          java.lang.String key,
          greptime.v1.index.InvertedIndex.InvertedIndexMeta value) {
        if (key == null) { throw new NullPointerException("map key"); }
        if (value == null) {
  throw new NullPointerException("map value");
}

        internalGetMutableMetas().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <pre>
       * A map of tag names to their respective metadata corresponding to an individual
       * inverted index within the inverted index blob.
       * </pre>
       *
       * <code>map&lt;string, .greptime.v1.index.InvertedIndexMeta&gt; metas = 1;</code>
       */

      public Builder putAllMetas(
          java.util.Map<java.lang.String, greptime.v1.index.InvertedIndex.InvertedIndexMeta> values) {
        internalGetMutableMetas().getMutableMap()
            .putAll(values);
        return this;
      }

      private long totalRowCount_ ;
      /**
       * <pre>
       * The total count of rows within the inverted index blob.
       * This is used to determine the number of segments within the bitmap.
       * </pre>
       *
       * <code>uint64 total_row_count = 2;</code>
       * @return The totalRowCount.
       */
      @java.lang.Override
      public long getTotalRowCount() {
        return totalRowCount_;
      }
      /**
       * <pre>
       * The total count of rows within the inverted index blob.
       * This is used to determine the number of segments within the bitmap.
       * </pre>
       *
       * <code>uint64 total_row_count = 2;</code>
       * @param value The totalRowCount to set.
       * @return This builder for chaining.
       */
      public Builder setTotalRowCount(long value) {
        
        totalRowCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The total count of rows within the inverted index blob.
       * This is used to determine the number of segments within the bitmap.
       * </pre>
       *
       * <code>uint64 total_row_count = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearTotalRowCount() {
        
        totalRowCount_ = 0L;
        onChanged();
        return this;
      }

      private long segmentRowCount_ ;
      /**
       * <pre>
       * The number of rows per group for bitmap indexing which determines how rows are
       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
       * for efficient retrieval during queries by reducing the search space.
       * </pre>
       *
       * <code>uint64 segment_row_count = 3;</code>
       * @return The segmentRowCount.
       */
      @java.lang.Override
      public long getSegmentRowCount() {
        return segmentRowCount_;
      }
      /**
       * <pre>
       * The number of rows per group for bitmap indexing which determines how rows are
       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
       * for efficient retrieval during queries by reducing the search space.
       * </pre>
       *
       * <code>uint64 segment_row_count = 3;</code>
       * @param value The segmentRowCount to set.
       * @return This builder for chaining.
       */
      public Builder setSegmentRowCount(long value) {
        
        segmentRowCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The number of rows per group for bitmap indexing which determines how rows are
       * batched for indexing. Each batch corresponds to a segment in the bitmap and allows
       * for efficient retrieval during queries by reducing the search space.
       * </pre>
       *
       * <code>uint64 segment_row_count = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearSegmentRowCount() {
        
        segmentRowCount_ = 0L;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexMetas)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMetas)
    private static final greptime.v1.index.InvertedIndex.InvertedIndexMetas DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexMetas();
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<InvertedIndexMetas>
        PARSER = new com.google.protobuf.AbstractParser<InvertedIndexMetas>() {
      @java.lang.Override
      public InvertedIndexMetas parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new InvertedIndexMetas(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<InvertedIndexMetas> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<InvertedIndexMetas> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public greptime.v1.index.InvertedIndex.InvertedIndexMetas getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface InvertedIndexMetaOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexMeta)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Name of the tag associated with the inverted index.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The name.
     */
    java.lang.String getName();
    /**
     * <pre>
     * Name of the tag associated with the inverted index.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The bytes for name.
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <pre>
     * The base byte offset for this tag's inverted index data within the blob.
     * Other offsets in this message are relative to this base offset.
     * </pre>
     *
     * <code>uint64 base_offset = 2;</code>
     * @return The baseOffset.
     */
    long getBaseOffset();

    /**
     * <pre>
     * The total size in bytes of this tag's inverted index data, including bitmaps,
     * FST data.
     * </pre>
     *
     * <code>uint64 inverted_index_size = 3;</code>
     * @return The invertedIndexSize.
     */
    long getInvertedIndexSize();

    /**
     * <pre>
     * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
     * </pre>
     *
     * <code>uint32 relative_fst_offset = 4;</code>
     * @return The relativeFstOffset.
     */
    int getRelativeFstOffset();

    /**
     * <pre>
     * The size in bytes of the FST data.
     * </pre>
     *
     * <code>uint32 fst_size = 5;</code>
     * @return The fstSize.
     */
    int getFstSize();

    /**
     * <pre>
     * The byte offset relative to the `base_offset` where the null bitmap for this tag
     * starts.
     * </pre>
     *
     * <code>uint32 relative_null_bitmap_offset = 6;</code>
     * @return The relativeNullBitmapOffset.
     */
    int getRelativeNullBitmapOffset();

    /**
     * <pre>
     * The size in bytes of the null bitmap.
     * </pre>
     *
     * <code>uint32 null_bitmap_size = 7;</code>
     * @return The nullBitmapSize.
     */
    int getNullBitmapSize();

    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     * @return Whether the stats field is set.
     */
    boolean hasStats();
    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     * @return The stats.
     */
    greptime.v1.index.InvertedIndex.InvertedIndexStats getStats();
    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     */
    greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder();

    /**
     * <pre>
     * The type of bitmap used for indexing.
     * </pre>
     *
     * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
     * @return The enum numeric value on the wire for bitmapType.
     */
    int getBitmapTypeValue();
    /**
     * <pre>
     * The type of bitmap used for indexing.
     * </pre>
     *
     * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
     * @return The bitmapType.
     */
    greptime.v1.index.InvertedIndex.BitmapType getBitmapType();
  }
  /**
   * <pre>
   * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.index.InvertedIndexMeta}
   */
  public static final class InvertedIndexMeta extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexMeta)
      InvertedIndexMetaOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InvertedIndexMeta.newBuilder() to construct.
    private InvertedIndexMeta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InvertedIndexMeta() {
      name_ = "";
      bitmapType_ = 0;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new InvertedIndexMeta();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InvertedIndexMeta(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
            case 16: {

              baseOffset_ = input.readUInt64();
              break;
            }
            case 24: {

              invertedIndexSize_ = input.readUInt64();
              break;
            }
            case 32: {

              relativeFstOffset_ = input.readUInt32();
              break;
            }
            case 40: {

              fstSize_ = input.readUInt32();
              break;
            }
            case 48: {

              relativeNullBitmapOffset_ = input.readUInt32();
              break;
            }
            case 56: {

              nullBitmapSize_ = input.readUInt32();
              break;
            }
            case 66: {
              greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder subBuilder = null;
              if (stats_ != null) {
                subBuilder = stats_.toBuilder();
              }
              stats_ = input.readMessage(greptime.v1.index.InvertedIndex.InvertedIndexStats.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(stats_);
                stats_ = subBuilder.buildPartial();
              }

              break;
            }
            case 72: {
              int rawValue = input.readEnum();

              bitmapType_ = rawValue;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class);
    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile java.lang.Object name_;
    /**
     * <pre>
     * Name of the tag associated with the inverted index.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The name.
     */
    @java.lang.Override
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Name of the tag associated with the inverted index.
     * </pre>
     *
     * <code>string name = 1;</code>
     * @return The bytes for name.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int BASE_OFFSET_FIELD_NUMBER = 2;
    private long baseOffset_;
    /**
     * <pre>
     * The base byte offset for this tag's inverted index data within the blob.
     * Other offsets in this message are relative to this base offset.
     * </pre>
     *
     * <code>uint64 base_offset = 2;</code>
     * @return The baseOffset.
     */
    @java.lang.Override
    public long getBaseOffset() {
      return baseOffset_;
    }

    public static final int INVERTED_INDEX_SIZE_FIELD_NUMBER = 3;
    private long invertedIndexSize_;
    /**
     * <pre>
     * The total size in bytes of this tag's inverted index data, including bitmaps,
     * FST data.
     * </pre>
     *
     * <code>uint64 inverted_index_size = 3;</code>
     * @return The invertedIndexSize.
     */
    @java.lang.Override
    public long getInvertedIndexSize() {
      return invertedIndexSize_;
    }

    public static final int RELATIVE_FST_OFFSET_FIELD_NUMBER = 4;
    private int relativeFstOffset_;
    /**
     * <pre>
     * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
     * </pre>
     *
     * <code>uint32 relative_fst_offset = 4;</code>
     * @return The relativeFstOffset.
     */
    @java.lang.Override
    public int getRelativeFstOffset() {
      return relativeFstOffset_;
    }

    public static final int FST_SIZE_FIELD_NUMBER = 5;
    private int fstSize_;
    /**
     * <pre>
     * The size in bytes of the FST data.
     * </pre>
     *
     * <code>uint32 fst_size = 5;</code>
     * @return The fstSize.
     */
    @java.lang.Override
    public int getFstSize() {
      return fstSize_;
    }

    public static final int RELATIVE_NULL_BITMAP_OFFSET_FIELD_NUMBER = 6;
    private int relativeNullBitmapOffset_;
    /**
     * <pre>
     * The byte offset relative to the `base_offset` where the null bitmap for this tag
     * starts.
     * </pre>
     *
     * <code>uint32 relative_null_bitmap_offset = 6;</code>
     * @return The relativeNullBitmapOffset.
     */
    @java.lang.Override
    public int getRelativeNullBitmapOffset() {
      return relativeNullBitmapOffset_;
    }

    public static final int NULL_BITMAP_SIZE_FIELD_NUMBER = 7;
    private int nullBitmapSize_;
    /**
     * <pre>
     * The size in bytes of the null bitmap.
     * </pre>
     *
     * <code>uint32 null_bitmap_size = 7;</code>
     * @return The nullBitmapSize.
     */
    @java.lang.Override
    public int getNullBitmapSize() {
      return nullBitmapSize_;
    }

    public static final int STATS_FIELD_NUMBER = 8;
    private greptime.v1.index.InvertedIndex.InvertedIndexStats stats_;
    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     * @return Whether the stats field is set.
     */
    @java.lang.Override
    public boolean hasStats() {
      return stats_ != null;
    }
    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     * @return The stats.
     */
    @java.lang.Override
    public greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() {
      return stats_ == null ? greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_;
    }
    /**
     * <pre>
     * Statistical information about the tag's inverted index.
     * </pre>
     *
     * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
     */
    @java.lang.Override
    public greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() {
      return getStats();
    }

    public static final int BITMAP_TYPE_FIELD_NUMBER = 9;
    private int bitmapType_;
    /**
     * <pre>
     * The type of bitmap used for indexing.
     * </pre>
     *
     * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
     * @return The enum numeric value on the wire for bitmapType.
     */
    @java.lang.Override public int getBitmapTypeValue() {
      return bitmapType_;
    }
    /**
     * <pre>
     * The type of bitmap used for indexing.
     * </pre>
     *
     * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
     * @return The bitmapType.
     */
    @java.lang.Override public greptime.v1.index.InvertedIndex.BitmapType getBitmapType() {
      @SuppressWarnings("deprecation")
      greptime.v1.index.InvertedIndex.BitmapType result = greptime.v1.index.InvertedIndex.BitmapType.valueOf(bitmapType_);
      return result == null ? greptime.v1.index.InvertedIndex.BitmapType.UNRECOGNIZED : result;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (baseOffset_ != 0L) {
        output.writeUInt64(2, baseOffset_);
      }
      if (invertedIndexSize_ != 0L) {
        output.writeUInt64(3, invertedIndexSize_);
      }
      if (relativeFstOffset_ != 0) {
        output.writeUInt32(4, relativeFstOffset_);
      }
      if (fstSize_ != 0) {
        output.writeUInt32(5, fstSize_);
      }
      if (relativeNullBitmapOffset_ != 0) {
        output.writeUInt32(6, relativeNullBitmapOffset_);
      }
      if (nullBitmapSize_ != 0) {
        output.writeUInt32(7, nullBitmapSize_);
      }
      if (stats_ != null) {
        output.writeMessage(8, getStats());
      }
      if (bitmapType_ != greptime.v1.index.InvertedIndex.BitmapType.BitVec.getNumber()) {
        output.writeEnum(9, bitmapType_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (baseOffset_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, baseOffset_);
      }
      if (invertedIndexSize_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(3, invertedIndexSize_);
      }
      if (relativeFstOffset_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(4, relativeFstOffset_);
      }
      if (fstSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(5, fstSize_);
      }
      if (relativeNullBitmapOffset_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(6, relativeNullBitmapOffset_);
      }
      if (nullBitmapSize_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(7, nullBitmapSize_);
      }
      if (stats_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(8, getStats());
      }
      if (bitmapType_ != greptime.v1.index.InvertedIndex.BitmapType.BitVec.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(9, bitmapType_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexMeta)) {
        return super.equals(obj);
      }
      greptime.v1.index.InvertedIndex.InvertedIndexMeta other = (greptime.v1.index.InvertedIndex.InvertedIndexMeta) obj;

      if (!getName()
          .equals(other.getName())) return false;
      if (getBaseOffset()
          != other.getBaseOffset()) return false;
      if (getInvertedIndexSize()
          != other.getInvertedIndexSize()) return false;
      if (getRelativeFstOffset()
          != other.getRelativeFstOffset()) return false;
      if (getFstSize()
          != other.getFstSize()) return false;
      if (getRelativeNullBitmapOffset()
          != other.getRelativeNullBitmapOffset()) return false;
      if (getNullBitmapSize()
          != other.getNullBitmapSize()) return false;
      if (hasStats() != other.hasStats()) return false;
      if (hasStats()) {
        if (!getStats()
            .equals(other.getStats())) return false;
      }
      if (bitmapType_ != other.bitmapType_) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + BASE_OFFSET_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getBaseOffset());
      hash = (37 * hash) + INVERTED_INDEX_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getInvertedIndexSize());
      hash = (37 * hash) + RELATIVE_FST_OFFSET_FIELD_NUMBER;
      hash = (53 * hash) + getRelativeFstOffset();
      hash = (37 * hash) + FST_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + getFstSize();
      hash = (37 * hash) + RELATIVE_NULL_BITMAP_OFFSET_FIELD_NUMBER;
      hash = (53 * hash) + getRelativeNullBitmapOffset();
      hash = (37 * hash) + NULL_BITMAP_SIZE_FIELD_NUMBER;
      hash = (53 * hash) + getNullBitmapSize();
      if (hasStats()) {
        hash = (37 * hash) + STATS_FIELD_NUMBER;
        hash = (53 * hash) + getStats().hashCode();
      }
      hash = (37 * hash) + BITMAP_TYPE_FIELD_NUMBER;
      hash = (53 * hash) + bitmapType_;
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexMeta prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.index.InvertedIndexMeta}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexMeta)
        greptime.v1.index.InvertedIndex.InvertedIndexMetaOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class);
      }

      // Construct using greptime.v1.index.InvertedIndex.InvertedIndexMeta.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        name_ = "";

        baseOffset_ = 0L;

        invertedIndexSize_ = 0L;

        relativeFstOffset_ = 0;

        fstSize_ = 0;

        relativeNullBitmapOffset_ = 0;

        nullBitmapSize_ = 0;

        if (statsBuilder_ == null) {
          stats_ = null;
        } else {
          stats_ = null;
          statsBuilder_ = null;
        }
        bitmapType_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() {
        return greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMeta build() {
        greptime.v1.index.InvertedIndex.InvertedIndexMeta result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexMeta buildPartial() {
        greptime.v1.index.InvertedIndex.InvertedIndexMeta result = new greptime.v1.index.InvertedIndex.InvertedIndexMeta(this);
        result.name_ = name_;
        result.baseOffset_ = baseOffset_;
        result.invertedIndexSize_ = invertedIndexSize_;
        result.relativeFstOffset_ = relativeFstOffset_;
        result.fstSize_ = fstSize_;
        result.relativeNullBitmapOffset_ = relativeNullBitmapOffset_;
        result.nullBitmapSize_ = nullBitmapSize_;
        if (statsBuilder_ == null) {
          result.stats_ = stats_;
        } else {
          result.stats_ = statsBuilder_.build();
        }
        result.bitmapType_ = bitmapType_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexMeta) {
          return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexMeta)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexMeta other) {
        if (other == greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance()) return this;
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (other.getBaseOffset() != 0L) {
          setBaseOffset(other.getBaseOffset());
        }
        if (other.getInvertedIndexSize() != 0L) {
          setInvertedIndexSize(other.getInvertedIndexSize());
        }
        if (other.getRelativeFstOffset() != 0) {
          setRelativeFstOffset(other.getRelativeFstOffset());
        }
        if (other.getFstSize() != 0) {
          setFstSize(other.getFstSize());
        }
        if (other.getRelativeNullBitmapOffset() != 0) {
          setRelativeNullBitmapOffset(other.getRelativeNullBitmapOffset());
        }
        if (other.getNullBitmapSize() != 0) {
          setNullBitmapSize(other.getNullBitmapSize());
        }
        if (other.hasStats()) {
          mergeStats(other.getStats());
        }
        if (other.bitmapType_ != 0) {
          setBitmapTypeValue(other.getBitmapTypeValue());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        greptime.v1.index.InvertedIndex.InvertedIndexMeta parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexMeta) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object name_ = "";
      /**
       * <pre>
       * Name of the tag associated with the inverted index.
       * </pre>
       *
       * <code>string name = 1;</code>
       * @return The name.
       */
      public java.lang.String getName() {
        java.lang.Object ref = name_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Name of the tag associated with the inverted index.
       * </pre>
       *
       * <code>string name = 1;</code>
       * @return The bytes for name.
       */
      public com.google.protobuf.ByteString
          getNameBytes() {
        java.lang.Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Name of the tag associated with the inverted index.
       * </pre>
       *
       * <code>string name = 1;</code>
       * @param value The name to set.
       * @return This builder for chaining.
       */
      public Builder setName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        name_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Name of the tag associated with the inverted index.
       * </pre>
       *
       * <code>string name = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearName() {
        
        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Name of the tag associated with the inverted index.
       * </pre>
       *
       * <code>string name = 1;</code>
       * @param value The bytes for name to set.
       * @return This builder for chaining.
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        name_ = value;
        onChanged();
        return this;
      }

      private long baseOffset_ ;
      /**
       * <pre>
       * The base byte offset for this tag's inverted index data within the blob.
       * Other offsets in this message are relative to this base offset.
       * </pre>
       *
       * <code>uint64 base_offset = 2;</code>
       * @return The baseOffset.
       */
      @java.lang.Override
      public long getBaseOffset() {
        return baseOffset_;
      }
      /**
       * <pre>
       * The base byte offset for this tag's inverted index data within the blob.
       * Other offsets in this message are relative to this base offset.
       * </pre>
       *
       * <code>uint64 base_offset = 2;</code>
       * @param value The baseOffset to set.
       * @return This builder for chaining.
       */
      public Builder setBaseOffset(long value) {
        
        baseOffset_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The base byte offset for this tag's inverted index data within the blob.
       * Other offsets in this message are relative to this base offset.
       * </pre>
       *
       * <code>uint64 base_offset = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearBaseOffset() {
        
        baseOffset_ = 0L;
        onChanged();
        return this;
      }

      private long invertedIndexSize_ ;
      /**
       * <pre>
       * The total size in bytes of this tag's inverted index data, including bitmaps,
       * FST data.
       * </pre>
       *
       * <code>uint64 inverted_index_size = 3;</code>
       * @return The invertedIndexSize.
       */
      @java.lang.Override
      public long getInvertedIndexSize() {
        return invertedIndexSize_;
      }
      /**
       * <pre>
       * The total size in bytes of this tag's inverted index data, including bitmaps,
       * FST data.
       * </pre>
       *
       * <code>uint64 inverted_index_size = 3;</code>
       * @param value The invertedIndexSize to set.
       * @return This builder for chaining.
       */
      public Builder setInvertedIndexSize(long value) {
        
        invertedIndexSize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The total size in bytes of this tag's inverted index data, including bitmaps,
       * FST data.
       * </pre>
       *
       * <code>uint64 inverted_index_size = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearInvertedIndexSize() {
        
        invertedIndexSize_ = 0L;
        onChanged();
        return this;
      }

      private int relativeFstOffset_ ;
      /**
       * <pre>
       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
       * </pre>
       *
       * <code>uint32 relative_fst_offset = 4;</code>
       * @return The relativeFstOffset.
       */
      @java.lang.Override
      public int getRelativeFstOffset() {
        return relativeFstOffset_;
      }
      /**
       * <pre>
       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
       * </pre>
       *
       * <code>uint32 relative_fst_offset = 4;</code>
       * @param value The relativeFstOffset to set.
       * @return This builder for chaining.
       */
      public Builder setRelativeFstOffset(int value) {
        
        relativeFstOffset_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`.
       * </pre>
       *
       * <code>uint32 relative_fst_offset = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearRelativeFstOffset() {
        
        relativeFstOffset_ = 0;
        onChanged();
        return this;
      }

      private int fstSize_ ;
      /**
       * <pre>
       * The size in bytes of the FST data.
       * </pre>
       *
       * <code>uint32 fst_size = 5;</code>
       * @return The fstSize.
       */
      @java.lang.Override
      public int getFstSize() {
        return fstSize_;
      }
      /**
       * <pre>
       * The size in bytes of the FST data.
       * </pre>
       *
       * <code>uint32 fst_size = 5;</code>
       * @param value The fstSize to set.
       * @return This builder for chaining.
       */
      public Builder setFstSize(int value) {
        
        fstSize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The size in bytes of the FST data.
       * </pre>
       *
       * <code>uint32 fst_size = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearFstSize() {
        
        fstSize_ = 0;
        onChanged();
        return this;
      }

      private int relativeNullBitmapOffset_ ;
      /**
       * <pre>
       * The byte offset relative to the `base_offset` where the null bitmap for this tag
       * starts.
       * </pre>
       *
       * <code>uint32 relative_null_bitmap_offset = 6;</code>
       * @return The relativeNullBitmapOffset.
       */
      @java.lang.Override
      public int getRelativeNullBitmapOffset() {
        return relativeNullBitmapOffset_;
      }
      /**
       * <pre>
       * The byte offset relative to the `base_offset` where the null bitmap for this tag
       * starts.
       * </pre>
       *
       * <code>uint32 relative_null_bitmap_offset = 6;</code>
       * @param value The relativeNullBitmapOffset to set.
       * @return This builder for chaining.
       */
      public Builder setRelativeNullBitmapOffset(int value) {
        
        relativeNullBitmapOffset_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The byte offset relative to the `base_offset` where the null bitmap for this tag
       * starts.
       * </pre>
       *
       * <code>uint32 relative_null_bitmap_offset = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearRelativeNullBitmapOffset() {
        
        relativeNullBitmapOffset_ = 0;
        onChanged();
        return this;
      }

      private int nullBitmapSize_ ;
      /**
       * <pre>
       * The size in bytes of the null bitmap.
       * </pre>
       *
       * <code>uint32 null_bitmap_size = 7;</code>
       * @return The nullBitmapSize.
       */
      @java.lang.Override
      public int getNullBitmapSize() {
        return nullBitmapSize_;
      }
      /**
       * <pre>
       * The size in bytes of the null bitmap.
       * </pre>
       *
       * <code>uint32 null_bitmap_size = 7;</code>
       * @param value The nullBitmapSize to set.
       * @return This builder for chaining.
       */
      public Builder setNullBitmapSize(int value) {
        
        nullBitmapSize_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The size in bytes of the null bitmap.
       * </pre>
       *
       * <code>uint32 null_bitmap_size = 7;</code>
       * @return This builder for chaining.
       */
      public Builder clearNullBitmapSize() {
        
        nullBitmapSize_ = 0;
        onChanged();
        return this;
      }

      private greptime.v1.index.InvertedIndex.InvertedIndexStats stats_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> statsBuilder_;
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       * @return Whether the stats field is set.
       */
      public boolean hasStats() {
        return statsBuilder_ != null || stats_ != null;
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       * @return The stats.
       */
      public greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() {
        if (statsBuilder_ == null) {
          return stats_ == null ? greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_;
        } else {
          return statsBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public Builder setStats(greptime.v1.index.InvertedIndex.InvertedIndexStats value) {
        if (statsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          stats_ = value;
          onChanged();
        } else {
          statsBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public Builder setStats(
          greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder builderForValue) {
        if (statsBuilder_ == null) {
          stats_ = builderForValue.build();
          onChanged();
        } else {
          statsBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public Builder mergeStats(greptime.v1.index.InvertedIndex.InvertedIndexStats value) {
        if (statsBuilder_ == null) {
          if (stats_ != null) {
            stats_ =
              greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder(stats_).mergeFrom(value).buildPartial();
          } else {
            stats_ = value;
          }
          onChanged();
        } else {
          statsBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public Builder clearStats() {
        if (statsBuilder_ == null) {
          stats_ = null;
          onChanged();
        } else {
          stats_ = null;
          statsBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder getStatsBuilder() {
        
        onChanged();
        return getStatsFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      public greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() {
        if (statsBuilder_ != null) {
          return statsBuilder_.getMessageOrBuilder();
        } else {
          return stats_ == null ?
              greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_;
        }
      }
      /**
       * <pre>
       * Statistical information about the tag's inverted index.
       * </pre>
       *
       * <code>.greptime.v1.index.InvertedIndexStats stats = 8;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> 
          getStatsFieldBuilder() {
        if (statsBuilder_ == null) {
          statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.index.InvertedIndex.InvertedIndexStats, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder>(
                  getStats(),
                  getParentForChildren(),
                  isClean());
          stats_ = null;
        }
        return statsBuilder_;
      }

      private int bitmapType_ = 0;
      /**
       * <pre>
       * The type of bitmap used for indexing.
       * </pre>
       *
       * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
       * @return The enum numeric value on the wire for bitmapType.
       */
      @java.lang.Override public int getBitmapTypeValue() {
        return bitmapType_;
      }
      /**
       * <pre>
       * The type of bitmap used for indexing.
       * </pre>
       *
       * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
       * @param value The enum numeric value on the wire for bitmapType to set.
       * @return This builder for chaining.
       */
      public Builder setBitmapTypeValue(int value) {
        
        bitmapType_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The type of bitmap used for indexing.
       * </pre>
       *
       * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
       * @return The bitmapType.
       */
      @java.lang.Override
      public greptime.v1.index.InvertedIndex.BitmapType getBitmapType() {
        @SuppressWarnings("deprecation")
        greptime.v1.index.InvertedIndex.BitmapType result = greptime.v1.index.InvertedIndex.BitmapType.valueOf(bitmapType_);
        return result == null ? greptime.v1.index.InvertedIndex.BitmapType.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * The type of bitmap used for indexing.
       * </pre>
       *
       * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
       * @param value The bitmapType to set.
       * @return This builder for chaining.
       */
      public Builder setBitmapType(greptime.v1.index.InvertedIndex.BitmapType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        bitmapType_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The type of bitmap used for indexing.
       * </pre>
       *
       * <code>.greptime.v1.index.BitmapType bitmap_type = 9;</code>
       * @return This builder for chaining.
       */
      public Builder clearBitmapType() {
        
        bitmapType_ = 0;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexMeta)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMeta)
    private static final greptime.v1.index.InvertedIndex.InvertedIndexMeta DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexMeta();
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<InvertedIndexMeta>
        PARSER = new com.google.protobuf.AbstractParser<InvertedIndexMeta>() {
      @java.lang.Override
      public InvertedIndexMeta parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new InvertedIndexMeta(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<InvertedIndexMeta> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<InvertedIndexMeta> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface InvertedIndexStatsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexStats)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The count of null entries within the tag's column.
     * </pre>
     *
     * <code>uint64 null_count = 1;</code>
     * @return The nullCount.
     */
    long getNullCount();

    /**
     * <pre>
     * The number of distinct values within the tag's column.
     * </pre>
     *
     * <code>uint64 distinct_count = 2;</code>
     * @return The distinctCount.
     */
    long getDistinctCount();

    /**
     * <pre>
     * The minimum value found within the tag's column, encoded as bytes.
     * </pre>
     *
     * <code>bytes min_value = 3;</code>
     * @return The minValue.
     */
    com.google.protobuf.ByteString getMinValue();

    /**
     * <pre>
     * The maximum value found within the tag's column, encoded as bytes.
     * </pre>
     *
     * <code>bytes max_value = 4;</code>
     * @return The maxValue.
     */
    com.google.protobuf.ByteString getMaxValue();
  }
  /**
   * <pre>
   * InvertedIndexStats provides statistical data on a tag's inverted index.
   * </pre>
   *
   * Protobuf type {@code greptime.v1.index.InvertedIndexStats}
   */
  public static final class InvertedIndexStats extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexStats)
      InvertedIndexStatsOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InvertedIndexStats.newBuilder() to construct.
    private InvertedIndexStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InvertedIndexStats() {
      minValue_ = com.google.protobuf.ByteString.EMPTY;
      maxValue_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new InvertedIndexStats();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InvertedIndexStats(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {

              nullCount_ = input.readUInt64();
              break;
            }
            case 16: {

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

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

              maxValue_ = input.readBytes();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.index.InvertedIndex.InvertedIndexStats.class, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class);
    }

    public static final int NULL_COUNT_FIELD_NUMBER = 1;
    private long nullCount_;
    /**
     * <pre>
     * The count of null entries within the tag's column.
     * </pre>
     *
     * <code>uint64 null_count = 1;</code>
     * @return The nullCount.
     */
    @java.lang.Override
    public long getNullCount() {
      return nullCount_;
    }

    public static final int DISTINCT_COUNT_FIELD_NUMBER = 2;
    private long distinctCount_;
    /**
     * <pre>
     * The number of distinct values within the tag's column.
     * </pre>
     *
     * <code>uint64 distinct_count = 2;</code>
     * @return The distinctCount.
     */
    @java.lang.Override
    public long getDistinctCount() {
      return distinctCount_;
    }

    public static final int MIN_VALUE_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString minValue_;
    /**
     * <pre>
     * The minimum value found within the tag's column, encoded as bytes.
     * </pre>
     *
     * <code>bytes min_value = 3;</code>
     * @return The minValue.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getMinValue() {
      return minValue_;
    }

    public static final int MAX_VALUE_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString maxValue_;
    /**
     * <pre>
     * The maximum value found within the tag's column, encoded as bytes.
     * </pre>
     *
     * <code>bytes max_value = 4;</code>
     * @return The maxValue.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getMaxValue() {
      return maxValue_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (nullCount_ != 0L) {
        output.writeUInt64(1, nullCount_);
      }
      if (distinctCount_ != 0L) {
        output.writeUInt64(2, distinctCount_);
      }
      if (!minValue_.isEmpty()) {
        output.writeBytes(3, minValue_);
      }
      if (!maxValue_.isEmpty()) {
        output.writeBytes(4, maxValue_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (nullCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, nullCount_);
      }
      if (distinctCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, distinctCount_);
      }
      if (!minValue_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, minValue_);
      }
      if (!maxValue_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, maxValue_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof greptime.v1.index.InvertedIndex.InvertedIndexStats)) {
        return super.equals(obj);
      }
      greptime.v1.index.InvertedIndex.InvertedIndexStats other = (greptime.v1.index.InvertedIndex.InvertedIndexStats) obj;

      if (getNullCount()
          != other.getNullCount()) return false;
      if (getDistinctCount()
          != other.getDistinctCount()) return false;
      if (!getMinValue()
          .equals(other.getMinValue())) return false;
      if (!getMaxValue()
          .equals(other.getMaxValue())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NULL_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getNullCount());
      hash = (37 * hash) + DISTINCT_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getDistinctCount());
      hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER;
      hash = (53 * hash) + getMinValue().hashCode();
      hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER;
      hash = (53 * hash) + getMaxValue().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(greptime.v1.index.InvertedIndex.InvertedIndexStats prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * InvertedIndexStats provides statistical data on a tag's inverted index.
     * </pre>
     *
     * Protobuf type {@code greptime.v1.index.InvertedIndexStats}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexStats)
        greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.index.InvertedIndex.InvertedIndexStats.class, greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class);
      }

      // Construct using greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        nullCount_ = 0L;

        distinctCount_ = 0L;

        minValue_ = com.google.protobuf.ByteString.EMPTY;

        maxValue_ = com.google.protobuf.ByteString.EMPTY;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() {
        return greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexStats build() {
        greptime.v1.index.InvertedIndex.InvertedIndexStats result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.index.InvertedIndex.InvertedIndexStats buildPartial() {
        greptime.v1.index.InvertedIndex.InvertedIndexStats result = new greptime.v1.index.InvertedIndex.InvertedIndexStats(this);
        result.nullCount_ = nullCount_;
        result.distinctCount_ = distinctCount_;
        result.minValue_ = minValue_;
        result.maxValue_ = maxValue_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof greptime.v1.index.InvertedIndex.InvertedIndexStats) {
          return mergeFrom((greptime.v1.index.InvertedIndex.InvertedIndexStats)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.index.InvertedIndex.InvertedIndexStats other) {
        if (other == greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance()) return this;
        if (other.getNullCount() != 0L) {
          setNullCount(other.getNullCount());
        }
        if (other.getDistinctCount() != 0L) {
          setDistinctCount(other.getDistinctCount());
        }
        if (other.getMinValue() != com.google.protobuf.ByteString.EMPTY) {
          setMinValue(other.getMinValue());
        }
        if (other.getMaxValue() != com.google.protobuf.ByteString.EMPTY) {
          setMaxValue(other.getMaxValue());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        greptime.v1.index.InvertedIndex.InvertedIndexStats parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.index.InvertedIndex.InvertedIndexStats) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private long nullCount_ ;
      /**
       * <pre>
       * The count of null entries within the tag's column.
       * </pre>
       *
       * <code>uint64 null_count = 1;</code>
       * @return The nullCount.
       */
      @java.lang.Override
      public long getNullCount() {
        return nullCount_;
      }
      /**
       * <pre>
       * The count of null entries within the tag's column.
       * </pre>
       *
       * <code>uint64 null_count = 1;</code>
       * @param value The nullCount to set.
       * @return This builder for chaining.
       */
      public Builder setNullCount(long value) {
        
        nullCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The count of null entries within the tag's column.
       * </pre>
       *
       * <code>uint64 null_count = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearNullCount() {
        
        nullCount_ = 0L;
        onChanged();
        return this;
      }

      private long distinctCount_ ;
      /**
       * <pre>
       * The number of distinct values within the tag's column.
       * </pre>
       *
       * <code>uint64 distinct_count = 2;</code>
       * @return The distinctCount.
       */
      @java.lang.Override
      public long getDistinctCount() {
        return distinctCount_;
      }
      /**
       * <pre>
       * The number of distinct values within the tag's column.
       * </pre>
       *
       * <code>uint64 distinct_count = 2;</code>
       * @param value The distinctCount to set.
       * @return This builder for chaining.
       */
      public Builder setDistinctCount(long value) {
        
        distinctCount_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The number of distinct values within the tag's column.
       * </pre>
       *
       * <code>uint64 distinct_count = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearDistinctCount() {
        
        distinctCount_ = 0L;
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString minValue_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * The minimum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes min_value = 3;</code>
       * @return The minValue.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getMinValue() {
        return minValue_;
      }
      /**
       * <pre>
       * The minimum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes min_value = 3;</code>
       * @param value The minValue to set.
       * @return This builder for chaining.
       */
      public Builder setMinValue(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        minValue_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The minimum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes min_value = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearMinValue() {
        
        minValue_ = getDefaultInstance().getMinValue();
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString maxValue_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * The maximum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes max_value = 4;</code>
       * @return The maxValue.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getMaxValue() {
        return maxValue_;
      }
      /**
       * <pre>
       * The maximum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes max_value = 4;</code>
       * @param value The maxValue to set.
       * @return This builder for chaining.
       */
      public Builder setMaxValue(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        maxValue_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The maximum value found within the tag's column, encoded as bytes.
       * </pre>
       *
       * <code>bytes max_value = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearMaxValue() {
        
        maxValue_ = getDefaultInstance().getMaxValue();
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexStats)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexStats)
    private static final greptime.v1.index.InvertedIndex.InvertedIndexStats DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.index.InvertedIndex.InvertedIndexStats();
    }

    public static greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<InvertedIndexStats>
        PARSER = new com.google.protobuf.AbstractParser<InvertedIndexStats>() {
      @java.lang.Override
      public InvertedIndexStats parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new InvertedIndexStats(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<InvertedIndexStats> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<InvertedIndexStats> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_index_InvertedIndexMetas_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_index_InvertedIndexMeta_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_index_InvertedIndexStats_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n&greptime/v1/index/inverted_index.proto" +
      "\022\021greptime.v1.index\"\335\001\n\022InvertedIndexMet" +
      "as\022?\n\005metas\030\001 \003(\01320.greptime.v1.index.In" +
      "vertedIndexMetas.MetasEntry\022\027\n\017total_row" +
      "_count\030\002 \001(\004\022\031\n\021segment_row_count\030\003 \001(\004\032" +
      "R\n\nMetasEntry\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001(" +
      "\0132$.greptime.v1.index.InvertedIndexMeta:" +
      "\0028\001\"\253\002\n\021InvertedIndexMeta\022\014\n\004name\030\001 \001(\t\022" +
      "\023\n\013base_offset\030\002 \001(\004\022\033\n\023inverted_index_s" +
      "ize\030\003 \001(\004\022\033\n\023relative_fst_offset\030\004 \001(\r\022\020" +
      "\n\010fst_size\030\005 \001(\r\022#\n\033relative_null_bitmap" +
      "_offset\030\006 \001(\r\022\030\n\020null_bitmap_size\030\007 \001(\r\022" +
      "4\n\005stats\030\010 \001(\0132%.greptime.v1.index.Inver" +
      "tedIndexStats\0222\n\013bitmap_type\030\t \001(\0162\035.gre" +
      "ptime.v1.index.BitmapType\"f\n\022InvertedInd" +
      "exStats\022\022\n\nnull_count\030\001 \001(\004\022\026\n\016distinct_" +
      "count\030\002 \001(\004\022\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_va" +
      "lue\030\004 \001(\014*%\n\nBitmapType\022\n\n\006BitVec\020\000\022\013\n\007R" +
      "oaring\020\001B=Z;github.com/GreptimeTeam/grep" +
      "time-proto/go/greptime/v1/indexb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_greptime_v1_index_InvertedIndexMetas_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_greptime_v1_index_InvertedIndexMetas_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_index_InvertedIndexMetas_descriptor,
        new java.lang.String[] { "Metas", "TotalRowCount", "SegmentRowCount", });
    internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor =
      internal_static_greptime_v1_index_InvertedIndexMetas_descriptor.getNestedTypes().get(0);
    internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_index_InvertedIndexMetas_MetasEntry_descriptor,
        new java.lang.String[] { "Key", "Value", });
    internal_static_greptime_v1_index_InvertedIndexMeta_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_index_InvertedIndexMeta_descriptor,
        new java.lang.String[] { "Name", "BaseOffset", "InvertedIndexSize", "RelativeFstOffset", "FstSize", "RelativeNullBitmapOffset", "NullBitmapSize", "Stats", "BitmapType", });
    internal_static_greptime_v1_index_InvertedIndexStats_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_index_InvertedIndexStats_descriptor,
        new java.lang.String[] { "NullCount", "DistinctCount", "MinValue", "MaxValue", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
