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

package greptime.v1.meta;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * Protobuf enum {@code greptime.v1.meta.RegionRole}
   */
  public enum RegionRole
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <pre>
     * Writable region(mito2), Readonly region(file).
     * </pre>
     *
     * <code>Leader = 0;</code>
     */
    Leader(0),
    /**
     * <pre>
     * Readonly region.
     * </pre>
     *
     * <code>Follower = 1;</code>
     */
    Follower(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <pre>
     * Writable region(mito2), Readonly region(file).
     * </pre>
     *
     * <code>Leader = 0;</code>
     */
    public static final int Leader_VALUE = 0;
    /**
     * <pre>
     * Readonly region.
     * </pre>
     *
     * <code>Follower = 1;</code>
     */
    public static final int Follower_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 RegionRole 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 RegionRole forNumber(int value) {
      switch (value) {
        case 0: return Leader;
        case 1: return Follower;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<RegionRole>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        RegionRole> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<RegionRole>() {
            public RegionRole findValueByNumber(int number) {
              return RegionRole.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.meta.HeartbeatOuterClass.getDescriptor().getEnumTypes().get(0);
    }

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

    public static RegionRole 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 RegionRole(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:greptime.v1.meta.RegionRole)
  }

  public interface HeartbeatRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.HeartbeatRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return The header.
     */
    greptime.v1.meta.Common.RequestHeader getHeader();
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     */
    greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     * @return Whether the peer field is set.
     */
    boolean hasPeer();
    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     * @return The peer.
     */
    greptime.v1.meta.Common.Peer getPeer();
    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     */
    greptime.v1.meta.Common.PeerOrBuilder getPeerOrBuilder();

    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     * @return Whether the reportInterval field is set.
     */
    boolean hasReportInterval();
    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     * @return The reportInterval.
     */
    greptime.v1.meta.Common.TimeInterval getReportInterval();
    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     */
    greptime.v1.meta.Common.TimeIntervalOrBuilder getReportIntervalOrBuilder();

    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat> 
        getRegionStatsList();
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionStat getRegionStats(int index);
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    int getRegionStatsCount();
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder> 
        getRegionStatsOrBuilderList();
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder getRegionStatsOrBuilder(
        int index);

    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     * @return Whether the mailboxMessage field is set.
     */
    boolean hasMailboxMessage();
    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     * @return The mailboxMessage.
     */
    greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage();
    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder();

    /**
     * <pre>
     * The duration since the heartbeat task's epoch in milliseconds.
     * </pre>
     *
     * <code>uint64 duration_since_epoch = 6;</code>
     * @return The durationSinceEpoch.
     */
    long getDurationSinceEpoch();

    /**
     * <pre>
     * The node's epoch
     * </pre>
     *
     * <code>uint64 node_epoch = 7;</code>
     * @return The nodeEpoch.
     */
    long getNodeEpoch();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.HeartbeatRequest}
   */
  public static final class HeartbeatRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.HeartbeatRequest)
      HeartbeatRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HeartbeatRequest.newBuilder() to construct.
    private HeartbeatRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HeartbeatRequest() {
      regionStats_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HeartbeatRequest(
        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: {
              greptime.v1.meta.Common.RequestHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(greptime.v1.meta.Common.RequestHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {
              greptime.v1.meta.Common.Peer.Builder subBuilder = null;
              if (peer_ != null) {
                subBuilder = peer_.toBuilder();
              }
              peer_ = input.readMessage(greptime.v1.meta.Common.Peer.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(peer_);
                peer_ = subBuilder.buildPartial();
              }

              break;
            }
            case 26: {
              greptime.v1.meta.Common.TimeInterval.Builder subBuilder = null;
              if (reportInterval_ != null) {
                subBuilder = reportInterval_.toBuilder();
              }
              reportInterval_ = input.readMessage(greptime.v1.meta.Common.TimeInterval.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(reportInterval_);
                reportInterval_ = subBuilder.buildPartial();
              }

              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                regionStats_ = new java.util.ArrayList<greptime.v1.meta.HeartbeatOuterClass.RegionStat>();
                mutable_bitField0_ |= 0x00000001;
              }
              regionStats_.add(
                  input.readMessage(greptime.v1.meta.HeartbeatOuterClass.RegionStat.parser(), extensionRegistry));
              break;
            }
            case 42: {
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder subBuilder = null;
              if (mailboxMessage_ != null) {
                subBuilder = mailboxMessage_.toBuilder();
              }
              mailboxMessage_ = input.readMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(mailboxMessage_);
                mailboxMessage_ = subBuilder.buildPartial();
              }

              break;
            }
            case 48: {

              durationSinceEpoch_ = input.readUInt64();
              break;
            }
            case 56: {

              nodeEpoch_ = 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 {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          regionStats_ = java.util.Collections.unmodifiableList(regionStats_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.class, greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private greptime.v1.meta.Common.RequestHeader header_;
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return The header.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.RequestHeader getHeader() {
      return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int PEER_FIELD_NUMBER = 2;
    private greptime.v1.meta.Common.Peer peer_;
    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     * @return Whether the peer field is set.
     */
    @java.lang.Override
    public boolean hasPeer() {
      return peer_ != null;
    }
    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     * @return The peer.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.Peer getPeer() {
      return peer_ == null ? greptime.v1.meta.Common.Peer.getDefaultInstance() : peer_;
    }
    /**
     * <pre>
     * Self peer
     * </pre>
     *
     * <code>.greptime.v1.meta.Peer peer = 2;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.PeerOrBuilder getPeerOrBuilder() {
      return getPeer();
    }

    public static final int REPORT_INTERVAL_FIELD_NUMBER = 3;
    private greptime.v1.meta.Common.TimeInterval reportInterval_;
    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     * @return Whether the reportInterval field is set.
     */
    @java.lang.Override
    public boolean hasReportInterval() {
      return reportInterval_ != null;
    }
    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     * @return The reportInterval.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.TimeInterval getReportInterval() {
      return reportInterval_ == null ? greptime.v1.meta.Common.TimeInterval.getDefaultInstance() : reportInterval_;
    }
    /**
     * <pre>
     * Actually reported time interval
     * </pre>
     *
     * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.TimeIntervalOrBuilder getReportIntervalOrBuilder() {
      return getReportInterval();
    }

    public static final int REGION_STATS_FIELD_NUMBER = 4;
    private java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat> regionStats_;
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    @java.lang.Override
    public java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat> getRegionStatsList() {
      return regionStats_;
    }
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    @java.lang.Override
    public java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder> 
        getRegionStatsOrBuilderList() {
      return regionStats_;
    }
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    @java.lang.Override
    public int getRegionStatsCount() {
      return regionStats_.size();
    }
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionStat getRegionStats(int index) {
      return regionStats_.get(index);
    }
    /**
     * <pre>
     * Region stats on this node
     * </pre>
     *
     * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder getRegionStatsOrBuilder(
        int index) {
      return regionStats_.get(index);
    }

    public static final int MAILBOX_MESSAGE_FIELD_NUMBER = 5;
    private greptime.v1.meta.HeartbeatOuterClass.MailboxMessage mailboxMessage_;
    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     * @return Whether the mailboxMessage field is set.
     */
    @java.lang.Override
    public boolean hasMailboxMessage() {
      return mailboxMessage_ != null;
    }
    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     * @return The mailboxMessage.
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage() {
      return mailboxMessage_ == null ? greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
    }
    /**
     * <pre>
     * Mailbox send message to Metasrv
     * </pre>
     *
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder() {
      return getMailboxMessage();
    }

    public static final int DURATION_SINCE_EPOCH_FIELD_NUMBER = 6;
    private long durationSinceEpoch_;
    /**
     * <pre>
     * The duration since the heartbeat task's epoch in milliseconds.
     * </pre>
     *
     * <code>uint64 duration_since_epoch = 6;</code>
     * @return The durationSinceEpoch.
     */
    @java.lang.Override
    public long getDurationSinceEpoch() {
      return durationSinceEpoch_;
    }

    public static final int NODE_EPOCH_FIELD_NUMBER = 7;
    private long nodeEpoch_;
    /**
     * <pre>
     * The node's epoch
     * </pre>
     *
     * <code>uint64 node_epoch = 7;</code>
     * @return The nodeEpoch.
     */
    @java.lang.Override
    public long getNodeEpoch() {
      return nodeEpoch_;
    }

    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 (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      if (peer_ != null) {
        output.writeMessage(2, getPeer());
      }
      if (reportInterval_ != null) {
        output.writeMessage(3, getReportInterval());
      }
      for (int i = 0; i < regionStats_.size(); i++) {
        output.writeMessage(4, regionStats_.get(i));
      }
      if (mailboxMessage_ != null) {
        output.writeMessage(5, getMailboxMessage());
      }
      if (durationSinceEpoch_ != 0L) {
        output.writeUInt64(6, durationSinceEpoch_);
      }
      if (nodeEpoch_ != 0L) {
        output.writeUInt64(7, nodeEpoch_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      if (peer_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getPeer());
      }
      if (reportInterval_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getReportInterval());
      }
      for (int i = 0; i < regionStats_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, regionStats_.get(i));
      }
      if (mailboxMessage_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getMailboxMessage());
      }
      if (durationSinceEpoch_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(6, durationSinceEpoch_);
      }
      if (nodeEpoch_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(7, nodeEpoch_);
      }
      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.meta.HeartbeatOuterClass.HeartbeatRequest)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest other = (greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (hasPeer() != other.hasPeer()) return false;
      if (hasPeer()) {
        if (!getPeer()
            .equals(other.getPeer())) return false;
      }
      if (hasReportInterval() != other.hasReportInterval()) return false;
      if (hasReportInterval()) {
        if (!getReportInterval()
            .equals(other.getReportInterval())) return false;
      }
      if (!getRegionStatsList()
          .equals(other.getRegionStatsList())) return false;
      if (hasMailboxMessage() != other.hasMailboxMessage()) return false;
      if (hasMailboxMessage()) {
        if (!getMailboxMessage()
            .equals(other.getMailboxMessage())) return false;
      }
      if (getDurationSinceEpoch()
          != other.getDurationSinceEpoch()) return false;
      if (getNodeEpoch()
          != other.getNodeEpoch()) 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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      if (hasPeer()) {
        hash = (37 * hash) + PEER_FIELD_NUMBER;
        hash = (53 * hash) + getPeer().hashCode();
      }
      if (hasReportInterval()) {
        hash = (37 * hash) + REPORT_INTERVAL_FIELD_NUMBER;
        hash = (53 * hash) + getReportInterval().hashCode();
      }
      if (getRegionStatsCount() > 0) {
        hash = (37 * hash) + REGION_STATS_FIELD_NUMBER;
        hash = (53 * hash) + getRegionStatsList().hashCode();
      }
      if (hasMailboxMessage()) {
        hash = (37 * hash) + MAILBOX_MESSAGE_FIELD_NUMBER;
        hash = (53 * hash) + getMailboxMessage().hashCode();
      }
      hash = (37 * hash) + DURATION_SINCE_EPOCH_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getDurationSinceEpoch());
      hash = (37 * hash) + NODE_EPOCH_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getNodeEpoch());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest 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.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest 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.meta.HeartbeatOuterClass.HeartbeatRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest 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.meta.HeartbeatOuterClass.HeartbeatRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest 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.meta.HeartbeatOuterClass.HeartbeatRequest 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.HeartbeatRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.HeartbeatRequest)
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.class, greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getRegionStatsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        if (peerBuilder_ == null) {
          peer_ = null;
        } else {
          peer_ = null;
          peerBuilder_ = null;
        }
        if (reportIntervalBuilder_ == null) {
          reportInterval_ = null;
        } else {
          reportInterval_ = null;
          reportIntervalBuilder_ = null;
        }
        if (regionStatsBuilder_ == null) {
          regionStats_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          regionStatsBuilder_.clear();
        }
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = null;
        } else {
          mailboxMessage_ = null;
          mailboxMessageBuilder_ = null;
        }
        durationSinceEpoch_ = 0L;

        nodeEpoch_ = 0L;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatRequest_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest build() {
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest result = new greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest(this);
        int from_bitField0_ = bitField0_;
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (peerBuilder_ == null) {
          result.peer_ = peer_;
        } else {
          result.peer_ = peerBuilder_.build();
        }
        if (reportIntervalBuilder_ == null) {
          result.reportInterval_ = reportInterval_;
        } else {
          result.reportInterval_ = reportIntervalBuilder_.build();
        }
        if (regionStatsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            regionStats_ = java.util.Collections.unmodifiableList(regionStats_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.regionStats_ = regionStats_;
        } else {
          result.regionStats_ = regionStatsBuilder_.build();
        }
        if (mailboxMessageBuilder_ == null) {
          result.mailboxMessage_ = mailboxMessage_;
        } else {
          result.mailboxMessage_ = mailboxMessageBuilder_.build();
        }
        result.durationSinceEpoch_ = durationSinceEpoch_;
        result.nodeEpoch_ = nodeEpoch_;
        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.meta.HeartbeatOuterClass.HeartbeatRequest) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasPeer()) {
          mergePeer(other.getPeer());
        }
        if (other.hasReportInterval()) {
          mergeReportInterval(other.getReportInterval());
        }
        if (regionStatsBuilder_ == null) {
          if (!other.regionStats_.isEmpty()) {
            if (regionStats_.isEmpty()) {
              regionStats_ = other.regionStats_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureRegionStatsIsMutable();
              regionStats_.addAll(other.regionStats_);
            }
            onChanged();
          }
        } else {
          if (!other.regionStats_.isEmpty()) {
            if (regionStatsBuilder_.isEmpty()) {
              regionStatsBuilder_.dispose();
              regionStatsBuilder_ = null;
              regionStats_ = other.regionStats_;
              bitField0_ = (bitField0_ & ~0x00000001);
              regionStatsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getRegionStatsFieldBuilder() : null;
            } else {
              regionStatsBuilder_.addAllMessages(other.regionStats_);
            }
          }
        }
        if (other.hasMailboxMessage()) {
          mergeMailboxMessage(other.getMailboxMessage());
        }
        if (other.getDurationSinceEpoch() != 0L) {
          setDurationSinceEpoch(other.getDurationSinceEpoch());
        }
        if (other.getNodeEpoch() != 0L) {
          setNodeEpoch(other.getNodeEpoch());
        }
        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.meta.HeartbeatOuterClass.HeartbeatRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private greptime.v1.meta.Common.RequestHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       * @return The header.
       */
      public greptime.v1.meta.Common.RequestHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder setHeader(greptime.v1.meta.Common.RequestHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder setHeader(
          greptime.v1.meta.Common.RequestHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder mergeHeader(greptime.v1.meta.Common.RequestHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              greptime.v1.meta.Common.RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.RequestHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private greptime.v1.meta.Common.Peer peer_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> peerBuilder_;
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       * @return Whether the peer field is set.
       */
      public boolean hasPeer() {
        return peerBuilder_ != null || peer_ != null;
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       * @return The peer.
       */
      public greptime.v1.meta.Common.Peer getPeer() {
        if (peerBuilder_ == null) {
          return peer_ == null ? greptime.v1.meta.Common.Peer.getDefaultInstance() : peer_;
        } else {
          return peerBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public Builder setPeer(greptime.v1.meta.Common.Peer value) {
        if (peerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          peer_ = value;
          onChanged();
        } else {
          peerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public Builder setPeer(
          greptime.v1.meta.Common.Peer.Builder builderForValue) {
        if (peerBuilder_ == null) {
          peer_ = builderForValue.build();
          onChanged();
        } else {
          peerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public Builder mergePeer(greptime.v1.meta.Common.Peer value) {
        if (peerBuilder_ == null) {
          if (peer_ != null) {
            peer_ =
              greptime.v1.meta.Common.Peer.newBuilder(peer_).mergeFrom(value).buildPartial();
          } else {
            peer_ = value;
          }
          onChanged();
        } else {
          peerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public Builder clearPeer() {
        if (peerBuilder_ == null) {
          peer_ = null;
          onChanged();
        } else {
          peer_ = null;
          peerBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public greptime.v1.meta.Common.Peer.Builder getPeerBuilder() {
        
        onChanged();
        return getPeerFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      public greptime.v1.meta.Common.PeerOrBuilder getPeerOrBuilder() {
        if (peerBuilder_ != null) {
          return peerBuilder_.getMessageOrBuilder();
        } else {
          return peer_ == null ?
              greptime.v1.meta.Common.Peer.getDefaultInstance() : peer_;
        }
      }
      /**
       * <pre>
       * Self peer
       * </pre>
       *
       * <code>.greptime.v1.meta.Peer peer = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> 
          getPeerFieldBuilder() {
        if (peerBuilder_ == null) {
          peerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder>(
                  getPeer(),
                  getParentForChildren(),
                  isClean());
          peer_ = null;
        }
        return peerBuilder_;
      }

      private greptime.v1.meta.Common.TimeInterval reportInterval_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.TimeInterval, greptime.v1.meta.Common.TimeInterval.Builder, greptime.v1.meta.Common.TimeIntervalOrBuilder> reportIntervalBuilder_;
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       * @return Whether the reportInterval field is set.
       */
      public boolean hasReportInterval() {
        return reportIntervalBuilder_ != null || reportInterval_ != null;
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       * @return The reportInterval.
       */
      public greptime.v1.meta.Common.TimeInterval getReportInterval() {
        if (reportIntervalBuilder_ == null) {
          return reportInterval_ == null ? greptime.v1.meta.Common.TimeInterval.getDefaultInstance() : reportInterval_;
        } else {
          return reportIntervalBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public Builder setReportInterval(greptime.v1.meta.Common.TimeInterval value) {
        if (reportIntervalBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          reportInterval_ = value;
          onChanged();
        } else {
          reportIntervalBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public Builder setReportInterval(
          greptime.v1.meta.Common.TimeInterval.Builder builderForValue) {
        if (reportIntervalBuilder_ == null) {
          reportInterval_ = builderForValue.build();
          onChanged();
        } else {
          reportIntervalBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public Builder mergeReportInterval(greptime.v1.meta.Common.TimeInterval value) {
        if (reportIntervalBuilder_ == null) {
          if (reportInterval_ != null) {
            reportInterval_ =
              greptime.v1.meta.Common.TimeInterval.newBuilder(reportInterval_).mergeFrom(value).buildPartial();
          } else {
            reportInterval_ = value;
          }
          onChanged();
        } else {
          reportIntervalBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public Builder clearReportInterval() {
        if (reportIntervalBuilder_ == null) {
          reportInterval_ = null;
          onChanged();
        } else {
          reportInterval_ = null;
          reportIntervalBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public greptime.v1.meta.Common.TimeInterval.Builder getReportIntervalBuilder() {
        
        onChanged();
        return getReportIntervalFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      public greptime.v1.meta.Common.TimeIntervalOrBuilder getReportIntervalOrBuilder() {
        if (reportIntervalBuilder_ != null) {
          return reportIntervalBuilder_.getMessageOrBuilder();
        } else {
          return reportInterval_ == null ?
              greptime.v1.meta.Common.TimeInterval.getDefaultInstance() : reportInterval_;
        }
      }
      /**
       * <pre>
       * Actually reported time interval
       * </pre>
       *
       * <code>.greptime.v1.meta.TimeInterval report_interval = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.TimeInterval, greptime.v1.meta.Common.TimeInterval.Builder, greptime.v1.meta.Common.TimeIntervalOrBuilder> 
          getReportIntervalFieldBuilder() {
        if (reportIntervalBuilder_ == null) {
          reportIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.TimeInterval, greptime.v1.meta.Common.TimeInterval.Builder, greptime.v1.meta.Common.TimeIntervalOrBuilder>(
                  getReportInterval(),
                  getParentForChildren(),
                  isClean());
          reportInterval_ = null;
        }
        return reportIntervalBuilder_;
      }

      private java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat> regionStats_ =
        java.util.Collections.emptyList();
      private void ensureRegionStatsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          regionStats_ = new java.util.ArrayList<greptime.v1.meta.HeartbeatOuterClass.RegionStat>(regionStats_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.RegionStat, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder> regionStatsBuilder_;

      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat> getRegionStatsList() {
        if (regionStatsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(regionStats_);
        } else {
          return regionStatsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public int getRegionStatsCount() {
        if (regionStatsBuilder_ == null) {
          return regionStats_.size();
        } else {
          return regionStatsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat getRegionStats(int index) {
        if (regionStatsBuilder_ == null) {
          return regionStats_.get(index);
        } else {
          return regionStatsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder setRegionStats(
          int index, greptime.v1.meta.HeartbeatOuterClass.RegionStat value) {
        if (regionStatsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionStatsIsMutable();
          regionStats_.set(index, value);
          onChanged();
        } else {
          regionStatsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder setRegionStats(
          int index, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder builderForValue) {
        if (regionStatsBuilder_ == null) {
          ensureRegionStatsIsMutable();
          regionStats_.set(index, builderForValue.build());
          onChanged();
        } else {
          regionStatsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder addRegionStats(greptime.v1.meta.HeartbeatOuterClass.RegionStat value) {
        if (regionStatsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionStatsIsMutable();
          regionStats_.add(value);
          onChanged();
        } else {
          regionStatsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder addRegionStats(
          int index, greptime.v1.meta.HeartbeatOuterClass.RegionStat value) {
        if (regionStatsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionStatsIsMutable();
          regionStats_.add(index, value);
          onChanged();
        } else {
          regionStatsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder addRegionStats(
          greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder builderForValue) {
        if (regionStatsBuilder_ == null) {
          ensureRegionStatsIsMutable();
          regionStats_.add(builderForValue.build());
          onChanged();
        } else {
          regionStatsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder addRegionStats(
          int index, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder builderForValue) {
        if (regionStatsBuilder_ == null) {
          ensureRegionStatsIsMutable();
          regionStats_.add(index, builderForValue.build());
          onChanged();
        } else {
          regionStatsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder addAllRegionStats(
          java.lang.Iterable<? extends greptime.v1.meta.HeartbeatOuterClass.RegionStat> values) {
        if (regionStatsBuilder_ == null) {
          ensureRegionStatsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, regionStats_);
          onChanged();
        } else {
          regionStatsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder clearRegionStats() {
        if (regionStatsBuilder_ == null) {
          regionStats_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          regionStatsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public Builder removeRegionStats(int index) {
        if (regionStatsBuilder_ == null) {
          ensureRegionStatsIsMutable();
          regionStats_.remove(index);
          onChanged();
        } else {
          regionStatsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder getRegionStatsBuilder(
          int index) {
        return getRegionStatsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder getRegionStatsOrBuilder(
          int index) {
        if (regionStatsBuilder_ == null) {
          return regionStats_.get(index);  } else {
          return regionStatsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder> 
           getRegionStatsOrBuilderList() {
        if (regionStatsBuilder_ != null) {
          return regionStatsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(regionStats_);
        }
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder addRegionStatsBuilder() {
        return getRegionStatsFieldBuilder().addBuilder(
            greptime.v1.meta.HeartbeatOuterClass.RegionStat.getDefaultInstance());
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder addRegionStatsBuilder(
          int index) {
        return getRegionStatsFieldBuilder().addBuilder(
            index, greptime.v1.meta.HeartbeatOuterClass.RegionStat.getDefaultInstance());
      }
      /**
       * <pre>
       * Region stats on this node
       * </pre>
       *
       * <code>repeated .greptime.v1.meta.RegionStat region_stats = 4;</code>
       */
      public java.util.List<greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder> 
           getRegionStatsBuilderList() {
        return getRegionStatsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.RegionStat, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder> 
          getRegionStatsFieldBuilder() {
        if (regionStatsBuilder_ == null) {
          regionStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              greptime.v1.meta.HeartbeatOuterClass.RegionStat, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder>(
                  regionStats_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          regionStats_ = null;
        }
        return regionStatsBuilder_;
      }

      private greptime.v1.meta.HeartbeatOuterClass.MailboxMessage mailboxMessage_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder> mailboxMessageBuilder_;
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       * @return Whether the mailboxMessage field is set.
       */
      public boolean hasMailboxMessage() {
        return mailboxMessageBuilder_ != null || mailboxMessage_ != null;
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       * @return The mailboxMessage.
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage() {
        if (mailboxMessageBuilder_ == null) {
          return mailboxMessage_ == null ? greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
        } else {
          return mailboxMessageBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public Builder setMailboxMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage value) {
        if (mailboxMessageBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          mailboxMessage_ = value;
          onChanged();
        } else {
          mailboxMessageBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public Builder setMailboxMessage(
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder builderForValue) {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = builderForValue.build();
          onChanged();
        } else {
          mailboxMessageBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public Builder mergeMailboxMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage value) {
        if (mailboxMessageBuilder_ == null) {
          if (mailboxMessage_ != null) {
            mailboxMessage_ =
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.newBuilder(mailboxMessage_).mergeFrom(value).buildPartial();
          } else {
            mailboxMessage_ = value;
          }
          onChanged();
        } else {
          mailboxMessageBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public Builder clearMailboxMessage() {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = null;
          onChanged();
        } else {
          mailboxMessage_ = null;
          mailboxMessageBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder getMailboxMessageBuilder() {
        
        onChanged();
        return getMailboxMessageFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder() {
        if (mailboxMessageBuilder_ != null) {
          return mailboxMessageBuilder_.getMessageOrBuilder();
        } else {
          return mailboxMessage_ == null ?
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
        }
      }
      /**
       * <pre>
       * Mailbox send message to Metasrv
       * </pre>
       *
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 5;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder> 
          getMailboxMessageFieldBuilder() {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder>(
                  getMailboxMessage(),
                  getParentForChildren(),
                  isClean());
          mailboxMessage_ = null;
        }
        return mailboxMessageBuilder_;
      }

      private long durationSinceEpoch_ ;
      /**
       * <pre>
       * The duration since the heartbeat task's epoch in milliseconds.
       * </pre>
       *
       * <code>uint64 duration_since_epoch = 6;</code>
       * @return The durationSinceEpoch.
       */
      @java.lang.Override
      public long getDurationSinceEpoch() {
        return durationSinceEpoch_;
      }
      /**
       * <pre>
       * The duration since the heartbeat task's epoch in milliseconds.
       * </pre>
       *
       * <code>uint64 duration_since_epoch = 6;</code>
       * @param value The durationSinceEpoch to set.
       * @return This builder for chaining.
       */
      public Builder setDurationSinceEpoch(long value) {
        
        durationSinceEpoch_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The duration since the heartbeat task's epoch in milliseconds.
       * </pre>
       *
       * <code>uint64 duration_since_epoch = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearDurationSinceEpoch() {
        
        durationSinceEpoch_ = 0L;
        onChanged();
        return this;
      }

      private long nodeEpoch_ ;
      /**
       * <pre>
       * The node's epoch
       * </pre>
       *
       * <code>uint64 node_epoch = 7;</code>
       * @return The nodeEpoch.
       */
      @java.lang.Override
      public long getNodeEpoch() {
        return nodeEpoch_;
      }
      /**
       * <pre>
       * The node's epoch
       * </pre>
       *
       * <code>uint64 node_epoch = 7;</code>
       * @param value The nodeEpoch to set.
       * @return This builder for chaining.
       */
      public Builder setNodeEpoch(long value) {
        
        nodeEpoch_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The node's epoch
       * </pre>
       *
       * <code>uint64 node_epoch = 7;</code>
       * @return This builder for chaining.
       */
      public Builder clearNodeEpoch() {
        
        nodeEpoch_ = 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.meta.HeartbeatRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.HeartbeatRequest)
    private static final greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.HeartbeatRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface RegionStatOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.RegionStat)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    long getRegionId();

    /**
     * <pre>
     * The read capacity units during this period
     * </pre>
     *
     * <code>int64 rcus = 2;</code>
     * @return The rcus.
     */
    long getRcus();

    /**
     * <pre>
     * The write capacity units during this period
     * </pre>
     *
     * <code>int64 wcus = 3;</code>
     * @return The wcus.
     */
    long getWcus();

    /**
     * <pre>
     * Approximate bytes of this region
     * </pre>
     *
     * <code>int64 approximate_bytes = 4;</code>
     * @return The approximateBytes.
     */
    long getApproximateBytes();

    /**
     * <pre>
     * Approximate number of rows in this region
     * </pre>
     *
     * <code>int64 approximate_rows = 5;</code>
     * @return The approximateRows.
     */
    long getApproximateRows();

    /**
     * <pre>
     * Engine name
     * </pre>
     *
     * <code>string engine = 6;</code>
     * @return The engine.
     */
    java.lang.String getEngine();
    /**
     * <pre>
     * Engine name
     * </pre>
     *
     * <code>string engine = 6;</code>
     * @return The bytes for engine.
     */
    com.google.protobuf.ByteString
        getEngineBytes();

    /**
     * <pre>
     * Region role
     * </pre>
     *
     * <code>.greptime.v1.meta.RegionRole role = 7;</code>
     * @return The enum numeric value on the wire for role.
     */
    int getRoleValue();
    /**
     * <pre>
     * Region role
     * </pre>
     *
     * <code>.greptime.v1.meta.RegionRole role = 7;</code>
     * @return The role.
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.RegionStat}
   */
  public static final class RegionStat extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.RegionStat)
      RegionStatOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use RegionStat.newBuilder() to construct.
    private RegionStat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private RegionStat() {
      engine_ = "";
      role_ = 0;
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private RegionStat(
        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: {

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

              rcus_ = input.readInt64();
              break;
            }
            case 24: {

              wcus_ = input.readInt64();
              break;
            }
            case 32: {

              approximateBytes_ = input.readInt64();
              break;
            }
            case 40: {

              approximateRows_ = input.readInt64();
              break;
            }
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();

              engine_ = s;
              break;
            }
            case 56: {
              int rawValue = input.readEnum();

              role_ = 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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.RegionStat.class, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder.class);
    }

    public static final int REGION_ID_FIELD_NUMBER = 1;
    private long regionId_;
    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    @java.lang.Override
    public long getRegionId() {
      return regionId_;
    }

    public static final int RCUS_FIELD_NUMBER = 2;
    private long rcus_;
    /**
     * <pre>
     * The read capacity units during this period
     * </pre>
     *
     * <code>int64 rcus = 2;</code>
     * @return The rcus.
     */
    @java.lang.Override
    public long getRcus() {
      return rcus_;
    }

    public static final int WCUS_FIELD_NUMBER = 3;
    private long wcus_;
    /**
     * <pre>
     * The write capacity units during this period
     * </pre>
     *
     * <code>int64 wcus = 3;</code>
     * @return The wcus.
     */
    @java.lang.Override
    public long getWcus() {
      return wcus_;
    }

    public static final int APPROXIMATE_BYTES_FIELD_NUMBER = 4;
    private long approximateBytes_;
    /**
     * <pre>
     * Approximate bytes of this region
     * </pre>
     *
     * <code>int64 approximate_bytes = 4;</code>
     * @return The approximateBytes.
     */
    @java.lang.Override
    public long getApproximateBytes() {
      return approximateBytes_;
    }

    public static final int APPROXIMATE_ROWS_FIELD_NUMBER = 5;
    private long approximateRows_;
    /**
     * <pre>
     * Approximate number of rows in this region
     * </pre>
     *
     * <code>int64 approximate_rows = 5;</code>
     * @return The approximateRows.
     */
    @java.lang.Override
    public long getApproximateRows() {
      return approximateRows_;
    }

    public static final int ENGINE_FIELD_NUMBER = 6;
    private volatile java.lang.Object engine_;
    /**
     * <pre>
     * Engine name
     * </pre>
     *
     * <code>string engine = 6;</code>
     * @return The engine.
     */
    @java.lang.Override
    public java.lang.String getEngine() {
      java.lang.Object ref = engine_;
      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();
        engine_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Engine name
     * </pre>
     *
     * <code>string engine = 6;</code>
     * @return The bytes for engine.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getEngineBytes() {
      java.lang.Object ref = engine_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        engine_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ROLE_FIELD_NUMBER = 7;
    private int role_;
    /**
     * <pre>
     * Region role
     * </pre>
     *
     * <code>.greptime.v1.meta.RegionRole role = 7;</code>
     * @return The enum numeric value on the wire for role.
     */
    @java.lang.Override public int getRoleValue() {
      return role_;
    }
    /**
     * <pre>
     * Region role
     * </pre>
     *
     * <code>.greptime.v1.meta.RegionRole role = 7;</code>
     * @return The role.
     */
    @java.lang.Override public greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole() {
      @SuppressWarnings("deprecation")
      greptime.v1.meta.HeartbeatOuterClass.RegionRole result = greptime.v1.meta.HeartbeatOuterClass.RegionRole.valueOf(role_);
      return result == null ? greptime.v1.meta.HeartbeatOuterClass.RegionRole.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 (regionId_ != 0L) {
        output.writeUInt64(1, regionId_);
      }
      if (rcus_ != 0L) {
        output.writeInt64(2, rcus_);
      }
      if (wcus_ != 0L) {
        output.writeInt64(3, wcus_);
      }
      if (approximateBytes_ != 0L) {
        output.writeInt64(4, approximateBytes_);
      }
      if (approximateRows_ != 0L) {
        output.writeInt64(5, approximateRows_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(engine_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, engine_);
      }
      if (role_ != greptime.v1.meta.HeartbeatOuterClass.RegionRole.Leader.getNumber()) {
        output.writeEnum(7, role_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (regionId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, regionId_);
      }
      if (rcus_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, rcus_);
      }
      if (wcus_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, wcus_);
      }
      if (approximateBytes_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(4, approximateBytes_);
      }
      if (approximateRows_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(5, approximateRows_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(engine_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, engine_);
      }
      if (role_ != greptime.v1.meta.HeartbeatOuterClass.RegionRole.Leader.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(7, role_);
      }
      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.meta.HeartbeatOuterClass.RegionStat)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.RegionStat other = (greptime.v1.meta.HeartbeatOuterClass.RegionStat) obj;

      if (getRegionId()
          != other.getRegionId()) return false;
      if (getRcus()
          != other.getRcus()) return false;
      if (getWcus()
          != other.getWcus()) return false;
      if (getApproximateBytes()
          != other.getApproximateBytes()) return false;
      if (getApproximateRows()
          != other.getApproximateRows()) return false;
      if (!getEngine()
          .equals(other.getEngine())) return false;
      if (role_ != other.role_) 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) + REGION_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getRegionId());
      hash = (37 * hash) + RCUS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getRcus());
      hash = (37 * hash) + WCUS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getWcus());
      hash = (37 * hash) + APPROXIMATE_BYTES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getApproximateBytes());
      hash = (37 * hash) + APPROXIMATE_ROWS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getApproximateRows());
      hash = (37 * hash) + ENGINE_FIELD_NUMBER;
      hash = (53 * hash) + getEngine().hashCode();
      hash = (37 * hash) + ROLE_FIELD_NUMBER;
      hash = (53 * hash) + role_;
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat 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.meta.HeartbeatOuterClass.RegionStat parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat 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.meta.HeartbeatOuterClass.RegionStat parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat 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.meta.HeartbeatOuterClass.RegionStat parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat 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.meta.HeartbeatOuterClass.RegionStat 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.RegionStat}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.RegionStat)
        greptime.v1.meta.HeartbeatOuterClass.RegionStatOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.RegionStat.class, greptime.v1.meta.HeartbeatOuterClass.RegionStat.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.RegionStat.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();
        regionId_ = 0L;

        rcus_ = 0L;

        wcus_ = 0L;

        approximateBytes_ = 0L;

        approximateRows_ = 0L;

        engine_ = "";

        role_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionStat_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.RegionStat.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat build() {
        greptime.v1.meta.HeartbeatOuterClass.RegionStat result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionStat buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.RegionStat result = new greptime.v1.meta.HeartbeatOuterClass.RegionStat(this);
        result.regionId_ = regionId_;
        result.rcus_ = rcus_;
        result.wcus_ = wcus_;
        result.approximateBytes_ = approximateBytes_;
        result.approximateRows_ = approximateRows_;
        result.engine_ = engine_;
        result.role_ = role_;
        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.meta.HeartbeatOuterClass.RegionStat) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.RegionStat)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.RegionStat other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.RegionStat.getDefaultInstance()) return this;
        if (other.getRegionId() != 0L) {
          setRegionId(other.getRegionId());
        }
        if (other.getRcus() != 0L) {
          setRcus(other.getRcus());
        }
        if (other.getWcus() != 0L) {
          setWcus(other.getWcus());
        }
        if (other.getApproximateBytes() != 0L) {
          setApproximateBytes(other.getApproximateBytes());
        }
        if (other.getApproximateRows() != 0L) {
          setApproximateRows(other.getApproximateRows());
        }
        if (!other.getEngine().isEmpty()) {
          engine_ = other.engine_;
          onChanged();
        }
        if (other.role_ != 0) {
          setRoleValue(other.getRoleValue());
        }
        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.meta.HeartbeatOuterClass.RegionStat parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.RegionStat) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private long regionId_ ;
      /**
       * <code>uint64 region_id = 1;</code>
       * @return The regionId.
       */
      @java.lang.Override
      public long getRegionId() {
        return regionId_;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @param value The regionId to set.
       * @return This builder for chaining.
       */
      public Builder setRegionId(long value) {
        
        regionId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearRegionId() {
        
        regionId_ = 0L;
        onChanged();
        return this;
      }

      private long rcus_ ;
      /**
       * <pre>
       * The read capacity units during this period
       * </pre>
       *
       * <code>int64 rcus = 2;</code>
       * @return The rcus.
       */
      @java.lang.Override
      public long getRcus() {
        return rcus_;
      }
      /**
       * <pre>
       * The read capacity units during this period
       * </pre>
       *
       * <code>int64 rcus = 2;</code>
       * @param value The rcus to set.
       * @return This builder for chaining.
       */
      public Builder setRcus(long value) {
        
        rcus_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The read capacity units during this period
       * </pre>
       *
       * <code>int64 rcus = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearRcus() {
        
        rcus_ = 0L;
        onChanged();
        return this;
      }

      private long wcus_ ;
      /**
       * <pre>
       * The write capacity units during this period
       * </pre>
       *
       * <code>int64 wcus = 3;</code>
       * @return The wcus.
       */
      @java.lang.Override
      public long getWcus() {
        return wcus_;
      }
      /**
       * <pre>
       * The write capacity units during this period
       * </pre>
       *
       * <code>int64 wcus = 3;</code>
       * @param value The wcus to set.
       * @return This builder for chaining.
       */
      public Builder setWcus(long value) {
        
        wcus_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The write capacity units during this period
       * </pre>
       *
       * <code>int64 wcus = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearWcus() {
        
        wcus_ = 0L;
        onChanged();
        return this;
      }

      private long approximateBytes_ ;
      /**
       * <pre>
       * Approximate bytes of this region
       * </pre>
       *
       * <code>int64 approximate_bytes = 4;</code>
       * @return The approximateBytes.
       */
      @java.lang.Override
      public long getApproximateBytes() {
        return approximateBytes_;
      }
      /**
       * <pre>
       * Approximate bytes of this region
       * </pre>
       *
       * <code>int64 approximate_bytes = 4;</code>
       * @param value The approximateBytes to set.
       * @return This builder for chaining.
       */
      public Builder setApproximateBytes(long value) {
        
        approximateBytes_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Approximate bytes of this region
       * </pre>
       *
       * <code>int64 approximate_bytes = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearApproximateBytes() {
        
        approximateBytes_ = 0L;
        onChanged();
        return this;
      }

      private long approximateRows_ ;
      /**
       * <pre>
       * Approximate number of rows in this region
       * </pre>
       *
       * <code>int64 approximate_rows = 5;</code>
       * @return The approximateRows.
       */
      @java.lang.Override
      public long getApproximateRows() {
        return approximateRows_;
      }
      /**
       * <pre>
       * Approximate number of rows in this region
       * </pre>
       *
       * <code>int64 approximate_rows = 5;</code>
       * @param value The approximateRows to set.
       * @return This builder for chaining.
       */
      public Builder setApproximateRows(long value) {
        
        approximateRows_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Approximate number of rows in this region
       * </pre>
       *
       * <code>int64 approximate_rows = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearApproximateRows() {
        
        approximateRows_ = 0L;
        onChanged();
        return this;
      }

      private java.lang.Object engine_ = "";
      /**
       * <pre>
       * Engine name
       * </pre>
       *
       * <code>string engine = 6;</code>
       * @return The engine.
       */
      public java.lang.String getEngine() {
        java.lang.Object ref = engine_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          engine_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Engine name
       * </pre>
       *
       * <code>string engine = 6;</code>
       * @return The bytes for engine.
       */
      public com.google.protobuf.ByteString
          getEngineBytes() {
        java.lang.Object ref = engine_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          engine_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Engine name
       * </pre>
       *
       * <code>string engine = 6;</code>
       * @param value The engine to set.
       * @return This builder for chaining.
       */
      public Builder setEngine(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        engine_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Engine name
       * </pre>
       *
       * <code>string engine = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearEngine() {
        
        engine_ = getDefaultInstance().getEngine();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Engine name
       * </pre>
       *
       * <code>string engine = 6;</code>
       * @param value The bytes for engine to set.
       * @return This builder for chaining.
       */
      public Builder setEngineBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        engine_ = value;
        onChanged();
        return this;
      }

      private int role_ = 0;
      /**
       * <pre>
       * Region role
       * </pre>
       *
       * <code>.greptime.v1.meta.RegionRole role = 7;</code>
       * @return The enum numeric value on the wire for role.
       */
      @java.lang.Override public int getRoleValue() {
        return role_;
      }
      /**
       * <pre>
       * Region role
       * </pre>
       *
       * <code>.greptime.v1.meta.RegionRole role = 7;</code>
       * @param value The enum numeric value on the wire for role to set.
       * @return This builder for chaining.
       */
      public Builder setRoleValue(int value) {
        
        role_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Region role
       * </pre>
       *
       * <code>.greptime.v1.meta.RegionRole role = 7;</code>
       * @return The role.
       */
      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole() {
        @SuppressWarnings("deprecation")
        greptime.v1.meta.HeartbeatOuterClass.RegionRole result = greptime.v1.meta.HeartbeatOuterClass.RegionRole.valueOf(role_);
        return result == null ? greptime.v1.meta.HeartbeatOuterClass.RegionRole.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * Region role
       * </pre>
       *
       * <code>.greptime.v1.meta.RegionRole role = 7;</code>
       * @param value The role to set.
       * @return This builder for chaining.
       */
      public Builder setRole(greptime.v1.meta.HeartbeatOuterClass.RegionRole value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        role_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Region role
       * </pre>
       *
       * <code>.greptime.v1.meta.RegionRole role = 7;</code>
       * @return This builder for chaining.
       */
      public Builder clearRole() {
        
        role_ = 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.meta.RegionStat)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.RegionStat)
    private static final greptime.v1.meta.HeartbeatOuterClass.RegionStat DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.RegionStat();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.RegionStat getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionStat getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface HeartbeatResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.HeartbeatResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return The header.
     */
    greptime.v1.meta.Common.ResponseHeader getHeader();
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     */
    greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     * @return Whether the mailboxMessage field is set.
     */
    boolean hasMailboxMessage();
    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     * @return The mailboxMessage.
     */
    greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage();
    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder();

    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     * @return Whether the regionLease field is set.
     */
    boolean hasRegionLease();
    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     * @return The regionLease.
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionLease getRegionLease();
    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder getRegionLeaseOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.HeartbeatResponse}
   */
  public static final class HeartbeatResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.HeartbeatResponse)
      HeartbeatResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HeartbeatResponse.newBuilder() to construct.
    private HeartbeatResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HeartbeatResponse() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HeartbeatResponse(
        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: {
              greptime.v1.meta.Common.ResponseHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(greptime.v1.meta.Common.ResponseHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder subBuilder = null;
              if (mailboxMessage_ != null) {
                subBuilder = mailboxMessage_.toBuilder();
              }
              mailboxMessage_ = input.readMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(mailboxMessage_);
                mailboxMessage_ = subBuilder.buildPartial();
              }

              break;
            }
            case 26: {
              greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder subBuilder = null;
              if (regionLease_ != null) {
                subBuilder = regionLease_.toBuilder();
              }
              regionLease_ = input.readMessage(greptime.v1.meta.HeartbeatOuterClass.RegionLease.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(regionLease_);
                regionLease_ = subBuilder.buildPartial();
              }

              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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.class, greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private greptime.v1.meta.Common.ResponseHeader header_;
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return The header.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.ResponseHeader getHeader() {
      return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int MAILBOX_MESSAGE_FIELD_NUMBER = 2;
    private greptime.v1.meta.HeartbeatOuterClass.MailboxMessage mailboxMessage_;
    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     * @return Whether the mailboxMessage field is set.
     */
    @java.lang.Override
    public boolean hasMailboxMessage() {
      return mailboxMessage_ != null;
    }
    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     * @return The mailboxMessage.
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage() {
      return mailboxMessage_ == null ? greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
    }
    /**
     * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder() {
      return getMailboxMessage();
    }

    public static final int REGION_LEASE_FIELD_NUMBER = 3;
    private greptime.v1.meta.HeartbeatOuterClass.RegionLease regionLease_;
    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     * @return Whether the regionLease field is set.
     */
    @java.lang.Override
    public boolean hasRegionLease() {
      return regionLease_ != null;
    }
    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     * @return The regionLease.
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionLease getRegionLease() {
      return regionLease_ == null ? greptime.v1.meta.HeartbeatOuterClass.RegionLease.getDefaultInstance() : regionLease_;
    }
    /**
     * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder getRegionLeaseOrBuilder() {
      return getRegionLease();
    }

    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 (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      if (mailboxMessage_ != null) {
        output.writeMessage(2, getMailboxMessage());
      }
      if (regionLease_ != null) {
        output.writeMessage(3, getRegionLease());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      if (mailboxMessage_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getMailboxMessage());
      }
      if (regionLease_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getRegionLease());
      }
      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.meta.HeartbeatOuterClass.HeartbeatResponse)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse other = (greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (hasMailboxMessage() != other.hasMailboxMessage()) return false;
      if (hasMailboxMessage()) {
        if (!getMailboxMessage()
            .equals(other.getMailboxMessage())) return false;
      }
      if (hasRegionLease() != other.hasRegionLease()) return false;
      if (hasRegionLease()) {
        if (!getRegionLease()
            .equals(other.getRegionLease())) 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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      if (hasMailboxMessage()) {
        hash = (37 * hash) + MAILBOX_MESSAGE_FIELD_NUMBER;
        hash = (53 * hash) + getMailboxMessage().hashCode();
      }
      if (hasRegionLease()) {
        hash = (37 * hash) + REGION_LEASE_FIELD_NUMBER;
        hash = (53 * hash) + getRegionLease().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse 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.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse 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.meta.HeartbeatOuterClass.HeartbeatResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse 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.meta.HeartbeatOuterClass.HeartbeatResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse 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.meta.HeartbeatOuterClass.HeartbeatResponse 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.HeartbeatResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.HeartbeatResponse)
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.class, greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.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();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = null;
        } else {
          mailboxMessage_ = null;
          mailboxMessageBuilder_ = null;
        }
        if (regionLeaseBuilder_ == null) {
          regionLease_ = null;
        } else {
          regionLease_ = null;
          regionLeaseBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_HeartbeatResponse_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse build() {
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse result = new greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (mailboxMessageBuilder_ == null) {
          result.mailboxMessage_ = mailboxMessage_;
        } else {
          result.mailboxMessage_ = mailboxMessageBuilder_.build();
        }
        if (regionLeaseBuilder_ == null) {
          result.regionLease_ = regionLease_;
        } else {
          result.regionLease_ = regionLeaseBuilder_.build();
        }
        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.meta.HeartbeatOuterClass.HeartbeatResponse) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasMailboxMessage()) {
          mergeMailboxMessage(other.getMailboxMessage());
        }
        if (other.hasRegionLease()) {
          mergeRegionLease(other.getRegionLease());
        }
        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.meta.HeartbeatOuterClass.HeartbeatResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private greptime.v1.meta.Common.ResponseHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       * @return The header.
       */
      public greptime.v1.meta.Common.ResponseHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(greptime.v1.meta.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(
          greptime.v1.meta.Common.ResponseHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder mergeHeader(greptime.v1.meta.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              greptime.v1.meta.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.ResponseHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private greptime.v1.meta.HeartbeatOuterClass.MailboxMessage mailboxMessage_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder> mailboxMessageBuilder_;
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       * @return Whether the mailboxMessage field is set.
       */
      public boolean hasMailboxMessage() {
        return mailboxMessageBuilder_ != null || mailboxMessage_ != null;
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       * @return The mailboxMessage.
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getMailboxMessage() {
        if (mailboxMessageBuilder_ == null) {
          return mailboxMessage_ == null ? greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
        } else {
          return mailboxMessageBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public Builder setMailboxMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage value) {
        if (mailboxMessageBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          mailboxMessage_ = value;
          onChanged();
        } else {
          mailboxMessageBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public Builder setMailboxMessage(
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder builderForValue) {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = builderForValue.build();
          onChanged();
        } else {
          mailboxMessageBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public Builder mergeMailboxMessage(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage value) {
        if (mailboxMessageBuilder_ == null) {
          if (mailboxMessage_ != null) {
            mailboxMessage_ =
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.newBuilder(mailboxMessage_).mergeFrom(value).buildPartial();
          } else {
            mailboxMessage_ = value;
          }
          onChanged();
        } else {
          mailboxMessageBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public Builder clearMailboxMessage() {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessage_ = null;
          onChanged();
        } else {
          mailboxMessage_ = null;
          mailboxMessageBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder getMailboxMessageBuilder() {
        
        onChanged();
        return getMailboxMessageFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder getMailboxMessageOrBuilder() {
        if (mailboxMessageBuilder_ != null) {
          return mailboxMessageBuilder_.getMessageOrBuilder();
        } else {
          return mailboxMessage_ == null ?
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance() : mailboxMessage_;
        }
      }
      /**
       * <code>.greptime.v1.meta.MailboxMessage mailbox_message = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder> 
          getMailboxMessageFieldBuilder() {
        if (mailboxMessageBuilder_ == null) {
          mailboxMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder, greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder>(
                  getMailboxMessage(),
                  getParentForChildren(),
                  isClean());
          mailboxMessage_ = null;
        }
        return mailboxMessageBuilder_;
      }

      private greptime.v1.meta.HeartbeatOuterClass.RegionLease regionLease_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.RegionLease, greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder> regionLeaseBuilder_;
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       * @return Whether the regionLease field is set.
       */
      public boolean hasRegionLease() {
        return regionLeaseBuilder_ != null || regionLease_ != null;
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       * @return The regionLease.
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionLease getRegionLease() {
        if (regionLeaseBuilder_ == null) {
          return regionLease_ == null ? greptime.v1.meta.HeartbeatOuterClass.RegionLease.getDefaultInstance() : regionLease_;
        } else {
          return regionLeaseBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public Builder setRegionLease(greptime.v1.meta.HeartbeatOuterClass.RegionLease value) {
        if (regionLeaseBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          regionLease_ = value;
          onChanged();
        } else {
          regionLeaseBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public Builder setRegionLease(
          greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder builderForValue) {
        if (regionLeaseBuilder_ == null) {
          regionLease_ = builderForValue.build();
          onChanged();
        } else {
          regionLeaseBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public Builder mergeRegionLease(greptime.v1.meta.HeartbeatOuterClass.RegionLease value) {
        if (regionLeaseBuilder_ == null) {
          if (regionLease_ != null) {
            regionLease_ =
              greptime.v1.meta.HeartbeatOuterClass.RegionLease.newBuilder(regionLease_).mergeFrom(value).buildPartial();
          } else {
            regionLease_ = value;
          }
          onChanged();
        } else {
          regionLeaseBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public Builder clearRegionLease() {
        if (regionLeaseBuilder_ == null) {
          regionLease_ = null;
          onChanged();
        } else {
          regionLease_ = null;
          regionLeaseBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder getRegionLeaseBuilder() {
        
        onChanged();
        return getRegionLeaseFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder getRegionLeaseOrBuilder() {
        if (regionLeaseBuilder_ != null) {
          return regionLeaseBuilder_.getMessageOrBuilder();
        } else {
          return regionLease_ == null ?
              greptime.v1.meta.HeartbeatOuterClass.RegionLease.getDefaultInstance() : regionLease_;
        }
      }
      /**
       * <code>.greptime.v1.meta.RegionLease region_lease = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.RegionLease, greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder> 
          getRegionLeaseFieldBuilder() {
        if (regionLeaseBuilder_ == null) {
          regionLeaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.HeartbeatOuterClass.RegionLease, greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder, greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder>(
                  getRegionLease(),
                  getParentForChildren(),
                  isClean());
          regionLease_ = null;
        }
        return regionLeaseBuilder_;
      }
      @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.meta.HeartbeatResponse)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.HeartbeatResponse)
    private static final greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.HeartbeatResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface GrantedRegionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.GrantedRegion)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    long getRegionId();

    /**
     * <code>.greptime.v1.meta.RegionRole role = 2;</code>
     * @return The enum numeric value on the wire for role.
     */
    int getRoleValue();
    /**
     * <code>.greptime.v1.meta.RegionRole role = 2;</code>
     * @return The role.
     */
    greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.GrantedRegion}
   */
  public static final class GrantedRegion extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.GrantedRegion)
      GrantedRegionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use GrantedRegion.newBuilder() to construct.
    private GrantedRegion(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private GrantedRegion() {
      role_ = 0;
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private GrantedRegion(
        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: {

              regionId_ = input.readUInt64();
              break;
            }
            case 16: {
              int rawValue = input.readEnum();

              role_ = 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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_GrantedRegion_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_GrantedRegion_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.class, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder.class);
    }

    public static final int REGION_ID_FIELD_NUMBER = 1;
    private long regionId_;
    /**
     * <code>uint64 region_id = 1;</code>
     * @return The regionId.
     */
    @java.lang.Override
    public long getRegionId() {
      return regionId_;
    }

    public static final int ROLE_FIELD_NUMBER = 2;
    private int role_;
    /**
     * <code>.greptime.v1.meta.RegionRole role = 2;</code>
     * @return The enum numeric value on the wire for role.
     */
    @java.lang.Override public int getRoleValue() {
      return role_;
    }
    /**
     * <code>.greptime.v1.meta.RegionRole role = 2;</code>
     * @return The role.
     */
    @java.lang.Override public greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole() {
      @SuppressWarnings("deprecation")
      greptime.v1.meta.HeartbeatOuterClass.RegionRole result = greptime.v1.meta.HeartbeatOuterClass.RegionRole.valueOf(role_);
      return result == null ? greptime.v1.meta.HeartbeatOuterClass.RegionRole.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 (regionId_ != 0L) {
        output.writeUInt64(1, regionId_);
      }
      if (role_ != greptime.v1.meta.HeartbeatOuterClass.RegionRole.Leader.getNumber()) {
        output.writeEnum(2, role_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (regionId_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, regionId_);
      }
      if (role_ != greptime.v1.meta.HeartbeatOuterClass.RegionRole.Leader.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, role_);
      }
      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.meta.HeartbeatOuterClass.GrantedRegion)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.GrantedRegion other = (greptime.v1.meta.HeartbeatOuterClass.GrantedRegion) obj;

      if (getRegionId()
          != other.getRegionId()) return false;
      if (role_ != other.role_) 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) + REGION_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getRegionId());
      hash = (37 * hash) + ROLE_FIELD_NUMBER;
      hash = (53 * hash) + role_;
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion 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.meta.HeartbeatOuterClass.GrantedRegion parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion 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.meta.HeartbeatOuterClass.GrantedRegion parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion 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.meta.HeartbeatOuterClass.GrantedRegion parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion 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.meta.HeartbeatOuterClass.GrantedRegion 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.GrantedRegion}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.GrantedRegion)
        greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_GrantedRegion_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_GrantedRegion_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.class, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.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();
        regionId_ = 0L;

        role_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_GrantedRegion_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion build() {
        greptime.v1.meta.HeartbeatOuterClass.GrantedRegion result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.GrantedRegion result = new greptime.v1.meta.HeartbeatOuterClass.GrantedRegion(this);
        result.regionId_ = regionId_;
        result.role_ = role_;
        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.meta.HeartbeatOuterClass.GrantedRegion) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.GrantedRegion)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.GrantedRegion other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.getDefaultInstance()) return this;
        if (other.getRegionId() != 0L) {
          setRegionId(other.getRegionId());
        }
        if (other.role_ != 0) {
          setRoleValue(other.getRoleValue());
        }
        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.meta.HeartbeatOuterClass.GrantedRegion parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.GrantedRegion) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private long regionId_ ;
      /**
       * <code>uint64 region_id = 1;</code>
       * @return The regionId.
       */
      @java.lang.Override
      public long getRegionId() {
        return regionId_;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @param value The regionId to set.
       * @return This builder for chaining.
       */
      public Builder setRegionId(long value) {
        
        regionId_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 region_id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearRegionId() {
        
        regionId_ = 0L;
        onChanged();
        return this;
      }

      private int role_ = 0;
      /**
       * <code>.greptime.v1.meta.RegionRole role = 2;</code>
       * @return The enum numeric value on the wire for role.
       */
      @java.lang.Override public int getRoleValue() {
        return role_;
      }
      /**
       * <code>.greptime.v1.meta.RegionRole role = 2;</code>
       * @param value The enum numeric value on the wire for role to set.
       * @return This builder for chaining.
       */
      public Builder setRoleValue(int value) {
        
        role_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionRole role = 2;</code>
       * @return The role.
       */
      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionRole getRole() {
        @SuppressWarnings("deprecation")
        greptime.v1.meta.HeartbeatOuterClass.RegionRole result = greptime.v1.meta.HeartbeatOuterClass.RegionRole.valueOf(role_);
        return result == null ? greptime.v1.meta.HeartbeatOuterClass.RegionRole.UNRECOGNIZED : result;
      }
      /**
       * <code>.greptime.v1.meta.RegionRole role = 2;</code>
       * @param value The role to set.
       * @return This builder for chaining.
       */
      public Builder setRole(greptime.v1.meta.HeartbeatOuterClass.RegionRole value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        role_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.greptime.v1.meta.RegionRole role = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearRole() {
        
        role_ = 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.meta.GrantedRegion)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.GrantedRegion)
    private static final greptime.v1.meta.HeartbeatOuterClass.GrantedRegion DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.GrantedRegion();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface RegionLeaseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.RegionLease)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> 
        getRegionsList();
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getRegions(int index);
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    int getRegionsCount();
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder> 
        getRegionsOrBuilderList();
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder getRegionsOrBuilder(
        int index);

    /**
     * <code>uint64 duration_since_epoch = 2;</code>
     * @return The durationSinceEpoch.
     */
    long getDurationSinceEpoch();

    /**
     * <code>uint64 lease_seconds = 3;</code>
     * @return The leaseSeconds.
     */
    long getLeaseSeconds();

    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @return A list containing the closeableRegionIds.
     */
    java.util.List<java.lang.Long> getCloseableRegionIdsList();
    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @return The count of closeableRegionIds.
     */
    int getCloseableRegionIdsCount();
    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @param index The index of the element to return.
     * @return The closeableRegionIds at the given index.
     */
    long getCloseableRegionIds(int index);
  }
  /**
   * Protobuf type {@code greptime.v1.meta.RegionLease}
   */
  public static final class RegionLease extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.RegionLease)
      RegionLeaseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use RegionLease.newBuilder() to construct.
    private RegionLease(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private RegionLease() {
      regions_ = java.util.Collections.emptyList();
      closeableRegionIds_ = emptyLongList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private RegionLease(
        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)) {
                regions_ = new java.util.ArrayList<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion>();
                mutable_bitField0_ |= 0x00000001;
              }
              regions_.add(
                  input.readMessage(greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.parser(), extensionRegistry));
              break;
            }
            case 16: {

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

              leaseSeconds_ = input.readUInt64();
              break;
            }
            case 32: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                closeableRegionIds_ = newLongList();
                mutable_bitField0_ |= 0x00000002;
              }
              closeableRegionIds_.addLong(input.readUInt64());
              break;
            }
            case 34: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
                closeableRegionIds_ = newLongList();
                mutable_bitField0_ |= 0x00000002;
              }
              while (input.getBytesUntilLimit() > 0) {
                closeableRegionIds_.addLong(input.readUInt64());
              }
              input.popLimit(limit);
              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 {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          regions_ = java.util.Collections.unmodifiableList(regions_);
        }
        if (((mutable_bitField0_ & 0x00000002) != 0)) {
          closeableRegionIds_.makeImmutable(); // C
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionLease_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionLease_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.RegionLease.class, greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder.class);
    }

    public static final int REGIONS_FIELD_NUMBER = 1;
    private java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> regions_;
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    @java.lang.Override
    public java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> getRegionsList() {
      return regions_;
    }
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder> 
        getRegionsOrBuilderList() {
      return regions_;
    }
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    @java.lang.Override
    public int getRegionsCount() {
      return regions_.size();
    }
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getRegions(int index) {
      return regions_.get(index);
    }
    /**
     * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder getRegionsOrBuilder(
        int index) {
      return regions_.get(index);
    }

    public static final int DURATION_SINCE_EPOCH_FIELD_NUMBER = 2;
    private long durationSinceEpoch_;
    /**
     * <code>uint64 duration_since_epoch = 2;</code>
     * @return The durationSinceEpoch.
     */
    @java.lang.Override
    public long getDurationSinceEpoch() {
      return durationSinceEpoch_;
    }

    public static final int LEASE_SECONDS_FIELD_NUMBER = 3;
    private long leaseSeconds_;
    /**
     * <code>uint64 lease_seconds = 3;</code>
     * @return The leaseSeconds.
     */
    @java.lang.Override
    public long getLeaseSeconds() {
      return leaseSeconds_;
    }

    public static final int CLOSEABLE_REGION_IDS_FIELD_NUMBER = 4;
    private com.google.protobuf.Internal.LongList closeableRegionIds_;
    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @return A list containing the closeableRegionIds.
     */
    @java.lang.Override
    public java.util.List<java.lang.Long>
        getCloseableRegionIdsList() {
      return closeableRegionIds_;
    }
    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @return The count of closeableRegionIds.
     */
    public int getCloseableRegionIdsCount() {
      return closeableRegionIds_.size();
    }
    /**
     * <code>repeated uint64 closeable_region_ids = 4;</code>
     * @param index The index of the element to return.
     * @return The closeableRegionIds at the given index.
     */
    public long getCloseableRegionIds(int index) {
      return closeableRegionIds_.getLong(index);
    }
    private int closeableRegionIdsMemoizedSerializedSize = -1;

    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 {
      getSerializedSize();
      for (int i = 0; i < regions_.size(); i++) {
        output.writeMessage(1, regions_.get(i));
      }
      if (durationSinceEpoch_ != 0L) {
        output.writeUInt64(2, durationSinceEpoch_);
      }
      if (leaseSeconds_ != 0L) {
        output.writeUInt64(3, leaseSeconds_);
      }
      if (getCloseableRegionIdsList().size() > 0) {
        output.writeUInt32NoTag(34);
        output.writeUInt32NoTag(closeableRegionIdsMemoizedSerializedSize);
      }
      for (int i = 0; i < closeableRegionIds_.size(); i++) {
        output.writeUInt64NoTag(closeableRegionIds_.getLong(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < regions_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, regions_.get(i));
      }
      if (durationSinceEpoch_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(2, durationSinceEpoch_);
      }
      if (leaseSeconds_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(3, leaseSeconds_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < closeableRegionIds_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt64SizeNoTag(closeableRegionIds_.getLong(i));
        }
        size += dataSize;
        if (!getCloseableRegionIdsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        closeableRegionIdsMemoizedSerializedSize = dataSize;
      }
      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.meta.HeartbeatOuterClass.RegionLease)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.RegionLease other = (greptime.v1.meta.HeartbeatOuterClass.RegionLease) obj;

      if (!getRegionsList()
          .equals(other.getRegionsList())) return false;
      if (getDurationSinceEpoch()
          != other.getDurationSinceEpoch()) return false;
      if (getLeaseSeconds()
          != other.getLeaseSeconds()) return false;
      if (!getCloseableRegionIdsList()
          .equals(other.getCloseableRegionIdsList())) 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 (getRegionsCount() > 0) {
        hash = (37 * hash) + REGIONS_FIELD_NUMBER;
        hash = (53 * hash) + getRegionsList().hashCode();
      }
      hash = (37 * hash) + DURATION_SINCE_EPOCH_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getDurationSinceEpoch());
      hash = (37 * hash) + LEASE_SECONDS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getLeaseSeconds());
      if (getCloseableRegionIdsCount() > 0) {
        hash = (37 * hash) + CLOSEABLE_REGION_IDS_FIELD_NUMBER;
        hash = (53 * hash) + getCloseableRegionIdsList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease 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.meta.HeartbeatOuterClass.RegionLease parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease 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.meta.HeartbeatOuterClass.RegionLease parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease 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.meta.HeartbeatOuterClass.RegionLease parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease 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.meta.HeartbeatOuterClass.RegionLease 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.RegionLease}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.RegionLease)
        greptime.v1.meta.HeartbeatOuterClass.RegionLeaseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionLease_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionLease_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.RegionLease.class, greptime.v1.meta.HeartbeatOuterClass.RegionLease.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.RegionLease.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getRegionsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (regionsBuilder_ == null) {
          regions_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          regionsBuilder_.clear();
        }
        durationSinceEpoch_ = 0L;

        leaseSeconds_ = 0L;

        closeableRegionIds_ = emptyLongList();
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_RegionLease_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionLease getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.RegionLease.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionLease build() {
        greptime.v1.meta.HeartbeatOuterClass.RegionLease result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.RegionLease buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.RegionLease result = new greptime.v1.meta.HeartbeatOuterClass.RegionLease(this);
        int from_bitField0_ = bitField0_;
        if (regionsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            regions_ = java.util.Collections.unmodifiableList(regions_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.regions_ = regions_;
        } else {
          result.regions_ = regionsBuilder_.build();
        }
        result.durationSinceEpoch_ = durationSinceEpoch_;
        result.leaseSeconds_ = leaseSeconds_;
        if (((bitField0_ & 0x00000002) != 0)) {
          closeableRegionIds_.makeImmutable();
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.closeableRegionIds_ = closeableRegionIds_;
        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.meta.HeartbeatOuterClass.RegionLease) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.RegionLease)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.RegionLease other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.RegionLease.getDefaultInstance()) return this;
        if (regionsBuilder_ == null) {
          if (!other.regions_.isEmpty()) {
            if (regions_.isEmpty()) {
              regions_ = other.regions_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureRegionsIsMutable();
              regions_.addAll(other.regions_);
            }
            onChanged();
          }
        } else {
          if (!other.regions_.isEmpty()) {
            if (regionsBuilder_.isEmpty()) {
              regionsBuilder_.dispose();
              regionsBuilder_ = null;
              regions_ = other.regions_;
              bitField0_ = (bitField0_ & ~0x00000001);
              regionsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getRegionsFieldBuilder() : null;
            } else {
              regionsBuilder_.addAllMessages(other.regions_);
            }
          }
        }
        if (other.getDurationSinceEpoch() != 0L) {
          setDurationSinceEpoch(other.getDurationSinceEpoch());
        }
        if (other.getLeaseSeconds() != 0L) {
          setLeaseSeconds(other.getLeaseSeconds());
        }
        if (!other.closeableRegionIds_.isEmpty()) {
          if (closeableRegionIds_.isEmpty()) {
            closeableRegionIds_ = other.closeableRegionIds_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureCloseableRegionIdsIsMutable();
            closeableRegionIds_.addAll(other.closeableRegionIds_);
          }
          onChanged();
        }
        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.meta.HeartbeatOuterClass.RegionLease parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.RegionLease) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> regions_ =
        java.util.Collections.emptyList();
      private void ensureRegionsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          regions_ = new java.util.ArrayList<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion>(regions_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.GrantedRegion, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder, greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder> regionsBuilder_;

      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> getRegionsList() {
        if (regionsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(regions_);
        } else {
          return regionsBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public int getRegionsCount() {
        if (regionsBuilder_ == null) {
          return regions_.size();
        } else {
          return regionsBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion getRegions(int index) {
        if (regionsBuilder_ == null) {
          return regions_.get(index);
        } else {
          return regionsBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder setRegions(
          int index, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion value) {
        if (regionsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionsIsMutable();
          regions_.set(index, value);
          onChanged();
        } else {
          regionsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder setRegions(
          int index, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder builderForValue) {
        if (regionsBuilder_ == null) {
          ensureRegionsIsMutable();
          regions_.set(index, builderForValue.build());
          onChanged();
        } else {
          regionsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder addRegions(greptime.v1.meta.HeartbeatOuterClass.GrantedRegion value) {
        if (regionsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionsIsMutable();
          regions_.add(value);
          onChanged();
        } else {
          regionsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder addRegions(
          int index, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion value) {
        if (regionsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRegionsIsMutable();
          regions_.add(index, value);
          onChanged();
        } else {
          regionsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder addRegions(
          greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder builderForValue) {
        if (regionsBuilder_ == null) {
          ensureRegionsIsMutable();
          regions_.add(builderForValue.build());
          onChanged();
        } else {
          regionsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder addRegions(
          int index, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder builderForValue) {
        if (regionsBuilder_ == null) {
          ensureRegionsIsMutable();
          regions_.add(index, builderForValue.build());
          onChanged();
        } else {
          regionsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder addAllRegions(
          java.lang.Iterable<? extends greptime.v1.meta.HeartbeatOuterClass.GrantedRegion> values) {
        if (regionsBuilder_ == null) {
          ensureRegionsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, regions_);
          onChanged();
        } else {
          regionsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder clearRegions() {
        if (regionsBuilder_ == null) {
          regions_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          regionsBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public Builder removeRegions(int index) {
        if (regionsBuilder_ == null) {
          ensureRegionsIsMutable();
          regions_.remove(index);
          onChanged();
        } else {
          regionsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder getRegionsBuilder(
          int index) {
        return getRegionsFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder getRegionsOrBuilder(
          int index) {
        if (regionsBuilder_ == null) {
          return regions_.get(index);  } else {
          return regionsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public java.util.List<? extends greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder> 
           getRegionsOrBuilderList() {
        if (regionsBuilder_ != null) {
          return regionsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(regions_);
        }
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder addRegionsBuilder() {
        return getRegionsFieldBuilder().addBuilder(
            greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder addRegionsBuilder(
          int index) {
        return getRegionsFieldBuilder().addBuilder(
            index, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.getDefaultInstance());
      }
      /**
       * <code>repeated .greptime.v1.meta.GrantedRegion regions = 1;</code>
       */
      public java.util.List<greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder> 
           getRegionsBuilderList() {
        return getRegionsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          greptime.v1.meta.HeartbeatOuterClass.GrantedRegion, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder, greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder> 
          getRegionsFieldBuilder() {
        if (regionsBuilder_ == null) {
          regionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              greptime.v1.meta.HeartbeatOuterClass.GrantedRegion, greptime.v1.meta.HeartbeatOuterClass.GrantedRegion.Builder, greptime.v1.meta.HeartbeatOuterClass.GrantedRegionOrBuilder>(
                  regions_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          regions_ = null;
        }
        return regionsBuilder_;
      }

      private long durationSinceEpoch_ ;
      /**
       * <code>uint64 duration_since_epoch = 2;</code>
       * @return The durationSinceEpoch.
       */
      @java.lang.Override
      public long getDurationSinceEpoch() {
        return durationSinceEpoch_;
      }
      /**
       * <code>uint64 duration_since_epoch = 2;</code>
       * @param value The durationSinceEpoch to set.
       * @return This builder for chaining.
       */
      public Builder setDurationSinceEpoch(long value) {
        
        durationSinceEpoch_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 duration_since_epoch = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearDurationSinceEpoch() {
        
        durationSinceEpoch_ = 0L;
        onChanged();
        return this;
      }

      private long leaseSeconds_ ;
      /**
       * <code>uint64 lease_seconds = 3;</code>
       * @return The leaseSeconds.
       */
      @java.lang.Override
      public long getLeaseSeconds() {
        return leaseSeconds_;
      }
      /**
       * <code>uint64 lease_seconds = 3;</code>
       * @param value The leaseSeconds to set.
       * @return This builder for chaining.
       */
      public Builder setLeaseSeconds(long value) {
        
        leaseSeconds_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>uint64 lease_seconds = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearLeaseSeconds() {
        
        leaseSeconds_ = 0L;
        onChanged();
        return this;
      }

      private com.google.protobuf.Internal.LongList closeableRegionIds_ = emptyLongList();
      private void ensureCloseableRegionIdsIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          closeableRegionIds_ = mutableCopy(closeableRegionIds_);
          bitField0_ |= 0x00000002;
         }
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @return A list containing the closeableRegionIds.
       */
      public java.util.List<java.lang.Long>
          getCloseableRegionIdsList() {
        return ((bitField0_ & 0x00000002) != 0) ?
                 java.util.Collections.unmodifiableList(closeableRegionIds_) : closeableRegionIds_;
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @return The count of closeableRegionIds.
       */
      public int getCloseableRegionIdsCount() {
        return closeableRegionIds_.size();
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @param index The index of the element to return.
       * @return The closeableRegionIds at the given index.
       */
      public long getCloseableRegionIds(int index) {
        return closeableRegionIds_.getLong(index);
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @param index The index to set the value at.
       * @param value The closeableRegionIds to set.
       * @return This builder for chaining.
       */
      public Builder setCloseableRegionIds(
          int index, long value) {
        ensureCloseableRegionIdsIsMutable();
        closeableRegionIds_.setLong(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @param value The closeableRegionIds to add.
       * @return This builder for chaining.
       */
      public Builder addCloseableRegionIds(long value) {
        ensureCloseableRegionIdsIsMutable();
        closeableRegionIds_.addLong(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @param values The closeableRegionIds to add.
       * @return This builder for chaining.
       */
      public Builder addAllCloseableRegionIds(
          java.lang.Iterable<? extends java.lang.Long> values) {
        ensureCloseableRegionIdsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, closeableRegionIds_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated uint64 closeable_region_ids = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearCloseableRegionIds() {
        closeableRegionIds_ = emptyLongList();
        bitField0_ = (bitField0_ & ~0x00000002);
        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.meta.RegionLease)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.RegionLease)
    private static final greptime.v1.meta.HeartbeatOuterClass.RegionLease DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.RegionLease();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.RegionLease getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.RegionLease getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface AskLeaderRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.AskLeaderRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return The header.
     */
    greptime.v1.meta.Common.RequestHeader getHeader();
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     */
    greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.AskLeaderRequest}
   */
  public static final class AskLeaderRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.AskLeaderRequest)
      AskLeaderRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use AskLeaderRequest.newBuilder() to construct.
    private AskLeaderRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private AskLeaderRequest() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private AskLeaderRequest(
        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: {
              greptime.v1.meta.Common.RequestHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(greptime.v1.meta.Common.RequestHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.class, greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private greptime.v1.meta.Common.RequestHeader header_;
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     * @return The header.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.RequestHeader getHeader() {
      return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    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 (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      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.meta.HeartbeatOuterClass.AskLeaderRequest)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest other = (greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) 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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest 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.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest 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.meta.HeartbeatOuterClass.AskLeaderRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest 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.meta.HeartbeatOuterClass.AskLeaderRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest 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.meta.HeartbeatOuterClass.AskLeaderRequest 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.AskLeaderRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.AskLeaderRequest)
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.class, greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.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();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderRequest_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest build() {
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest result = new greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        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.meta.HeartbeatOuterClass.AskLeaderRequest) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        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.meta.HeartbeatOuterClass.AskLeaderRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private greptime.v1.meta.Common.RequestHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       * @return The header.
       */
      public greptime.v1.meta.Common.RequestHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder setHeader(greptime.v1.meta.Common.RequestHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder setHeader(
          greptime.v1.meta.Common.RequestHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder mergeHeader(greptime.v1.meta.Common.RequestHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              greptime.v1.meta.Common.RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.RequestHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.RequestHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              greptime.v1.meta.Common.RequestHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.meta.RequestHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.RequestHeader, greptime.v1.meta.Common.RequestHeader.Builder, greptime.v1.meta.Common.RequestHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }
      @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.meta.AskLeaderRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.AskLeaderRequest)
    private static final greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.AskLeaderRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface AskLeaderResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.AskLeaderResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    boolean hasHeader();
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return The header.
     */
    greptime.v1.meta.Common.ResponseHeader getHeader();
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     */
    greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     * @return Whether the leader field is set.
     */
    boolean hasLeader();
    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     * @return The leader.
     */
    greptime.v1.meta.Common.Peer getLeader();
    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     */
    greptime.v1.meta.Common.PeerOrBuilder getLeaderOrBuilder();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.AskLeaderResponse}
   */
  public static final class AskLeaderResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.AskLeaderResponse)
      AskLeaderResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use AskLeaderResponse.newBuilder() to construct.
    private AskLeaderResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private AskLeaderResponse() {
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private AskLeaderResponse(
        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: {
              greptime.v1.meta.Common.ResponseHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(greptime.v1.meta.Common.ResponseHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {
              greptime.v1.meta.Common.Peer.Builder subBuilder = null;
              if (leader_ != null) {
                subBuilder = leader_.toBuilder();
              }
              leader_ = input.readMessage(greptime.v1.meta.Common.Peer.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(leader_);
                leader_ = subBuilder.buildPartial();
              }

              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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.class, greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private greptime.v1.meta.Common.ResponseHeader header_;
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return Whether the header field is set.
     */
    @java.lang.Override
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     * @return The header.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.ResponseHeader getHeader() {
      return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
    }
    /**
     * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int LEADER_FIELD_NUMBER = 2;
    private greptime.v1.meta.Common.Peer leader_;
    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     * @return Whether the leader field is set.
     */
    @java.lang.Override
    public boolean hasLeader() {
      return leader_ != null;
    }
    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     * @return The leader.
     */
    @java.lang.Override
    public greptime.v1.meta.Common.Peer getLeader() {
      return leader_ == null ? greptime.v1.meta.Common.Peer.getDefaultInstance() : leader_;
    }
    /**
     * <code>.greptime.v1.meta.Peer leader = 2;</code>
     */
    @java.lang.Override
    public greptime.v1.meta.Common.PeerOrBuilder getLeaderOrBuilder() {
      return getLeader();
    }

    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 (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      if (leader_ != null) {
        output.writeMessage(2, getLeader());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      if (leader_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getLeader());
      }
      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.meta.HeartbeatOuterClass.AskLeaderResponse)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse other = (greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (hasLeader() != other.hasLeader()) return false;
      if (hasLeader()) {
        if (!getLeader()
            .equals(other.getLeader())) 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 (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      if (hasLeader()) {
        hash = (37 * hash) + LEADER_FIELD_NUMBER;
        hash = (53 * hash) + getLeader().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse 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.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse 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.meta.HeartbeatOuterClass.AskLeaderResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse 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.meta.HeartbeatOuterClass.AskLeaderResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse 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.meta.HeartbeatOuterClass.AskLeaderResponse 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.AskLeaderResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.AskLeaderResponse)
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.class, greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.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();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        if (leaderBuilder_ == null) {
          leader_ = null;
        } else {
          leader_ = null;
          leaderBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_AskLeaderResponse_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse build() {
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse result = new greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (leaderBuilder_ == null) {
          result.leader_ = leader_;
        } else {
          result.leader_ = leaderBuilder_.build();
        }
        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.meta.HeartbeatOuterClass.AskLeaderResponse) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasLeader()) {
          mergeLeader(other.getLeader());
        }
        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.meta.HeartbeatOuterClass.AskLeaderResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private greptime.v1.meta.Common.ResponseHeader header_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> headerBuilder_;
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       * @return Whether the header field is set.
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       * @return The header.
       */
      public greptime.v1.meta.Common.ResponseHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(greptime.v1.meta.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder setHeader(
          greptime.v1.meta.Common.ResponseHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder mergeHeader(greptime.v1.meta.Common.ResponseHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              greptime.v1.meta.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.ResponseHeader.Builder getHeaderBuilder() {
        
        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      public greptime.v1.meta.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              greptime.v1.meta.Common.ResponseHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <code>.greptime.v1.meta.ResponseHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder> 
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.ResponseHeader, greptime.v1.meta.Common.ResponseHeader.Builder, greptime.v1.meta.Common.ResponseHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private greptime.v1.meta.Common.Peer leader_;
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> leaderBuilder_;
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       * @return Whether the leader field is set.
       */
      public boolean hasLeader() {
        return leaderBuilder_ != null || leader_ != null;
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       * @return The leader.
       */
      public greptime.v1.meta.Common.Peer getLeader() {
        if (leaderBuilder_ == null) {
          return leader_ == null ? greptime.v1.meta.Common.Peer.getDefaultInstance() : leader_;
        } else {
          return leaderBuilder_.getMessage();
        }
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public Builder setLeader(greptime.v1.meta.Common.Peer value) {
        if (leaderBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          leader_ = value;
          onChanged();
        } else {
          leaderBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public Builder setLeader(
          greptime.v1.meta.Common.Peer.Builder builderForValue) {
        if (leaderBuilder_ == null) {
          leader_ = builderForValue.build();
          onChanged();
        } else {
          leaderBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public Builder mergeLeader(greptime.v1.meta.Common.Peer value) {
        if (leaderBuilder_ == null) {
          if (leader_ != null) {
            leader_ =
              greptime.v1.meta.Common.Peer.newBuilder(leader_).mergeFrom(value).buildPartial();
          } else {
            leader_ = value;
          }
          onChanged();
        } else {
          leaderBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public Builder clearLeader() {
        if (leaderBuilder_ == null) {
          leader_ = null;
          onChanged();
        } else {
          leader_ = null;
          leaderBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public greptime.v1.meta.Common.Peer.Builder getLeaderBuilder() {
        
        onChanged();
        return getLeaderFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      public greptime.v1.meta.Common.PeerOrBuilder getLeaderOrBuilder() {
        if (leaderBuilder_ != null) {
          return leaderBuilder_.getMessageOrBuilder();
        } else {
          return leader_ == null ?
              greptime.v1.meta.Common.Peer.getDefaultInstance() : leader_;
        }
      }
      /**
       * <code>.greptime.v1.meta.Peer leader = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder> 
          getLeaderFieldBuilder() {
        if (leaderBuilder_ == null) {
          leaderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              greptime.v1.meta.Common.Peer, greptime.v1.meta.Common.Peer.Builder, greptime.v1.meta.Common.PeerOrBuilder>(
                  getLeader(),
                  getParentForChildren(),
                  isClean());
          leader_ = null;
        }
        return leaderBuilder_;
      }
      @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.meta.AskLeaderResponse)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.AskLeaderResponse)
    private static final greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.AskLeaderResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface MailboxMessageOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.meta.MailboxMessage)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The id is used to associate request and response.
     * </pre>
     *
     * <code>uint64 id = 1;</code>
     * @return The id.
     */
    long getId();

    /**
     * <pre>
     * The following information plays a bigger role in making messages traceable
     * and facilitating debugging.
     * </pre>
     *
     * <code>string subject = 2;</code>
     * @return The subject.
     */
    java.lang.String getSubject();
    /**
     * <pre>
     * The following information plays a bigger role in making messages traceable
     * and facilitating debugging.
     * </pre>
     *
     * <code>string subject = 2;</code>
     * @return The bytes for subject.
     */
    com.google.protobuf.ByteString
        getSubjectBytes();

    /**
     * <code>string from = 3;</code>
     * @return The from.
     */
    java.lang.String getFrom();
    /**
     * <code>string from = 3;</code>
     * @return The bytes for from.
     */
    com.google.protobuf.ByteString
        getFromBytes();

    /**
     * <code>string to = 4;</code>
     * @return The to.
     */
    java.lang.String getTo();
    /**
     * <code>string to = 4;</code>
     * @return The bytes for to.
     */
    com.google.protobuf.ByteString
        getToBytes();

    /**
     * <pre>
     * The unix timestamp in milliseconds.
     * </pre>
     *
     * <code>int64 timestamp_millis = 5;</code>
     * @return The timestampMillis.
     */
    long getTimestampMillis();

    /**
     * <code>string json = 6;</code>
     * @return Whether the json field is set.
     */
    boolean hasJson();
    /**
     * <code>string json = 6;</code>
     * @return The json.
     */
    java.lang.String getJson();
    /**
     * <code>string json = 6;</code>
     * @return The bytes for json.
     */
    com.google.protobuf.ByteString
        getJsonBytes();

    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.PayloadCase getPayloadCase();
  }
  /**
   * Protobuf type {@code greptime.v1.meta.MailboxMessage}
   */
  public static final class MailboxMessage extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.meta.MailboxMessage)
      MailboxMessageOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use MailboxMessage.newBuilder() to construct.
    private MailboxMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private MailboxMessage() {
      subject_ = "";
      from_ = "";
      to_ = "";
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private MailboxMessage(
        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: {

              id_ = input.readUInt64();
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              subject_ = s;
              break;
            }
            case 26: {
              java.lang.String s = input.readStringRequireUtf8();

              from_ = s;
              break;
            }
            case 34: {
              java.lang.String s = input.readStringRequireUtf8();

              to_ = s;
              break;
            }
            case 40: {

              timestampMillis_ = input.readInt64();
              break;
            }
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();
              payloadCase_ = 6;
              payload_ = s;
              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.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_MailboxMessage_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_MailboxMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.class, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder.class);
    }

    private int payloadCase_ = 0;
    private java.lang.Object payload_;
    public enum PayloadCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      JSON(6),
      PAYLOAD_NOT_SET(0);
      private final int value;
      private PayloadCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static PayloadCase valueOf(int value) {
        return forNumber(value);
      }

      public static PayloadCase forNumber(int value) {
        switch (value) {
          case 6: return JSON;
          case 0: return PAYLOAD_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public PayloadCase
    getPayloadCase() {
      return PayloadCase.forNumber(
          payloadCase_);
    }

    public static final int ID_FIELD_NUMBER = 1;
    private long id_;
    /**
     * <pre>
     * The id is used to associate request and response.
     * </pre>
     *
     * <code>uint64 id = 1;</code>
     * @return The id.
     */
    @java.lang.Override
    public long getId() {
      return id_;
    }

    public static final int SUBJECT_FIELD_NUMBER = 2;
    private volatile java.lang.Object subject_;
    /**
     * <pre>
     * The following information plays a bigger role in making messages traceable
     * and facilitating debugging.
     * </pre>
     *
     * <code>string subject = 2;</code>
     * @return The subject.
     */
    @java.lang.Override
    public java.lang.String getSubject() {
      java.lang.Object ref = subject_;
      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();
        subject_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The following information plays a bigger role in making messages traceable
     * and facilitating debugging.
     * </pre>
     *
     * <code>string subject = 2;</code>
     * @return The bytes for subject.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getSubjectBytes() {
      java.lang.Object ref = subject_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        subject_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int FROM_FIELD_NUMBER = 3;
    private volatile java.lang.Object from_;
    /**
     * <code>string from = 3;</code>
     * @return The from.
     */
    @java.lang.Override
    public java.lang.String getFrom() {
      java.lang.Object ref = from_;
      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();
        from_ = s;
        return s;
      }
    }
    /**
     * <code>string from = 3;</code>
     * @return The bytes for from.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getFromBytes() {
      java.lang.Object ref = from_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        from_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int TO_FIELD_NUMBER = 4;
    private volatile java.lang.Object to_;
    /**
     * <code>string to = 4;</code>
     * @return The to.
     */
    @java.lang.Override
    public java.lang.String getTo() {
      java.lang.Object ref = to_;
      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();
        to_ = s;
        return s;
      }
    }
    /**
     * <code>string to = 4;</code>
     * @return The bytes for to.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getToBytes() {
      java.lang.Object ref = to_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        to_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int TIMESTAMP_MILLIS_FIELD_NUMBER = 5;
    private long timestampMillis_;
    /**
     * <pre>
     * The unix timestamp in milliseconds.
     * </pre>
     *
     * <code>int64 timestamp_millis = 5;</code>
     * @return The timestampMillis.
     */
    @java.lang.Override
    public long getTimestampMillis() {
      return timestampMillis_;
    }

    public static final int JSON_FIELD_NUMBER = 6;
    /**
     * <code>string json = 6;</code>
     * @return Whether the json field is set.
     */
    public boolean hasJson() {
      return payloadCase_ == 6;
    }
    /**
     * <code>string json = 6;</code>
     * @return The json.
     */
    public java.lang.String getJson() {
      java.lang.Object ref = "";
      if (payloadCase_ == 6) {
        ref = payload_;
      }
      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();
        if (payloadCase_ == 6) {
          payload_ = s;
        }
        return s;
      }
    }
    /**
     * <code>string json = 6;</code>
     * @return The bytes for json.
     */
    public com.google.protobuf.ByteString
        getJsonBytes() {
      java.lang.Object ref = "";
      if (payloadCase_ == 6) {
        ref = payload_;
      }
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (payloadCase_ == 6) {
          payload_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    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 (id_ != 0L) {
        output.writeUInt64(1, id_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subject_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, from_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, to_);
      }
      if (timestampMillis_ != 0L) {
        output.writeInt64(5, timestampMillis_);
      }
      if (payloadCase_ == 6) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payload_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (id_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(1, id_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subject_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, from_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, to_);
      }
      if (timestampMillis_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(5, timestampMillis_);
      }
      if (payloadCase_ == 6) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payload_);
      }
      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.meta.HeartbeatOuterClass.MailboxMessage)) {
        return super.equals(obj);
      }
      greptime.v1.meta.HeartbeatOuterClass.MailboxMessage other = (greptime.v1.meta.HeartbeatOuterClass.MailboxMessage) obj;

      if (getId()
          != other.getId()) return false;
      if (!getSubject()
          .equals(other.getSubject())) return false;
      if (!getFrom()
          .equals(other.getFrom())) return false;
      if (!getTo()
          .equals(other.getTo())) return false;
      if (getTimestampMillis()
          != other.getTimestampMillis()) return false;
      if (!getPayloadCase().equals(other.getPayloadCase())) return false;
      switch (payloadCase_) {
        case 6:
          if (!getJson()
              .equals(other.getJson())) return false;
          break;
        case 0:
        default:
      }
      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) + ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getId());
      hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
      hash = (53 * hash) + getSubject().hashCode();
      hash = (37 * hash) + FROM_FIELD_NUMBER;
      hash = (53 * hash) + getFrom().hashCode();
      hash = (37 * hash) + TO_FIELD_NUMBER;
      hash = (53 * hash) + getTo().hashCode();
      hash = (37 * hash) + TIMESTAMP_MILLIS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getTimestampMillis());
      switch (payloadCase_) {
        case 6:
          hash = (37 * hash) + JSON_FIELD_NUMBER;
          hash = (53 * hash) + getJson().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage 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.meta.HeartbeatOuterClass.MailboxMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage 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.meta.HeartbeatOuterClass.MailboxMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage 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.meta.HeartbeatOuterClass.MailboxMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage 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.meta.HeartbeatOuterClass.MailboxMessage 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;
    }
    /**
     * Protobuf type {@code greptime.v1.meta.MailboxMessage}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:greptime.v1.meta.MailboxMessage)
        greptime.v1.meta.HeartbeatOuterClass.MailboxMessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_MailboxMessage_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_MailboxMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.class, greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.Builder.class);
      }

      // Construct using greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.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();
        id_ = 0L;

        subject_ = "";

        from_ = "";

        to_ = "";

        timestampMillis_ = 0L;

        payloadCase_ = 0;
        payload_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return greptime.v1.meta.HeartbeatOuterClass.internal_static_greptime_v1_meta_MailboxMessage_descriptor;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getDefaultInstanceForType() {
        return greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance();
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage build() {
        greptime.v1.meta.HeartbeatOuterClass.MailboxMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage buildPartial() {
        greptime.v1.meta.HeartbeatOuterClass.MailboxMessage result = new greptime.v1.meta.HeartbeatOuterClass.MailboxMessage(this);
        result.id_ = id_;
        result.subject_ = subject_;
        result.from_ = from_;
        result.to_ = to_;
        result.timestampMillis_ = timestampMillis_;
        if (payloadCase_ == 6) {
          result.payload_ = payload_;
        }
        result.payloadCase_ = payloadCase_;
        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.meta.HeartbeatOuterClass.MailboxMessage) {
          return mergeFrom((greptime.v1.meta.HeartbeatOuterClass.MailboxMessage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(greptime.v1.meta.HeartbeatOuterClass.MailboxMessage other) {
        if (other == greptime.v1.meta.HeartbeatOuterClass.MailboxMessage.getDefaultInstance()) return this;
        if (other.getId() != 0L) {
          setId(other.getId());
        }
        if (!other.getSubject().isEmpty()) {
          subject_ = other.subject_;
          onChanged();
        }
        if (!other.getFrom().isEmpty()) {
          from_ = other.from_;
          onChanged();
        }
        if (!other.getTo().isEmpty()) {
          to_ = other.to_;
          onChanged();
        }
        if (other.getTimestampMillis() != 0L) {
          setTimestampMillis(other.getTimestampMillis());
        }
        switch (other.getPayloadCase()) {
          case JSON: {
            payloadCase_ = 6;
            payload_ = other.payload_;
            onChanged();
            break;
          }
          case PAYLOAD_NOT_SET: {
            break;
          }
        }
        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.meta.HeartbeatOuterClass.MailboxMessage parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (greptime.v1.meta.HeartbeatOuterClass.MailboxMessage) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int payloadCase_ = 0;
      private java.lang.Object payload_;
      public PayloadCase
          getPayloadCase() {
        return PayloadCase.forNumber(
            payloadCase_);
      }

      public Builder clearPayload() {
        payloadCase_ = 0;
        payload_ = null;
        onChanged();
        return this;
      }


      private long id_ ;
      /**
       * <pre>
       * The id is used to associate request and response.
       * </pre>
       *
       * <code>uint64 id = 1;</code>
       * @return The id.
       */
      @java.lang.Override
      public long getId() {
        return id_;
      }
      /**
       * <pre>
       * The id is used to associate request and response.
       * </pre>
       *
       * <code>uint64 id = 1;</code>
       * @param value The id to set.
       * @return This builder for chaining.
       */
      public Builder setId(long value) {
        
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The id is used to associate request and response.
       * </pre>
       *
       * <code>uint64 id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearId() {
        
        id_ = 0L;
        onChanged();
        return this;
      }

      private java.lang.Object subject_ = "";
      /**
       * <pre>
       * The following information plays a bigger role in making messages traceable
       * and facilitating debugging.
       * </pre>
       *
       * <code>string subject = 2;</code>
       * @return The subject.
       */
      public java.lang.String getSubject() {
        java.lang.Object ref = subject_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          subject_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The following information plays a bigger role in making messages traceable
       * and facilitating debugging.
       * </pre>
       *
       * <code>string subject = 2;</code>
       * @return The bytes for subject.
       */
      public com.google.protobuf.ByteString
          getSubjectBytes() {
        java.lang.Object ref = subject_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          subject_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The following information plays a bigger role in making messages traceable
       * and facilitating debugging.
       * </pre>
       *
       * <code>string subject = 2;</code>
       * @param value The subject to set.
       * @return This builder for chaining.
       */
      public Builder setSubject(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        subject_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The following information plays a bigger role in making messages traceable
       * and facilitating debugging.
       * </pre>
       *
       * <code>string subject = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearSubject() {
        
        subject_ = getDefaultInstance().getSubject();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The following information plays a bigger role in making messages traceable
       * and facilitating debugging.
       * </pre>
       *
       * <code>string subject = 2;</code>
       * @param value The bytes for subject to set.
       * @return This builder for chaining.
       */
      public Builder setSubjectBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        subject_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object from_ = "";
      /**
       * <code>string from = 3;</code>
       * @return The from.
       */
      public java.lang.String getFrom() {
        java.lang.Object ref = from_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          from_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string from = 3;</code>
       * @return The bytes for from.
       */
      public com.google.protobuf.ByteString
          getFromBytes() {
        java.lang.Object ref = from_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          from_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string from = 3;</code>
       * @param value The from to set.
       * @return This builder for chaining.
       */
      public Builder setFrom(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        from_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string from = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearFrom() {
        
        from_ = getDefaultInstance().getFrom();
        onChanged();
        return this;
      }
      /**
       * <code>string from = 3;</code>
       * @param value The bytes for from to set.
       * @return This builder for chaining.
       */
      public Builder setFromBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        from_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object to_ = "";
      /**
       * <code>string to = 4;</code>
       * @return The to.
       */
      public java.lang.String getTo() {
        java.lang.Object ref = to_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          to_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string to = 4;</code>
       * @return The bytes for to.
       */
      public com.google.protobuf.ByteString
          getToBytes() {
        java.lang.Object ref = to_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          to_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string to = 4;</code>
       * @param value The to to set.
       * @return This builder for chaining.
       */
      public Builder setTo(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        to_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string to = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearTo() {
        
        to_ = getDefaultInstance().getTo();
        onChanged();
        return this;
      }
      /**
       * <code>string to = 4;</code>
       * @param value The bytes for to to set.
       * @return This builder for chaining.
       */
      public Builder setToBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        to_ = value;
        onChanged();
        return this;
      }

      private long timestampMillis_ ;
      /**
       * <pre>
       * The unix timestamp in milliseconds.
       * </pre>
       *
       * <code>int64 timestamp_millis = 5;</code>
       * @return The timestampMillis.
       */
      @java.lang.Override
      public long getTimestampMillis() {
        return timestampMillis_;
      }
      /**
       * <pre>
       * The unix timestamp in milliseconds.
       * </pre>
       *
       * <code>int64 timestamp_millis = 5;</code>
       * @param value The timestampMillis to set.
       * @return This builder for chaining.
       */
      public Builder setTimestampMillis(long value) {
        
        timestampMillis_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The unix timestamp in milliseconds.
       * </pre>
       *
       * <code>int64 timestamp_millis = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearTimestampMillis() {
        
        timestampMillis_ = 0L;
        onChanged();
        return this;
      }

      /**
       * <code>string json = 6;</code>
       * @return Whether the json field is set.
       */
      @java.lang.Override
      public boolean hasJson() {
        return payloadCase_ == 6;
      }
      /**
       * <code>string json = 6;</code>
       * @return The json.
       */
      @java.lang.Override
      public java.lang.String getJson() {
        java.lang.Object ref = "";
        if (payloadCase_ == 6) {
          ref = payload_;
        }
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (payloadCase_ == 6) {
            payload_ = s;
          }
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string json = 6;</code>
       * @return The bytes for json.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getJsonBytes() {
        java.lang.Object ref = "";
        if (payloadCase_ == 6) {
          ref = payload_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          if (payloadCase_ == 6) {
            payload_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string json = 6;</code>
       * @param value The json to set.
       * @return This builder for chaining.
       */
      public Builder setJson(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  payloadCase_ = 6;
        payload_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string json = 6;</code>
       * @return This builder for chaining.
       */
      public Builder clearJson() {
        if (payloadCase_ == 6) {
          payloadCase_ = 0;
          payload_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <code>string json = 6;</code>
       * @param value The bytes for json to set.
       * @return This builder for chaining.
       */
      public Builder setJsonBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        payloadCase_ = 6;
        payload_ = value;
        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.meta.MailboxMessage)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.meta.MailboxMessage)
    private static final greptime.v1.meta.HeartbeatOuterClass.MailboxMessage DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new greptime.v1.meta.HeartbeatOuterClass.MailboxMessage();
    }

    public static greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public greptime.v1.meta.HeartbeatOuterClass.MailboxMessage getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_HeartbeatRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_HeartbeatRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_RegionStat_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_RegionStat_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_HeartbeatResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_HeartbeatResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_GrantedRegion_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_GrantedRegion_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_RegionLease_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_RegionLease_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_AskLeaderRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_AskLeaderRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_AskLeaderResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_AskLeaderResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_meta_MailboxMessage_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_meta_MailboxMessage_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/meta/heartbeat.proto\022\020grep" +
      "time.v1.meta\032\035greptime/v1/meta/common.pr" +
      "oto\"\303\002\n\020HeartbeatRequest\022/\n\006header\030\001 \001(\013" +
      "2\037.greptime.v1.meta.RequestHeader\022$\n\004pee" +
      "r\030\002 \001(\0132\026.greptime.v1.meta.Peer\0227\n\017repor" +
      "t_interval\030\003 \001(\0132\036.greptime.v1.meta.Time" +
      "Interval\0222\n\014region_stats\030\004 \003(\0132\034.greptim" +
      "e.v1.meta.RegionStat\0229\n\017mailbox_message\030" +
      "\005 \001(\0132 .greptime.v1.meta.MailboxMessage\022" +
      "\034\n\024duration_since_epoch\030\006 \001(\004\022\022\n\nnode_ep" +
      "och\030\007 \001(\004\"\254\001\n\nRegionStat\022\021\n\tregion_id\030\001 " +
      "\001(\004\022\014\n\004rcus\030\002 \001(\003\022\014\n\004wcus\030\003 \001(\003\022\031\n\021appro" +
      "ximate_bytes\030\004 \001(\003\022\030\n\020approximate_rows\030\005" +
      " \001(\003\022\016\n\006engine\030\006 \001(\t\022*\n\004role\030\007 \001(\0162\034.gre" +
      "ptime.v1.meta.RegionRole\"\265\001\n\021HeartbeatRe" +
      "sponse\0220\n\006header\030\001 \001(\0132 .greptime.v1.met" +
      "a.ResponseHeader\0229\n\017mailbox_message\030\002 \001(" +
      "\0132 .greptime.v1.meta.MailboxMessage\0223\n\014r" +
      "egion_lease\030\003 \001(\0132\035.greptime.v1.meta.Reg" +
      "ionLease\"N\n\rGrantedRegion\022\021\n\tregion_id\030\001" +
      " \001(\004\022*\n\004role\030\002 \001(\0162\034.greptime.v1.meta.Re" +
      "gionRole\"\222\001\n\013RegionLease\0220\n\007regions\030\001 \003(" +
      "\0132\037.greptime.v1.meta.GrantedRegion\022\034\n\024du" +
      "ration_since_epoch\030\002 \001(\004\022\025\n\rlease_second" +
      "s\030\003 \001(\004\022\034\n\024closeable_region_ids\030\004 \003(\004\"C\n" +
      "\020AskLeaderRequest\022/\n\006header\030\001 \001(\0132\037.grep" +
      "time.v1.meta.RequestHeader\"m\n\021AskLeaderR" +
      "esponse\0220\n\006header\030\001 \001(\0132 .greptime.v1.me" +
      "ta.ResponseHeader\022&\n\006leader\030\002 \001(\0132\026.grep" +
      "time.v1.meta.Peer\"|\n\016MailboxMessage\022\n\n\002i" +
      "d\030\001 \001(\004\022\017\n\007subject\030\002 \001(\t\022\014\n\004from\030\003 \001(\t\022\n" +
      "\n\002to\030\004 \001(\t\022\030\n\020timestamp_millis\030\005 \001(\003\022\016\n\004" +
      "json\030\006 \001(\tH\000B\t\n\007payload*&\n\nRegionRole\022\n\n" +
      "\006Leader\020\000\022\014\n\010Follower\020\0012\277\001\n\tHeartbeat\022Z\n" +
      "\tHeartbeat\022\".greptime.v1.meta.HeartbeatR" +
      "equest\032#.greptime.v1.meta.HeartbeatRespo" +
      "nse\"\000(\0010\001\022V\n\tAskLeader\022\".greptime.v1.met" +
      "a.AskLeaderRequest\032#.greptime.v1.meta.As" +
      "kLeaderResponse\"\000B<Z:github.com/Greptime" +
      "Team/greptime-proto/go/greptime/v1/metab" +
      "\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          greptime.v1.meta.Common.getDescriptor(),
        });
    internal_static_greptime_v1_meta_HeartbeatRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_greptime_v1_meta_HeartbeatRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_HeartbeatRequest_descriptor,
        new java.lang.String[] { "Header", "Peer", "ReportInterval", "RegionStats", "MailboxMessage", "DurationSinceEpoch", "NodeEpoch", });
    internal_static_greptime_v1_meta_RegionStat_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_greptime_v1_meta_RegionStat_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_RegionStat_descriptor,
        new java.lang.String[] { "RegionId", "Rcus", "Wcus", "ApproximateBytes", "ApproximateRows", "Engine", "Role", });
    internal_static_greptime_v1_meta_HeartbeatResponse_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_greptime_v1_meta_HeartbeatResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_HeartbeatResponse_descriptor,
        new java.lang.String[] { "Header", "MailboxMessage", "RegionLease", });
    internal_static_greptime_v1_meta_GrantedRegion_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_greptime_v1_meta_GrantedRegion_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_GrantedRegion_descriptor,
        new java.lang.String[] { "RegionId", "Role", });
    internal_static_greptime_v1_meta_RegionLease_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_greptime_v1_meta_RegionLease_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_RegionLease_descriptor,
        new java.lang.String[] { "Regions", "DurationSinceEpoch", "LeaseSeconds", "CloseableRegionIds", });
    internal_static_greptime_v1_meta_AskLeaderRequest_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_greptime_v1_meta_AskLeaderRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_AskLeaderRequest_descriptor,
        new java.lang.String[] { "Header", });
    internal_static_greptime_v1_meta_AskLeaderResponse_descriptor =
      getDescriptor().getMessageTypes().get(6);
    internal_static_greptime_v1_meta_AskLeaderResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_AskLeaderResponse_descriptor,
        new java.lang.String[] { "Header", "Leader", });
    internal_static_greptime_v1_meta_MailboxMessage_descriptor =
      getDescriptor().getMessageTypes().get(7);
    internal_static_greptime_v1_meta_MailboxMessage_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_meta_MailboxMessage_descriptor,
        new java.lang.String[] { "Id", "Subject", "From", "To", "TimestampMillis", "Json", "Payload", });
    greptime.v1.meta.Common.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
