// SPDX-License-Identifier: AGPL-3.0-only
// Provenance-includes-location: https://github.com/thanos-io/thanos/blob/main/pkg/store/hintspb/hints.proto
// Provenance-includes-license: Apache-2.0
// Provenance-includes-copyright: The Thanos Authors.

syntax = "proto3";
package hintspb;

import "github.com/grafana/mimir/pkg/storegateway/storepb/types.proto";
import "gogoproto/gogo.proto";

option go_package = "hintspb";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.goproto_sizecache_all) = false; // Do not generate XXX_sizecache fields to reduce memory footprint.
option (gogoproto.goproto_unkeyed_all) = false; // Do not generate XXX_unkeyed fields to reduce memory footprint.
option (gogoproto.goproto_unrecognized_all) = false; // Do not generate XXX_unrecognized fields to reduce memory footprint.
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;

message SeriesRequestHints {
  /// block_matchers is a list of label matchers that are evaluated against each single block's
  /// labels to filter which blocks get queried. If the list is empty, no per-block filtering
  /// is applied.
  repeated thanos.LabelMatcher block_matchers = 1 [(gogoproto.nullable) = false];
}

message SeriesResponseHints {
  /// queried_blocks is the list of blocks that have been queried.
  repeated Block queried_blocks = 1 [(gogoproto.nullable) = false];
}

message Block {
  string id = 1;
}

message LabelNamesRequestHints {
  /// block_matchers is a list of label matchers that are evaluated against each single block's
  /// labels to filter which blocks get queried. If the list is empty, no per-block filtering
  /// is applied.
  repeated thanos.LabelMatcher block_matchers = 1 [(gogoproto.nullable) = false];
}

message LabelNamesResponseHints {
  /// queried_blocks is the list of blocks that have been queried.
  repeated Block queried_blocks = 1 [(gogoproto.nullable) = false];
}

message LabelValuesRequestHints {
  /// block_matchers is a list of label matchers that are evaluated against each single block's
  /// labels to filter which blocks get queried. If the list is empty, no per-block filtering
  /// is applied.
  repeated thanos.LabelMatcher block_matchers = 1 [(gogoproto.nullable) = false];
}

message LabelValuesResponseHints {
  /// queried_blocks is the list of blocks that have been queried.
  repeated Block queried_blocks = 1 [(gogoproto.nullable) = false];
}
