github.com/thanos-io/thanos@v0.32.5/pkg/api/query/querypb/query.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: api/query/querypb/query.proto
     3  
     4  package querypb
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	io "io"
    10  	math "math"
    11  	math_bits "math/bits"
    12  
    13  	_ "github.com/gogo/protobuf/gogoproto"
    14  	proto "github.com/gogo/protobuf/proto"
    15  	storepb "github.com/thanos-io/thanos/pkg/store/storepb"
    16  	prompb "github.com/thanos-io/thanos/pkg/store/storepb/prompb"
    17  	grpc "google.golang.org/grpc"
    18  	codes "google.golang.org/grpc/codes"
    19  	status "google.golang.org/grpc/status"
    20  )
    21  
    22  // Reference imports to suppress errors if they are not otherwise used.
    23  var _ = proto.Marshal
    24  var _ = fmt.Errorf
    25  var _ = math.Inf
    26  
    27  // This is a compile-time assertion to ensure that this generated file
    28  // is compatible with the proto package it is being compiled against.
    29  // A compilation error at this line likely means your copy of the
    30  // proto package needs to be updated.
    31  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    32  
    33  type EngineType int32
    34  
    35  const (
    36  	EngineType_default    EngineType = 0
    37  	EngineType_prometheus EngineType = 1
    38  	EngineType_thanos     EngineType = 2
    39  )
    40  
    41  var EngineType_name = map[int32]string{
    42  	0: "default",
    43  	1: "prometheus",
    44  	2: "thanos",
    45  }
    46  
    47  var EngineType_value = map[string]int32{
    48  	"default":    0,
    49  	"prometheus": 1,
    50  	"thanos":     2,
    51  }
    52  
    53  func (x EngineType) String() string {
    54  	return proto.EnumName(EngineType_name, int32(x))
    55  }
    56  
    57  func (EngineType) EnumDescriptor() ([]byte, []int) {
    58  	return fileDescriptor_4b2aba43925d729f, []int{0}
    59  }
    60  
    61  type QueryRequest struct {
    62  	Query                 string             `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
    63  	TimeSeconds           int64              `protobuf:"varint,2,opt,name=time_seconds,json=timeSeconds,proto3" json:"time_seconds,omitempty"`
    64  	TimeoutSeconds        int64              `protobuf:"varint,3,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
    65  	MaxResolutionSeconds  int64              `protobuf:"varint,4,opt,name=max_resolution_seconds,json=maxResolutionSeconds,proto3" json:"max_resolution_seconds,omitempty"`
    66  	ReplicaLabels         []string           `protobuf:"bytes,5,rep,name=replica_labels,json=replicaLabels,proto3" json:"replica_labels,omitempty"`
    67  	StoreMatchers         []StoreMatchers    `protobuf:"bytes,6,rep,name=storeMatchers,proto3" json:"storeMatchers"`
    68  	EnableDedup           bool               `protobuf:"varint,7,opt,name=enableDedup,proto3" json:"enableDedup,omitempty"`
    69  	EnablePartialResponse bool               `protobuf:"varint,8,opt,name=enablePartialResponse,proto3" json:"enablePartialResponse,omitempty"`
    70  	EnableQueryPushdown   bool               `protobuf:"varint,9,opt,name=enableQueryPushdown,proto3" json:"enableQueryPushdown,omitempty"`
    71  	SkipChunks            bool               `protobuf:"varint,10,opt,name=skipChunks,proto3" json:"skipChunks,omitempty"`
    72  	ShardInfo             *storepb.ShardInfo `protobuf:"bytes,11,opt,name=shard_info,json=shardInfo,proto3" json:"shard_info,omitempty"`
    73  	LookbackDeltaSeconds  int64              `protobuf:"varint,12,opt,name=lookback_delta_seconds,json=lookbackDeltaSeconds,proto3" json:"lookback_delta_seconds,omitempty"`
    74  	Engine                EngineType         `protobuf:"varint,13,opt,name=engine,proto3,enum=thanos.EngineType" json:"engine,omitempty"`
    75  }
    76  
    77  func (m *QueryRequest) Reset()         { *m = QueryRequest{} }
    78  func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
    79  func (*QueryRequest) ProtoMessage()    {}
    80  func (*QueryRequest) Descriptor() ([]byte, []int) {
    81  	return fileDescriptor_4b2aba43925d729f, []int{0}
    82  }
    83  func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
    84  	return m.Unmarshal(b)
    85  }
    86  func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    87  	if deterministic {
    88  		return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic)
    89  	} else {
    90  		b = b[:cap(b)]
    91  		n, err := m.MarshalToSizedBuffer(b)
    92  		if err != nil {
    93  			return nil, err
    94  		}
    95  		return b[:n], nil
    96  	}
    97  }
    98  func (m *QueryRequest) XXX_Merge(src proto.Message) {
    99  	xxx_messageInfo_QueryRequest.Merge(m, src)
   100  }
   101  func (m *QueryRequest) XXX_Size() int {
   102  	return m.Size()
   103  }
   104  func (m *QueryRequest) XXX_DiscardUnknown() {
   105  	xxx_messageInfo_QueryRequest.DiscardUnknown(m)
   106  }
   107  
   108  var xxx_messageInfo_QueryRequest proto.InternalMessageInfo
   109  
   110  type StoreMatchers struct {
   111  	LabelMatchers []storepb.LabelMatcher `protobuf:"bytes,1,rep,name=labelMatchers,proto3" json:"labelMatchers"`
   112  }
   113  
   114  func (m *StoreMatchers) Reset()         { *m = StoreMatchers{} }
   115  func (m *StoreMatchers) String() string { return proto.CompactTextString(m) }
   116  func (*StoreMatchers) ProtoMessage()    {}
   117  func (*StoreMatchers) Descriptor() ([]byte, []int) {
   118  	return fileDescriptor_4b2aba43925d729f, []int{1}
   119  }
   120  func (m *StoreMatchers) XXX_Unmarshal(b []byte) error {
   121  	return m.Unmarshal(b)
   122  }
   123  func (m *StoreMatchers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   124  	if deterministic {
   125  		return xxx_messageInfo_StoreMatchers.Marshal(b, m, deterministic)
   126  	} else {
   127  		b = b[:cap(b)]
   128  		n, err := m.MarshalToSizedBuffer(b)
   129  		if err != nil {
   130  			return nil, err
   131  		}
   132  		return b[:n], nil
   133  	}
   134  }
   135  func (m *StoreMatchers) XXX_Merge(src proto.Message) {
   136  	xxx_messageInfo_StoreMatchers.Merge(m, src)
   137  }
   138  func (m *StoreMatchers) XXX_Size() int {
   139  	return m.Size()
   140  }
   141  func (m *StoreMatchers) XXX_DiscardUnknown() {
   142  	xxx_messageInfo_StoreMatchers.DiscardUnknown(m)
   143  }
   144  
   145  var xxx_messageInfo_StoreMatchers proto.InternalMessageInfo
   146  
   147  type QueryResponse struct {
   148  	// Types that are valid to be assigned to Result:
   149  	//	*QueryResponse_Warnings
   150  	//	*QueryResponse_Timeseries
   151  	Result isQueryResponse_Result `protobuf_oneof:"result"`
   152  }
   153  
   154  func (m *QueryResponse) Reset()         { *m = QueryResponse{} }
   155  func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
   156  func (*QueryResponse) ProtoMessage()    {}
   157  func (*QueryResponse) Descriptor() ([]byte, []int) {
   158  	return fileDescriptor_4b2aba43925d729f, []int{2}
   159  }
   160  func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
   161  	return m.Unmarshal(b)
   162  }
   163  func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   164  	if deterministic {
   165  		return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic)
   166  	} else {
   167  		b = b[:cap(b)]
   168  		n, err := m.MarshalToSizedBuffer(b)
   169  		if err != nil {
   170  			return nil, err
   171  		}
   172  		return b[:n], nil
   173  	}
   174  }
   175  func (m *QueryResponse) XXX_Merge(src proto.Message) {
   176  	xxx_messageInfo_QueryResponse.Merge(m, src)
   177  }
   178  func (m *QueryResponse) XXX_Size() int {
   179  	return m.Size()
   180  }
   181  func (m *QueryResponse) XXX_DiscardUnknown() {
   182  	xxx_messageInfo_QueryResponse.DiscardUnknown(m)
   183  }
   184  
   185  var xxx_messageInfo_QueryResponse proto.InternalMessageInfo
   186  
   187  type isQueryResponse_Result interface {
   188  	isQueryResponse_Result()
   189  	MarshalTo([]byte) (int, error)
   190  	Size() int
   191  }
   192  
   193  type QueryResponse_Warnings struct {
   194  	Warnings string `protobuf:"bytes,1,opt,name=warnings,proto3,oneof" json:"warnings,omitempty"`
   195  }
   196  type QueryResponse_Timeseries struct {
   197  	Timeseries *prompb.TimeSeries `protobuf:"bytes,2,opt,name=timeseries,proto3,oneof" json:"timeseries,omitempty"`
   198  }
   199  
   200  func (*QueryResponse_Warnings) isQueryResponse_Result()   {}
   201  func (*QueryResponse_Timeseries) isQueryResponse_Result() {}
   202  
   203  func (m *QueryResponse) GetResult() isQueryResponse_Result {
   204  	if m != nil {
   205  		return m.Result
   206  	}
   207  	return nil
   208  }
   209  
   210  func (m *QueryResponse) GetWarnings() string {
   211  	if x, ok := m.GetResult().(*QueryResponse_Warnings); ok {
   212  		return x.Warnings
   213  	}
   214  	return ""
   215  }
   216  
   217  func (m *QueryResponse) GetTimeseries() *prompb.TimeSeries {
   218  	if x, ok := m.GetResult().(*QueryResponse_Timeseries); ok {
   219  		return x.Timeseries
   220  	}
   221  	return nil
   222  }
   223  
   224  // XXX_OneofWrappers is for the internal use of the proto package.
   225  func (*QueryResponse) XXX_OneofWrappers() []interface{} {
   226  	return []interface{}{
   227  		(*QueryResponse_Warnings)(nil),
   228  		(*QueryResponse_Timeseries)(nil),
   229  	}
   230  }
   231  
   232  type QueryRangeRequest struct {
   233  	Query                 string             `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
   234  	StartTimeSeconds      int64              `protobuf:"varint,2,opt,name=start_time_seconds,json=startTimeSeconds,proto3" json:"start_time_seconds,omitempty"`
   235  	EndTimeSeconds        int64              `protobuf:"varint,3,opt,name=end_time_seconds,json=endTimeSeconds,proto3" json:"end_time_seconds,omitempty"`
   236  	IntervalSeconds       int64              `protobuf:"varint,4,opt,name=interval_seconds,json=intervalSeconds,proto3" json:"interval_seconds,omitempty"`
   237  	TimeoutSeconds        int64              `protobuf:"varint,5,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
   238  	MaxResolutionSeconds  int64              `protobuf:"varint,6,opt,name=max_resolution_seconds,json=maxResolutionSeconds,proto3" json:"max_resolution_seconds,omitempty"`
   239  	ReplicaLabels         []string           `protobuf:"bytes,7,rep,name=replica_labels,json=replicaLabels,proto3" json:"replica_labels,omitempty"`
   240  	StoreMatchers         []StoreMatchers    `protobuf:"bytes,8,rep,name=storeMatchers,proto3" json:"storeMatchers"`
   241  	EnableDedup           bool               `protobuf:"varint,9,opt,name=enableDedup,proto3" json:"enableDedup,omitempty"`
   242  	EnablePartialResponse bool               `protobuf:"varint,10,opt,name=enablePartialResponse,proto3" json:"enablePartialResponse,omitempty"`
   243  	EnableQueryPushdown   bool               `protobuf:"varint,11,opt,name=enableQueryPushdown,proto3" json:"enableQueryPushdown,omitempty"`
   244  	SkipChunks            bool               `protobuf:"varint,12,opt,name=skipChunks,proto3" json:"skipChunks,omitempty"`
   245  	ShardInfo             *storepb.ShardInfo `protobuf:"bytes,13,opt,name=shard_info,json=shardInfo,proto3" json:"shard_info,omitempty"`
   246  	LookbackDeltaSeconds  int64              `protobuf:"varint,14,opt,name=lookback_delta_seconds,json=lookbackDeltaSeconds,proto3" json:"lookback_delta_seconds,omitempty"`
   247  	Engine                EngineType         `protobuf:"varint,15,opt,name=engine,proto3,enum=thanos.EngineType" json:"engine,omitempty"`
   248  }
   249  
   250  func (m *QueryRangeRequest) Reset()         { *m = QueryRangeRequest{} }
   251  func (m *QueryRangeRequest) String() string { return proto.CompactTextString(m) }
   252  func (*QueryRangeRequest) ProtoMessage()    {}
   253  func (*QueryRangeRequest) Descriptor() ([]byte, []int) {
   254  	return fileDescriptor_4b2aba43925d729f, []int{3}
   255  }
   256  func (m *QueryRangeRequest) XXX_Unmarshal(b []byte) error {
   257  	return m.Unmarshal(b)
   258  }
   259  func (m *QueryRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   260  	if deterministic {
   261  		return xxx_messageInfo_QueryRangeRequest.Marshal(b, m, deterministic)
   262  	} else {
   263  		b = b[:cap(b)]
   264  		n, err := m.MarshalToSizedBuffer(b)
   265  		if err != nil {
   266  			return nil, err
   267  		}
   268  		return b[:n], nil
   269  	}
   270  }
   271  func (m *QueryRangeRequest) XXX_Merge(src proto.Message) {
   272  	xxx_messageInfo_QueryRangeRequest.Merge(m, src)
   273  }
   274  func (m *QueryRangeRequest) XXX_Size() int {
   275  	return m.Size()
   276  }
   277  func (m *QueryRangeRequest) XXX_DiscardUnknown() {
   278  	xxx_messageInfo_QueryRangeRequest.DiscardUnknown(m)
   279  }
   280  
   281  var xxx_messageInfo_QueryRangeRequest proto.InternalMessageInfo
   282  
   283  type QueryRangeResponse struct {
   284  	// Types that are valid to be assigned to Result:
   285  	//	*QueryRangeResponse_Warnings
   286  	//	*QueryRangeResponse_Timeseries
   287  	Result isQueryRangeResponse_Result `protobuf_oneof:"result"`
   288  }
   289  
   290  func (m *QueryRangeResponse) Reset()         { *m = QueryRangeResponse{} }
   291  func (m *QueryRangeResponse) String() string { return proto.CompactTextString(m) }
   292  func (*QueryRangeResponse) ProtoMessage()    {}
   293  func (*QueryRangeResponse) Descriptor() ([]byte, []int) {
   294  	return fileDescriptor_4b2aba43925d729f, []int{4}
   295  }
   296  func (m *QueryRangeResponse) XXX_Unmarshal(b []byte) error {
   297  	return m.Unmarshal(b)
   298  }
   299  func (m *QueryRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   300  	if deterministic {
   301  		return xxx_messageInfo_QueryRangeResponse.Marshal(b, m, deterministic)
   302  	} else {
   303  		b = b[:cap(b)]
   304  		n, err := m.MarshalToSizedBuffer(b)
   305  		if err != nil {
   306  			return nil, err
   307  		}
   308  		return b[:n], nil
   309  	}
   310  }
   311  func (m *QueryRangeResponse) XXX_Merge(src proto.Message) {
   312  	xxx_messageInfo_QueryRangeResponse.Merge(m, src)
   313  }
   314  func (m *QueryRangeResponse) XXX_Size() int {
   315  	return m.Size()
   316  }
   317  func (m *QueryRangeResponse) XXX_DiscardUnknown() {
   318  	xxx_messageInfo_QueryRangeResponse.DiscardUnknown(m)
   319  }
   320  
   321  var xxx_messageInfo_QueryRangeResponse proto.InternalMessageInfo
   322  
   323  type isQueryRangeResponse_Result interface {
   324  	isQueryRangeResponse_Result()
   325  	MarshalTo([]byte) (int, error)
   326  	Size() int
   327  }
   328  
   329  type QueryRangeResponse_Warnings struct {
   330  	Warnings string `protobuf:"bytes,1,opt,name=warnings,proto3,oneof" json:"warnings,omitempty"`
   331  }
   332  type QueryRangeResponse_Timeseries struct {
   333  	Timeseries *prompb.TimeSeries `protobuf:"bytes,2,opt,name=timeseries,proto3,oneof" json:"timeseries,omitempty"`
   334  }
   335  
   336  func (*QueryRangeResponse_Warnings) isQueryRangeResponse_Result()   {}
   337  func (*QueryRangeResponse_Timeseries) isQueryRangeResponse_Result() {}
   338  
   339  func (m *QueryRangeResponse) GetResult() isQueryRangeResponse_Result {
   340  	if m != nil {
   341  		return m.Result
   342  	}
   343  	return nil
   344  }
   345  
   346  func (m *QueryRangeResponse) GetWarnings() string {
   347  	if x, ok := m.GetResult().(*QueryRangeResponse_Warnings); ok {
   348  		return x.Warnings
   349  	}
   350  	return ""
   351  }
   352  
   353  func (m *QueryRangeResponse) GetTimeseries() *prompb.TimeSeries {
   354  	if x, ok := m.GetResult().(*QueryRangeResponse_Timeseries); ok {
   355  		return x.Timeseries
   356  	}
   357  	return nil
   358  }
   359  
   360  // XXX_OneofWrappers is for the internal use of the proto package.
   361  func (*QueryRangeResponse) XXX_OneofWrappers() []interface{} {
   362  	return []interface{}{
   363  		(*QueryRangeResponse_Warnings)(nil),
   364  		(*QueryRangeResponse_Timeseries)(nil),
   365  	}
   366  }
   367  
   368  func init() {
   369  	proto.RegisterEnum("thanos.EngineType", EngineType_name, EngineType_value)
   370  	proto.RegisterType((*QueryRequest)(nil), "thanos.QueryRequest")
   371  	proto.RegisterType((*StoreMatchers)(nil), "thanos.StoreMatchers")
   372  	proto.RegisterType((*QueryResponse)(nil), "thanos.QueryResponse")
   373  	proto.RegisterType((*QueryRangeRequest)(nil), "thanos.QueryRangeRequest")
   374  	proto.RegisterType((*QueryRangeResponse)(nil), "thanos.QueryRangeResponse")
   375  }
   376  
   377  func init() { proto.RegisterFile("api/query/querypb/query.proto", fileDescriptor_4b2aba43925d729f) }
   378  
   379  var fileDescriptor_4b2aba43925d729f = []byte{
   380  	// 752 bytes of a gzipped FileDescriptorProto
   381  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4b, 0x6f, 0xeb, 0x44,
   382  	0x14, 0xb6, 0x6f, 0x9a, 0xd7, 0x71, 0x92, 0xe6, 0x0e, 0x29, 0xf8, 0x06, 0x30, 0x26, 0x52, 0x85,
   383  	0xa9, 0x50, 0x52, 0x85, 0xc2, 0x0e, 0x09, 0x4a, 0x2b, 0x15, 0xa9, 0x48, 0xad, 0xdb, 0x15, 0x9b,
   384  	0x68, 0x12, 0x4f, 0x13, 0x2b, 0xce, 0x8c, 0xeb, 0x19, 0xb7, 0x8d, 0xd8, 0xb3, 0xe6, 0xbf, 0xf0,
   385  	0x27, 0xba, 0x42, 0x5d, 0xb2, 0x42, 0xd0, 0xfe, 0x11, 0xe4, 0xf1, 0xa3, 0x76, 0x15, 0xf5, 0x41,
   386  	0xa5, 0xbb, 0x71, 0x66, 0xbe, 0xef, 0x3b, 0xf3, 0x38, 0x73, 0xbe, 0x1c, 0xf8, 0x14, 0xfb, 0xee,
   387  	0xe0, 0x3c, 0x24, 0xc1, 0x32, 0xfe, 0xfa, 0xe3, 0xf8, 0xb7, 0xef, 0x07, 0x4c, 0x30, 0x54, 0x11,
   388  	0x33, 0x4c, 0x19, 0xef, 0x76, 0xa6, 0x6c, 0xca, 0x24, 0x34, 0x88, 0x46, 0x31, 0xdb, 0x7d, 0xc7,
   389  	0x05, 0x0b, 0xc8, 0x40, 0x7e, 0xfd, 0xf1, 0x40, 0x2c, 0x7d, 0xc2, 0x13, 0xea, 0xa3, 0x22, 0x15,
   390  	0xf8, 0x93, 0x84, 0x30, 0x8b, 0x84, 0x1f, 0xb0, 0x45, 0x31, 0xb4, 0xf7, 0xe7, 0x1a, 0x34, 0x8e,
   391  	0xa3, 0x33, 0xd8, 0xe4, 0x3c, 0x24, 0x5c, 0xa0, 0x0e, 0x94, 0xe5, 0x99, 0x74, 0xd5, 0x54, 0xad,
   392  	0xba, 0x1d, 0x4f, 0xd0, 0xe7, 0xd0, 0x10, 0xee, 0x82, 0x8c, 0x38, 0x99, 0x30, 0xea, 0x70, 0xfd,
   393  	0x8d, 0xa9, 0x5a, 0x25, 0x5b, 0x8b, 0xb0, 0x93, 0x18, 0x42, 0x5f, 0xc0, 0x7a, 0x34, 0x65, 0xa1,
   394  	0xc8, 0x54, 0x25, 0xa9, 0x6a, 0x25, 0x70, 0x2a, 0xdc, 0x81, 0x0f, 0x17, 0xf8, 0x6a, 0x14, 0x10,
   395  	0xce, 0xbc, 0x50, 0xb8, 0x8c, 0x66, 0xfa, 0x35, 0xa9, 0xef, 0x2c, 0xf0, 0x95, 0x9d, 0x91, 0x69,
   396  	0xd4, 0x26, 0xb4, 0x02, 0xe2, 0x7b, 0xee, 0x04, 0x8f, 0x3c, 0x3c, 0x26, 0x1e, 0xd7, 0xcb, 0x66,
   397  	0xc9, 0xaa, 0xdb, 0xcd, 0x04, 0x3d, 0x94, 0x20, 0xfa, 0x01, 0x9a, 0xf2, 0xb6, 0x3f, 0x63, 0x31,
   398  	0x99, 0x91, 0x80, 0xeb, 0x15, 0xb3, 0x64, 0x69, 0xc3, 0x8d, 0x7e, 0x9c, 0xdb, 0xfe, 0x49, 0x9e,
   399  	0xdc, 0x5d, 0xbb, 0xfe, 0xfb, 0x33, 0xc5, 0x2e, 0x46, 0x20, 0x13, 0x34, 0x42, 0xf1, 0xd8, 0x23,
   400  	0x7b, 0xc4, 0x09, 0x7d, 0xbd, 0x6a, 0xaa, 0x56, 0xcd, 0xce, 0x43, 0x68, 0x07, 0x36, 0xe2, 0xe9,
   401  	0x11, 0x0e, 0x84, 0x8b, 0x3d, 0x9b, 0x70, 0x9f, 0x51, 0x4e, 0xf4, 0x9a, 0xd4, 0xae, 0x26, 0xd1,
   402  	0x36, 0x7c, 0x10, 0x13, 0x32, 0xdf, 0x47, 0x21, 0x9f, 0x39, 0xec, 0x92, 0xea, 0x75, 0x19, 0xb3,
   403  	0x8a, 0x42, 0x06, 0x00, 0x9f, 0xbb, 0xfe, 0x8f, 0xb3, 0x90, 0xce, 0xb9, 0x0e, 0x52, 0x98, 0x43,
   404  	0xd0, 0x36, 0x00, 0x9f, 0xe1, 0xc0, 0x19, 0xb9, 0xf4, 0x8c, 0xe9, 0x9a, 0xa9, 0x5a, 0xda, 0xf0,
   405  	0x6d, 0x76, 0xd3, 0x88, 0xf9, 0x89, 0x9e, 0x31, 0xbb, 0xce, 0xd3, 0x61, 0x94, 0x7b, 0x8f, 0xb1,
   406  	0xf9, 0x18, 0x4f, 0xe6, 0x23, 0x87, 0x78, 0x02, 0x67, 0xb9, 0x6f, 0xc4, 0xb9, 0x4f, 0xd9, 0xbd,
   407  	0x88, 0x4c, 0x73, 0xbf, 0x05, 0x15, 0x42, 0xa7, 0x2e, 0x25, 0x7a, 0xd3, 0x54, 0xad, 0xd6, 0x10,
   408  	0xa5, 0x7b, 0xec, 0x4b, 0xf4, 0x74, 0xe9, 0x13, 0x3b, 0x51, 0xf4, 0x8e, 0xa1, 0x59, 0xc8, 0x31,
   409  	0xfa, 0x1e, 0x9a, 0xf2, 0xc1, 0xb2, 0x17, 0x51, 0xe5, 0x8b, 0x74, 0xd2, 0x35, 0x0e, 0x73, 0x64,
   410  	0xfa, 0x20, 0x85, 0x80, 0xde, 0x05, 0x34, 0x93, 0x12, 0x4d, 0x32, 0xf9, 0x09, 0xd4, 0x2e, 0x71,
   411  	0x40, 0x5d, 0x3a, 0xe5, 0x71, 0x99, 0x1e, 0x28, 0x76, 0x86, 0xa0, 0xef, 0x00, 0xa2, 0x8a, 0xe3,
   412  	0x24, 0x70, 0x49, 0x5c, 0xa9, 0xda, 0xf0, 0xe3, 0xa8, 0xdc, 0x17, 0x44, 0xcc, 0x48, 0xc8, 0x47,
   413  	0x13, 0xe6, 0x2f, 0xfb, 0xa7, 0xb2, 0x74, 0x23, 0xc9, 0x81, 0x62, 0xe7, 0x02, 0x76, 0x6b, 0x50,
   414  	0x09, 0x08, 0x0f, 0x3d, 0xd1, 0xfb, 0xa3, 0x0c, 0x6f, 0xe3, 0x8d, 0x31, 0x9d, 0x92, 0xc7, 0x0d,
   415  	0xf2, 0x15, 0x20, 0x2e, 0x70, 0x20, 0x46, 0x2b, 0x6c, 0xd2, 0x96, 0xcc, 0x69, 0xce, 0x2b, 0x16,
   416  	0xb4, 0x09, 0x75, 0x8a, 0xda, 0xc4, 0x2c, 0x84, 0x3a, 0x79, 0xe5, 0x97, 0xd0, 0x76, 0xa9, 0x20,
   417  	0xc1, 0x05, 0xf6, 0x1e, 0xd8, 0x64, 0x3d, 0xc5, 0x1f, 0x31, 0x60, 0xf9, 0x85, 0x06, 0xac, 0xbc,
   418  	0xc8, 0x80, 0xd5, 0x67, 0x19, 0xb0, 0xf6, 0x5a, 0x03, 0xd6, 0x5f, 0x60, 0x40, 0xf8, 0x1f, 0x06,
   419  	0xd4, 0x9e, 0x6b, 0xc0, 0xc6, 0x13, 0x06, 0x6c, 0xbe, 0xca, 0x80, 0xad, 0x67, 0x19, 0x70, 0xfd,
   420  	0x49, 0x03, 0xfe, 0x0a, 0x28, 0x5f, 0xb4, 0xef, 0xd5, 0x32, 0x5b, 0xdf, 0x00, 0xdc, 0x1f, 0x09,
   421  	0x69, 0x50, 0x75, 0xc8, 0x19, 0x0e, 0x3d, 0xd1, 0x56, 0x50, 0x0b, 0xe0, 0x7e, 0xc1, 0xb6, 0x8a,
   422  	0x00, 0x92, 0x7e, 0xd7, 0x7e, 0x33, 0xfc, 0x4d, 0x85, 0xb2, 0x3c, 0x34, 0xfa, 0x36, 0x1d, 0x64,
   423  	0xff, 0x0f, 0xf9, 0xee, 0xd4, 0xdd, 0x78, 0x80, 0xc6, 0xb7, 0xdb, 0x56, 0xd1, 0x3e, 0xc0, 0xfd,
   424  	0xad, 0xd1, 0xbb, 0xa2, 0x2c, 0x67, 0xdf, 0x6e, 0x77, 0x15, 0x95, 0x2e, 0xb3, 0xbb, 0x79, 0xfd,
   425  	0xaf, 0xa1, 0x5c, 0xdf, 0x1a, 0xea, 0xcd, 0xad, 0xa1, 0xfe, 0x73, 0x6b, 0xa8, 0xbf, 0xdf, 0x19,
   426  	0xca, 0xcd, 0x9d, 0xa1, 0xfc, 0x75, 0x67, 0x28, 0xbf, 0x54, 0x93, 0xae, 0x3d, 0xae, 0xc8, 0xe6,
   427  	0xf9, 0xf5, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0xcb, 0xbf, 0x05, 0xd1, 0x07, 0x00, 0x00,
   428  }
   429  
   430  // Reference imports to suppress errors if they are not otherwise used.
   431  var _ context.Context
   432  var _ grpc.ClientConn
   433  
   434  // This is a compile-time assertion to ensure that this generated file
   435  // is compatible with the grpc package it is being compiled against.
   436  const _ = grpc.SupportPackageIsVersion4
   437  
   438  // QueryClient is the client API for Query service.
   439  //
   440  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   441  type QueryClient interface {
   442  	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (Query_QueryClient, error)
   443  	QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (Query_QueryRangeClient, error)
   444  }
   445  
   446  type queryClient struct {
   447  	cc *grpc.ClientConn
   448  }
   449  
   450  func NewQueryClient(cc *grpc.ClientConn) QueryClient {
   451  	return &queryClient{cc}
   452  }
   453  
   454  func (c *queryClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (Query_QueryClient, error) {
   455  	stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[0], "/thanos.Query/Query", opts...)
   456  	if err != nil {
   457  		return nil, err
   458  	}
   459  	x := &queryQueryClient{stream}
   460  	if err := x.ClientStream.SendMsg(in); err != nil {
   461  		return nil, err
   462  	}
   463  	if err := x.ClientStream.CloseSend(); err != nil {
   464  		return nil, err
   465  	}
   466  	return x, nil
   467  }
   468  
   469  type Query_QueryClient interface {
   470  	Recv() (*QueryResponse, error)
   471  	grpc.ClientStream
   472  }
   473  
   474  type queryQueryClient struct {
   475  	grpc.ClientStream
   476  }
   477  
   478  func (x *queryQueryClient) Recv() (*QueryResponse, error) {
   479  	m := new(QueryResponse)
   480  	if err := x.ClientStream.RecvMsg(m); err != nil {
   481  		return nil, err
   482  	}
   483  	return m, nil
   484  }
   485  
   486  func (c *queryClient) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (Query_QueryRangeClient, error) {
   487  	stream, err := c.cc.NewStream(ctx, &_Query_serviceDesc.Streams[1], "/thanos.Query/QueryRange", opts...)
   488  	if err != nil {
   489  		return nil, err
   490  	}
   491  	x := &queryQueryRangeClient{stream}
   492  	if err := x.ClientStream.SendMsg(in); err != nil {
   493  		return nil, err
   494  	}
   495  	if err := x.ClientStream.CloseSend(); err != nil {
   496  		return nil, err
   497  	}
   498  	return x, nil
   499  }
   500  
   501  type Query_QueryRangeClient interface {
   502  	Recv() (*QueryRangeResponse, error)
   503  	grpc.ClientStream
   504  }
   505  
   506  type queryQueryRangeClient struct {
   507  	grpc.ClientStream
   508  }
   509  
   510  func (x *queryQueryRangeClient) Recv() (*QueryRangeResponse, error) {
   511  	m := new(QueryRangeResponse)
   512  	if err := x.ClientStream.RecvMsg(m); err != nil {
   513  		return nil, err
   514  	}
   515  	return m, nil
   516  }
   517  
   518  // QueryServer is the server API for Query service.
   519  type QueryServer interface {
   520  	Query(*QueryRequest, Query_QueryServer) error
   521  	QueryRange(*QueryRangeRequest, Query_QueryRangeServer) error
   522  }
   523  
   524  // UnimplementedQueryServer can be embedded to have forward compatible implementations.
   525  type UnimplementedQueryServer struct {
   526  }
   527  
   528  func (*UnimplementedQueryServer) Query(req *QueryRequest, srv Query_QueryServer) error {
   529  	return status.Errorf(codes.Unimplemented, "method Query not implemented")
   530  }
   531  func (*UnimplementedQueryServer) QueryRange(req *QueryRangeRequest, srv Query_QueryRangeServer) error {
   532  	return status.Errorf(codes.Unimplemented, "method QueryRange not implemented")
   533  }
   534  
   535  func RegisterQueryServer(s *grpc.Server, srv QueryServer) {
   536  	s.RegisterService(&_Query_serviceDesc, srv)
   537  }
   538  
   539  func _Query_Query_Handler(srv interface{}, stream grpc.ServerStream) error {
   540  	m := new(QueryRequest)
   541  	if err := stream.RecvMsg(m); err != nil {
   542  		return err
   543  	}
   544  	return srv.(QueryServer).Query(m, &queryQueryServer{stream})
   545  }
   546  
   547  type Query_QueryServer interface {
   548  	Send(*QueryResponse) error
   549  	grpc.ServerStream
   550  }
   551  
   552  type queryQueryServer struct {
   553  	grpc.ServerStream
   554  }
   555  
   556  func (x *queryQueryServer) Send(m *QueryResponse) error {
   557  	return x.ServerStream.SendMsg(m)
   558  }
   559  
   560  func _Query_QueryRange_Handler(srv interface{}, stream grpc.ServerStream) error {
   561  	m := new(QueryRangeRequest)
   562  	if err := stream.RecvMsg(m); err != nil {
   563  		return err
   564  	}
   565  	return srv.(QueryServer).QueryRange(m, &queryQueryRangeServer{stream})
   566  }
   567  
   568  type Query_QueryRangeServer interface {
   569  	Send(*QueryRangeResponse) error
   570  	grpc.ServerStream
   571  }
   572  
   573  type queryQueryRangeServer struct {
   574  	grpc.ServerStream
   575  }
   576  
   577  func (x *queryQueryRangeServer) Send(m *QueryRangeResponse) error {
   578  	return x.ServerStream.SendMsg(m)
   579  }
   580  
   581  var _Query_serviceDesc = grpc.ServiceDesc{
   582  	ServiceName: "thanos.Query",
   583  	HandlerType: (*QueryServer)(nil),
   584  	Methods:     []grpc.MethodDesc{},
   585  	Streams: []grpc.StreamDesc{
   586  		{
   587  			StreamName:    "Query",
   588  			Handler:       _Query_Query_Handler,
   589  			ServerStreams: true,
   590  		},
   591  		{
   592  			StreamName:    "QueryRange",
   593  			Handler:       _Query_QueryRange_Handler,
   594  			ServerStreams: true,
   595  		},
   596  	},
   597  	Metadata: "api/query/querypb/query.proto",
   598  }
   599  
   600  func (m *QueryRequest) Marshal() (dAtA []byte, err error) {
   601  	size := m.Size()
   602  	dAtA = make([]byte, size)
   603  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   604  	if err != nil {
   605  		return nil, err
   606  	}
   607  	return dAtA[:n], nil
   608  }
   609  
   610  func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) {
   611  	size := m.Size()
   612  	return m.MarshalToSizedBuffer(dAtA[:size])
   613  }
   614  
   615  func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   616  	i := len(dAtA)
   617  	_ = i
   618  	var l int
   619  	_ = l
   620  	if m.Engine != 0 {
   621  		i = encodeVarintQuery(dAtA, i, uint64(m.Engine))
   622  		i--
   623  		dAtA[i] = 0x68
   624  	}
   625  	if m.LookbackDeltaSeconds != 0 {
   626  		i = encodeVarintQuery(dAtA, i, uint64(m.LookbackDeltaSeconds))
   627  		i--
   628  		dAtA[i] = 0x60
   629  	}
   630  	if m.ShardInfo != nil {
   631  		{
   632  			size, err := m.ShardInfo.MarshalToSizedBuffer(dAtA[:i])
   633  			if err != nil {
   634  				return 0, err
   635  			}
   636  			i -= size
   637  			i = encodeVarintQuery(dAtA, i, uint64(size))
   638  		}
   639  		i--
   640  		dAtA[i] = 0x5a
   641  	}
   642  	if m.SkipChunks {
   643  		i--
   644  		if m.SkipChunks {
   645  			dAtA[i] = 1
   646  		} else {
   647  			dAtA[i] = 0
   648  		}
   649  		i--
   650  		dAtA[i] = 0x50
   651  	}
   652  	if m.EnableQueryPushdown {
   653  		i--
   654  		if m.EnableQueryPushdown {
   655  			dAtA[i] = 1
   656  		} else {
   657  			dAtA[i] = 0
   658  		}
   659  		i--
   660  		dAtA[i] = 0x48
   661  	}
   662  	if m.EnablePartialResponse {
   663  		i--
   664  		if m.EnablePartialResponse {
   665  			dAtA[i] = 1
   666  		} else {
   667  			dAtA[i] = 0
   668  		}
   669  		i--
   670  		dAtA[i] = 0x40
   671  	}
   672  	if m.EnableDedup {
   673  		i--
   674  		if m.EnableDedup {
   675  			dAtA[i] = 1
   676  		} else {
   677  			dAtA[i] = 0
   678  		}
   679  		i--
   680  		dAtA[i] = 0x38
   681  	}
   682  	if len(m.StoreMatchers) > 0 {
   683  		for iNdEx := len(m.StoreMatchers) - 1; iNdEx >= 0; iNdEx-- {
   684  			{
   685  				size, err := m.StoreMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   686  				if err != nil {
   687  					return 0, err
   688  				}
   689  				i -= size
   690  				i = encodeVarintQuery(dAtA, i, uint64(size))
   691  			}
   692  			i--
   693  			dAtA[i] = 0x32
   694  		}
   695  	}
   696  	if len(m.ReplicaLabels) > 0 {
   697  		for iNdEx := len(m.ReplicaLabels) - 1; iNdEx >= 0; iNdEx-- {
   698  			i -= len(m.ReplicaLabels[iNdEx])
   699  			copy(dAtA[i:], m.ReplicaLabels[iNdEx])
   700  			i = encodeVarintQuery(dAtA, i, uint64(len(m.ReplicaLabels[iNdEx])))
   701  			i--
   702  			dAtA[i] = 0x2a
   703  		}
   704  	}
   705  	if m.MaxResolutionSeconds != 0 {
   706  		i = encodeVarintQuery(dAtA, i, uint64(m.MaxResolutionSeconds))
   707  		i--
   708  		dAtA[i] = 0x20
   709  	}
   710  	if m.TimeoutSeconds != 0 {
   711  		i = encodeVarintQuery(dAtA, i, uint64(m.TimeoutSeconds))
   712  		i--
   713  		dAtA[i] = 0x18
   714  	}
   715  	if m.TimeSeconds != 0 {
   716  		i = encodeVarintQuery(dAtA, i, uint64(m.TimeSeconds))
   717  		i--
   718  		dAtA[i] = 0x10
   719  	}
   720  	if len(m.Query) > 0 {
   721  		i -= len(m.Query)
   722  		copy(dAtA[i:], m.Query)
   723  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Query)))
   724  		i--
   725  		dAtA[i] = 0xa
   726  	}
   727  	return len(dAtA) - i, nil
   728  }
   729  
   730  func (m *StoreMatchers) Marshal() (dAtA []byte, err error) {
   731  	size := m.Size()
   732  	dAtA = make([]byte, size)
   733  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   734  	if err != nil {
   735  		return nil, err
   736  	}
   737  	return dAtA[:n], nil
   738  }
   739  
   740  func (m *StoreMatchers) MarshalTo(dAtA []byte) (int, error) {
   741  	size := m.Size()
   742  	return m.MarshalToSizedBuffer(dAtA[:size])
   743  }
   744  
   745  func (m *StoreMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   746  	i := len(dAtA)
   747  	_ = i
   748  	var l int
   749  	_ = l
   750  	if len(m.LabelMatchers) > 0 {
   751  		for iNdEx := len(m.LabelMatchers) - 1; iNdEx >= 0; iNdEx-- {
   752  			{
   753  				size, err := m.LabelMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   754  				if err != nil {
   755  					return 0, err
   756  				}
   757  				i -= size
   758  				i = encodeVarintQuery(dAtA, i, uint64(size))
   759  			}
   760  			i--
   761  			dAtA[i] = 0xa
   762  		}
   763  	}
   764  	return len(dAtA) - i, nil
   765  }
   766  
   767  func (m *QueryResponse) Marshal() (dAtA []byte, err error) {
   768  	size := m.Size()
   769  	dAtA = make([]byte, size)
   770  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   771  	if err != nil {
   772  		return nil, err
   773  	}
   774  	return dAtA[:n], nil
   775  }
   776  
   777  func (m *QueryResponse) MarshalTo(dAtA []byte) (int, error) {
   778  	size := m.Size()
   779  	return m.MarshalToSizedBuffer(dAtA[:size])
   780  }
   781  
   782  func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   783  	i := len(dAtA)
   784  	_ = i
   785  	var l int
   786  	_ = l
   787  	if m.Result != nil {
   788  		{
   789  			size := m.Result.Size()
   790  			i -= size
   791  			if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil {
   792  				return 0, err
   793  			}
   794  		}
   795  	}
   796  	return len(dAtA) - i, nil
   797  }
   798  
   799  func (m *QueryResponse_Warnings) MarshalTo(dAtA []byte) (int, error) {
   800  	size := m.Size()
   801  	return m.MarshalToSizedBuffer(dAtA[:size])
   802  }
   803  
   804  func (m *QueryResponse_Warnings) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   805  	i := len(dAtA)
   806  	i -= len(m.Warnings)
   807  	copy(dAtA[i:], m.Warnings)
   808  	i = encodeVarintQuery(dAtA, i, uint64(len(m.Warnings)))
   809  	i--
   810  	dAtA[i] = 0xa
   811  	return len(dAtA) - i, nil
   812  }
   813  func (m *QueryResponse_Timeseries) MarshalTo(dAtA []byte) (int, error) {
   814  	size := m.Size()
   815  	return m.MarshalToSizedBuffer(dAtA[:size])
   816  }
   817  
   818  func (m *QueryResponse_Timeseries) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   819  	i := len(dAtA)
   820  	if m.Timeseries != nil {
   821  		{
   822  			size, err := m.Timeseries.MarshalToSizedBuffer(dAtA[:i])
   823  			if err != nil {
   824  				return 0, err
   825  			}
   826  			i -= size
   827  			i = encodeVarintQuery(dAtA, i, uint64(size))
   828  		}
   829  		i--
   830  		dAtA[i] = 0x12
   831  	}
   832  	return len(dAtA) - i, nil
   833  }
   834  func (m *QueryRangeRequest) Marshal() (dAtA []byte, err error) {
   835  	size := m.Size()
   836  	dAtA = make([]byte, size)
   837  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   838  	if err != nil {
   839  		return nil, err
   840  	}
   841  	return dAtA[:n], nil
   842  }
   843  
   844  func (m *QueryRangeRequest) MarshalTo(dAtA []byte) (int, error) {
   845  	size := m.Size()
   846  	return m.MarshalToSizedBuffer(dAtA[:size])
   847  }
   848  
   849  func (m *QueryRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   850  	i := len(dAtA)
   851  	_ = i
   852  	var l int
   853  	_ = l
   854  	if m.Engine != 0 {
   855  		i = encodeVarintQuery(dAtA, i, uint64(m.Engine))
   856  		i--
   857  		dAtA[i] = 0x78
   858  	}
   859  	if m.LookbackDeltaSeconds != 0 {
   860  		i = encodeVarintQuery(dAtA, i, uint64(m.LookbackDeltaSeconds))
   861  		i--
   862  		dAtA[i] = 0x70
   863  	}
   864  	if m.ShardInfo != nil {
   865  		{
   866  			size, err := m.ShardInfo.MarshalToSizedBuffer(dAtA[:i])
   867  			if err != nil {
   868  				return 0, err
   869  			}
   870  			i -= size
   871  			i = encodeVarintQuery(dAtA, i, uint64(size))
   872  		}
   873  		i--
   874  		dAtA[i] = 0x6a
   875  	}
   876  	if m.SkipChunks {
   877  		i--
   878  		if m.SkipChunks {
   879  			dAtA[i] = 1
   880  		} else {
   881  			dAtA[i] = 0
   882  		}
   883  		i--
   884  		dAtA[i] = 0x60
   885  	}
   886  	if m.EnableQueryPushdown {
   887  		i--
   888  		if m.EnableQueryPushdown {
   889  			dAtA[i] = 1
   890  		} else {
   891  			dAtA[i] = 0
   892  		}
   893  		i--
   894  		dAtA[i] = 0x58
   895  	}
   896  	if m.EnablePartialResponse {
   897  		i--
   898  		if m.EnablePartialResponse {
   899  			dAtA[i] = 1
   900  		} else {
   901  			dAtA[i] = 0
   902  		}
   903  		i--
   904  		dAtA[i] = 0x50
   905  	}
   906  	if m.EnableDedup {
   907  		i--
   908  		if m.EnableDedup {
   909  			dAtA[i] = 1
   910  		} else {
   911  			dAtA[i] = 0
   912  		}
   913  		i--
   914  		dAtA[i] = 0x48
   915  	}
   916  	if len(m.StoreMatchers) > 0 {
   917  		for iNdEx := len(m.StoreMatchers) - 1; iNdEx >= 0; iNdEx-- {
   918  			{
   919  				size, err := m.StoreMatchers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   920  				if err != nil {
   921  					return 0, err
   922  				}
   923  				i -= size
   924  				i = encodeVarintQuery(dAtA, i, uint64(size))
   925  			}
   926  			i--
   927  			dAtA[i] = 0x42
   928  		}
   929  	}
   930  	if len(m.ReplicaLabels) > 0 {
   931  		for iNdEx := len(m.ReplicaLabels) - 1; iNdEx >= 0; iNdEx-- {
   932  			i -= len(m.ReplicaLabels[iNdEx])
   933  			copy(dAtA[i:], m.ReplicaLabels[iNdEx])
   934  			i = encodeVarintQuery(dAtA, i, uint64(len(m.ReplicaLabels[iNdEx])))
   935  			i--
   936  			dAtA[i] = 0x3a
   937  		}
   938  	}
   939  	if m.MaxResolutionSeconds != 0 {
   940  		i = encodeVarintQuery(dAtA, i, uint64(m.MaxResolutionSeconds))
   941  		i--
   942  		dAtA[i] = 0x30
   943  	}
   944  	if m.TimeoutSeconds != 0 {
   945  		i = encodeVarintQuery(dAtA, i, uint64(m.TimeoutSeconds))
   946  		i--
   947  		dAtA[i] = 0x28
   948  	}
   949  	if m.IntervalSeconds != 0 {
   950  		i = encodeVarintQuery(dAtA, i, uint64(m.IntervalSeconds))
   951  		i--
   952  		dAtA[i] = 0x20
   953  	}
   954  	if m.EndTimeSeconds != 0 {
   955  		i = encodeVarintQuery(dAtA, i, uint64(m.EndTimeSeconds))
   956  		i--
   957  		dAtA[i] = 0x18
   958  	}
   959  	if m.StartTimeSeconds != 0 {
   960  		i = encodeVarintQuery(dAtA, i, uint64(m.StartTimeSeconds))
   961  		i--
   962  		dAtA[i] = 0x10
   963  	}
   964  	if len(m.Query) > 0 {
   965  		i -= len(m.Query)
   966  		copy(dAtA[i:], m.Query)
   967  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Query)))
   968  		i--
   969  		dAtA[i] = 0xa
   970  	}
   971  	return len(dAtA) - i, nil
   972  }
   973  
   974  func (m *QueryRangeResponse) Marshal() (dAtA []byte, err error) {
   975  	size := m.Size()
   976  	dAtA = make([]byte, size)
   977  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   978  	if err != nil {
   979  		return nil, err
   980  	}
   981  	return dAtA[:n], nil
   982  }
   983  
   984  func (m *QueryRangeResponse) MarshalTo(dAtA []byte) (int, error) {
   985  	size := m.Size()
   986  	return m.MarshalToSizedBuffer(dAtA[:size])
   987  }
   988  
   989  func (m *QueryRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   990  	i := len(dAtA)
   991  	_ = i
   992  	var l int
   993  	_ = l
   994  	if m.Result != nil {
   995  		{
   996  			size := m.Result.Size()
   997  			i -= size
   998  			if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil {
   999  				return 0, err
  1000  			}
  1001  		}
  1002  	}
  1003  	return len(dAtA) - i, nil
  1004  }
  1005  
  1006  func (m *QueryRangeResponse_Warnings) MarshalTo(dAtA []byte) (int, error) {
  1007  	size := m.Size()
  1008  	return m.MarshalToSizedBuffer(dAtA[:size])
  1009  }
  1010  
  1011  func (m *QueryRangeResponse_Warnings) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1012  	i := len(dAtA)
  1013  	i -= len(m.Warnings)
  1014  	copy(dAtA[i:], m.Warnings)
  1015  	i = encodeVarintQuery(dAtA, i, uint64(len(m.Warnings)))
  1016  	i--
  1017  	dAtA[i] = 0xa
  1018  	return len(dAtA) - i, nil
  1019  }
  1020  func (m *QueryRangeResponse_Timeseries) MarshalTo(dAtA []byte) (int, error) {
  1021  	size := m.Size()
  1022  	return m.MarshalToSizedBuffer(dAtA[:size])
  1023  }
  1024  
  1025  func (m *QueryRangeResponse_Timeseries) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1026  	i := len(dAtA)
  1027  	if m.Timeseries != nil {
  1028  		{
  1029  			size, err := m.Timeseries.MarshalToSizedBuffer(dAtA[:i])
  1030  			if err != nil {
  1031  				return 0, err
  1032  			}
  1033  			i -= size
  1034  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1035  		}
  1036  		i--
  1037  		dAtA[i] = 0x12
  1038  	}
  1039  	return len(dAtA) - i, nil
  1040  }
  1041  func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
  1042  	offset -= sovQuery(v)
  1043  	base := offset
  1044  	for v >= 1<<7 {
  1045  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1046  		v >>= 7
  1047  		offset++
  1048  	}
  1049  	dAtA[offset] = uint8(v)
  1050  	return base
  1051  }
  1052  func (m *QueryRequest) Size() (n int) {
  1053  	if m == nil {
  1054  		return 0
  1055  	}
  1056  	var l int
  1057  	_ = l
  1058  	l = len(m.Query)
  1059  	if l > 0 {
  1060  		n += 1 + l + sovQuery(uint64(l))
  1061  	}
  1062  	if m.TimeSeconds != 0 {
  1063  		n += 1 + sovQuery(uint64(m.TimeSeconds))
  1064  	}
  1065  	if m.TimeoutSeconds != 0 {
  1066  		n += 1 + sovQuery(uint64(m.TimeoutSeconds))
  1067  	}
  1068  	if m.MaxResolutionSeconds != 0 {
  1069  		n += 1 + sovQuery(uint64(m.MaxResolutionSeconds))
  1070  	}
  1071  	if len(m.ReplicaLabels) > 0 {
  1072  		for _, s := range m.ReplicaLabels {
  1073  			l = len(s)
  1074  			n += 1 + l + sovQuery(uint64(l))
  1075  		}
  1076  	}
  1077  	if len(m.StoreMatchers) > 0 {
  1078  		for _, e := range m.StoreMatchers {
  1079  			l = e.Size()
  1080  			n += 1 + l + sovQuery(uint64(l))
  1081  		}
  1082  	}
  1083  	if m.EnableDedup {
  1084  		n += 2
  1085  	}
  1086  	if m.EnablePartialResponse {
  1087  		n += 2
  1088  	}
  1089  	if m.EnableQueryPushdown {
  1090  		n += 2
  1091  	}
  1092  	if m.SkipChunks {
  1093  		n += 2
  1094  	}
  1095  	if m.ShardInfo != nil {
  1096  		l = m.ShardInfo.Size()
  1097  		n += 1 + l + sovQuery(uint64(l))
  1098  	}
  1099  	if m.LookbackDeltaSeconds != 0 {
  1100  		n += 1 + sovQuery(uint64(m.LookbackDeltaSeconds))
  1101  	}
  1102  	if m.Engine != 0 {
  1103  		n += 1 + sovQuery(uint64(m.Engine))
  1104  	}
  1105  	return n
  1106  }
  1107  
  1108  func (m *StoreMatchers) Size() (n int) {
  1109  	if m == nil {
  1110  		return 0
  1111  	}
  1112  	var l int
  1113  	_ = l
  1114  	if len(m.LabelMatchers) > 0 {
  1115  		for _, e := range m.LabelMatchers {
  1116  			l = e.Size()
  1117  			n += 1 + l + sovQuery(uint64(l))
  1118  		}
  1119  	}
  1120  	return n
  1121  }
  1122  
  1123  func (m *QueryResponse) Size() (n int) {
  1124  	if m == nil {
  1125  		return 0
  1126  	}
  1127  	var l int
  1128  	_ = l
  1129  	if m.Result != nil {
  1130  		n += m.Result.Size()
  1131  	}
  1132  	return n
  1133  }
  1134  
  1135  func (m *QueryResponse_Warnings) Size() (n int) {
  1136  	if m == nil {
  1137  		return 0
  1138  	}
  1139  	var l int
  1140  	_ = l
  1141  	l = len(m.Warnings)
  1142  	n += 1 + l + sovQuery(uint64(l))
  1143  	return n
  1144  }
  1145  func (m *QueryResponse_Timeseries) Size() (n int) {
  1146  	if m == nil {
  1147  		return 0
  1148  	}
  1149  	var l int
  1150  	_ = l
  1151  	if m.Timeseries != nil {
  1152  		l = m.Timeseries.Size()
  1153  		n += 1 + l + sovQuery(uint64(l))
  1154  	}
  1155  	return n
  1156  }
  1157  func (m *QueryRangeRequest) Size() (n int) {
  1158  	if m == nil {
  1159  		return 0
  1160  	}
  1161  	var l int
  1162  	_ = l
  1163  	l = len(m.Query)
  1164  	if l > 0 {
  1165  		n += 1 + l + sovQuery(uint64(l))
  1166  	}
  1167  	if m.StartTimeSeconds != 0 {
  1168  		n += 1 + sovQuery(uint64(m.StartTimeSeconds))
  1169  	}
  1170  	if m.EndTimeSeconds != 0 {
  1171  		n += 1 + sovQuery(uint64(m.EndTimeSeconds))
  1172  	}
  1173  	if m.IntervalSeconds != 0 {
  1174  		n += 1 + sovQuery(uint64(m.IntervalSeconds))
  1175  	}
  1176  	if m.TimeoutSeconds != 0 {
  1177  		n += 1 + sovQuery(uint64(m.TimeoutSeconds))
  1178  	}
  1179  	if m.MaxResolutionSeconds != 0 {
  1180  		n += 1 + sovQuery(uint64(m.MaxResolutionSeconds))
  1181  	}
  1182  	if len(m.ReplicaLabels) > 0 {
  1183  		for _, s := range m.ReplicaLabels {
  1184  			l = len(s)
  1185  			n += 1 + l + sovQuery(uint64(l))
  1186  		}
  1187  	}
  1188  	if len(m.StoreMatchers) > 0 {
  1189  		for _, e := range m.StoreMatchers {
  1190  			l = e.Size()
  1191  			n += 1 + l + sovQuery(uint64(l))
  1192  		}
  1193  	}
  1194  	if m.EnableDedup {
  1195  		n += 2
  1196  	}
  1197  	if m.EnablePartialResponse {
  1198  		n += 2
  1199  	}
  1200  	if m.EnableQueryPushdown {
  1201  		n += 2
  1202  	}
  1203  	if m.SkipChunks {
  1204  		n += 2
  1205  	}
  1206  	if m.ShardInfo != nil {
  1207  		l = m.ShardInfo.Size()
  1208  		n += 1 + l + sovQuery(uint64(l))
  1209  	}
  1210  	if m.LookbackDeltaSeconds != 0 {
  1211  		n += 1 + sovQuery(uint64(m.LookbackDeltaSeconds))
  1212  	}
  1213  	if m.Engine != 0 {
  1214  		n += 1 + sovQuery(uint64(m.Engine))
  1215  	}
  1216  	return n
  1217  }
  1218  
  1219  func (m *QueryRangeResponse) Size() (n int) {
  1220  	if m == nil {
  1221  		return 0
  1222  	}
  1223  	var l int
  1224  	_ = l
  1225  	if m.Result != nil {
  1226  		n += m.Result.Size()
  1227  	}
  1228  	return n
  1229  }
  1230  
  1231  func (m *QueryRangeResponse_Warnings) Size() (n int) {
  1232  	if m == nil {
  1233  		return 0
  1234  	}
  1235  	var l int
  1236  	_ = l
  1237  	l = len(m.Warnings)
  1238  	n += 1 + l + sovQuery(uint64(l))
  1239  	return n
  1240  }
  1241  func (m *QueryRangeResponse_Timeseries) Size() (n int) {
  1242  	if m == nil {
  1243  		return 0
  1244  	}
  1245  	var l int
  1246  	_ = l
  1247  	if m.Timeseries != nil {
  1248  		l = m.Timeseries.Size()
  1249  		n += 1 + l + sovQuery(uint64(l))
  1250  	}
  1251  	return n
  1252  }
  1253  
  1254  func sovQuery(x uint64) (n int) {
  1255  	return (math_bits.Len64(x|1) + 6) / 7
  1256  }
  1257  func sozQuery(x uint64) (n int) {
  1258  	return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1259  }
  1260  func (m *QueryRequest) Unmarshal(dAtA []byte) error {
  1261  	l := len(dAtA)
  1262  	iNdEx := 0
  1263  	for iNdEx < l {
  1264  		preIndex := iNdEx
  1265  		var wire uint64
  1266  		for shift := uint(0); ; shift += 7 {
  1267  			if shift >= 64 {
  1268  				return ErrIntOverflowQuery
  1269  			}
  1270  			if iNdEx >= l {
  1271  				return io.ErrUnexpectedEOF
  1272  			}
  1273  			b := dAtA[iNdEx]
  1274  			iNdEx++
  1275  			wire |= uint64(b&0x7F) << shift
  1276  			if b < 0x80 {
  1277  				break
  1278  			}
  1279  		}
  1280  		fieldNum := int32(wire >> 3)
  1281  		wireType := int(wire & 0x7)
  1282  		if wireType == 4 {
  1283  			return fmt.Errorf("proto: QueryRequest: wiretype end group for non-group")
  1284  		}
  1285  		if fieldNum <= 0 {
  1286  			return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1287  		}
  1288  		switch fieldNum {
  1289  		case 1:
  1290  			if wireType != 2 {
  1291  				return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  1292  			}
  1293  			var stringLen uint64
  1294  			for shift := uint(0); ; shift += 7 {
  1295  				if shift >= 64 {
  1296  					return ErrIntOverflowQuery
  1297  				}
  1298  				if iNdEx >= l {
  1299  					return io.ErrUnexpectedEOF
  1300  				}
  1301  				b := dAtA[iNdEx]
  1302  				iNdEx++
  1303  				stringLen |= uint64(b&0x7F) << shift
  1304  				if b < 0x80 {
  1305  					break
  1306  				}
  1307  			}
  1308  			intStringLen := int(stringLen)
  1309  			if intStringLen < 0 {
  1310  				return ErrInvalidLengthQuery
  1311  			}
  1312  			postIndex := iNdEx + intStringLen
  1313  			if postIndex < 0 {
  1314  				return ErrInvalidLengthQuery
  1315  			}
  1316  			if postIndex > l {
  1317  				return io.ErrUnexpectedEOF
  1318  			}
  1319  			m.Query = string(dAtA[iNdEx:postIndex])
  1320  			iNdEx = postIndex
  1321  		case 2:
  1322  			if wireType != 0 {
  1323  				return fmt.Errorf("proto: wrong wireType = %d for field TimeSeconds", wireType)
  1324  			}
  1325  			m.TimeSeconds = 0
  1326  			for shift := uint(0); ; shift += 7 {
  1327  				if shift >= 64 {
  1328  					return ErrIntOverflowQuery
  1329  				}
  1330  				if iNdEx >= l {
  1331  					return io.ErrUnexpectedEOF
  1332  				}
  1333  				b := dAtA[iNdEx]
  1334  				iNdEx++
  1335  				m.TimeSeconds |= int64(b&0x7F) << shift
  1336  				if b < 0x80 {
  1337  					break
  1338  				}
  1339  			}
  1340  		case 3:
  1341  			if wireType != 0 {
  1342  				return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
  1343  			}
  1344  			m.TimeoutSeconds = 0
  1345  			for shift := uint(0); ; shift += 7 {
  1346  				if shift >= 64 {
  1347  					return ErrIntOverflowQuery
  1348  				}
  1349  				if iNdEx >= l {
  1350  					return io.ErrUnexpectedEOF
  1351  				}
  1352  				b := dAtA[iNdEx]
  1353  				iNdEx++
  1354  				m.TimeoutSeconds |= int64(b&0x7F) << shift
  1355  				if b < 0x80 {
  1356  					break
  1357  				}
  1358  			}
  1359  		case 4:
  1360  			if wireType != 0 {
  1361  				return fmt.Errorf("proto: wrong wireType = %d for field MaxResolutionSeconds", wireType)
  1362  			}
  1363  			m.MaxResolutionSeconds = 0
  1364  			for shift := uint(0); ; shift += 7 {
  1365  				if shift >= 64 {
  1366  					return ErrIntOverflowQuery
  1367  				}
  1368  				if iNdEx >= l {
  1369  					return io.ErrUnexpectedEOF
  1370  				}
  1371  				b := dAtA[iNdEx]
  1372  				iNdEx++
  1373  				m.MaxResolutionSeconds |= int64(b&0x7F) << shift
  1374  				if b < 0x80 {
  1375  					break
  1376  				}
  1377  			}
  1378  		case 5:
  1379  			if wireType != 2 {
  1380  				return fmt.Errorf("proto: wrong wireType = %d for field ReplicaLabels", wireType)
  1381  			}
  1382  			var stringLen uint64
  1383  			for shift := uint(0); ; shift += 7 {
  1384  				if shift >= 64 {
  1385  					return ErrIntOverflowQuery
  1386  				}
  1387  				if iNdEx >= l {
  1388  					return io.ErrUnexpectedEOF
  1389  				}
  1390  				b := dAtA[iNdEx]
  1391  				iNdEx++
  1392  				stringLen |= uint64(b&0x7F) << shift
  1393  				if b < 0x80 {
  1394  					break
  1395  				}
  1396  			}
  1397  			intStringLen := int(stringLen)
  1398  			if intStringLen < 0 {
  1399  				return ErrInvalidLengthQuery
  1400  			}
  1401  			postIndex := iNdEx + intStringLen
  1402  			if postIndex < 0 {
  1403  				return ErrInvalidLengthQuery
  1404  			}
  1405  			if postIndex > l {
  1406  				return io.ErrUnexpectedEOF
  1407  			}
  1408  			m.ReplicaLabels = append(m.ReplicaLabels, string(dAtA[iNdEx:postIndex]))
  1409  			iNdEx = postIndex
  1410  		case 6:
  1411  			if wireType != 2 {
  1412  				return fmt.Errorf("proto: wrong wireType = %d for field StoreMatchers", wireType)
  1413  			}
  1414  			var msglen int
  1415  			for shift := uint(0); ; shift += 7 {
  1416  				if shift >= 64 {
  1417  					return ErrIntOverflowQuery
  1418  				}
  1419  				if iNdEx >= l {
  1420  					return io.ErrUnexpectedEOF
  1421  				}
  1422  				b := dAtA[iNdEx]
  1423  				iNdEx++
  1424  				msglen |= int(b&0x7F) << shift
  1425  				if b < 0x80 {
  1426  					break
  1427  				}
  1428  			}
  1429  			if msglen < 0 {
  1430  				return ErrInvalidLengthQuery
  1431  			}
  1432  			postIndex := iNdEx + msglen
  1433  			if postIndex < 0 {
  1434  				return ErrInvalidLengthQuery
  1435  			}
  1436  			if postIndex > l {
  1437  				return io.ErrUnexpectedEOF
  1438  			}
  1439  			m.StoreMatchers = append(m.StoreMatchers, StoreMatchers{})
  1440  			if err := m.StoreMatchers[len(m.StoreMatchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1441  				return err
  1442  			}
  1443  			iNdEx = postIndex
  1444  		case 7:
  1445  			if wireType != 0 {
  1446  				return fmt.Errorf("proto: wrong wireType = %d for field EnableDedup", wireType)
  1447  			}
  1448  			var v int
  1449  			for shift := uint(0); ; shift += 7 {
  1450  				if shift >= 64 {
  1451  					return ErrIntOverflowQuery
  1452  				}
  1453  				if iNdEx >= l {
  1454  					return io.ErrUnexpectedEOF
  1455  				}
  1456  				b := dAtA[iNdEx]
  1457  				iNdEx++
  1458  				v |= int(b&0x7F) << shift
  1459  				if b < 0x80 {
  1460  					break
  1461  				}
  1462  			}
  1463  			m.EnableDedup = bool(v != 0)
  1464  		case 8:
  1465  			if wireType != 0 {
  1466  				return fmt.Errorf("proto: wrong wireType = %d for field EnablePartialResponse", wireType)
  1467  			}
  1468  			var v int
  1469  			for shift := uint(0); ; shift += 7 {
  1470  				if shift >= 64 {
  1471  					return ErrIntOverflowQuery
  1472  				}
  1473  				if iNdEx >= l {
  1474  					return io.ErrUnexpectedEOF
  1475  				}
  1476  				b := dAtA[iNdEx]
  1477  				iNdEx++
  1478  				v |= int(b&0x7F) << shift
  1479  				if b < 0x80 {
  1480  					break
  1481  				}
  1482  			}
  1483  			m.EnablePartialResponse = bool(v != 0)
  1484  		case 9:
  1485  			if wireType != 0 {
  1486  				return fmt.Errorf("proto: wrong wireType = %d for field EnableQueryPushdown", wireType)
  1487  			}
  1488  			var v int
  1489  			for shift := uint(0); ; shift += 7 {
  1490  				if shift >= 64 {
  1491  					return ErrIntOverflowQuery
  1492  				}
  1493  				if iNdEx >= l {
  1494  					return io.ErrUnexpectedEOF
  1495  				}
  1496  				b := dAtA[iNdEx]
  1497  				iNdEx++
  1498  				v |= int(b&0x7F) << shift
  1499  				if b < 0x80 {
  1500  					break
  1501  				}
  1502  			}
  1503  			m.EnableQueryPushdown = bool(v != 0)
  1504  		case 10:
  1505  			if wireType != 0 {
  1506  				return fmt.Errorf("proto: wrong wireType = %d for field SkipChunks", wireType)
  1507  			}
  1508  			var v int
  1509  			for shift := uint(0); ; shift += 7 {
  1510  				if shift >= 64 {
  1511  					return ErrIntOverflowQuery
  1512  				}
  1513  				if iNdEx >= l {
  1514  					return io.ErrUnexpectedEOF
  1515  				}
  1516  				b := dAtA[iNdEx]
  1517  				iNdEx++
  1518  				v |= int(b&0x7F) << shift
  1519  				if b < 0x80 {
  1520  					break
  1521  				}
  1522  			}
  1523  			m.SkipChunks = bool(v != 0)
  1524  		case 11:
  1525  			if wireType != 2 {
  1526  				return fmt.Errorf("proto: wrong wireType = %d for field ShardInfo", wireType)
  1527  			}
  1528  			var msglen int
  1529  			for shift := uint(0); ; shift += 7 {
  1530  				if shift >= 64 {
  1531  					return ErrIntOverflowQuery
  1532  				}
  1533  				if iNdEx >= l {
  1534  					return io.ErrUnexpectedEOF
  1535  				}
  1536  				b := dAtA[iNdEx]
  1537  				iNdEx++
  1538  				msglen |= int(b&0x7F) << shift
  1539  				if b < 0x80 {
  1540  					break
  1541  				}
  1542  			}
  1543  			if msglen < 0 {
  1544  				return ErrInvalidLengthQuery
  1545  			}
  1546  			postIndex := iNdEx + msglen
  1547  			if postIndex < 0 {
  1548  				return ErrInvalidLengthQuery
  1549  			}
  1550  			if postIndex > l {
  1551  				return io.ErrUnexpectedEOF
  1552  			}
  1553  			if m.ShardInfo == nil {
  1554  				m.ShardInfo = &storepb.ShardInfo{}
  1555  			}
  1556  			if err := m.ShardInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1557  				return err
  1558  			}
  1559  			iNdEx = postIndex
  1560  		case 12:
  1561  			if wireType != 0 {
  1562  				return fmt.Errorf("proto: wrong wireType = %d for field LookbackDeltaSeconds", wireType)
  1563  			}
  1564  			m.LookbackDeltaSeconds = 0
  1565  			for shift := uint(0); ; shift += 7 {
  1566  				if shift >= 64 {
  1567  					return ErrIntOverflowQuery
  1568  				}
  1569  				if iNdEx >= l {
  1570  					return io.ErrUnexpectedEOF
  1571  				}
  1572  				b := dAtA[iNdEx]
  1573  				iNdEx++
  1574  				m.LookbackDeltaSeconds |= int64(b&0x7F) << shift
  1575  				if b < 0x80 {
  1576  					break
  1577  				}
  1578  			}
  1579  		case 13:
  1580  			if wireType != 0 {
  1581  				return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType)
  1582  			}
  1583  			m.Engine = 0
  1584  			for shift := uint(0); ; shift += 7 {
  1585  				if shift >= 64 {
  1586  					return ErrIntOverflowQuery
  1587  				}
  1588  				if iNdEx >= l {
  1589  					return io.ErrUnexpectedEOF
  1590  				}
  1591  				b := dAtA[iNdEx]
  1592  				iNdEx++
  1593  				m.Engine |= EngineType(b&0x7F) << shift
  1594  				if b < 0x80 {
  1595  					break
  1596  				}
  1597  			}
  1598  		default:
  1599  			iNdEx = preIndex
  1600  			skippy, err := skipQuery(dAtA[iNdEx:])
  1601  			if err != nil {
  1602  				return err
  1603  			}
  1604  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1605  				return ErrInvalidLengthQuery
  1606  			}
  1607  			if (iNdEx + skippy) > l {
  1608  				return io.ErrUnexpectedEOF
  1609  			}
  1610  			iNdEx += skippy
  1611  		}
  1612  	}
  1613  
  1614  	if iNdEx > l {
  1615  		return io.ErrUnexpectedEOF
  1616  	}
  1617  	return nil
  1618  }
  1619  func (m *StoreMatchers) Unmarshal(dAtA []byte) error {
  1620  	l := len(dAtA)
  1621  	iNdEx := 0
  1622  	for iNdEx < l {
  1623  		preIndex := iNdEx
  1624  		var wire uint64
  1625  		for shift := uint(0); ; shift += 7 {
  1626  			if shift >= 64 {
  1627  				return ErrIntOverflowQuery
  1628  			}
  1629  			if iNdEx >= l {
  1630  				return io.ErrUnexpectedEOF
  1631  			}
  1632  			b := dAtA[iNdEx]
  1633  			iNdEx++
  1634  			wire |= uint64(b&0x7F) << shift
  1635  			if b < 0x80 {
  1636  				break
  1637  			}
  1638  		}
  1639  		fieldNum := int32(wire >> 3)
  1640  		wireType := int(wire & 0x7)
  1641  		if wireType == 4 {
  1642  			return fmt.Errorf("proto: StoreMatchers: wiretype end group for non-group")
  1643  		}
  1644  		if fieldNum <= 0 {
  1645  			return fmt.Errorf("proto: StoreMatchers: illegal tag %d (wire type %d)", fieldNum, wire)
  1646  		}
  1647  		switch fieldNum {
  1648  		case 1:
  1649  			if wireType != 2 {
  1650  				return fmt.Errorf("proto: wrong wireType = %d for field LabelMatchers", wireType)
  1651  			}
  1652  			var msglen int
  1653  			for shift := uint(0); ; shift += 7 {
  1654  				if shift >= 64 {
  1655  					return ErrIntOverflowQuery
  1656  				}
  1657  				if iNdEx >= l {
  1658  					return io.ErrUnexpectedEOF
  1659  				}
  1660  				b := dAtA[iNdEx]
  1661  				iNdEx++
  1662  				msglen |= int(b&0x7F) << shift
  1663  				if b < 0x80 {
  1664  					break
  1665  				}
  1666  			}
  1667  			if msglen < 0 {
  1668  				return ErrInvalidLengthQuery
  1669  			}
  1670  			postIndex := iNdEx + msglen
  1671  			if postIndex < 0 {
  1672  				return ErrInvalidLengthQuery
  1673  			}
  1674  			if postIndex > l {
  1675  				return io.ErrUnexpectedEOF
  1676  			}
  1677  			m.LabelMatchers = append(m.LabelMatchers, storepb.LabelMatcher{})
  1678  			if err := m.LabelMatchers[len(m.LabelMatchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1679  				return err
  1680  			}
  1681  			iNdEx = postIndex
  1682  		default:
  1683  			iNdEx = preIndex
  1684  			skippy, err := skipQuery(dAtA[iNdEx:])
  1685  			if err != nil {
  1686  				return err
  1687  			}
  1688  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1689  				return ErrInvalidLengthQuery
  1690  			}
  1691  			if (iNdEx + skippy) > l {
  1692  				return io.ErrUnexpectedEOF
  1693  			}
  1694  			iNdEx += skippy
  1695  		}
  1696  	}
  1697  
  1698  	if iNdEx > l {
  1699  		return io.ErrUnexpectedEOF
  1700  	}
  1701  	return nil
  1702  }
  1703  func (m *QueryResponse) Unmarshal(dAtA []byte) error {
  1704  	l := len(dAtA)
  1705  	iNdEx := 0
  1706  	for iNdEx < l {
  1707  		preIndex := iNdEx
  1708  		var wire uint64
  1709  		for shift := uint(0); ; shift += 7 {
  1710  			if shift >= 64 {
  1711  				return ErrIntOverflowQuery
  1712  			}
  1713  			if iNdEx >= l {
  1714  				return io.ErrUnexpectedEOF
  1715  			}
  1716  			b := dAtA[iNdEx]
  1717  			iNdEx++
  1718  			wire |= uint64(b&0x7F) << shift
  1719  			if b < 0x80 {
  1720  				break
  1721  			}
  1722  		}
  1723  		fieldNum := int32(wire >> 3)
  1724  		wireType := int(wire & 0x7)
  1725  		if wireType == 4 {
  1726  			return fmt.Errorf("proto: QueryResponse: wiretype end group for non-group")
  1727  		}
  1728  		if fieldNum <= 0 {
  1729  			return fmt.Errorf("proto: QueryResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1730  		}
  1731  		switch fieldNum {
  1732  		case 1:
  1733  			if wireType != 2 {
  1734  				return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType)
  1735  			}
  1736  			var stringLen uint64
  1737  			for shift := uint(0); ; shift += 7 {
  1738  				if shift >= 64 {
  1739  					return ErrIntOverflowQuery
  1740  				}
  1741  				if iNdEx >= l {
  1742  					return io.ErrUnexpectedEOF
  1743  				}
  1744  				b := dAtA[iNdEx]
  1745  				iNdEx++
  1746  				stringLen |= uint64(b&0x7F) << shift
  1747  				if b < 0x80 {
  1748  					break
  1749  				}
  1750  			}
  1751  			intStringLen := int(stringLen)
  1752  			if intStringLen < 0 {
  1753  				return ErrInvalidLengthQuery
  1754  			}
  1755  			postIndex := iNdEx + intStringLen
  1756  			if postIndex < 0 {
  1757  				return ErrInvalidLengthQuery
  1758  			}
  1759  			if postIndex > l {
  1760  				return io.ErrUnexpectedEOF
  1761  			}
  1762  			m.Result = &QueryResponse_Warnings{string(dAtA[iNdEx:postIndex])}
  1763  			iNdEx = postIndex
  1764  		case 2:
  1765  			if wireType != 2 {
  1766  				return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
  1767  			}
  1768  			var msglen int
  1769  			for shift := uint(0); ; shift += 7 {
  1770  				if shift >= 64 {
  1771  					return ErrIntOverflowQuery
  1772  				}
  1773  				if iNdEx >= l {
  1774  					return io.ErrUnexpectedEOF
  1775  				}
  1776  				b := dAtA[iNdEx]
  1777  				iNdEx++
  1778  				msglen |= int(b&0x7F) << shift
  1779  				if b < 0x80 {
  1780  					break
  1781  				}
  1782  			}
  1783  			if msglen < 0 {
  1784  				return ErrInvalidLengthQuery
  1785  			}
  1786  			postIndex := iNdEx + msglen
  1787  			if postIndex < 0 {
  1788  				return ErrInvalidLengthQuery
  1789  			}
  1790  			if postIndex > l {
  1791  				return io.ErrUnexpectedEOF
  1792  			}
  1793  			v := &prompb.TimeSeries{}
  1794  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1795  				return err
  1796  			}
  1797  			m.Result = &QueryResponse_Timeseries{v}
  1798  			iNdEx = postIndex
  1799  		default:
  1800  			iNdEx = preIndex
  1801  			skippy, err := skipQuery(dAtA[iNdEx:])
  1802  			if err != nil {
  1803  				return err
  1804  			}
  1805  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1806  				return ErrInvalidLengthQuery
  1807  			}
  1808  			if (iNdEx + skippy) > l {
  1809  				return io.ErrUnexpectedEOF
  1810  			}
  1811  			iNdEx += skippy
  1812  		}
  1813  	}
  1814  
  1815  	if iNdEx > l {
  1816  		return io.ErrUnexpectedEOF
  1817  	}
  1818  	return nil
  1819  }
  1820  func (m *QueryRangeRequest) Unmarshal(dAtA []byte) error {
  1821  	l := len(dAtA)
  1822  	iNdEx := 0
  1823  	for iNdEx < l {
  1824  		preIndex := iNdEx
  1825  		var wire uint64
  1826  		for shift := uint(0); ; shift += 7 {
  1827  			if shift >= 64 {
  1828  				return ErrIntOverflowQuery
  1829  			}
  1830  			if iNdEx >= l {
  1831  				return io.ErrUnexpectedEOF
  1832  			}
  1833  			b := dAtA[iNdEx]
  1834  			iNdEx++
  1835  			wire |= uint64(b&0x7F) << shift
  1836  			if b < 0x80 {
  1837  				break
  1838  			}
  1839  		}
  1840  		fieldNum := int32(wire >> 3)
  1841  		wireType := int(wire & 0x7)
  1842  		if wireType == 4 {
  1843  			return fmt.Errorf("proto: QueryRangeRequest: wiretype end group for non-group")
  1844  		}
  1845  		if fieldNum <= 0 {
  1846  			return fmt.Errorf("proto: QueryRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1847  		}
  1848  		switch fieldNum {
  1849  		case 1:
  1850  			if wireType != 2 {
  1851  				return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
  1852  			}
  1853  			var stringLen uint64
  1854  			for shift := uint(0); ; shift += 7 {
  1855  				if shift >= 64 {
  1856  					return ErrIntOverflowQuery
  1857  				}
  1858  				if iNdEx >= l {
  1859  					return io.ErrUnexpectedEOF
  1860  				}
  1861  				b := dAtA[iNdEx]
  1862  				iNdEx++
  1863  				stringLen |= uint64(b&0x7F) << shift
  1864  				if b < 0x80 {
  1865  					break
  1866  				}
  1867  			}
  1868  			intStringLen := int(stringLen)
  1869  			if intStringLen < 0 {
  1870  				return ErrInvalidLengthQuery
  1871  			}
  1872  			postIndex := iNdEx + intStringLen
  1873  			if postIndex < 0 {
  1874  				return ErrInvalidLengthQuery
  1875  			}
  1876  			if postIndex > l {
  1877  				return io.ErrUnexpectedEOF
  1878  			}
  1879  			m.Query = string(dAtA[iNdEx:postIndex])
  1880  			iNdEx = postIndex
  1881  		case 2:
  1882  			if wireType != 0 {
  1883  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimeSeconds", wireType)
  1884  			}
  1885  			m.StartTimeSeconds = 0
  1886  			for shift := uint(0); ; shift += 7 {
  1887  				if shift >= 64 {
  1888  					return ErrIntOverflowQuery
  1889  				}
  1890  				if iNdEx >= l {
  1891  					return io.ErrUnexpectedEOF
  1892  				}
  1893  				b := dAtA[iNdEx]
  1894  				iNdEx++
  1895  				m.StartTimeSeconds |= int64(b&0x7F) << shift
  1896  				if b < 0x80 {
  1897  					break
  1898  				}
  1899  			}
  1900  		case 3:
  1901  			if wireType != 0 {
  1902  				return fmt.Errorf("proto: wrong wireType = %d for field EndTimeSeconds", wireType)
  1903  			}
  1904  			m.EndTimeSeconds = 0
  1905  			for shift := uint(0); ; shift += 7 {
  1906  				if shift >= 64 {
  1907  					return ErrIntOverflowQuery
  1908  				}
  1909  				if iNdEx >= l {
  1910  					return io.ErrUnexpectedEOF
  1911  				}
  1912  				b := dAtA[iNdEx]
  1913  				iNdEx++
  1914  				m.EndTimeSeconds |= int64(b&0x7F) << shift
  1915  				if b < 0x80 {
  1916  					break
  1917  				}
  1918  			}
  1919  		case 4:
  1920  			if wireType != 0 {
  1921  				return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType)
  1922  			}
  1923  			m.IntervalSeconds = 0
  1924  			for shift := uint(0); ; shift += 7 {
  1925  				if shift >= 64 {
  1926  					return ErrIntOverflowQuery
  1927  				}
  1928  				if iNdEx >= l {
  1929  					return io.ErrUnexpectedEOF
  1930  				}
  1931  				b := dAtA[iNdEx]
  1932  				iNdEx++
  1933  				m.IntervalSeconds |= int64(b&0x7F) << shift
  1934  				if b < 0x80 {
  1935  					break
  1936  				}
  1937  			}
  1938  		case 5:
  1939  			if wireType != 0 {
  1940  				return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
  1941  			}
  1942  			m.TimeoutSeconds = 0
  1943  			for shift := uint(0); ; shift += 7 {
  1944  				if shift >= 64 {
  1945  					return ErrIntOverflowQuery
  1946  				}
  1947  				if iNdEx >= l {
  1948  					return io.ErrUnexpectedEOF
  1949  				}
  1950  				b := dAtA[iNdEx]
  1951  				iNdEx++
  1952  				m.TimeoutSeconds |= int64(b&0x7F) << shift
  1953  				if b < 0x80 {
  1954  					break
  1955  				}
  1956  			}
  1957  		case 6:
  1958  			if wireType != 0 {
  1959  				return fmt.Errorf("proto: wrong wireType = %d for field MaxResolutionSeconds", wireType)
  1960  			}
  1961  			m.MaxResolutionSeconds = 0
  1962  			for shift := uint(0); ; shift += 7 {
  1963  				if shift >= 64 {
  1964  					return ErrIntOverflowQuery
  1965  				}
  1966  				if iNdEx >= l {
  1967  					return io.ErrUnexpectedEOF
  1968  				}
  1969  				b := dAtA[iNdEx]
  1970  				iNdEx++
  1971  				m.MaxResolutionSeconds |= int64(b&0x7F) << shift
  1972  				if b < 0x80 {
  1973  					break
  1974  				}
  1975  			}
  1976  		case 7:
  1977  			if wireType != 2 {
  1978  				return fmt.Errorf("proto: wrong wireType = %d for field ReplicaLabels", wireType)
  1979  			}
  1980  			var stringLen uint64
  1981  			for shift := uint(0); ; shift += 7 {
  1982  				if shift >= 64 {
  1983  					return ErrIntOverflowQuery
  1984  				}
  1985  				if iNdEx >= l {
  1986  					return io.ErrUnexpectedEOF
  1987  				}
  1988  				b := dAtA[iNdEx]
  1989  				iNdEx++
  1990  				stringLen |= uint64(b&0x7F) << shift
  1991  				if b < 0x80 {
  1992  					break
  1993  				}
  1994  			}
  1995  			intStringLen := int(stringLen)
  1996  			if intStringLen < 0 {
  1997  				return ErrInvalidLengthQuery
  1998  			}
  1999  			postIndex := iNdEx + intStringLen
  2000  			if postIndex < 0 {
  2001  				return ErrInvalidLengthQuery
  2002  			}
  2003  			if postIndex > l {
  2004  				return io.ErrUnexpectedEOF
  2005  			}
  2006  			m.ReplicaLabels = append(m.ReplicaLabels, string(dAtA[iNdEx:postIndex]))
  2007  			iNdEx = postIndex
  2008  		case 8:
  2009  			if wireType != 2 {
  2010  				return fmt.Errorf("proto: wrong wireType = %d for field StoreMatchers", wireType)
  2011  			}
  2012  			var msglen int
  2013  			for shift := uint(0); ; shift += 7 {
  2014  				if shift >= 64 {
  2015  					return ErrIntOverflowQuery
  2016  				}
  2017  				if iNdEx >= l {
  2018  					return io.ErrUnexpectedEOF
  2019  				}
  2020  				b := dAtA[iNdEx]
  2021  				iNdEx++
  2022  				msglen |= int(b&0x7F) << shift
  2023  				if b < 0x80 {
  2024  					break
  2025  				}
  2026  			}
  2027  			if msglen < 0 {
  2028  				return ErrInvalidLengthQuery
  2029  			}
  2030  			postIndex := iNdEx + msglen
  2031  			if postIndex < 0 {
  2032  				return ErrInvalidLengthQuery
  2033  			}
  2034  			if postIndex > l {
  2035  				return io.ErrUnexpectedEOF
  2036  			}
  2037  			m.StoreMatchers = append(m.StoreMatchers, StoreMatchers{})
  2038  			if err := m.StoreMatchers[len(m.StoreMatchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2039  				return err
  2040  			}
  2041  			iNdEx = postIndex
  2042  		case 9:
  2043  			if wireType != 0 {
  2044  				return fmt.Errorf("proto: wrong wireType = %d for field EnableDedup", wireType)
  2045  			}
  2046  			var v int
  2047  			for shift := uint(0); ; shift += 7 {
  2048  				if shift >= 64 {
  2049  					return ErrIntOverflowQuery
  2050  				}
  2051  				if iNdEx >= l {
  2052  					return io.ErrUnexpectedEOF
  2053  				}
  2054  				b := dAtA[iNdEx]
  2055  				iNdEx++
  2056  				v |= int(b&0x7F) << shift
  2057  				if b < 0x80 {
  2058  					break
  2059  				}
  2060  			}
  2061  			m.EnableDedup = bool(v != 0)
  2062  		case 10:
  2063  			if wireType != 0 {
  2064  				return fmt.Errorf("proto: wrong wireType = %d for field EnablePartialResponse", wireType)
  2065  			}
  2066  			var v int
  2067  			for shift := uint(0); ; shift += 7 {
  2068  				if shift >= 64 {
  2069  					return ErrIntOverflowQuery
  2070  				}
  2071  				if iNdEx >= l {
  2072  					return io.ErrUnexpectedEOF
  2073  				}
  2074  				b := dAtA[iNdEx]
  2075  				iNdEx++
  2076  				v |= int(b&0x7F) << shift
  2077  				if b < 0x80 {
  2078  					break
  2079  				}
  2080  			}
  2081  			m.EnablePartialResponse = bool(v != 0)
  2082  		case 11:
  2083  			if wireType != 0 {
  2084  				return fmt.Errorf("proto: wrong wireType = %d for field EnableQueryPushdown", wireType)
  2085  			}
  2086  			var v int
  2087  			for shift := uint(0); ; shift += 7 {
  2088  				if shift >= 64 {
  2089  					return ErrIntOverflowQuery
  2090  				}
  2091  				if iNdEx >= l {
  2092  					return io.ErrUnexpectedEOF
  2093  				}
  2094  				b := dAtA[iNdEx]
  2095  				iNdEx++
  2096  				v |= int(b&0x7F) << shift
  2097  				if b < 0x80 {
  2098  					break
  2099  				}
  2100  			}
  2101  			m.EnableQueryPushdown = bool(v != 0)
  2102  		case 12:
  2103  			if wireType != 0 {
  2104  				return fmt.Errorf("proto: wrong wireType = %d for field SkipChunks", wireType)
  2105  			}
  2106  			var v int
  2107  			for shift := uint(0); ; shift += 7 {
  2108  				if shift >= 64 {
  2109  					return ErrIntOverflowQuery
  2110  				}
  2111  				if iNdEx >= l {
  2112  					return io.ErrUnexpectedEOF
  2113  				}
  2114  				b := dAtA[iNdEx]
  2115  				iNdEx++
  2116  				v |= int(b&0x7F) << shift
  2117  				if b < 0x80 {
  2118  					break
  2119  				}
  2120  			}
  2121  			m.SkipChunks = bool(v != 0)
  2122  		case 13:
  2123  			if wireType != 2 {
  2124  				return fmt.Errorf("proto: wrong wireType = %d for field ShardInfo", wireType)
  2125  			}
  2126  			var msglen int
  2127  			for shift := uint(0); ; shift += 7 {
  2128  				if shift >= 64 {
  2129  					return ErrIntOverflowQuery
  2130  				}
  2131  				if iNdEx >= l {
  2132  					return io.ErrUnexpectedEOF
  2133  				}
  2134  				b := dAtA[iNdEx]
  2135  				iNdEx++
  2136  				msglen |= int(b&0x7F) << shift
  2137  				if b < 0x80 {
  2138  					break
  2139  				}
  2140  			}
  2141  			if msglen < 0 {
  2142  				return ErrInvalidLengthQuery
  2143  			}
  2144  			postIndex := iNdEx + msglen
  2145  			if postIndex < 0 {
  2146  				return ErrInvalidLengthQuery
  2147  			}
  2148  			if postIndex > l {
  2149  				return io.ErrUnexpectedEOF
  2150  			}
  2151  			if m.ShardInfo == nil {
  2152  				m.ShardInfo = &storepb.ShardInfo{}
  2153  			}
  2154  			if err := m.ShardInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2155  				return err
  2156  			}
  2157  			iNdEx = postIndex
  2158  		case 14:
  2159  			if wireType != 0 {
  2160  				return fmt.Errorf("proto: wrong wireType = %d for field LookbackDeltaSeconds", wireType)
  2161  			}
  2162  			m.LookbackDeltaSeconds = 0
  2163  			for shift := uint(0); ; shift += 7 {
  2164  				if shift >= 64 {
  2165  					return ErrIntOverflowQuery
  2166  				}
  2167  				if iNdEx >= l {
  2168  					return io.ErrUnexpectedEOF
  2169  				}
  2170  				b := dAtA[iNdEx]
  2171  				iNdEx++
  2172  				m.LookbackDeltaSeconds |= int64(b&0x7F) << shift
  2173  				if b < 0x80 {
  2174  					break
  2175  				}
  2176  			}
  2177  		case 15:
  2178  			if wireType != 0 {
  2179  				return fmt.Errorf("proto: wrong wireType = %d for field Engine", wireType)
  2180  			}
  2181  			m.Engine = 0
  2182  			for shift := uint(0); ; shift += 7 {
  2183  				if shift >= 64 {
  2184  					return ErrIntOverflowQuery
  2185  				}
  2186  				if iNdEx >= l {
  2187  					return io.ErrUnexpectedEOF
  2188  				}
  2189  				b := dAtA[iNdEx]
  2190  				iNdEx++
  2191  				m.Engine |= EngineType(b&0x7F) << shift
  2192  				if b < 0x80 {
  2193  					break
  2194  				}
  2195  			}
  2196  		default:
  2197  			iNdEx = preIndex
  2198  			skippy, err := skipQuery(dAtA[iNdEx:])
  2199  			if err != nil {
  2200  				return err
  2201  			}
  2202  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2203  				return ErrInvalidLengthQuery
  2204  			}
  2205  			if (iNdEx + skippy) > l {
  2206  				return io.ErrUnexpectedEOF
  2207  			}
  2208  			iNdEx += skippy
  2209  		}
  2210  	}
  2211  
  2212  	if iNdEx > l {
  2213  		return io.ErrUnexpectedEOF
  2214  	}
  2215  	return nil
  2216  }
  2217  func (m *QueryRangeResponse) Unmarshal(dAtA []byte) error {
  2218  	l := len(dAtA)
  2219  	iNdEx := 0
  2220  	for iNdEx < l {
  2221  		preIndex := iNdEx
  2222  		var wire uint64
  2223  		for shift := uint(0); ; shift += 7 {
  2224  			if shift >= 64 {
  2225  				return ErrIntOverflowQuery
  2226  			}
  2227  			if iNdEx >= l {
  2228  				return io.ErrUnexpectedEOF
  2229  			}
  2230  			b := dAtA[iNdEx]
  2231  			iNdEx++
  2232  			wire |= uint64(b&0x7F) << shift
  2233  			if b < 0x80 {
  2234  				break
  2235  			}
  2236  		}
  2237  		fieldNum := int32(wire >> 3)
  2238  		wireType := int(wire & 0x7)
  2239  		if wireType == 4 {
  2240  			return fmt.Errorf("proto: QueryRangeResponse: wiretype end group for non-group")
  2241  		}
  2242  		if fieldNum <= 0 {
  2243  			return fmt.Errorf("proto: QueryRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2244  		}
  2245  		switch fieldNum {
  2246  		case 1:
  2247  			if wireType != 2 {
  2248  				return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType)
  2249  			}
  2250  			var stringLen uint64
  2251  			for shift := uint(0); ; shift += 7 {
  2252  				if shift >= 64 {
  2253  					return ErrIntOverflowQuery
  2254  				}
  2255  				if iNdEx >= l {
  2256  					return io.ErrUnexpectedEOF
  2257  				}
  2258  				b := dAtA[iNdEx]
  2259  				iNdEx++
  2260  				stringLen |= uint64(b&0x7F) << shift
  2261  				if b < 0x80 {
  2262  					break
  2263  				}
  2264  			}
  2265  			intStringLen := int(stringLen)
  2266  			if intStringLen < 0 {
  2267  				return ErrInvalidLengthQuery
  2268  			}
  2269  			postIndex := iNdEx + intStringLen
  2270  			if postIndex < 0 {
  2271  				return ErrInvalidLengthQuery
  2272  			}
  2273  			if postIndex > l {
  2274  				return io.ErrUnexpectedEOF
  2275  			}
  2276  			m.Result = &QueryRangeResponse_Warnings{string(dAtA[iNdEx:postIndex])}
  2277  			iNdEx = postIndex
  2278  		case 2:
  2279  			if wireType != 2 {
  2280  				return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
  2281  			}
  2282  			var msglen int
  2283  			for shift := uint(0); ; shift += 7 {
  2284  				if shift >= 64 {
  2285  					return ErrIntOverflowQuery
  2286  				}
  2287  				if iNdEx >= l {
  2288  					return io.ErrUnexpectedEOF
  2289  				}
  2290  				b := dAtA[iNdEx]
  2291  				iNdEx++
  2292  				msglen |= int(b&0x7F) << shift
  2293  				if b < 0x80 {
  2294  					break
  2295  				}
  2296  			}
  2297  			if msglen < 0 {
  2298  				return ErrInvalidLengthQuery
  2299  			}
  2300  			postIndex := iNdEx + msglen
  2301  			if postIndex < 0 {
  2302  				return ErrInvalidLengthQuery
  2303  			}
  2304  			if postIndex > l {
  2305  				return io.ErrUnexpectedEOF
  2306  			}
  2307  			v := &prompb.TimeSeries{}
  2308  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2309  				return err
  2310  			}
  2311  			m.Result = &QueryRangeResponse_Timeseries{v}
  2312  			iNdEx = postIndex
  2313  		default:
  2314  			iNdEx = preIndex
  2315  			skippy, err := skipQuery(dAtA[iNdEx:])
  2316  			if err != nil {
  2317  				return err
  2318  			}
  2319  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2320  				return ErrInvalidLengthQuery
  2321  			}
  2322  			if (iNdEx + skippy) > l {
  2323  				return io.ErrUnexpectedEOF
  2324  			}
  2325  			iNdEx += skippy
  2326  		}
  2327  	}
  2328  
  2329  	if iNdEx > l {
  2330  		return io.ErrUnexpectedEOF
  2331  	}
  2332  	return nil
  2333  }
  2334  func skipQuery(dAtA []byte) (n int, err error) {
  2335  	l := len(dAtA)
  2336  	iNdEx := 0
  2337  	depth := 0
  2338  	for iNdEx < l {
  2339  		var wire uint64
  2340  		for shift := uint(0); ; shift += 7 {
  2341  			if shift >= 64 {
  2342  				return 0, ErrIntOverflowQuery
  2343  			}
  2344  			if iNdEx >= l {
  2345  				return 0, io.ErrUnexpectedEOF
  2346  			}
  2347  			b := dAtA[iNdEx]
  2348  			iNdEx++
  2349  			wire |= (uint64(b) & 0x7F) << shift
  2350  			if b < 0x80 {
  2351  				break
  2352  			}
  2353  		}
  2354  		wireType := int(wire & 0x7)
  2355  		switch wireType {
  2356  		case 0:
  2357  			for shift := uint(0); ; shift += 7 {
  2358  				if shift >= 64 {
  2359  					return 0, ErrIntOverflowQuery
  2360  				}
  2361  				if iNdEx >= l {
  2362  					return 0, io.ErrUnexpectedEOF
  2363  				}
  2364  				iNdEx++
  2365  				if dAtA[iNdEx-1] < 0x80 {
  2366  					break
  2367  				}
  2368  			}
  2369  		case 1:
  2370  			iNdEx += 8
  2371  		case 2:
  2372  			var length int
  2373  			for shift := uint(0); ; shift += 7 {
  2374  				if shift >= 64 {
  2375  					return 0, ErrIntOverflowQuery
  2376  				}
  2377  				if iNdEx >= l {
  2378  					return 0, io.ErrUnexpectedEOF
  2379  				}
  2380  				b := dAtA[iNdEx]
  2381  				iNdEx++
  2382  				length |= (int(b) & 0x7F) << shift
  2383  				if b < 0x80 {
  2384  					break
  2385  				}
  2386  			}
  2387  			if length < 0 {
  2388  				return 0, ErrInvalidLengthQuery
  2389  			}
  2390  			iNdEx += length
  2391  		case 3:
  2392  			depth++
  2393  		case 4:
  2394  			if depth == 0 {
  2395  				return 0, ErrUnexpectedEndOfGroupQuery
  2396  			}
  2397  			depth--
  2398  		case 5:
  2399  			iNdEx += 4
  2400  		default:
  2401  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2402  		}
  2403  		if iNdEx < 0 {
  2404  			return 0, ErrInvalidLengthQuery
  2405  		}
  2406  		if depth == 0 {
  2407  			return iNdEx, nil
  2408  		}
  2409  	}
  2410  	return 0, io.ErrUnexpectedEOF
  2411  }
  2412  
  2413  var (
  2414  	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
  2415  	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
  2416  	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
  2417  )