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

package io.greptime.v1;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface PromqlRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.PromqlRequest)
      com.google.protobuf.MessageOrBuilder {

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

    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     * @return Whether the instantQuery field is set.
     */
    boolean hasInstantQuery();
    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     * @return The instantQuery.
     */
    io.greptime.v1.Prometheus.PromInstantQuery getInstantQuery();
    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     */
    io.greptime.v1.Prometheus.PromInstantQueryOrBuilder getInstantQueryOrBuilder();

    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     * @return Whether the rangeQuery field is set.
     */
    boolean hasRangeQuery();
    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     * @return The rangeQuery.
     */
    io.greptime.v1.Prometheus.PromRangeQuery getRangeQuery();
    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     */
    io.greptime.v1.Prometheus.PromRangeQueryOrBuilder getRangeQueryOrBuilder();

    public io.greptime.v1.Prometheus.PromqlRequest.PromqlCase getPromqlCase();
  }
  /**
   * Protobuf type {@code greptime.v1.PromqlRequest}
   */
  public static final class PromqlRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.PromqlRequest)
      PromqlRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use PromqlRequest.newBuilder() to construct.
    private PromqlRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private PromqlRequest() {
    }

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

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

              break;
            }
            case 18: {
              io.greptime.v1.Prometheus.PromInstantQuery.Builder subBuilder = null;
              if (promqlCase_ == 2) {
                subBuilder = ((io.greptime.v1.Prometheus.PromInstantQuery) promql_).toBuilder();
              }
              promql_ =
                  input.readMessage(io.greptime.v1.Prometheus.PromInstantQuery.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((io.greptime.v1.Prometheus.PromInstantQuery) promql_);
                promql_ = subBuilder.buildPartial();
              }
              promqlCase_ = 2;
              break;
            }
            case 26: {
              io.greptime.v1.Prometheus.PromRangeQuery.Builder subBuilder = null;
              if (promqlCase_ == 3) {
                subBuilder = ((io.greptime.v1.Prometheus.PromRangeQuery) promql_).toBuilder();
              }
              promql_ =
                  input.readMessage(io.greptime.v1.Prometheus.PromRangeQuery.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((io.greptime.v1.Prometheus.PromRangeQuery) promql_);
                promql_ = subBuilder.buildPartial();
              }
              promqlCase_ = 3;
              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 io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.Prometheus.PromqlRequest.class, io.greptime.v1.Prometheus.PromqlRequest.Builder.class);
    }

    private int promqlCase_ = 0;
    private java.lang.Object promql_;
    public enum PromqlCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      INSTANT_QUERY(2),
      RANGE_QUERY(3),
      PROMQL_NOT_SET(0);
      private final int value;
      private PromqlCase(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 PromqlCase valueOf(int value) {
        return forNumber(value);
      }

      public static PromqlCase forNumber(int value) {
        switch (value) {
          case 2: return INSTANT_QUERY;
          case 3: return RANGE_QUERY;
          case 0: return PROMQL_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public PromqlCase
    getPromqlCase() {
      return PromqlCase.forNumber(
          promqlCase_);
    }

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

    public static final int INSTANT_QUERY_FIELD_NUMBER = 2;
    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     * @return Whether the instantQuery field is set.
     */
    @java.lang.Override
    public boolean hasInstantQuery() {
      return promqlCase_ == 2;
    }
    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     * @return The instantQuery.
     */
    @java.lang.Override
    public io.greptime.v1.Prometheus.PromInstantQuery getInstantQuery() {
      if (promqlCase_ == 2) {
         return (io.greptime.v1.Prometheus.PromInstantQuery) promql_;
      }
      return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
    }
    /**
     * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Prometheus.PromInstantQueryOrBuilder getInstantQueryOrBuilder() {
      if (promqlCase_ == 2) {
         return (io.greptime.v1.Prometheus.PromInstantQuery) promql_;
      }
      return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
    }

    public static final int RANGE_QUERY_FIELD_NUMBER = 3;
    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     * @return Whether the rangeQuery field is set.
     */
    @java.lang.Override
    public boolean hasRangeQuery() {
      return promqlCase_ == 3;
    }
    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     * @return The rangeQuery.
     */
    @java.lang.Override
    public io.greptime.v1.Prometheus.PromRangeQuery getRangeQuery() {
      if (promqlCase_ == 3) {
         return (io.greptime.v1.Prometheus.PromRangeQuery) promql_;
      }
      return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
    }
    /**
     * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
     */
    @java.lang.Override
    public io.greptime.v1.Prometheus.PromRangeQueryOrBuilder getRangeQueryOrBuilder() {
      if (promqlCase_ == 3) {
         return (io.greptime.v1.Prometheus.PromRangeQuery) promql_;
      }
      return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
    }

    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 (promqlCase_ == 2) {
        output.writeMessage(2, (io.greptime.v1.Prometheus.PromInstantQuery) promql_);
      }
      if (promqlCase_ == 3) {
        output.writeMessage(3, (io.greptime.v1.Prometheus.PromRangeQuery) promql_);
      }
      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 (promqlCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (io.greptime.v1.Prometheus.PromInstantQuery) promql_);
      }
      if (promqlCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (io.greptime.v1.Prometheus.PromRangeQuery) promql_);
      }
      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 io.greptime.v1.Prometheus.PromqlRequest)) {
        return super.equals(obj);
      }
      io.greptime.v1.Prometheus.PromqlRequest other = (io.greptime.v1.Prometheus.PromqlRequest) obj;

      if (hasHeader() != other.hasHeader()) return false;
      if (hasHeader()) {
        if (!getHeader()
            .equals(other.getHeader())) return false;
      }
      if (!getPromqlCase().equals(other.getPromqlCase())) return false;
      switch (promqlCase_) {
        case 2:
          if (!getInstantQuery()
              .equals(other.getInstantQuery())) return false;
          break;
        case 3:
          if (!getRangeQuery()
              .equals(other.getRangeQuery())) 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();
      if (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      switch (promqlCase_) {
        case 2:
          hash = (37 * hash) + INSTANT_QUERY_FIELD_NUMBER;
          hash = (53 * hash) + getInstantQuery().hashCode();
          break;
        case 3:
          hash = (37 * hash) + RANGE_QUERY_FIELD_NUMBER;
          hash = (53 * hash) + getRangeQuery().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.Prometheus.PromqlRequest.class, io.greptime.v1.Prometheus.PromqlRequest.Builder.class);
      }

      // Construct using io.greptime.v1.Prometheus.PromqlRequest.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;
        }
        promqlCase_ = 0;
        promql_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlRequest_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromqlRequest getDefaultInstanceForType() {
        return io.greptime.v1.Prometheus.PromqlRequest.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromqlRequest build() {
        io.greptime.v1.Prometheus.PromqlRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromqlRequest buildPartial() {
        io.greptime.v1.Prometheus.PromqlRequest result = new io.greptime.v1.Prometheus.PromqlRequest(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (promqlCase_ == 2) {
          if (instantQueryBuilder_ == null) {
            result.promql_ = promql_;
          } else {
            result.promql_ = instantQueryBuilder_.build();
          }
        }
        if (promqlCase_ == 3) {
          if (rangeQueryBuilder_ == null) {
            result.promql_ = promql_;
          } else {
            result.promql_ = rangeQueryBuilder_.build();
          }
        }
        result.promqlCase_ = promqlCase_;
        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 io.greptime.v1.Prometheus.PromqlRequest) {
          return mergeFrom((io.greptime.v1.Prometheus.PromqlRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.Prometheus.PromqlRequest other) {
        if (other == io.greptime.v1.Prometheus.PromqlRequest.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        switch (other.getPromqlCase()) {
          case INSTANT_QUERY: {
            mergeInstantQuery(other.getInstantQuery());
            break;
          }
          case RANGE_QUERY: {
            mergeRangeQuery(other.getRangeQuery());
            break;
          }
          case PROMQL_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 {
        io.greptime.v1.Prometheus.PromqlRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.Prometheus.PromqlRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int promqlCase_ = 0;
      private java.lang.Object promql_;
      public PromqlCase
          getPromqlCase() {
        return PromqlCase.forNumber(
            promqlCase_);
      }

      public Builder clearPromql() {
        promqlCase_ = 0;
        promql_ = null;
        onChanged();
        return this;
      }


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

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

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

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

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

      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Prometheus.PromInstantQuery, io.greptime.v1.Prometheus.PromInstantQuery.Builder, io.greptime.v1.Prometheus.PromInstantQueryOrBuilder> instantQueryBuilder_;
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       * @return Whether the instantQuery field is set.
       */
      @java.lang.Override
      public boolean hasInstantQuery() {
        return promqlCase_ == 2;
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       * @return The instantQuery.
       */
      @java.lang.Override
      public io.greptime.v1.Prometheus.PromInstantQuery getInstantQuery() {
        if (instantQueryBuilder_ == null) {
          if (promqlCase_ == 2) {
            return (io.greptime.v1.Prometheus.PromInstantQuery) promql_;
          }
          return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
        } else {
          if (promqlCase_ == 2) {
            return instantQueryBuilder_.getMessage();
          }
          return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      public Builder setInstantQuery(io.greptime.v1.Prometheus.PromInstantQuery value) {
        if (instantQueryBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          promql_ = value;
          onChanged();
        } else {
          instantQueryBuilder_.setMessage(value);
        }
        promqlCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      public Builder setInstantQuery(
          io.greptime.v1.Prometheus.PromInstantQuery.Builder builderForValue) {
        if (instantQueryBuilder_ == null) {
          promql_ = builderForValue.build();
          onChanged();
        } else {
          instantQueryBuilder_.setMessage(builderForValue.build());
        }
        promqlCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      public Builder mergeInstantQuery(io.greptime.v1.Prometheus.PromInstantQuery value) {
        if (instantQueryBuilder_ == null) {
          if (promqlCase_ == 2 &&
              promql_ != io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance()) {
            promql_ = io.greptime.v1.Prometheus.PromInstantQuery.newBuilder((io.greptime.v1.Prometheus.PromInstantQuery) promql_)
                .mergeFrom(value).buildPartial();
          } else {
            promql_ = value;
          }
          onChanged();
        } else {
          if (promqlCase_ == 2) {
            instantQueryBuilder_.mergeFrom(value);
          } else {
            instantQueryBuilder_.setMessage(value);
          }
        }
        promqlCase_ = 2;
        return this;
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      public Builder clearInstantQuery() {
        if (instantQueryBuilder_ == null) {
          if (promqlCase_ == 2) {
            promqlCase_ = 0;
            promql_ = null;
            onChanged();
          }
        } else {
          if (promqlCase_ == 2) {
            promqlCase_ = 0;
            promql_ = null;
          }
          instantQueryBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      public io.greptime.v1.Prometheus.PromInstantQuery.Builder getInstantQueryBuilder() {
        return getInstantQueryFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      @java.lang.Override
      public io.greptime.v1.Prometheus.PromInstantQueryOrBuilder getInstantQueryOrBuilder() {
        if ((promqlCase_ == 2) && (instantQueryBuilder_ != null)) {
          return instantQueryBuilder_.getMessageOrBuilder();
        } else {
          if (promqlCase_ == 2) {
            return (io.greptime.v1.Prometheus.PromInstantQuery) promql_;
          }
          return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.PromInstantQuery instant_query = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Prometheus.PromInstantQuery, io.greptime.v1.Prometheus.PromInstantQuery.Builder, io.greptime.v1.Prometheus.PromInstantQueryOrBuilder> 
          getInstantQueryFieldBuilder() {
        if (instantQueryBuilder_ == null) {
          if (!(promqlCase_ == 2)) {
            promql_ = io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
          }
          instantQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Prometheus.PromInstantQuery, io.greptime.v1.Prometheus.PromInstantQuery.Builder, io.greptime.v1.Prometheus.PromInstantQueryOrBuilder>(
                  (io.greptime.v1.Prometheus.PromInstantQuery) promql_,
                  getParentForChildren(),
                  isClean());
          promql_ = null;
        }
        promqlCase_ = 2;
        onChanged();;
        return instantQueryBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Prometheus.PromRangeQuery, io.greptime.v1.Prometheus.PromRangeQuery.Builder, io.greptime.v1.Prometheus.PromRangeQueryOrBuilder> rangeQueryBuilder_;
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       * @return Whether the rangeQuery field is set.
       */
      @java.lang.Override
      public boolean hasRangeQuery() {
        return promqlCase_ == 3;
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       * @return The rangeQuery.
       */
      @java.lang.Override
      public io.greptime.v1.Prometheus.PromRangeQuery getRangeQuery() {
        if (rangeQueryBuilder_ == null) {
          if (promqlCase_ == 3) {
            return (io.greptime.v1.Prometheus.PromRangeQuery) promql_;
          }
          return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
        } else {
          if (promqlCase_ == 3) {
            return rangeQueryBuilder_.getMessage();
          }
          return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      public Builder setRangeQuery(io.greptime.v1.Prometheus.PromRangeQuery value) {
        if (rangeQueryBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          promql_ = value;
          onChanged();
        } else {
          rangeQueryBuilder_.setMessage(value);
        }
        promqlCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      public Builder setRangeQuery(
          io.greptime.v1.Prometheus.PromRangeQuery.Builder builderForValue) {
        if (rangeQueryBuilder_ == null) {
          promql_ = builderForValue.build();
          onChanged();
        } else {
          rangeQueryBuilder_.setMessage(builderForValue.build());
        }
        promqlCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      public Builder mergeRangeQuery(io.greptime.v1.Prometheus.PromRangeQuery value) {
        if (rangeQueryBuilder_ == null) {
          if (promqlCase_ == 3 &&
              promql_ != io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance()) {
            promql_ = io.greptime.v1.Prometheus.PromRangeQuery.newBuilder((io.greptime.v1.Prometheus.PromRangeQuery) promql_)
                .mergeFrom(value).buildPartial();
          } else {
            promql_ = value;
          }
          onChanged();
        } else {
          if (promqlCase_ == 3) {
            rangeQueryBuilder_.mergeFrom(value);
          } else {
            rangeQueryBuilder_.setMessage(value);
          }
        }
        promqlCase_ = 3;
        return this;
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      public Builder clearRangeQuery() {
        if (rangeQueryBuilder_ == null) {
          if (promqlCase_ == 3) {
            promqlCase_ = 0;
            promql_ = null;
            onChanged();
          }
        } else {
          if (promqlCase_ == 3) {
            promqlCase_ = 0;
            promql_ = null;
          }
          rangeQueryBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      public io.greptime.v1.Prometheus.PromRangeQuery.Builder getRangeQueryBuilder() {
        return getRangeQueryFieldBuilder().getBuilder();
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      @java.lang.Override
      public io.greptime.v1.Prometheus.PromRangeQueryOrBuilder getRangeQueryOrBuilder() {
        if ((promqlCase_ == 3) && (rangeQueryBuilder_ != null)) {
          return rangeQueryBuilder_.getMessageOrBuilder();
        } else {
          if (promqlCase_ == 3) {
            return (io.greptime.v1.Prometheus.PromRangeQuery) promql_;
          }
          return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
        }
      }
      /**
       * <code>.greptime.v1.PromRangeQuery range_query = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          io.greptime.v1.Prometheus.PromRangeQuery, io.greptime.v1.Prometheus.PromRangeQuery.Builder, io.greptime.v1.Prometheus.PromRangeQueryOrBuilder> 
          getRangeQueryFieldBuilder() {
        if (rangeQueryBuilder_ == null) {
          if (!(promqlCase_ == 3)) {
            promql_ = io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
          }
          rangeQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              io.greptime.v1.Prometheus.PromRangeQuery, io.greptime.v1.Prometheus.PromRangeQuery.Builder, io.greptime.v1.Prometheus.PromRangeQueryOrBuilder>(
                  (io.greptime.v1.Prometheus.PromRangeQuery) promql_,
                  getParentForChildren(),
                  isClean());
          promql_ = null;
        }
        promqlCase_ = 3;
        onChanged();;
        return rangeQueryBuilder_;
      }
      @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.PromqlRequest)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.PromqlRequest)
    private static final io.greptime.v1.Prometheus.PromqlRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.Prometheus.PromqlRequest();
    }

    public static io.greptime.v1.Prometheus.PromqlRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.Prometheus.PromqlRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface PromqlResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.PromqlResponse)
      com.google.protobuf.MessageOrBuilder {

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

    /**
     * <pre>
     * absolutely same format as Prometheus in JSON
     * </pre>
     *
     * <code>bytes body = 2;</code>
     * @return The body.
     */
    com.google.protobuf.ByteString getBody();
  }
  /**
   * Protobuf type {@code greptime.v1.PromqlResponse}
   */
  public static final class PromqlResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.PromqlResponse)
      PromqlResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use PromqlResponse.newBuilder() to construct.
    private PromqlResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private PromqlResponse() {
      body_ = com.google.protobuf.ByteString.EMPTY;
    }

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

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

              break;
            }
            case 18: {

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.Prometheus.PromqlResponse.class, io.greptime.v1.Prometheus.PromqlResponse.Builder.class);
    }

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

    public static final int BODY_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString body_;
    /**
     * <pre>
     * absolutely same format as Prometheus in JSON
     * </pre>
     *
     * <code>bytes body = 2;</code>
     * @return The body.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }

    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 (!body_.isEmpty()) {
        output.writeBytes(2, body_);
      }
      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 (!body_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, body_);
      }
      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 io.greptime.v1.Prometheus.PromqlResponse)) {
        return super.equals(obj);
      }
      io.greptime.v1.Prometheus.PromqlResponse other = (io.greptime.v1.Prometheus.PromqlResponse) obj;

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

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.Prometheus.PromqlResponse.class, io.greptime.v1.Prometheus.PromqlResponse.Builder.class);
      }

      // Construct using io.greptime.v1.Prometheus.PromqlResponse.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;
        }
        body_ = com.google.protobuf.ByteString.EMPTY;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromqlResponse_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromqlResponse getDefaultInstanceForType() {
        return io.greptime.v1.Prometheus.PromqlResponse.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromqlResponse build() {
        io.greptime.v1.Prometheus.PromqlResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

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

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

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

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

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

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

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

      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * absolutely same format as Prometheus in JSON
       * </pre>
       *
       * <code>bytes body = 2;</code>
       * @return The body.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      /**
       * <pre>
       * absolutely same format as Prometheus in JSON
       * </pre>
       *
       * <code>bytes body = 2;</code>
       * @param value The body to set.
       * @return This builder for chaining.
       */
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        body_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * absolutely same format as Prometheus in JSON
       * </pre>
       *
       * <code>bytes body = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearBody() {
        
        body_ = getDefaultInstance().getBody();
        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.PromqlResponse)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.PromqlResponse)
    private static final io.greptime.v1.Prometheus.PromqlResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.Prometheus.PromqlResponse();
    }

    public static io.greptime.v1.Prometheus.PromqlResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.Prometheus.PromqlResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface PromInstantQueryOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.PromInstantQuery)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string query = 1;</code>
     * @return The query.
     */
    java.lang.String getQuery();
    /**
     * <code>string query = 1;</code>
     * @return The bytes for query.
     */
    com.google.protobuf.ByteString
        getQueryBytes();

    /**
     * <code>string time = 2;</code>
     * @return The time.
     */
    java.lang.String getTime();
    /**
     * <code>string time = 2;</code>
     * @return The bytes for time.
     */
    com.google.protobuf.ByteString
        getTimeBytes();

    /**
     * <code>string lookback = 3;</code>
     * @return The lookback.
     */
    java.lang.String getLookback();
    /**
     * <code>string lookback = 3;</code>
     * @return The bytes for lookback.
     */
    com.google.protobuf.ByteString
        getLookbackBytes();
  }
  /**
   * Protobuf type {@code greptime.v1.PromInstantQuery}
   */
  public static final class PromInstantQuery extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.PromInstantQuery)
      PromInstantQueryOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use PromInstantQuery.newBuilder() to construct.
    private PromInstantQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private PromInstantQuery() {
      query_ = "";
      time_ = "";
      lookback_ = "";
    }

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

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

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

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

              lookback_ = 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 io.greptime.v1.Prometheus.internal_static_greptime_v1_PromInstantQuery_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.Prometheus.PromInstantQuery.class, io.greptime.v1.Prometheus.PromInstantQuery.Builder.class);
    }

    public static final int QUERY_FIELD_NUMBER = 1;
    private volatile java.lang.Object query_;
    /**
     * <code>string query = 1;</code>
     * @return The query.
     */
    @java.lang.Override
    public java.lang.String getQuery() {
      java.lang.Object ref = query_;
      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();
        query_ = s;
        return s;
      }
    }
    /**
     * <code>string query = 1;</code>
     * @return The bytes for query.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getQueryBytes() {
      java.lang.Object ref = query_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        query_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int TIME_FIELD_NUMBER = 2;
    private volatile java.lang.Object time_;
    /**
     * <code>string time = 2;</code>
     * @return The time.
     */
    @java.lang.Override
    public java.lang.String getTime() {
      java.lang.Object ref = time_;
      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();
        time_ = s;
        return s;
      }
    }
    /**
     * <code>string time = 2;</code>
     * @return The bytes for time.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getTimeBytes() {
      java.lang.Object ref = time_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        time_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int LOOKBACK_FIELD_NUMBER = 3;
    private volatile java.lang.Object lookback_;
    /**
     * <code>string lookback = 3;</code>
     * @return The lookback.
     */
    @java.lang.Override
    public java.lang.String getLookback() {
      java.lang.Object ref = lookback_;
      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();
        lookback_ = s;
        return s;
      }
    }
    /**
     * <code>string lookback = 3;</code>
     * @return The bytes for lookback.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getLookbackBytes() {
      java.lang.Object ref = lookback_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        lookback_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, time_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lookback_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(time_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, time_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, lookback_);
      }
      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 io.greptime.v1.Prometheus.PromInstantQuery)) {
        return super.equals(obj);
      }
      io.greptime.v1.Prometheus.PromInstantQuery other = (io.greptime.v1.Prometheus.PromInstantQuery) obj;

      if (!getQuery()
          .equals(other.getQuery())) return false;
      if (!getTime()
          .equals(other.getTime())) return false;
      if (!getLookback()
          .equals(other.getLookback())) 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) + QUERY_FIELD_NUMBER;
      hash = (53 * hash) + getQuery().hashCode();
      hash = (37 * hash) + TIME_FIELD_NUMBER;
      hash = (53 * hash) + getTime().hashCode();
      hash = (37 * hash) + LOOKBACK_FIELD_NUMBER;
      hash = (53 * hash) + getLookback().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.Prometheus.PromInstantQuery.class, io.greptime.v1.Prometheus.PromInstantQuery.Builder.class);
      }

      // Construct using io.greptime.v1.Prometheus.PromInstantQuery.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();
        query_ = "";

        time_ = "";

        lookback_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromInstantQuery_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromInstantQuery getDefaultInstanceForType() {
        return io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromInstantQuery build() {
        io.greptime.v1.Prometheus.PromInstantQuery result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromInstantQuery buildPartial() {
        io.greptime.v1.Prometheus.PromInstantQuery result = new io.greptime.v1.Prometheus.PromInstantQuery(this);
        result.query_ = query_;
        result.time_ = time_;
        result.lookback_ = lookback_;
        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 io.greptime.v1.Prometheus.PromInstantQuery) {
          return mergeFrom((io.greptime.v1.Prometheus.PromInstantQuery)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.Prometheus.PromInstantQuery other) {
        if (other == io.greptime.v1.Prometheus.PromInstantQuery.getDefaultInstance()) return this;
        if (!other.getQuery().isEmpty()) {
          query_ = other.query_;
          onChanged();
        }
        if (!other.getTime().isEmpty()) {
          time_ = other.time_;
          onChanged();
        }
        if (!other.getLookback().isEmpty()) {
          lookback_ = other.lookback_;
          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 {
        io.greptime.v1.Prometheus.PromInstantQuery parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.Prometheus.PromInstantQuery) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object query_ = "";
      /**
       * <code>string query = 1;</code>
       * @return The query.
       */
      public java.lang.String getQuery() {
        java.lang.Object ref = query_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          query_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string query = 1;</code>
       * @return The bytes for query.
       */
      public com.google.protobuf.ByteString
          getQueryBytes() {
        java.lang.Object ref = query_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          query_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string query = 1;</code>
       * @param value The query to set.
       * @return This builder for chaining.
       */
      public Builder setQuery(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        query_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string query = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearQuery() {
        
        query_ = getDefaultInstance().getQuery();
        onChanged();
        return this;
      }
      /**
       * <code>string query = 1;</code>
       * @param value The bytes for query to set.
       * @return This builder for chaining.
       */
      public Builder setQueryBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        query_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object time_ = "";
      /**
       * <code>string time = 2;</code>
       * @return The time.
       */
      public java.lang.String getTime() {
        java.lang.Object ref = time_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          time_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string time = 2;</code>
       * @return The bytes for time.
       */
      public com.google.protobuf.ByteString
          getTimeBytes() {
        java.lang.Object ref = time_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          time_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string time = 2;</code>
       * @param value The time to set.
       * @return This builder for chaining.
       */
      public Builder setTime(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        time_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string time = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearTime() {
        
        time_ = getDefaultInstance().getTime();
        onChanged();
        return this;
      }
      /**
       * <code>string time = 2;</code>
       * @param value The bytes for time to set.
       * @return This builder for chaining.
       */
      public Builder setTimeBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        time_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object lookback_ = "";
      /**
       * <code>string lookback = 3;</code>
       * @return The lookback.
       */
      public java.lang.String getLookback() {
        java.lang.Object ref = lookback_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          lookback_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string lookback = 3;</code>
       * @return The bytes for lookback.
       */
      public com.google.protobuf.ByteString
          getLookbackBytes() {
        java.lang.Object ref = lookback_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          lookback_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string lookback = 3;</code>
       * @param value The lookback to set.
       * @return This builder for chaining.
       */
      public Builder setLookback(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        lookback_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string lookback = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearLookback() {
        
        lookback_ = getDefaultInstance().getLookback();
        onChanged();
        return this;
      }
      /**
       * <code>string lookback = 3;</code>
       * @param value The bytes for lookback to set.
       * @return This builder for chaining.
       */
      public Builder setLookbackBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        lookback_ = 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.PromInstantQuery)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.PromInstantQuery)
    private static final io.greptime.v1.Prometheus.PromInstantQuery DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.Prometheus.PromInstantQuery();
    }

    public static io.greptime.v1.Prometheus.PromInstantQuery getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.Prometheus.PromInstantQuery getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface PromRangeQueryOrBuilder extends
      // @@protoc_insertion_point(interface_extends:greptime.v1.PromRangeQuery)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string query = 1;</code>
     * @return The query.
     */
    java.lang.String getQuery();
    /**
     * <code>string query = 1;</code>
     * @return The bytes for query.
     */
    com.google.protobuf.ByteString
        getQueryBytes();

    /**
     * <code>string start = 2;</code>
     * @return The start.
     */
    java.lang.String getStart();
    /**
     * <code>string start = 2;</code>
     * @return The bytes for start.
     */
    com.google.protobuf.ByteString
        getStartBytes();

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

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

    /**
     * <code>string lookback = 5;</code>
     * @return The lookback.
     */
    java.lang.String getLookback();
    /**
     * <code>string lookback = 5;</code>
     * @return The bytes for lookback.
     */
    com.google.protobuf.ByteString
        getLookbackBytes();
  }
  /**
   * Protobuf type {@code greptime.v1.PromRangeQuery}
   */
  public static final class PromRangeQuery extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:greptime.v1.PromRangeQuery)
      PromRangeQueryOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use PromRangeQuery.newBuilder() to construct.
    private PromRangeQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private PromRangeQuery() {
      query_ = "";
      start_ = "";
      end_ = "";
      step_ = "";
      lookback_ = "";
    }

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

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

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

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

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

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

              lookback_ = 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 io.greptime.v1.Prometheus.internal_static_greptime_v1_PromRangeQuery_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.greptime.v1.Prometheus.PromRangeQuery.class, io.greptime.v1.Prometheus.PromRangeQuery.Builder.class);
    }

    public static final int QUERY_FIELD_NUMBER = 1;
    private volatile java.lang.Object query_;
    /**
     * <code>string query = 1;</code>
     * @return The query.
     */
    @java.lang.Override
    public java.lang.String getQuery() {
      java.lang.Object ref = query_;
      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();
        query_ = s;
        return s;
      }
    }
    /**
     * <code>string query = 1;</code>
     * @return The bytes for query.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getQueryBytes() {
      java.lang.Object ref = query_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        query_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int START_FIELD_NUMBER = 2;
    private volatile java.lang.Object start_;
    /**
     * <code>string start = 2;</code>
     * @return The start.
     */
    @java.lang.Override
    public java.lang.String getStart() {
      java.lang.Object ref = start_;
      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();
        start_ = s;
        return s;
      }
    }
    /**
     * <code>string start = 2;</code>
     * @return The bytes for start.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getStartBytes() {
      java.lang.Object ref = start_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        start_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

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

    public static final int LOOKBACK_FIELD_NUMBER = 5;
    private volatile java.lang.Object lookback_;
    /**
     * <code>string lookback = 5;</code>
     * @return The lookback.
     */
    @java.lang.Override
    public java.lang.String getLookback() {
      java.lang.Object ref = lookback_;
      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();
        lookback_ = s;
        return s;
      }
    }
    /**
     * <code>string lookback = 5;</code>
     * @return The bytes for lookback.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getLookbackBytes() {
      java.lang.Object ref = lookback_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        lookback_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(start_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, start_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(end_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, end_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, step_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lookback_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(start_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, start_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(end_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, end_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(step_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, step_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lookback_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lookback_);
      }
      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 io.greptime.v1.Prometheus.PromRangeQuery)) {
        return super.equals(obj);
      }
      io.greptime.v1.Prometheus.PromRangeQuery other = (io.greptime.v1.Prometheus.PromRangeQuery) obj;

      if (!getQuery()
          .equals(other.getQuery())) return false;
      if (!getStart()
          .equals(other.getStart())) return false;
      if (!getEnd()
          .equals(other.getEnd())) return false;
      if (!getStep()
          .equals(other.getStep())) return false;
      if (!getLookback()
          .equals(other.getLookback())) 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) + QUERY_FIELD_NUMBER;
      hash = (53 * hash) + getQuery().hashCode();
      hash = (37 * hash) + START_FIELD_NUMBER;
      hash = (53 * hash) + getStart().hashCode();
      hash = (37 * hash) + END_FIELD_NUMBER;
      hash = (53 * hash) + getEnd().hashCode();
      hash = (37 * hash) + STEP_FIELD_NUMBER;
      hash = (53 * hash) + getStep().hashCode();
      hash = (37 * hash) + LOOKBACK_FIELD_NUMBER;
      hash = (53 * hash) + getLookback().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.greptime.v1.Prometheus.PromRangeQuery.class, io.greptime.v1.Prometheus.PromRangeQuery.Builder.class);
      }

      // Construct using io.greptime.v1.Prometheus.PromRangeQuery.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();
        query_ = "";

        start_ = "";

        end_ = "";

        step_ = "";

        lookback_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.greptime.v1.Prometheus.internal_static_greptime_v1_PromRangeQuery_descriptor;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromRangeQuery getDefaultInstanceForType() {
        return io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance();
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromRangeQuery build() {
        io.greptime.v1.Prometheus.PromRangeQuery result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.greptime.v1.Prometheus.PromRangeQuery buildPartial() {
        io.greptime.v1.Prometheus.PromRangeQuery result = new io.greptime.v1.Prometheus.PromRangeQuery(this);
        result.query_ = query_;
        result.start_ = start_;
        result.end_ = end_;
        result.step_ = step_;
        result.lookback_ = lookback_;
        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 io.greptime.v1.Prometheus.PromRangeQuery) {
          return mergeFrom((io.greptime.v1.Prometheus.PromRangeQuery)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.greptime.v1.Prometheus.PromRangeQuery other) {
        if (other == io.greptime.v1.Prometheus.PromRangeQuery.getDefaultInstance()) return this;
        if (!other.getQuery().isEmpty()) {
          query_ = other.query_;
          onChanged();
        }
        if (!other.getStart().isEmpty()) {
          start_ = other.start_;
          onChanged();
        }
        if (!other.getEnd().isEmpty()) {
          end_ = other.end_;
          onChanged();
        }
        if (!other.getStep().isEmpty()) {
          step_ = other.step_;
          onChanged();
        }
        if (!other.getLookback().isEmpty()) {
          lookback_ = other.lookback_;
          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 {
        io.greptime.v1.Prometheus.PromRangeQuery parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (io.greptime.v1.Prometheus.PromRangeQuery) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object query_ = "";
      /**
       * <code>string query = 1;</code>
       * @return The query.
       */
      public java.lang.String getQuery() {
        java.lang.Object ref = query_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          query_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string query = 1;</code>
       * @return The bytes for query.
       */
      public com.google.protobuf.ByteString
          getQueryBytes() {
        java.lang.Object ref = query_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          query_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string query = 1;</code>
       * @param value The query to set.
       * @return This builder for chaining.
       */
      public Builder setQuery(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        query_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string query = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearQuery() {
        
        query_ = getDefaultInstance().getQuery();
        onChanged();
        return this;
      }
      /**
       * <code>string query = 1;</code>
       * @param value The bytes for query to set.
       * @return This builder for chaining.
       */
      public Builder setQueryBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        query_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object start_ = "";
      /**
       * <code>string start = 2;</code>
       * @return The start.
       */
      public java.lang.String getStart() {
        java.lang.Object ref = start_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          start_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string start = 2;</code>
       * @return The bytes for start.
       */
      public com.google.protobuf.ByteString
          getStartBytes() {
        java.lang.Object ref = start_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          start_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string start = 2;</code>
       * @param value The start to set.
       * @return This builder for chaining.
       */
      public Builder setStart(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        start_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string start = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearStart() {
        
        start_ = getDefaultInstance().getStart();
        onChanged();
        return this;
      }
      /**
       * <code>string start = 2;</code>
       * @param value The bytes for start to set.
       * @return This builder for chaining.
       */
      public Builder setStartBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        start_ = value;
        onChanged();
        return this;
      }

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

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

      private java.lang.Object lookback_ = "";
      /**
       * <code>string lookback = 5;</code>
       * @return The lookback.
       */
      public java.lang.String getLookback() {
        java.lang.Object ref = lookback_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          lookback_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string lookback = 5;</code>
       * @return The bytes for lookback.
       */
      public com.google.protobuf.ByteString
          getLookbackBytes() {
        java.lang.Object ref = lookback_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          lookback_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string lookback = 5;</code>
       * @param value The lookback to set.
       * @return This builder for chaining.
       */
      public Builder setLookback(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        lookback_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string lookback = 5;</code>
       * @return This builder for chaining.
       */
      public Builder clearLookback() {
        
        lookback_ = getDefaultInstance().getLookback();
        onChanged();
        return this;
      }
      /**
       * <code>string lookback = 5;</code>
       * @param value The bytes for lookback to set.
       * @return This builder for chaining.
       */
      public Builder setLookbackBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        lookback_ = 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.PromRangeQuery)
    }

    // @@protoc_insertion_point(class_scope:greptime.v1.PromRangeQuery)
    private static final io.greptime.v1.Prometheus.PromRangeQuery DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.greptime.v1.Prometheus.PromRangeQuery();
    }

    public static io.greptime.v1.Prometheus.PromRangeQuery getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public io.greptime.v1.Prometheus.PromRangeQuery getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_PromqlRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_PromqlRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_PromqlResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_PromqlResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_PromInstantQuery_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_greptime_v1_PromRangeQuery_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_greptime_v1_PromRangeQuery_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\026greptime/v1/prom.proto\022\013greptime.v1\032\030g" +
      "reptime/v1/common.proto\"\261\001\n\rPromqlReques" +
      "t\022*\n\006header\030\001 \001(\0132\032.greptime.v1.RequestH" +
      "eader\0226\n\rinstant_query\030\002 \001(\0132\035.greptime." +
      "v1.PromInstantQueryH\000\0222\n\013range_query\030\003 \001" +
      "(\0132\033.greptime.v1.PromRangeQueryH\000B\010\n\006pro" +
      "mql\"K\n\016PromqlResponse\022+\n\006header\030\001 \001(\0132\033." +
      "greptime.v1.ResponseHeader\022\014\n\004body\030\002 \001(\014" +
      "\"A\n\020PromInstantQuery\022\r\n\005query\030\001 \001(\t\022\014\n\004t" +
      "ime\030\002 \001(\t\022\020\n\010lookback\030\003 \001(\t\"[\n\016PromRange" +
      "Query\022\r\n\005query\030\001 \001(\t\022\r\n\005start\030\002 \001(\t\022\013\n\003e" +
      "nd\030\003 \001(\t\022\014\n\004step\030\004 \001(\t\022\020\n\010lookback\030\005 \001(\t" +
      "2V\n\021PrometheusGateway\022A\n\006Handle\022\032.grepti" +
      "me.v1.PromqlRequest\032\033.greptime.v1.Promql" +
      "ResponseBS\n\016io.greptime.v1B\nPrometheusZ5" +
      "github.com/GreptimeTeam/greptime-proto/g" +
      "o/greptime/v1b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          io.greptime.v1.Common.getDescriptor(),
        });
    internal_static_greptime_v1_PromqlRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_greptime_v1_PromqlRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_PromqlRequest_descriptor,
        new java.lang.String[] { "Header", "InstantQuery", "RangeQuery", "Promql", });
    internal_static_greptime_v1_PromqlResponse_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_greptime_v1_PromqlResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_PromqlResponse_descriptor,
        new java.lang.String[] { "Header", "Body", });
    internal_static_greptime_v1_PromInstantQuery_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_greptime_v1_PromInstantQuery_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_PromInstantQuery_descriptor,
        new java.lang.String[] { "Query", "Time", "Lookback", });
    internal_static_greptime_v1_PromRangeQuery_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_greptime_v1_PromRangeQuery_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_greptime_v1_PromRangeQuery_descriptor,
        new java.lang.String[] { "Query", "Start", "End", "Step", "Lookback", });
    io.greptime.v1.Common.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
