// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: prometheus/remote/remote.proto

package prometheus;

public final class Remote {
  private Remote() {}
  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 WriteRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.WriteRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    java.util.List<prometheus.Types.TimeSeries> 
        getTimeseriesList();
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    prometheus.Types.TimeSeries getTimeseries(int index);
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    int getTimeseriesCount();
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
        getTimeseriesOrBuilderList();
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
        int index);

    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    java.util.List<prometheus.Types.MetricMetadata> 
        getMetadataList();
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    prometheus.Types.MetricMetadata getMetadata(int index);
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    int getMetadataCount();
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    java.util.List<? extends prometheus.Types.MetricMetadataOrBuilder> 
        getMetadataOrBuilderList();
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    prometheus.Types.MetricMetadataOrBuilder getMetadataOrBuilder(
        int index);
  }
  /**
   * Protobuf type {@code prometheus.WriteRequest}
   */
  public static final class WriteRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.WriteRequest)
      WriteRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WriteRequest.newBuilder() to construct.
    private WriteRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WriteRequest() {
      timeseries_ = java.util.Collections.emptyList();
      metadata_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WriteRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                timeseries_ = new java.util.ArrayList<prometheus.Types.TimeSeries>();
                mutable_bitField0_ |= 0x00000001;
              }
              timeseries_.add(
                  input.readMessage(prometheus.Types.TimeSeries.parser(), extensionRegistry));
              break;
            }
            case 26: {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                metadata_ = new java.util.ArrayList<prometheus.Types.MetricMetadata>();
                mutable_bitField0_ |= 0x00000002;
              }
              metadata_.add(
                  input.readMessage(prometheus.Types.MetricMetadata.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          timeseries_ = java.util.Collections.unmodifiableList(timeseries_);
        }
        if (((mutable_bitField0_ & 0x00000002) != 0)) {
          metadata_ = java.util.Collections.unmodifiableList(metadata_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_WriteRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_WriteRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.WriteRequest.class, prometheus.Remote.WriteRequest.Builder.class);
    }

    public static final int TIMESERIES_FIELD_NUMBER = 1;
    private java.util.List<prometheus.Types.TimeSeries> timeseries_;
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Types.TimeSeries> getTimeseriesList() {
      return timeseries_;
    }
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
        getTimeseriesOrBuilderList() {
      return timeseries_;
    }
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public int getTimeseriesCount() {
      return timeseries_.size();
    }
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.TimeSeries getTimeseries(int index) {
      return timeseries_.get(index);
    }
    /**
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
        int index) {
      return timeseries_.get(index);
    }

    public static final int METADATA_FIELD_NUMBER = 3;
    private java.util.List<prometheus.Types.MetricMetadata> metadata_;
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Types.MetricMetadata> getMetadataList() {
      return metadata_;
    }
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Types.MetricMetadataOrBuilder> 
        getMetadataOrBuilderList() {
      return metadata_;
    }
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    @java.lang.Override
    public int getMetadataCount() {
      return metadata_.size();
    }
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    @java.lang.Override
    public prometheus.Types.MetricMetadata getMetadata(int index) {
      return metadata_.get(index);
    }
    /**
     * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
     */
    @java.lang.Override
    public prometheus.Types.MetricMetadataOrBuilder getMetadataOrBuilder(
        int index) {
      return metadata_.get(index);
    }

    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 {
      for (int i = 0; i < timeseries_.size(); i++) {
        output.writeMessage(1, timeseries_.get(i));
      }
      for (int i = 0; i < metadata_.size(); i++) {
        output.writeMessage(3, metadata_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < timeseries_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, timeseries_.get(i));
      }
      for (int i = 0; i < metadata_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, metadata_.get(i));
      }
      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 prometheus.Remote.WriteRequest)) {
        return super.equals(obj);
      }
      prometheus.Remote.WriteRequest other = (prometheus.Remote.WriteRequest) obj;

      if (!getTimeseriesList()
          .equals(other.getTimeseriesList())) return false;
      if (!getMetadataList()
          .equals(other.getMetadataList())) 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 (getTimeseriesCount() > 0) {
        hash = (37 * hash) + TIMESERIES_FIELD_NUMBER;
        hash = (53 * hash) + getTimeseriesList().hashCode();
      }
      if (getMetadataCount() > 0) {
        hash = (37 * hash) + METADATA_FIELD_NUMBER;
        hash = (53 * hash) + getMetadataList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_WriteRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.WriteRequest.class, prometheus.Remote.WriteRequest.Builder.class);
      }

      // Construct using prometheus.Remote.WriteRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getTimeseriesFieldBuilder();
          getMetadataFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (timeseriesBuilder_ == null) {
          timeseries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          timeseriesBuilder_.clear();
        }
        if (metadataBuilder_ == null) {
          metadata_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          metadataBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_WriteRequest_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.WriteRequest getDefaultInstanceForType() {
        return prometheus.Remote.WriteRequest.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.WriteRequest build() {
        prometheus.Remote.WriteRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.WriteRequest buildPartial() {
        prometheus.Remote.WriteRequest result = new prometheus.Remote.WriteRequest(this);
        int from_bitField0_ = bitField0_;
        if (timeseriesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            timeseries_ = java.util.Collections.unmodifiableList(timeseries_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.timeseries_ = timeseries_;
        } else {
          result.timeseries_ = timeseriesBuilder_.build();
        }
        if (metadataBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)) {
            metadata_ = java.util.Collections.unmodifiableList(metadata_);
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.metadata_ = metadata_;
        } else {
          result.metadata_ = metadataBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(prometheus.Remote.WriteRequest other) {
        if (other == prometheus.Remote.WriteRequest.getDefaultInstance()) return this;
        if (timeseriesBuilder_ == null) {
          if (!other.timeseries_.isEmpty()) {
            if (timeseries_.isEmpty()) {
              timeseries_ = other.timeseries_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureTimeseriesIsMutable();
              timeseries_.addAll(other.timeseries_);
            }
            onChanged();
          }
        } else {
          if (!other.timeseries_.isEmpty()) {
            if (timeseriesBuilder_.isEmpty()) {
              timeseriesBuilder_.dispose();
              timeseriesBuilder_ = null;
              timeseries_ = other.timeseries_;
              bitField0_ = (bitField0_ & ~0x00000001);
              timeseriesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getTimeseriesFieldBuilder() : null;
            } else {
              timeseriesBuilder_.addAllMessages(other.timeseries_);
            }
          }
        }
        if (metadataBuilder_ == null) {
          if (!other.metadata_.isEmpty()) {
            if (metadata_.isEmpty()) {
              metadata_ = other.metadata_;
              bitField0_ = (bitField0_ & ~0x00000002);
            } else {
              ensureMetadataIsMutable();
              metadata_.addAll(other.metadata_);
            }
            onChanged();
          }
        } else {
          if (!other.metadata_.isEmpty()) {
            if (metadataBuilder_.isEmpty()) {
              metadataBuilder_.dispose();
              metadataBuilder_ = null;
              metadata_ = other.metadata_;
              bitField0_ = (bitField0_ & ~0x00000002);
              metadataBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getMetadataFieldBuilder() : null;
            } else {
              metadataBuilder_.addAllMessages(other.metadata_);
            }
          }
        }
        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 {
        prometheus.Remote.WriteRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.WriteRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<prometheus.Types.TimeSeries> timeseries_ =
        java.util.Collections.emptyList();
      private void ensureTimeseriesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          timeseries_ = new java.util.ArrayList<prometheus.Types.TimeSeries>(timeseries_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder> timeseriesBuilder_;

      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<prometheus.Types.TimeSeries> getTimeseriesList() {
        if (timeseriesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(timeseries_);
        } else {
          return timeseriesBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public int getTimeseriesCount() {
        if (timeseriesBuilder_ == null) {
          return timeseries_.size();
        } else {
          return timeseriesBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries getTimeseries(int index) {
        if (timeseriesBuilder_ == null) {
          return timeseries_.get(index);
        } else {
          return timeseriesBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder setTimeseries(
          int index, prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.set(index, value);
          onChanged();
        } else {
          timeseriesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder setTimeseries(
          int index, prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.set(index, builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.add(value);
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          int index, prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.add(index, value);
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.add(builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          int index, prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.add(index, builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addAllTimeseries(
          java.lang.Iterable<? extends prometheus.Types.TimeSeries> values) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, timeseries_);
          onChanged();
        } else {
          timeseriesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder clearTimeseries() {
        if (timeseriesBuilder_ == null) {
          timeseries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          timeseriesBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder removeTimeseries(int index) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.remove(index);
          onChanged();
        } else {
          timeseriesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder getTimeseriesBuilder(
          int index) {
        return getTimeseriesFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
          int index) {
        if (timeseriesBuilder_ == null) {
          return timeseries_.get(index);  } else {
          return timeseriesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
           getTimeseriesOrBuilderList() {
        if (timeseriesBuilder_ != null) {
          return timeseriesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(timeseries_);
        }
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder addTimeseriesBuilder() {
        return getTimeseriesFieldBuilder().addBuilder(
            prometheus.Types.TimeSeries.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder addTimeseriesBuilder(
          int index) {
        return getTimeseriesFieldBuilder().addBuilder(
            index, prometheus.Types.TimeSeries.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<prometheus.Types.TimeSeries.Builder> 
           getTimeseriesBuilderList() {
        return getTimeseriesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder> 
          getTimeseriesFieldBuilder() {
        if (timeseriesBuilder_ == null) {
          timeseriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder>(
                  timeseries_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          timeseries_ = null;
        }
        return timeseriesBuilder_;
      }

      private java.util.List<prometheus.Types.MetricMetadata> metadata_ =
        java.util.Collections.emptyList();
      private void ensureMetadataIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          metadata_ = new java.util.ArrayList<prometheus.Types.MetricMetadata>(metadata_);
          bitField0_ |= 0x00000002;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.MetricMetadata, prometheus.Types.MetricMetadata.Builder, prometheus.Types.MetricMetadataOrBuilder> metadataBuilder_;

      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public java.util.List<prometheus.Types.MetricMetadata> getMetadataList() {
        if (metadataBuilder_ == null) {
          return java.util.Collections.unmodifiableList(metadata_);
        } else {
          return metadataBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public int getMetadataCount() {
        if (metadataBuilder_ == null) {
          return metadata_.size();
        } else {
          return metadataBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public prometheus.Types.MetricMetadata getMetadata(int index) {
        if (metadataBuilder_ == null) {
          return metadata_.get(index);
        } else {
          return metadataBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder setMetadata(
          int index, prometheus.Types.MetricMetadata value) {
        if (metadataBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetadataIsMutable();
          metadata_.set(index, value);
          onChanged();
        } else {
          metadataBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder setMetadata(
          int index, prometheus.Types.MetricMetadata.Builder builderForValue) {
        if (metadataBuilder_ == null) {
          ensureMetadataIsMutable();
          metadata_.set(index, builderForValue.build());
          onChanged();
        } else {
          metadataBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder addMetadata(prometheus.Types.MetricMetadata value) {
        if (metadataBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetadataIsMutable();
          metadata_.add(value);
          onChanged();
        } else {
          metadataBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder addMetadata(
          int index, prometheus.Types.MetricMetadata value) {
        if (metadataBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetadataIsMutable();
          metadata_.add(index, value);
          onChanged();
        } else {
          metadataBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder addMetadata(
          prometheus.Types.MetricMetadata.Builder builderForValue) {
        if (metadataBuilder_ == null) {
          ensureMetadataIsMutable();
          metadata_.add(builderForValue.build());
          onChanged();
        } else {
          metadataBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder addMetadata(
          int index, prometheus.Types.MetricMetadata.Builder builderForValue) {
        if (metadataBuilder_ == null) {
          ensureMetadataIsMutable();
          metadata_.add(index, builderForValue.build());
          onChanged();
        } else {
          metadataBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder addAllMetadata(
          java.lang.Iterable<? extends prometheus.Types.MetricMetadata> values) {
        if (metadataBuilder_ == null) {
          ensureMetadataIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, metadata_);
          onChanged();
        } else {
          metadataBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder clearMetadata() {
        if (metadataBuilder_ == null) {
          metadata_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
        } else {
          metadataBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public Builder removeMetadata(int index) {
        if (metadataBuilder_ == null) {
          ensureMetadataIsMutable();
          metadata_.remove(index);
          onChanged();
        } else {
          metadataBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public prometheus.Types.MetricMetadata.Builder getMetadataBuilder(
          int index) {
        return getMetadataFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public prometheus.Types.MetricMetadataOrBuilder getMetadataOrBuilder(
          int index) {
        if (metadataBuilder_ == null) {
          return metadata_.get(index);  } else {
          return metadataBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public java.util.List<? extends prometheus.Types.MetricMetadataOrBuilder> 
           getMetadataOrBuilderList() {
        if (metadataBuilder_ != null) {
          return metadataBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(metadata_);
        }
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public prometheus.Types.MetricMetadata.Builder addMetadataBuilder() {
        return getMetadataFieldBuilder().addBuilder(
            prometheus.Types.MetricMetadata.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public prometheus.Types.MetricMetadata.Builder addMetadataBuilder(
          int index) {
        return getMetadataFieldBuilder().addBuilder(
            index, prometheus.Types.MetricMetadata.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.MetricMetadata metadata = 3;</code>
       */
      public java.util.List<prometheus.Types.MetricMetadata.Builder> 
           getMetadataBuilderList() {
        return getMetadataFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.MetricMetadata, prometheus.Types.MetricMetadata.Builder, prometheus.Types.MetricMetadataOrBuilder> 
          getMetadataFieldBuilder() {
        if (metadataBuilder_ == null) {
          metadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Types.MetricMetadata, prometheus.Types.MetricMetadata.Builder, prometheus.Types.MetricMetadataOrBuilder>(
                  metadata_,
                  ((bitField0_ & 0x00000002) != 0),
                  getParentForChildren(),
                  isClean());
          metadata_ = null;
        }
        return metadataBuilder_;
      }
      @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:prometheus.WriteRequest)
    }

    // @@protoc_insertion_point(class_scope:prometheus.WriteRequest)
    private static final prometheus.Remote.WriteRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.WriteRequest();
    }

    public static prometheus.Remote.WriteRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.WriteRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ReadRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.ReadRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    java.util.List<prometheus.Remote.Query> 
        getQueriesList();
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    prometheus.Remote.Query getQueries(int index);
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    int getQueriesCount();
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    java.util.List<? extends prometheus.Remote.QueryOrBuilder> 
        getQueriesOrBuilderList();
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    prometheus.Remote.QueryOrBuilder getQueriesOrBuilder(
        int index);

    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return A list containing the acceptedResponseTypes.
     */
    java.util.List<prometheus.Remote.ReadRequest.ResponseType> getAcceptedResponseTypesList();
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return The count of acceptedResponseTypes.
     */
    int getAcceptedResponseTypesCount();
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @param index The index of the element to return.
     * @return The acceptedResponseTypes at the given index.
     */
    prometheus.Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index);
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return A list containing the enum numeric values on the wire for acceptedResponseTypes.
     */
    java.util.List<java.lang.Integer>
    getAcceptedResponseTypesValueList();
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of acceptedResponseTypes at the given index.
     */
    int getAcceptedResponseTypesValue(int index);
  }
  /**
   * <pre>
   * ReadRequest represents a remote read request.
   * </pre>
   *
   * Protobuf type {@code prometheus.ReadRequest}
   */
  public static final class ReadRequest extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.ReadRequest)
      ReadRequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ReadRequest.newBuilder() to construct.
    private ReadRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ReadRequest() {
      queries_ = java.util.Collections.emptyList();
      acceptedResponseTypes_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ReadRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                queries_ = new java.util.ArrayList<prometheus.Remote.Query>();
                mutable_bitField0_ |= 0x00000001;
              }
              queries_.add(
                  input.readMessage(prometheus.Remote.Query.parser(), extensionRegistry));
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                acceptedResponseTypes_ = new java.util.ArrayList<java.lang.Integer>();
                mutable_bitField0_ |= 0x00000002;
              }
              acceptedResponseTypes_.add(rawValue);
              break;
            }
            case 18: {
              int length = input.readRawVarint32();
              int oldLimit = input.pushLimit(length);
              while(input.getBytesUntilLimit() > 0) {
                int rawValue = input.readEnum();
                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                  acceptedResponseTypes_ = new java.util.ArrayList<java.lang.Integer>();
                  mutable_bitField0_ |= 0x00000002;
                }
                acceptedResponseTypes_.add(rawValue);
              }
              input.popLimit(oldLimit);
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          queries_ = java.util.Collections.unmodifiableList(queries_);
        }
        if (((mutable_bitField0_ & 0x00000002) != 0)) {
          acceptedResponseTypes_ = java.util.Collections.unmodifiableList(acceptedResponseTypes_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_ReadRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_ReadRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.ReadRequest.class, prometheus.Remote.ReadRequest.Builder.class);
    }

    /**
     * Protobuf enum {@code prometheus.ReadRequest.ResponseType}
     */
    public enum ResponseType
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <pre>
       * Server will return a single ReadResponse message with matched series that includes list of raw samples.
       * It's recommended to use streamed response types instead.
       * Response headers:
       * Content-Type: "application/x-protobuf"
       * Content-Encoding: "snappy"
       * </pre>
       *
       * <code>SAMPLES = 0;</code>
       */
      SAMPLES(0),
      /**
       * <pre>
       * Server will stream a delimited ChunkedReadResponse message that contains XOR encoded chunks for a single series.
       * Each message is following varint size and fixed size bigendian uint32 for CRC32 Castagnoli checksum.
       * Response headers:
       * Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
       * Content-Encoding: ""
       * </pre>
       *
       * <code>STREAMED_XOR_CHUNKS = 1;</code>
       */
      STREAMED_XOR_CHUNKS(1),
      UNRECOGNIZED(-1),
      ;

      /**
       * <pre>
       * Server will return a single ReadResponse message with matched series that includes list of raw samples.
       * It's recommended to use streamed response types instead.
       * Response headers:
       * Content-Type: "application/x-protobuf"
       * Content-Encoding: "snappy"
       * </pre>
       *
       * <code>SAMPLES = 0;</code>
       */
      public static final int SAMPLES_VALUE = 0;
      /**
       * <pre>
       * Server will stream a delimited ChunkedReadResponse message that contains XOR encoded chunks for a single series.
       * Each message is following varint size and fixed size bigendian uint32 for CRC32 Castagnoli checksum.
       * Response headers:
       * Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
       * Content-Encoding: ""
       * </pre>
       *
       * <code>STREAMED_XOR_CHUNKS = 1;</code>
       */
      public static final int STREAMED_XOR_CHUNKS_VALUE = 1;


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

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

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

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

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

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

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

      private final int value;

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

      // @@protoc_insertion_point(enum_scope:prometheus.ReadRequest.ResponseType)
    }

    public static final int QUERIES_FIELD_NUMBER = 1;
    private java.util.List<prometheus.Remote.Query> queries_;
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Remote.Query> getQueriesList() {
      return queries_;
    }
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Remote.QueryOrBuilder> 
        getQueriesOrBuilderList() {
      return queries_;
    }
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    @java.lang.Override
    public int getQueriesCount() {
      return queries_.size();
    }
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Remote.Query getQueries(int index) {
      return queries_.get(index);
    }
    /**
     * <code>repeated .prometheus.Query queries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Remote.QueryOrBuilder getQueriesOrBuilder(
        int index) {
      return queries_.get(index);
    }

    public static final int ACCEPTED_RESPONSE_TYPES_FIELD_NUMBER = 2;
    private java.util.List<java.lang.Integer> acceptedResponseTypes_;
    private static final com.google.protobuf.Internal.ListAdapter.Converter<
        java.lang.Integer, prometheus.Remote.ReadRequest.ResponseType> acceptedResponseTypes_converter_ =
            new com.google.protobuf.Internal.ListAdapter.Converter<
                java.lang.Integer, prometheus.Remote.ReadRequest.ResponseType>() {
              public prometheus.Remote.ReadRequest.ResponseType convert(java.lang.Integer from) {
                @SuppressWarnings("deprecation")
                prometheus.Remote.ReadRequest.ResponseType result = prometheus.Remote.ReadRequest.ResponseType.valueOf(from);
                return result == null ? prometheus.Remote.ReadRequest.ResponseType.UNRECOGNIZED : result;
              }
            };
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return A list containing the acceptedResponseTypes.
     */
    @java.lang.Override
    public java.util.List<prometheus.Remote.ReadRequest.ResponseType> getAcceptedResponseTypesList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, prometheus.Remote.ReadRequest.ResponseType>(acceptedResponseTypes_, acceptedResponseTypes_converter_);
    }
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return The count of acceptedResponseTypes.
     */
    @java.lang.Override
    public int getAcceptedResponseTypesCount() {
      return acceptedResponseTypes_.size();
    }
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @param index The index of the element to return.
     * @return The acceptedResponseTypes at the given index.
     */
    @java.lang.Override
    public prometheus.Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index) {
      return acceptedResponseTypes_converter_.convert(acceptedResponseTypes_.get(index));
    }
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @return A list containing the enum numeric values on the wire for acceptedResponseTypes.
     */
    @java.lang.Override
    public java.util.List<java.lang.Integer>
    getAcceptedResponseTypesValueList() {
      return acceptedResponseTypes_;
    }
    /**
     * <pre>
     * accepted_response_types allows negotiating the content type of the response.
     * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
     * implemented by server, error is returned.
     * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
     * </pre>
     *
     * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of acceptedResponseTypes at the given index.
     */
    @java.lang.Override
    public int getAcceptedResponseTypesValue(int index) {
      return acceptedResponseTypes_.get(index);
    }
    private int acceptedResponseTypesMemoizedSerializedSize;

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      for (int i = 0; i < queries_.size(); i++) {
        output.writeMessage(1, queries_.get(i));
      }
      if (getAcceptedResponseTypesList().size() > 0) {
        output.writeUInt32NoTag(18);
        output.writeUInt32NoTag(acceptedResponseTypesMemoizedSerializedSize);
      }
      for (int i = 0; i < acceptedResponseTypes_.size(); i++) {
        output.writeEnumNoTag(acceptedResponseTypes_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < queries_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, queries_.get(i));
      }
      {
        int dataSize = 0;
        for (int i = 0; i < acceptedResponseTypes_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeEnumSizeNoTag(acceptedResponseTypes_.get(i));
        }
        size += dataSize;
        if (!getAcceptedResponseTypesList().isEmpty()) {  size += 1;
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(dataSize);
        }acceptedResponseTypesMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof prometheus.Remote.ReadRequest)) {
        return super.equals(obj);
      }
      prometheus.Remote.ReadRequest other = (prometheus.Remote.ReadRequest) obj;

      if (!getQueriesList()
          .equals(other.getQueriesList())) return false;
      if (!acceptedResponseTypes_.equals(other.acceptedResponseTypes_)) 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 (getQueriesCount() > 0) {
        hash = (37 * hash) + QUERIES_FIELD_NUMBER;
        hash = (53 * hash) + getQueriesList().hashCode();
      }
      if (getAcceptedResponseTypesCount() > 0) {
        hash = (37 * hash) + ACCEPTED_RESPONSE_TYPES_FIELD_NUMBER;
        hash = (53 * hash) + acceptedResponseTypes_.hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static prometheus.Remote.ReadRequest parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadRequest parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadRequest 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 prometheus.Remote.ReadRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadRequest 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 prometheus.Remote.ReadRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadRequest 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(prometheus.Remote.ReadRequest prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * ReadRequest represents a remote read request.
     * </pre>
     *
     * Protobuf type {@code prometheus.ReadRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:prometheus.ReadRequest)
        prometheus.Remote.ReadRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return prometheus.Remote.internal_static_prometheus_ReadRequest_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_ReadRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.ReadRequest.class, prometheus.Remote.ReadRequest.Builder.class);
      }

      // Construct using prometheus.Remote.ReadRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getQueriesFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (queriesBuilder_ == null) {
          queries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          queriesBuilder_.clear();
        }
        acceptedResponseTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_ReadRequest_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.ReadRequest getDefaultInstanceForType() {
        return prometheus.Remote.ReadRequest.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.ReadRequest build() {
        prometheus.Remote.ReadRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.ReadRequest buildPartial() {
        prometheus.Remote.ReadRequest result = new prometheus.Remote.ReadRequest(this);
        int from_bitField0_ = bitField0_;
        if (queriesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            queries_ = java.util.Collections.unmodifiableList(queries_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.queries_ = queries_;
        } else {
          result.queries_ = queriesBuilder_.build();
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          acceptedResponseTypes_ = java.util.Collections.unmodifiableList(acceptedResponseTypes_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.acceptedResponseTypes_ = acceptedResponseTypes_;
        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 prometheus.Remote.ReadRequest) {
          return mergeFrom((prometheus.Remote.ReadRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(prometheus.Remote.ReadRequest other) {
        if (other == prometheus.Remote.ReadRequest.getDefaultInstance()) return this;
        if (queriesBuilder_ == null) {
          if (!other.queries_.isEmpty()) {
            if (queries_.isEmpty()) {
              queries_ = other.queries_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureQueriesIsMutable();
              queries_.addAll(other.queries_);
            }
            onChanged();
          }
        } else {
          if (!other.queries_.isEmpty()) {
            if (queriesBuilder_.isEmpty()) {
              queriesBuilder_.dispose();
              queriesBuilder_ = null;
              queries_ = other.queries_;
              bitField0_ = (bitField0_ & ~0x00000001);
              queriesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getQueriesFieldBuilder() : null;
            } else {
              queriesBuilder_.addAllMessages(other.queries_);
            }
          }
        }
        if (!other.acceptedResponseTypes_.isEmpty()) {
          if (acceptedResponseTypes_.isEmpty()) {
            acceptedResponseTypes_ = other.acceptedResponseTypes_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureAcceptedResponseTypesIsMutable();
            acceptedResponseTypes_.addAll(other.acceptedResponseTypes_);
          }
          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 {
        prometheus.Remote.ReadRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.ReadRequest) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<prometheus.Remote.Query> queries_ =
        java.util.Collections.emptyList();
      private void ensureQueriesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          queries_ = new java.util.ArrayList<prometheus.Remote.Query>(queries_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Remote.Query, prometheus.Remote.Query.Builder, prometheus.Remote.QueryOrBuilder> queriesBuilder_;

      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public java.util.List<prometheus.Remote.Query> getQueriesList() {
        if (queriesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(queries_);
        } else {
          return queriesBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public int getQueriesCount() {
        if (queriesBuilder_ == null) {
          return queries_.size();
        } else {
          return queriesBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public prometheus.Remote.Query getQueries(int index) {
        if (queriesBuilder_ == null) {
          return queries_.get(index);
        } else {
          return queriesBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder setQueries(
          int index, prometheus.Remote.Query value) {
        if (queriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureQueriesIsMutable();
          queries_.set(index, value);
          onChanged();
        } else {
          queriesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder setQueries(
          int index, prometheus.Remote.Query.Builder builderForValue) {
        if (queriesBuilder_ == null) {
          ensureQueriesIsMutable();
          queries_.set(index, builderForValue.build());
          onChanged();
        } else {
          queriesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder addQueries(prometheus.Remote.Query value) {
        if (queriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureQueriesIsMutable();
          queries_.add(value);
          onChanged();
        } else {
          queriesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder addQueries(
          int index, prometheus.Remote.Query value) {
        if (queriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureQueriesIsMutable();
          queries_.add(index, value);
          onChanged();
        } else {
          queriesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder addQueries(
          prometheus.Remote.Query.Builder builderForValue) {
        if (queriesBuilder_ == null) {
          ensureQueriesIsMutable();
          queries_.add(builderForValue.build());
          onChanged();
        } else {
          queriesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder addQueries(
          int index, prometheus.Remote.Query.Builder builderForValue) {
        if (queriesBuilder_ == null) {
          ensureQueriesIsMutable();
          queries_.add(index, builderForValue.build());
          onChanged();
        } else {
          queriesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder addAllQueries(
          java.lang.Iterable<? extends prometheus.Remote.Query> values) {
        if (queriesBuilder_ == null) {
          ensureQueriesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, queries_);
          onChanged();
        } else {
          queriesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder clearQueries() {
        if (queriesBuilder_ == null) {
          queries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          queriesBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public Builder removeQueries(int index) {
        if (queriesBuilder_ == null) {
          ensureQueriesIsMutable();
          queries_.remove(index);
          onChanged();
        } else {
          queriesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public prometheus.Remote.Query.Builder getQueriesBuilder(
          int index) {
        return getQueriesFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public prometheus.Remote.QueryOrBuilder getQueriesOrBuilder(
          int index) {
        if (queriesBuilder_ == null) {
          return queries_.get(index);  } else {
          return queriesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public java.util.List<? extends prometheus.Remote.QueryOrBuilder> 
           getQueriesOrBuilderList() {
        if (queriesBuilder_ != null) {
          return queriesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(queries_);
        }
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public prometheus.Remote.Query.Builder addQueriesBuilder() {
        return getQueriesFieldBuilder().addBuilder(
            prometheus.Remote.Query.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public prometheus.Remote.Query.Builder addQueriesBuilder(
          int index) {
        return getQueriesFieldBuilder().addBuilder(
            index, prometheus.Remote.Query.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.Query queries = 1;</code>
       */
      public java.util.List<prometheus.Remote.Query.Builder> 
           getQueriesBuilderList() {
        return getQueriesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Remote.Query, prometheus.Remote.Query.Builder, prometheus.Remote.QueryOrBuilder> 
          getQueriesFieldBuilder() {
        if (queriesBuilder_ == null) {
          queriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Remote.Query, prometheus.Remote.Query.Builder, prometheus.Remote.QueryOrBuilder>(
                  queries_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          queries_ = null;
        }
        return queriesBuilder_;
      }

      private java.util.List<java.lang.Integer> acceptedResponseTypes_ =
        java.util.Collections.emptyList();
      private void ensureAcceptedResponseTypesIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          acceptedResponseTypes_ = new java.util.ArrayList<java.lang.Integer>(acceptedResponseTypes_);
          bitField0_ |= 0x00000002;
        }
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @return A list containing the acceptedResponseTypes.
       */
      public java.util.List<prometheus.Remote.ReadRequest.ResponseType> getAcceptedResponseTypesList() {
        return new com.google.protobuf.Internal.ListAdapter<
            java.lang.Integer, prometheus.Remote.ReadRequest.ResponseType>(acceptedResponseTypes_, acceptedResponseTypes_converter_);
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @return The count of acceptedResponseTypes.
       */
      public int getAcceptedResponseTypesCount() {
        return acceptedResponseTypes_.size();
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param index The index of the element to return.
       * @return The acceptedResponseTypes at the given index.
       */
      public prometheus.Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index) {
        return acceptedResponseTypes_converter_.convert(acceptedResponseTypes_.get(index));
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param index The index to set the value at.
       * @param value The acceptedResponseTypes to set.
       * @return This builder for chaining.
       */
      public Builder setAcceptedResponseTypes(
          int index, prometheus.Remote.ReadRequest.ResponseType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAcceptedResponseTypesIsMutable();
        acceptedResponseTypes_.set(index, value.getNumber());
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param value The acceptedResponseTypes to add.
       * @return This builder for chaining.
       */
      public Builder addAcceptedResponseTypes(prometheus.Remote.ReadRequest.ResponseType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAcceptedResponseTypesIsMutable();
        acceptedResponseTypes_.add(value.getNumber());
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param values The acceptedResponseTypes to add.
       * @return This builder for chaining.
       */
      public Builder addAllAcceptedResponseTypes(
          java.lang.Iterable<? extends prometheus.Remote.ReadRequest.ResponseType> values) {
        ensureAcceptedResponseTypesIsMutable();
        for (prometheus.Remote.ReadRequest.ResponseType value : values) {
          acceptedResponseTypes_.add(value.getNumber());
        }
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearAcceptedResponseTypes() {
        acceptedResponseTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @return A list containing the enum numeric values on the wire for acceptedResponseTypes.
       */
      public java.util.List<java.lang.Integer>
      getAcceptedResponseTypesValueList() {
        return java.util.Collections.unmodifiableList(acceptedResponseTypes_);
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param index The index of the value to return.
       * @return The enum numeric value on the wire of acceptedResponseTypes at the given index.
       */
      public int getAcceptedResponseTypesValue(int index) {
        return acceptedResponseTypes_.get(index);
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param index The index to set the value at.
       * @param value The enum numeric value on the wire for acceptedResponseTypes to set.
       * @return This builder for chaining.
       */
      public Builder setAcceptedResponseTypesValue(
          int index, int value) {
        ensureAcceptedResponseTypesIsMutable();
        acceptedResponseTypes_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param value The enum numeric value on the wire for acceptedResponseTypes to add.
       * @return This builder for chaining.
       */
      public Builder addAcceptedResponseTypesValue(int value) {
        ensureAcceptedResponseTypesIsMutable();
        acceptedResponseTypes_.add(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * accepted_response_types allows negotiating the content type of the response.
       * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
       * implemented by server, error is returned.
       * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
       * </pre>
       *
       * <code>repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;</code>
       * @param values The enum numeric values on the wire for acceptedResponseTypes to add.
       * @return This builder for chaining.
       */
      public Builder addAllAcceptedResponseTypesValue(
          java.lang.Iterable<java.lang.Integer> values) {
        ensureAcceptedResponseTypesIsMutable();
        for (int value : values) {
          acceptedResponseTypes_.add(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:prometheus.ReadRequest)
    }

    // @@protoc_insertion_point(class_scope:prometheus.ReadRequest)
    private static final prometheus.Remote.ReadRequest DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.ReadRequest();
    }

    public static prometheus.Remote.ReadRequest getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.ReadRequest getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ReadResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.ReadResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    java.util.List<prometheus.Remote.QueryResult> 
        getResultsList();
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    prometheus.Remote.QueryResult getResults(int index);
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    int getResultsCount();
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    java.util.List<? extends prometheus.Remote.QueryResultOrBuilder> 
        getResultsOrBuilderList();
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    prometheus.Remote.QueryResultOrBuilder getResultsOrBuilder(
        int index);
  }
  /**
   * <pre>
   * ReadResponse is a response when response_type equals SAMPLES.
   * </pre>
   *
   * Protobuf type {@code prometheus.ReadResponse}
   */
  public static final class ReadResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.ReadResponse)
      ReadResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ReadResponse.newBuilder() to construct.
    private ReadResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ReadResponse() {
      results_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ReadResponse(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                results_ = new java.util.ArrayList<prometheus.Remote.QueryResult>();
                mutable_bitField0_ |= 0x00000001;
              }
              results_.add(
                  input.readMessage(prometheus.Remote.QueryResult.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          results_ = java.util.Collections.unmodifiableList(results_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_ReadResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_ReadResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.ReadResponse.class, prometheus.Remote.ReadResponse.Builder.class);
    }

    public static final int RESULTS_FIELD_NUMBER = 1;
    private java.util.List<prometheus.Remote.QueryResult> results_;
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Remote.QueryResult> getResultsList() {
      return results_;
    }
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Remote.QueryResultOrBuilder> 
        getResultsOrBuilderList() {
      return results_;
    }
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    @java.lang.Override
    public int getResultsCount() {
      return results_.size();
    }
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    @java.lang.Override
    public prometheus.Remote.QueryResult getResults(int index) {
      return results_.get(index);
    }
    /**
     * <pre>
     * In same order as the request's queries.
     * </pre>
     *
     * <code>repeated .prometheus.QueryResult results = 1;</code>
     */
    @java.lang.Override
    public prometheus.Remote.QueryResultOrBuilder getResultsOrBuilder(
        int index) {
      return results_.get(index);
    }

    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 {
      for (int i = 0; i < results_.size(); i++) {
        output.writeMessage(1, results_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < results_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, results_.get(i));
      }
      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 prometheus.Remote.ReadResponse)) {
        return super.equals(obj);
      }
      prometheus.Remote.ReadResponse other = (prometheus.Remote.ReadResponse) obj;

      if (!getResultsList()
          .equals(other.getResultsList())) 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 (getResultsCount() > 0) {
        hash = (37 * hash) + RESULTS_FIELD_NUMBER;
        hash = (53 * hash) + getResultsList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static prometheus.Remote.ReadResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ReadResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ReadResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadResponse 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 prometheus.Remote.ReadResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadResponse 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 prometheus.Remote.ReadResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ReadResponse 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(prometheus.Remote.ReadResponse prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * ReadResponse is a response when response_type equals SAMPLES.
     * </pre>
     *
     * Protobuf type {@code prometheus.ReadResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:prometheus.ReadResponse)
        prometheus.Remote.ReadResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return prometheus.Remote.internal_static_prometheus_ReadResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_ReadResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.ReadResponse.class, prometheus.Remote.ReadResponse.Builder.class);
      }

      // Construct using prometheus.Remote.ReadResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getResultsFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (resultsBuilder_ == null) {
          results_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          resultsBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_ReadResponse_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.ReadResponse getDefaultInstanceForType() {
        return prometheus.Remote.ReadResponse.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.ReadResponse build() {
        prometheus.Remote.ReadResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.ReadResponse buildPartial() {
        prometheus.Remote.ReadResponse result = new prometheus.Remote.ReadResponse(this);
        int from_bitField0_ = bitField0_;
        if (resultsBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            results_ = java.util.Collections.unmodifiableList(results_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.results_ = results_;
        } else {
          result.results_ = resultsBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(prometheus.Remote.ReadResponse other) {
        if (other == prometheus.Remote.ReadResponse.getDefaultInstance()) return this;
        if (resultsBuilder_ == null) {
          if (!other.results_.isEmpty()) {
            if (results_.isEmpty()) {
              results_ = other.results_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureResultsIsMutable();
              results_.addAll(other.results_);
            }
            onChanged();
          }
        } else {
          if (!other.results_.isEmpty()) {
            if (resultsBuilder_.isEmpty()) {
              resultsBuilder_.dispose();
              resultsBuilder_ = null;
              results_ = other.results_;
              bitField0_ = (bitField0_ & ~0x00000001);
              resultsBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getResultsFieldBuilder() : null;
            } else {
              resultsBuilder_.addAllMessages(other.results_);
            }
          }
        }
        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 {
        prometheus.Remote.ReadResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.ReadResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<prometheus.Remote.QueryResult> results_ =
        java.util.Collections.emptyList();
      private void ensureResultsIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          results_ = new java.util.ArrayList<prometheus.Remote.QueryResult>(results_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Remote.QueryResult, prometheus.Remote.QueryResult.Builder, prometheus.Remote.QueryResultOrBuilder> resultsBuilder_;

      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public java.util.List<prometheus.Remote.QueryResult> getResultsList() {
        if (resultsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(results_);
        } else {
          return resultsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public int getResultsCount() {
        if (resultsBuilder_ == null) {
          return results_.size();
        } else {
          return resultsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public prometheus.Remote.QueryResult getResults(int index) {
        if (resultsBuilder_ == null) {
          return results_.get(index);
        } else {
          return resultsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder setResults(
          int index, prometheus.Remote.QueryResult value) {
        if (resultsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureResultsIsMutable();
          results_.set(index, value);
          onChanged();
        } else {
          resultsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder setResults(
          int index, prometheus.Remote.QueryResult.Builder builderForValue) {
        if (resultsBuilder_ == null) {
          ensureResultsIsMutable();
          results_.set(index, builderForValue.build());
          onChanged();
        } else {
          resultsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder addResults(prometheus.Remote.QueryResult value) {
        if (resultsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureResultsIsMutable();
          results_.add(value);
          onChanged();
        } else {
          resultsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder addResults(
          int index, prometheus.Remote.QueryResult value) {
        if (resultsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureResultsIsMutable();
          results_.add(index, value);
          onChanged();
        } else {
          resultsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder addResults(
          prometheus.Remote.QueryResult.Builder builderForValue) {
        if (resultsBuilder_ == null) {
          ensureResultsIsMutable();
          results_.add(builderForValue.build());
          onChanged();
        } else {
          resultsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder addResults(
          int index, prometheus.Remote.QueryResult.Builder builderForValue) {
        if (resultsBuilder_ == null) {
          ensureResultsIsMutable();
          results_.add(index, builderForValue.build());
          onChanged();
        } else {
          resultsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder addAllResults(
          java.lang.Iterable<? extends prometheus.Remote.QueryResult> values) {
        if (resultsBuilder_ == null) {
          ensureResultsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, results_);
          onChanged();
        } else {
          resultsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder clearResults() {
        if (resultsBuilder_ == null) {
          results_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          resultsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public Builder removeResults(int index) {
        if (resultsBuilder_ == null) {
          ensureResultsIsMutable();
          results_.remove(index);
          onChanged();
        } else {
          resultsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public prometheus.Remote.QueryResult.Builder getResultsBuilder(
          int index) {
        return getResultsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public prometheus.Remote.QueryResultOrBuilder getResultsOrBuilder(
          int index) {
        if (resultsBuilder_ == null) {
          return results_.get(index);  } else {
          return resultsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public java.util.List<? extends prometheus.Remote.QueryResultOrBuilder> 
           getResultsOrBuilderList() {
        if (resultsBuilder_ != null) {
          return resultsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(results_);
        }
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public prometheus.Remote.QueryResult.Builder addResultsBuilder() {
        return getResultsFieldBuilder().addBuilder(
            prometheus.Remote.QueryResult.getDefaultInstance());
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public prometheus.Remote.QueryResult.Builder addResultsBuilder(
          int index) {
        return getResultsFieldBuilder().addBuilder(
            index, prometheus.Remote.QueryResult.getDefaultInstance());
      }
      /**
       * <pre>
       * In same order as the request's queries.
       * </pre>
       *
       * <code>repeated .prometheus.QueryResult results = 1;</code>
       */
      public java.util.List<prometheus.Remote.QueryResult.Builder> 
           getResultsBuilderList() {
        return getResultsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Remote.QueryResult, prometheus.Remote.QueryResult.Builder, prometheus.Remote.QueryResultOrBuilder> 
          getResultsFieldBuilder() {
        if (resultsBuilder_ == null) {
          resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Remote.QueryResult, prometheus.Remote.QueryResult.Builder, prometheus.Remote.QueryResultOrBuilder>(
                  results_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          results_ = null;
        }
        return resultsBuilder_;
      }
      @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:prometheus.ReadResponse)
    }

    // @@protoc_insertion_point(class_scope:prometheus.ReadResponse)
    private static final prometheus.Remote.ReadResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.ReadResponse();
    }

    public static prometheus.Remote.ReadResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.ReadResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface QueryOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.Query)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>int64 start_timestamp_ms = 1;</code>
     * @return The startTimestampMs.
     */
    long getStartTimestampMs();

    /**
     * <code>int64 end_timestamp_ms = 2;</code>
     * @return The endTimestampMs.
     */
    long getEndTimestampMs();

    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    java.util.List<prometheus.Types.LabelMatcher> 
        getMatchersList();
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    prometheus.Types.LabelMatcher getMatchers(int index);
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    int getMatchersCount();
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    java.util.List<? extends prometheus.Types.LabelMatcherOrBuilder> 
        getMatchersOrBuilderList();
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    prometheus.Types.LabelMatcherOrBuilder getMatchersOrBuilder(
        int index);

    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     * @return Whether the hints field is set.
     */
    boolean hasHints();
    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     * @return The hints.
     */
    prometheus.Types.ReadHints getHints();
    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     */
    prometheus.Types.ReadHintsOrBuilder getHintsOrBuilder();
  }
  /**
   * Protobuf type {@code prometheus.Query}
   */
  public static final class Query extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.Query)
      QueryOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Query.newBuilder() to construct.
    private Query(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Query() {
      matchers_ = java.util.Collections.emptyList();
    }

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

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

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

              endTimestampMs_ = input.readInt64();
              break;
            }
            case 26: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                matchers_ = new java.util.ArrayList<prometheus.Types.LabelMatcher>();
                mutable_bitField0_ |= 0x00000001;
              }
              matchers_.add(
                  input.readMessage(prometheus.Types.LabelMatcher.parser(), extensionRegistry));
              break;
            }
            case 34: {
              prometheus.Types.ReadHints.Builder subBuilder = null;
              if (hints_ != null) {
                subBuilder = hints_.toBuilder();
              }
              hints_ = input.readMessage(prometheus.Types.ReadHints.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(hints_);
                hints_ = subBuilder.buildPartial();
              }

              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          matchers_ = java.util.Collections.unmodifiableList(matchers_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_Query_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_Query_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.Query.class, prometheus.Remote.Query.Builder.class);
    }

    public static final int START_TIMESTAMP_MS_FIELD_NUMBER = 1;
    private long startTimestampMs_;
    /**
     * <code>int64 start_timestamp_ms = 1;</code>
     * @return The startTimestampMs.
     */
    @java.lang.Override
    public long getStartTimestampMs() {
      return startTimestampMs_;
    }

    public static final int END_TIMESTAMP_MS_FIELD_NUMBER = 2;
    private long endTimestampMs_;
    /**
     * <code>int64 end_timestamp_ms = 2;</code>
     * @return The endTimestampMs.
     */
    @java.lang.Override
    public long getEndTimestampMs() {
      return endTimestampMs_;
    }

    public static final int MATCHERS_FIELD_NUMBER = 3;
    private java.util.List<prometheus.Types.LabelMatcher> matchers_;
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Types.LabelMatcher> getMatchersList() {
      return matchers_;
    }
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Types.LabelMatcherOrBuilder> 
        getMatchersOrBuilderList() {
      return matchers_;
    }
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    @java.lang.Override
    public int getMatchersCount() {
      return matchers_.size();
    }
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    @java.lang.Override
    public prometheus.Types.LabelMatcher getMatchers(int index) {
      return matchers_.get(index);
    }
    /**
     * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
     */
    @java.lang.Override
    public prometheus.Types.LabelMatcherOrBuilder getMatchersOrBuilder(
        int index) {
      return matchers_.get(index);
    }

    public static final int HINTS_FIELD_NUMBER = 4;
    private prometheus.Types.ReadHints hints_;
    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     * @return Whether the hints field is set.
     */
    @java.lang.Override
    public boolean hasHints() {
      return hints_ != null;
    }
    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     * @return The hints.
     */
    @java.lang.Override
    public prometheus.Types.ReadHints getHints() {
      return hints_ == null ? prometheus.Types.ReadHints.getDefaultInstance() : hints_;
    }
    /**
     * <code>.prometheus.ReadHints hints = 4;</code>
     */
    @java.lang.Override
    public prometheus.Types.ReadHintsOrBuilder getHintsOrBuilder() {
      return getHints();
    }

    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 (startTimestampMs_ != 0L) {
        output.writeInt64(1, startTimestampMs_);
      }
      if (endTimestampMs_ != 0L) {
        output.writeInt64(2, endTimestampMs_);
      }
      for (int i = 0; i < matchers_.size(); i++) {
        output.writeMessage(3, matchers_.get(i));
      }
      if (hints_ != null) {
        output.writeMessage(4, getHints());
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (startTimestampMs_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, startTimestampMs_);
      }
      if (endTimestampMs_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, endTimestampMs_);
      }
      for (int i = 0; i < matchers_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, matchers_.get(i));
      }
      if (hints_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getHints());
      }
      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 prometheus.Remote.Query)) {
        return super.equals(obj);
      }
      prometheus.Remote.Query other = (prometheus.Remote.Query) obj;

      if (getStartTimestampMs()
          != other.getStartTimestampMs()) return false;
      if (getEndTimestampMs()
          != other.getEndTimestampMs()) return false;
      if (!getMatchersList()
          .equals(other.getMatchersList())) return false;
      if (hasHints() != other.hasHints()) return false;
      if (hasHints()) {
        if (!getHints()
            .equals(other.getHints())) 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) + START_TIMESTAMP_MS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getStartTimestampMs());
      hash = (37 * hash) + END_TIMESTAMP_MS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getEndTimestampMs());
      if (getMatchersCount() > 0) {
        hash = (37 * hash) + MATCHERS_FIELD_NUMBER;
        hash = (53 * hash) + getMatchersList().hashCode();
      }
      if (hasHints()) {
        hash = (37 * hash) + HINTS_FIELD_NUMBER;
        hash = (53 * hash) + getHints().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_Query_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.Query.class, prometheus.Remote.Query.Builder.class);
      }

      // Construct using prometheus.Remote.Query.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

        endTimestampMs_ = 0L;

        if (matchersBuilder_ == null) {
          matchers_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          matchersBuilder_.clear();
        }
        if (hintsBuilder_ == null) {
          hints_ = null;
        } else {
          hints_ = null;
          hintsBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_Query_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.Query getDefaultInstanceForType() {
        return prometheus.Remote.Query.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.Query build() {
        prometheus.Remote.Query result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.Query buildPartial() {
        prometheus.Remote.Query result = new prometheus.Remote.Query(this);
        int from_bitField0_ = bitField0_;
        result.startTimestampMs_ = startTimestampMs_;
        result.endTimestampMs_ = endTimestampMs_;
        if (matchersBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            matchers_ = java.util.Collections.unmodifiableList(matchers_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.matchers_ = matchers_;
        } else {
          result.matchers_ = matchersBuilder_.build();
        }
        if (hintsBuilder_ == null) {
          result.hints_ = hints_;
        } else {
          result.hints_ = hintsBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(prometheus.Remote.Query other) {
        if (other == prometheus.Remote.Query.getDefaultInstance()) return this;
        if (other.getStartTimestampMs() != 0L) {
          setStartTimestampMs(other.getStartTimestampMs());
        }
        if (other.getEndTimestampMs() != 0L) {
          setEndTimestampMs(other.getEndTimestampMs());
        }
        if (matchersBuilder_ == null) {
          if (!other.matchers_.isEmpty()) {
            if (matchers_.isEmpty()) {
              matchers_ = other.matchers_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureMatchersIsMutable();
              matchers_.addAll(other.matchers_);
            }
            onChanged();
          }
        } else {
          if (!other.matchers_.isEmpty()) {
            if (matchersBuilder_.isEmpty()) {
              matchersBuilder_.dispose();
              matchersBuilder_ = null;
              matchers_ = other.matchers_;
              bitField0_ = (bitField0_ & ~0x00000001);
              matchersBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getMatchersFieldBuilder() : null;
            } else {
              matchersBuilder_.addAllMessages(other.matchers_);
            }
          }
        }
        if (other.hasHints()) {
          mergeHints(other.getHints());
        }
        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 {
        prometheus.Remote.Query parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.Query) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private long startTimestampMs_ ;
      /**
       * <code>int64 start_timestamp_ms = 1;</code>
       * @return The startTimestampMs.
       */
      @java.lang.Override
      public long getStartTimestampMs() {
        return startTimestampMs_;
      }
      /**
       * <code>int64 start_timestamp_ms = 1;</code>
       * @param value The startTimestampMs to set.
       * @return This builder for chaining.
       */
      public Builder setStartTimestampMs(long value) {
        
        startTimestampMs_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int64 start_timestamp_ms = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearStartTimestampMs() {
        
        startTimestampMs_ = 0L;
        onChanged();
        return this;
      }

      private long endTimestampMs_ ;
      /**
       * <code>int64 end_timestamp_ms = 2;</code>
       * @return The endTimestampMs.
       */
      @java.lang.Override
      public long getEndTimestampMs() {
        return endTimestampMs_;
      }
      /**
       * <code>int64 end_timestamp_ms = 2;</code>
       * @param value The endTimestampMs to set.
       * @return This builder for chaining.
       */
      public Builder setEndTimestampMs(long value) {
        
        endTimestampMs_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int64 end_timestamp_ms = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearEndTimestampMs() {
        
        endTimestampMs_ = 0L;
        onChanged();
        return this;
      }

      private java.util.List<prometheus.Types.LabelMatcher> matchers_ =
        java.util.Collections.emptyList();
      private void ensureMatchersIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          matchers_ = new java.util.ArrayList<prometheus.Types.LabelMatcher>(matchers_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.LabelMatcher, prometheus.Types.LabelMatcher.Builder, prometheus.Types.LabelMatcherOrBuilder> matchersBuilder_;

      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public java.util.List<prometheus.Types.LabelMatcher> getMatchersList() {
        if (matchersBuilder_ == null) {
          return java.util.Collections.unmodifiableList(matchers_);
        } else {
          return matchersBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public int getMatchersCount() {
        if (matchersBuilder_ == null) {
          return matchers_.size();
        } else {
          return matchersBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public prometheus.Types.LabelMatcher getMatchers(int index) {
        if (matchersBuilder_ == null) {
          return matchers_.get(index);
        } else {
          return matchersBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder setMatchers(
          int index, prometheus.Types.LabelMatcher value) {
        if (matchersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMatchersIsMutable();
          matchers_.set(index, value);
          onChanged();
        } else {
          matchersBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder setMatchers(
          int index, prometheus.Types.LabelMatcher.Builder builderForValue) {
        if (matchersBuilder_ == null) {
          ensureMatchersIsMutable();
          matchers_.set(index, builderForValue.build());
          onChanged();
        } else {
          matchersBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder addMatchers(prometheus.Types.LabelMatcher value) {
        if (matchersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMatchersIsMutable();
          matchers_.add(value);
          onChanged();
        } else {
          matchersBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder addMatchers(
          int index, prometheus.Types.LabelMatcher value) {
        if (matchersBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMatchersIsMutable();
          matchers_.add(index, value);
          onChanged();
        } else {
          matchersBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder addMatchers(
          prometheus.Types.LabelMatcher.Builder builderForValue) {
        if (matchersBuilder_ == null) {
          ensureMatchersIsMutable();
          matchers_.add(builderForValue.build());
          onChanged();
        } else {
          matchersBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder addMatchers(
          int index, prometheus.Types.LabelMatcher.Builder builderForValue) {
        if (matchersBuilder_ == null) {
          ensureMatchersIsMutable();
          matchers_.add(index, builderForValue.build());
          onChanged();
        } else {
          matchersBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder addAllMatchers(
          java.lang.Iterable<? extends prometheus.Types.LabelMatcher> values) {
        if (matchersBuilder_ == null) {
          ensureMatchersIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, matchers_);
          onChanged();
        } else {
          matchersBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder clearMatchers() {
        if (matchersBuilder_ == null) {
          matchers_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          matchersBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public Builder removeMatchers(int index) {
        if (matchersBuilder_ == null) {
          ensureMatchersIsMutable();
          matchers_.remove(index);
          onChanged();
        } else {
          matchersBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public prometheus.Types.LabelMatcher.Builder getMatchersBuilder(
          int index) {
        return getMatchersFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public prometheus.Types.LabelMatcherOrBuilder getMatchersOrBuilder(
          int index) {
        if (matchersBuilder_ == null) {
          return matchers_.get(index);  } else {
          return matchersBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public java.util.List<? extends prometheus.Types.LabelMatcherOrBuilder> 
           getMatchersOrBuilderList() {
        if (matchersBuilder_ != null) {
          return matchersBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(matchers_);
        }
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public prometheus.Types.LabelMatcher.Builder addMatchersBuilder() {
        return getMatchersFieldBuilder().addBuilder(
            prometheus.Types.LabelMatcher.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public prometheus.Types.LabelMatcher.Builder addMatchersBuilder(
          int index) {
        return getMatchersFieldBuilder().addBuilder(
            index, prometheus.Types.LabelMatcher.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.LabelMatcher matchers = 3;</code>
       */
      public java.util.List<prometheus.Types.LabelMatcher.Builder> 
           getMatchersBuilderList() {
        return getMatchersFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.LabelMatcher, prometheus.Types.LabelMatcher.Builder, prometheus.Types.LabelMatcherOrBuilder> 
          getMatchersFieldBuilder() {
        if (matchersBuilder_ == null) {
          matchersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Types.LabelMatcher, prometheus.Types.LabelMatcher.Builder, prometheus.Types.LabelMatcherOrBuilder>(
                  matchers_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          matchers_ = null;
        }
        return matchersBuilder_;
      }

      private prometheus.Types.ReadHints hints_;
      private com.google.protobuf.SingleFieldBuilderV3<
          prometheus.Types.ReadHints, prometheus.Types.ReadHints.Builder, prometheus.Types.ReadHintsOrBuilder> hintsBuilder_;
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       * @return Whether the hints field is set.
       */
      public boolean hasHints() {
        return hintsBuilder_ != null || hints_ != null;
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       * @return The hints.
       */
      public prometheus.Types.ReadHints getHints() {
        if (hintsBuilder_ == null) {
          return hints_ == null ? prometheus.Types.ReadHints.getDefaultInstance() : hints_;
        } else {
          return hintsBuilder_.getMessage();
        }
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public Builder setHints(prometheus.Types.ReadHints value) {
        if (hintsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          hints_ = value;
          onChanged();
        } else {
          hintsBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public Builder setHints(
          prometheus.Types.ReadHints.Builder builderForValue) {
        if (hintsBuilder_ == null) {
          hints_ = builderForValue.build();
          onChanged();
        } else {
          hintsBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public Builder mergeHints(prometheus.Types.ReadHints value) {
        if (hintsBuilder_ == null) {
          if (hints_ != null) {
            hints_ =
              prometheus.Types.ReadHints.newBuilder(hints_).mergeFrom(value).buildPartial();
          } else {
            hints_ = value;
          }
          onChanged();
        } else {
          hintsBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public Builder clearHints() {
        if (hintsBuilder_ == null) {
          hints_ = null;
          onChanged();
        } else {
          hints_ = null;
          hintsBuilder_ = null;
        }

        return this;
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public prometheus.Types.ReadHints.Builder getHintsBuilder() {
        
        onChanged();
        return getHintsFieldBuilder().getBuilder();
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      public prometheus.Types.ReadHintsOrBuilder getHintsOrBuilder() {
        if (hintsBuilder_ != null) {
          return hintsBuilder_.getMessageOrBuilder();
        } else {
          return hints_ == null ?
              prometheus.Types.ReadHints.getDefaultInstance() : hints_;
        }
      }
      /**
       * <code>.prometheus.ReadHints hints = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          prometheus.Types.ReadHints, prometheus.Types.ReadHints.Builder, prometheus.Types.ReadHintsOrBuilder> 
          getHintsFieldBuilder() {
        if (hintsBuilder_ == null) {
          hintsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              prometheus.Types.ReadHints, prometheus.Types.ReadHints.Builder, prometheus.Types.ReadHintsOrBuilder>(
                  getHints(),
                  getParentForChildren(),
                  isClean());
          hints_ = null;
        }
        return hintsBuilder_;
      }
      @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:prometheus.Query)
    }

    // @@protoc_insertion_point(class_scope:prometheus.Query)
    private static final prometheus.Remote.Query DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.Query();
    }

    public static prometheus.Remote.Query getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.Query getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface QueryResultOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.QueryResult)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    java.util.List<prometheus.Types.TimeSeries> 
        getTimeseriesList();
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    prometheus.Types.TimeSeries getTimeseries(int index);
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    int getTimeseriesCount();
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
        getTimeseriesOrBuilderList();
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
        int index);
  }
  /**
   * Protobuf type {@code prometheus.QueryResult}
   */
  public static final class QueryResult extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.QueryResult)
      QueryResultOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use QueryResult.newBuilder() to construct.
    private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private QueryResult() {
      timeseries_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private QueryResult(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                timeseries_ = new java.util.ArrayList<prometheus.Types.TimeSeries>();
                mutable_bitField0_ |= 0x00000001;
              }
              timeseries_.add(
                  input.readMessage(prometheus.Types.TimeSeries.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          timeseries_ = java.util.Collections.unmodifiableList(timeseries_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_QueryResult_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_QueryResult_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.QueryResult.class, prometheus.Remote.QueryResult.Builder.class);
    }

    public static final int TIMESERIES_FIELD_NUMBER = 1;
    private java.util.List<prometheus.Types.TimeSeries> timeseries_;
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Types.TimeSeries> getTimeseriesList() {
      return timeseries_;
    }
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
        getTimeseriesOrBuilderList() {
      return timeseries_;
    }
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public int getTimeseriesCount() {
      return timeseries_.size();
    }
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.TimeSeries getTimeseries(int index) {
      return timeseries_.get(index);
    }
    /**
     * <pre>
     * Samples within a time series must be ordered by time.
     * </pre>
     *
     * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
        int index) {
      return timeseries_.get(index);
    }

    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 {
      for (int i = 0; i < timeseries_.size(); i++) {
        output.writeMessage(1, timeseries_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < timeseries_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, timeseries_.get(i));
      }
      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 prometheus.Remote.QueryResult)) {
        return super.equals(obj);
      }
      prometheus.Remote.QueryResult other = (prometheus.Remote.QueryResult) obj;

      if (!getTimeseriesList()
          .equals(other.getTimeseriesList())) 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 (getTimeseriesCount() > 0) {
        hash = (37 * hash) + TIMESERIES_FIELD_NUMBER;
        hash = (53 * hash) + getTimeseriesList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_QueryResult_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.QueryResult.class, prometheus.Remote.QueryResult.Builder.class);
      }

      // Construct using prometheus.Remote.QueryResult.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getTimeseriesFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (timeseriesBuilder_ == null) {
          timeseries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          timeseriesBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_QueryResult_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.QueryResult getDefaultInstanceForType() {
        return prometheus.Remote.QueryResult.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.QueryResult build() {
        prometheus.Remote.QueryResult result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.QueryResult buildPartial() {
        prometheus.Remote.QueryResult result = new prometheus.Remote.QueryResult(this);
        int from_bitField0_ = bitField0_;
        if (timeseriesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            timeseries_ = java.util.Collections.unmodifiableList(timeseries_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.timeseries_ = timeseries_;
        } else {
          result.timeseries_ = timeseriesBuilder_.build();
        }
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(prometheus.Remote.QueryResult other) {
        if (other == prometheus.Remote.QueryResult.getDefaultInstance()) return this;
        if (timeseriesBuilder_ == null) {
          if (!other.timeseries_.isEmpty()) {
            if (timeseries_.isEmpty()) {
              timeseries_ = other.timeseries_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureTimeseriesIsMutable();
              timeseries_.addAll(other.timeseries_);
            }
            onChanged();
          }
        } else {
          if (!other.timeseries_.isEmpty()) {
            if (timeseriesBuilder_.isEmpty()) {
              timeseriesBuilder_.dispose();
              timeseriesBuilder_ = null;
              timeseries_ = other.timeseries_;
              bitField0_ = (bitField0_ & ~0x00000001);
              timeseriesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getTimeseriesFieldBuilder() : null;
            } else {
              timeseriesBuilder_.addAllMessages(other.timeseries_);
            }
          }
        }
        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 {
        prometheus.Remote.QueryResult parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.QueryResult) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<prometheus.Types.TimeSeries> timeseries_ =
        java.util.Collections.emptyList();
      private void ensureTimeseriesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          timeseries_ = new java.util.ArrayList<prometheus.Types.TimeSeries>(timeseries_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder> timeseriesBuilder_;

      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<prometheus.Types.TimeSeries> getTimeseriesList() {
        if (timeseriesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(timeseries_);
        } else {
          return timeseriesBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public int getTimeseriesCount() {
        if (timeseriesBuilder_ == null) {
          return timeseries_.size();
        } else {
          return timeseriesBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries getTimeseries(int index) {
        if (timeseriesBuilder_ == null) {
          return timeseries_.get(index);
        } else {
          return timeseriesBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder setTimeseries(
          int index, prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.set(index, value);
          onChanged();
        } else {
          timeseriesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder setTimeseries(
          int index, prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.set(index, builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.add(value);
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          int index, prometheus.Types.TimeSeries value) {
        if (timeseriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureTimeseriesIsMutable();
          timeseries_.add(index, value);
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.add(builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addTimeseries(
          int index, prometheus.Types.TimeSeries.Builder builderForValue) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.add(index, builderForValue.build());
          onChanged();
        } else {
          timeseriesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder addAllTimeseries(
          java.lang.Iterable<? extends prometheus.Types.TimeSeries> values) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, timeseries_);
          onChanged();
        } else {
          timeseriesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder clearTimeseries() {
        if (timeseriesBuilder_ == null) {
          timeseries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          timeseriesBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public Builder removeTimeseries(int index) {
        if (timeseriesBuilder_ == null) {
          ensureTimeseriesIsMutable();
          timeseries_.remove(index);
          onChanged();
        } else {
          timeseriesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder getTimeseriesBuilder(
          int index) {
        return getTimeseriesFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(
          int index) {
        if (timeseriesBuilder_ == null) {
          return timeseries_.get(index);  } else {
          return timeseriesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<? extends prometheus.Types.TimeSeriesOrBuilder> 
           getTimeseriesOrBuilderList() {
        if (timeseriesBuilder_ != null) {
          return timeseriesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(timeseries_);
        }
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder addTimeseriesBuilder() {
        return getTimeseriesFieldBuilder().addBuilder(
            prometheus.Types.TimeSeries.getDefaultInstance());
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public prometheus.Types.TimeSeries.Builder addTimeseriesBuilder(
          int index) {
        return getTimeseriesFieldBuilder().addBuilder(
            index, prometheus.Types.TimeSeries.getDefaultInstance());
      }
      /**
       * <pre>
       * Samples within a time series must be ordered by time.
       * </pre>
       *
       * <code>repeated .prometheus.TimeSeries timeseries = 1;</code>
       */
      public java.util.List<prometheus.Types.TimeSeries.Builder> 
           getTimeseriesBuilderList() {
        return getTimeseriesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder> 
          getTimeseriesFieldBuilder() {
        if (timeseriesBuilder_ == null) {
          timeseriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Types.TimeSeries, prometheus.Types.TimeSeries.Builder, prometheus.Types.TimeSeriesOrBuilder>(
                  timeseries_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          timeseries_ = null;
        }
        return timeseriesBuilder_;
      }
      @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:prometheus.QueryResult)
    }

    // @@protoc_insertion_point(class_scope:prometheus.QueryResult)
    private static final prometheus.Remote.QueryResult DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.QueryResult();
    }

    public static prometheus.Remote.QueryResult getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.QueryResult getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ChunkedReadResponseOrBuilder extends
      // @@protoc_insertion_point(interface_extends:prometheus.ChunkedReadResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    java.util.List<prometheus.Types.ChunkedSeries> 
        getChunkedSeriesList();
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    prometheus.Types.ChunkedSeries getChunkedSeries(int index);
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    int getChunkedSeriesCount();
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    java.util.List<? extends prometheus.Types.ChunkedSeriesOrBuilder> 
        getChunkedSeriesOrBuilderList();
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    prometheus.Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(
        int index);

    /**
     * <pre>
     * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
     * </pre>
     *
     * <code>int64 query_index = 2;</code>
     * @return The queryIndex.
     */
    long getQueryIndex();
  }
  /**
   * <pre>
   * ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
   * We strictly stream full series after series, optionally split by time. This means that a single frame can contain
   * partition of the single series, but once a new series is started to be streamed it means that no more chunks will
   * be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
   * </pre>
   *
   * Protobuf type {@code prometheus.ChunkedReadResponse}
   */
  public static final class ChunkedReadResponse extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:prometheus.ChunkedReadResponse)
      ChunkedReadResponseOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ChunkedReadResponse.newBuilder() to construct.
    private ChunkedReadResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ChunkedReadResponse() {
      chunkedSeries_ = java.util.Collections.emptyList();
    }

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

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ChunkedReadResponse(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                chunkedSeries_ = new java.util.ArrayList<prometheus.Types.ChunkedSeries>();
                mutable_bitField0_ |= 0x00000001;
              }
              chunkedSeries_.add(
                  input.readMessage(prometheus.Types.ChunkedSeries.parser(), extensionRegistry));
              break;
            }
            case 16: {

              queryIndex_ = input.readInt64();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) != 0)) {
          chunkedSeries_ = java.util.Collections.unmodifiableList(chunkedSeries_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return prometheus.Remote.internal_static_prometheus_ChunkedReadResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return prometheus.Remote.internal_static_prometheus_ChunkedReadResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              prometheus.Remote.ChunkedReadResponse.class, prometheus.Remote.ChunkedReadResponse.Builder.class);
    }

    public static final int CHUNKED_SERIES_FIELD_NUMBER = 1;
    private java.util.List<prometheus.Types.ChunkedSeries> chunkedSeries_;
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    @java.lang.Override
    public java.util.List<prometheus.Types.ChunkedSeries> getChunkedSeriesList() {
      return chunkedSeries_;
    }
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    @java.lang.Override
    public java.util.List<? extends prometheus.Types.ChunkedSeriesOrBuilder> 
        getChunkedSeriesOrBuilderList() {
      return chunkedSeries_;
    }
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    @java.lang.Override
    public int getChunkedSeriesCount() {
      return chunkedSeries_.size();
    }
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.ChunkedSeries getChunkedSeries(int index) {
      return chunkedSeries_.get(index);
    }
    /**
     * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
     */
    @java.lang.Override
    public prometheus.Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(
        int index) {
      return chunkedSeries_.get(index);
    }

    public static final int QUERY_INDEX_FIELD_NUMBER = 2;
    private long queryIndex_;
    /**
     * <pre>
     * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
     * </pre>
     *
     * <code>int64 query_index = 2;</code>
     * @return The queryIndex.
     */
    @java.lang.Override
    public long getQueryIndex() {
      return queryIndex_;
    }

    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 {
      for (int i = 0; i < chunkedSeries_.size(); i++) {
        output.writeMessage(1, chunkedSeries_.get(i));
      }
      if (queryIndex_ != 0L) {
        output.writeInt64(2, queryIndex_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < chunkedSeries_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, chunkedSeries_.get(i));
      }
      if (queryIndex_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, queryIndex_);
      }
      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 prometheus.Remote.ChunkedReadResponse)) {
        return super.equals(obj);
      }
      prometheus.Remote.ChunkedReadResponse other = (prometheus.Remote.ChunkedReadResponse) obj;

      if (!getChunkedSeriesList()
          .equals(other.getChunkedSeriesList())) return false;
      if (getQueryIndex()
          != other.getQueryIndex()) 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 (getChunkedSeriesCount() > 0) {
        hash = (37 * hash) + CHUNKED_SERIES_FIELD_NUMBER;
        hash = (53 * hash) + getChunkedSeriesList().hashCode();
      }
      hash = (37 * hash) + QUERY_INDEX_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getQueryIndex());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static prometheus.Remote.ChunkedReadResponse parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static prometheus.Remote.ChunkedReadResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ChunkedReadResponse 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 prometheus.Remote.ChunkedReadResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ChunkedReadResponse 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 prometheus.Remote.ChunkedReadResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static prometheus.Remote.ChunkedReadResponse 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(prometheus.Remote.ChunkedReadResponse prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
     * We strictly stream full series after series, optionally split by time. This means that a single frame can contain
     * partition of the single series, but once a new series is started to be streamed it means that no more chunks will
     * be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
     * </pre>
     *
     * Protobuf type {@code prometheus.ChunkedReadResponse}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:prometheus.ChunkedReadResponse)
        prometheus.Remote.ChunkedReadResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return prometheus.Remote.internal_static_prometheus_ChunkedReadResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return prometheus.Remote.internal_static_prometheus_ChunkedReadResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                prometheus.Remote.ChunkedReadResponse.class, prometheus.Remote.ChunkedReadResponse.Builder.class);
      }

      // Construct using prometheus.Remote.ChunkedReadResponse.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return prometheus.Remote.internal_static_prometheus_ChunkedReadResponse_descriptor;
      }

      @java.lang.Override
      public prometheus.Remote.ChunkedReadResponse getDefaultInstanceForType() {
        return prometheus.Remote.ChunkedReadResponse.getDefaultInstance();
      }

      @java.lang.Override
      public prometheus.Remote.ChunkedReadResponse build() {
        prometheus.Remote.ChunkedReadResponse result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public prometheus.Remote.ChunkedReadResponse buildPartial() {
        prometheus.Remote.ChunkedReadResponse result = new prometheus.Remote.ChunkedReadResponse(this);
        int from_bitField0_ = bitField0_;
        if (chunkedSeriesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            chunkedSeries_ = java.util.Collections.unmodifiableList(chunkedSeries_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.chunkedSeries_ = chunkedSeries_;
        } else {
          result.chunkedSeries_ = chunkedSeriesBuilder_.build();
        }
        result.queryIndex_ = queryIndex_;
        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 prometheus.Remote.ChunkedReadResponse) {
          return mergeFrom((prometheus.Remote.ChunkedReadResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(prometheus.Remote.ChunkedReadResponse other) {
        if (other == prometheus.Remote.ChunkedReadResponse.getDefaultInstance()) return this;
        if (chunkedSeriesBuilder_ == null) {
          if (!other.chunkedSeries_.isEmpty()) {
            if (chunkedSeries_.isEmpty()) {
              chunkedSeries_ = other.chunkedSeries_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureChunkedSeriesIsMutable();
              chunkedSeries_.addAll(other.chunkedSeries_);
            }
            onChanged();
          }
        } else {
          if (!other.chunkedSeries_.isEmpty()) {
            if (chunkedSeriesBuilder_.isEmpty()) {
              chunkedSeriesBuilder_.dispose();
              chunkedSeriesBuilder_ = null;
              chunkedSeries_ = other.chunkedSeries_;
              bitField0_ = (bitField0_ & ~0x00000001);
              chunkedSeriesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getChunkedSeriesFieldBuilder() : null;
            } else {
              chunkedSeriesBuilder_.addAllMessages(other.chunkedSeries_);
            }
          }
        }
        if (other.getQueryIndex() != 0L) {
          setQueryIndex(other.getQueryIndex());
        }
        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 {
        prometheus.Remote.ChunkedReadResponse parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (prometheus.Remote.ChunkedReadResponse) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<prometheus.Types.ChunkedSeries> chunkedSeries_ =
        java.util.Collections.emptyList();
      private void ensureChunkedSeriesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          chunkedSeries_ = new java.util.ArrayList<prometheus.Types.ChunkedSeries>(chunkedSeries_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.ChunkedSeries, prometheus.Types.ChunkedSeries.Builder, prometheus.Types.ChunkedSeriesOrBuilder> chunkedSeriesBuilder_;

      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public java.util.List<prometheus.Types.ChunkedSeries> getChunkedSeriesList() {
        if (chunkedSeriesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(chunkedSeries_);
        } else {
          return chunkedSeriesBuilder_.getMessageList();
        }
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public int getChunkedSeriesCount() {
        if (chunkedSeriesBuilder_ == null) {
          return chunkedSeries_.size();
        } else {
          return chunkedSeriesBuilder_.getCount();
        }
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public prometheus.Types.ChunkedSeries getChunkedSeries(int index) {
        if (chunkedSeriesBuilder_ == null) {
          return chunkedSeries_.get(index);
        } else {
          return chunkedSeriesBuilder_.getMessage(index);
        }
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder setChunkedSeries(
          int index, prometheus.Types.ChunkedSeries value) {
        if (chunkedSeriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.set(index, value);
          onChanged();
        } else {
          chunkedSeriesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder setChunkedSeries(
          int index, prometheus.Types.ChunkedSeries.Builder builderForValue) {
        if (chunkedSeriesBuilder_ == null) {
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.set(index, builderForValue.build());
          onChanged();
        } else {
          chunkedSeriesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder addChunkedSeries(prometheus.Types.ChunkedSeries value) {
        if (chunkedSeriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.add(value);
          onChanged();
        } else {
          chunkedSeriesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder addChunkedSeries(
          int index, prometheus.Types.ChunkedSeries value) {
        if (chunkedSeriesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.add(index, value);
          onChanged();
        } else {
          chunkedSeriesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder addChunkedSeries(
          prometheus.Types.ChunkedSeries.Builder builderForValue) {
        if (chunkedSeriesBuilder_ == null) {
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.add(builderForValue.build());
          onChanged();
        } else {
          chunkedSeriesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder addChunkedSeries(
          int index, prometheus.Types.ChunkedSeries.Builder builderForValue) {
        if (chunkedSeriesBuilder_ == null) {
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.add(index, builderForValue.build());
          onChanged();
        } else {
          chunkedSeriesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder addAllChunkedSeries(
          java.lang.Iterable<? extends prometheus.Types.ChunkedSeries> values) {
        if (chunkedSeriesBuilder_ == null) {
          ensureChunkedSeriesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, chunkedSeries_);
          onChanged();
        } else {
          chunkedSeriesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder clearChunkedSeries() {
        if (chunkedSeriesBuilder_ == null) {
          chunkedSeries_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          chunkedSeriesBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public Builder removeChunkedSeries(int index) {
        if (chunkedSeriesBuilder_ == null) {
          ensureChunkedSeriesIsMutable();
          chunkedSeries_.remove(index);
          onChanged();
        } else {
          chunkedSeriesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public prometheus.Types.ChunkedSeries.Builder getChunkedSeriesBuilder(
          int index) {
        return getChunkedSeriesFieldBuilder().getBuilder(index);
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public prometheus.Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(
          int index) {
        if (chunkedSeriesBuilder_ == null) {
          return chunkedSeries_.get(index);  } else {
          return chunkedSeriesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public java.util.List<? extends prometheus.Types.ChunkedSeriesOrBuilder> 
           getChunkedSeriesOrBuilderList() {
        if (chunkedSeriesBuilder_ != null) {
          return chunkedSeriesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(chunkedSeries_);
        }
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public prometheus.Types.ChunkedSeries.Builder addChunkedSeriesBuilder() {
        return getChunkedSeriesFieldBuilder().addBuilder(
            prometheus.Types.ChunkedSeries.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public prometheus.Types.ChunkedSeries.Builder addChunkedSeriesBuilder(
          int index) {
        return getChunkedSeriesFieldBuilder().addBuilder(
            index, prometheus.Types.ChunkedSeries.getDefaultInstance());
      }
      /**
       * <code>repeated .prometheus.ChunkedSeries chunked_series = 1;</code>
       */
      public java.util.List<prometheus.Types.ChunkedSeries.Builder> 
           getChunkedSeriesBuilderList() {
        return getChunkedSeriesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          prometheus.Types.ChunkedSeries, prometheus.Types.ChunkedSeries.Builder, prometheus.Types.ChunkedSeriesOrBuilder> 
          getChunkedSeriesFieldBuilder() {
        if (chunkedSeriesBuilder_ == null) {
          chunkedSeriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              prometheus.Types.ChunkedSeries, prometheus.Types.ChunkedSeries.Builder, prometheus.Types.ChunkedSeriesOrBuilder>(
                  chunkedSeries_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          chunkedSeries_ = null;
        }
        return chunkedSeriesBuilder_;
      }

      private long queryIndex_ ;
      /**
       * <pre>
       * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
       * </pre>
       *
       * <code>int64 query_index = 2;</code>
       * @return The queryIndex.
       */
      @java.lang.Override
      public long getQueryIndex() {
        return queryIndex_;
      }
      /**
       * <pre>
       * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
       * </pre>
       *
       * <code>int64 query_index = 2;</code>
       * @param value The queryIndex to set.
       * @return This builder for chaining.
       */
      public Builder setQueryIndex(long value) {
        
        queryIndex_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
       * </pre>
       *
       * <code>int64 query_index = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearQueryIndex() {
        
        queryIndex_ = 0L;
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:prometheus.ChunkedReadResponse)
    }

    // @@protoc_insertion_point(class_scope:prometheus.ChunkedReadResponse)
    private static final prometheus.Remote.ChunkedReadResponse DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new prometheus.Remote.ChunkedReadResponse();
    }

    public static prometheus.Remote.ChunkedReadResponse getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public prometheus.Remote.ChunkedReadResponse getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_WriteRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_WriteRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_ReadRequest_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_ReadRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_ReadResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_ReadResponse_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_Query_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_Query_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_QueryResult_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_QueryResult_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_prometheus_ChunkedReadResponse_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_prometheus_ChunkedReadResponse_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\036prometheus/remote/remote.proto\022\npromet" +
      "heus\032\035prometheus/remote/types.proto\"n\n\014W" +
      "riteRequest\022*\n\ntimeseries\030\001 \003(\0132\026.promet" +
      "heus.TimeSeries\022,\n\010metadata\030\003 \003(\0132\032.prom" +
      "etheus.MetricMetadataJ\004\010\002\020\003\"\256\001\n\013ReadRequ" +
      "est\022\"\n\007queries\030\001 \003(\0132\021.prometheus.Query\022" +
      "E\n\027accepted_response_types\030\002 \003(\0162$.prome" +
      "theus.ReadRequest.ResponseType\"4\n\014Respon" +
      "seType\022\013\n\007SAMPLES\020\000\022\027\n\023STREAMED_XOR_CHUN" +
      "KS\020\001\"8\n\014ReadResponse\022(\n\007results\030\001 \003(\0132\027." +
      "prometheus.QueryResult\"\217\001\n\005Query\022\032\n\022star" +
      "t_timestamp_ms\030\001 \001(\003\022\030\n\020end_timestamp_ms" +
      "\030\002 \001(\003\022*\n\010matchers\030\003 \003(\0132\030.prometheus.La" +
      "belMatcher\022$\n\005hints\030\004 \001(\0132\025.prometheus.R" +
      "eadHints\"9\n\013QueryResult\022*\n\ntimeseries\030\001 " +
      "\003(\0132\026.prometheus.TimeSeries\"]\n\023ChunkedRe" +
      "adResponse\0221\n\016chunked_series\030\001 \003(\0132\031.pro" +
      "metheus.ChunkedSeries\022\023\n\013query_index\030\002 \001" +
      "(\003B=Z;github.com/GreptimeTeam/greptime-p" +
      "roto/go/prometheus/remoteb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          prometheus.Types.getDescriptor(),
        });
    internal_static_prometheus_WriteRequest_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_prometheus_WriteRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_WriteRequest_descriptor,
        new java.lang.String[] { "Timeseries", "Metadata", });
    internal_static_prometheus_ReadRequest_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_prometheus_ReadRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_ReadRequest_descriptor,
        new java.lang.String[] { "Queries", "AcceptedResponseTypes", });
    internal_static_prometheus_ReadResponse_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_prometheus_ReadResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_ReadResponse_descriptor,
        new java.lang.String[] { "Results", });
    internal_static_prometheus_Query_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_prometheus_Query_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_Query_descriptor,
        new java.lang.String[] { "StartTimestampMs", "EndTimestampMs", "Matchers", "Hints", });
    internal_static_prometheus_QueryResult_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_prometheus_QueryResult_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_QueryResult_descriptor,
        new java.lang.String[] { "Timeseries", });
    internal_static_prometheus_ChunkedReadResponse_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_prometheus_ChunkedReadResponse_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_prometheus_ChunkedReadResponse_descriptor,
        new java.lang.String[] { "ChunkedSeries", "QueryIndex", });
    prometheus.Types.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
