github.com/thanos-io/thanos@v0.32.5/pkg/store/storepb/prompb/remote.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: store/storepb/prompb/remote.proto
     3  
     4  package prompb
     5  
     6  import (
     7  	fmt "fmt"
     8  	io "io"
     9  	math "math"
    10  	math_bits "math/bits"
    11  
    12  	_ "github.com/gogo/protobuf/gogoproto"
    13  	proto "github.com/gogo/protobuf/proto"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type ReadRequest_ResponseType int32
    28  
    29  const (
    30  	// Server will return a single ReadResponse message with matched series that includes list of raw samples.
    31  	// It's recommended to use streamed response types instead.
    32  	//
    33  	// Response headers:
    34  	// Content-Type: "application/x-protobuf"
    35  	// Content-Encoding: "snappy"
    36  	ReadRequest_SAMPLES ReadRequest_ResponseType = 0
    37  	// Server will stream a delimited ChunkedReadResponse message that contains XOR encoded chunks for a single series.
    38  	// Each message is following varint size and fixed size bigendian uint32 for CRC32 Castagnoli checksum.
    39  	//
    40  	// Response headers:
    41  	// Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
    42  	// Content-Encoding: ""
    43  	ReadRequest_STREAMED_XOR_CHUNKS ReadRequest_ResponseType = 1
    44  )
    45  
    46  var ReadRequest_ResponseType_name = map[int32]string{
    47  	0: "SAMPLES",
    48  	1: "STREAMED_XOR_CHUNKS",
    49  }
    50  
    51  var ReadRequest_ResponseType_value = map[string]int32{
    52  	"SAMPLES":             0,
    53  	"STREAMED_XOR_CHUNKS": 1,
    54  }
    55  
    56  func (x ReadRequest_ResponseType) String() string {
    57  	return proto.EnumName(ReadRequest_ResponseType_name, int32(x))
    58  }
    59  
    60  func (ReadRequest_ResponseType) EnumDescriptor() ([]byte, []int) {
    61  	return fileDescriptor_b3df75c58e6767bb, []int{1, 0}
    62  }
    63  
    64  type WriteRequest struct {
    65  	Timeseries []TimeSeries     `protobuf:"bytes,1,rep,name=timeseries,proto3" json:"timeseries"`
    66  	Metadata   []MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata"`
    67  }
    68  
    69  func (m *WriteRequest) Reset()         { *m = WriteRequest{} }
    70  func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
    71  func (*WriteRequest) ProtoMessage()    {}
    72  func (*WriteRequest) Descriptor() ([]byte, []int) {
    73  	return fileDescriptor_b3df75c58e6767bb, []int{0}
    74  }
    75  func (m *WriteRequest) XXX_Unmarshal(b []byte) error {
    76  	return m.Unmarshal(b)
    77  }
    78  func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    79  	if deterministic {
    80  		return xxx_messageInfo_WriteRequest.Marshal(b, m, deterministic)
    81  	} else {
    82  		b = b[:cap(b)]
    83  		n, err := m.MarshalToSizedBuffer(b)
    84  		if err != nil {
    85  			return nil, err
    86  		}
    87  		return b[:n], nil
    88  	}
    89  }
    90  func (m *WriteRequest) XXX_Merge(src proto.Message) {
    91  	xxx_messageInfo_WriteRequest.Merge(m, src)
    92  }
    93  func (m *WriteRequest) XXX_Size() int {
    94  	return m.Size()
    95  }
    96  func (m *WriteRequest) XXX_DiscardUnknown() {
    97  	xxx_messageInfo_WriteRequest.DiscardUnknown(m)
    98  }
    99  
   100  var xxx_messageInfo_WriteRequest proto.InternalMessageInfo
   101  
   102  func (m *WriteRequest) GetTimeseries() []TimeSeries {
   103  	if m != nil {
   104  		return m.Timeseries
   105  	}
   106  	return nil
   107  }
   108  
   109  func (m *WriteRequest) GetMetadata() []MetricMetadata {
   110  	if m != nil {
   111  		return m.Metadata
   112  	}
   113  	return nil
   114  }
   115  
   116  // ReadRequest represents a remote read request.
   117  type ReadRequest struct {
   118  	Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
   119  	// accepted_response_types allows negotiating the content type of the response.
   120  	//
   121  	// Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
   122  	// implemented by server, error is returned.
   123  	// For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
   124  	AcceptedResponseTypes []ReadRequest_ResponseType `protobuf:"varint,2,rep,packed,name=accepted_response_types,json=acceptedResponseTypes,proto3,enum=prometheus_copy.ReadRequest_ResponseType" json:"accepted_response_types,omitempty"`
   125  }
   126  
   127  func (m *ReadRequest) Reset()         { *m = ReadRequest{} }
   128  func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
   129  func (*ReadRequest) ProtoMessage()    {}
   130  func (*ReadRequest) Descriptor() ([]byte, []int) {
   131  	return fileDescriptor_b3df75c58e6767bb, []int{1}
   132  }
   133  func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
   134  	return m.Unmarshal(b)
   135  }
   136  func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   137  	if deterministic {
   138  		return xxx_messageInfo_ReadRequest.Marshal(b, m, deterministic)
   139  	} else {
   140  		b = b[:cap(b)]
   141  		n, err := m.MarshalToSizedBuffer(b)
   142  		if err != nil {
   143  			return nil, err
   144  		}
   145  		return b[:n], nil
   146  	}
   147  }
   148  func (m *ReadRequest) XXX_Merge(src proto.Message) {
   149  	xxx_messageInfo_ReadRequest.Merge(m, src)
   150  }
   151  func (m *ReadRequest) XXX_Size() int {
   152  	return m.Size()
   153  }
   154  func (m *ReadRequest) XXX_DiscardUnknown() {
   155  	xxx_messageInfo_ReadRequest.DiscardUnknown(m)
   156  }
   157  
   158  var xxx_messageInfo_ReadRequest proto.InternalMessageInfo
   159  
   160  func (m *ReadRequest) GetQueries() []*Query {
   161  	if m != nil {
   162  		return m.Queries
   163  	}
   164  	return nil
   165  }
   166  
   167  func (m *ReadRequest) GetAcceptedResponseTypes() []ReadRequest_ResponseType {
   168  	if m != nil {
   169  		return m.AcceptedResponseTypes
   170  	}
   171  	return nil
   172  }
   173  
   174  // ReadResponse is a response when response_type equals SAMPLES.
   175  type ReadResponse struct {
   176  	// In same order as the request's queries.
   177  	Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
   178  }
   179  
   180  func (m *ReadResponse) Reset()         { *m = ReadResponse{} }
   181  func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
   182  func (*ReadResponse) ProtoMessage()    {}
   183  func (*ReadResponse) Descriptor() ([]byte, []int) {
   184  	return fileDescriptor_b3df75c58e6767bb, []int{2}
   185  }
   186  func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
   187  	return m.Unmarshal(b)
   188  }
   189  func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   190  	if deterministic {
   191  		return xxx_messageInfo_ReadResponse.Marshal(b, m, deterministic)
   192  	} else {
   193  		b = b[:cap(b)]
   194  		n, err := m.MarshalToSizedBuffer(b)
   195  		if err != nil {
   196  			return nil, err
   197  		}
   198  		return b[:n], nil
   199  	}
   200  }
   201  func (m *ReadResponse) XXX_Merge(src proto.Message) {
   202  	xxx_messageInfo_ReadResponse.Merge(m, src)
   203  }
   204  func (m *ReadResponse) XXX_Size() int {
   205  	return m.Size()
   206  }
   207  func (m *ReadResponse) XXX_DiscardUnknown() {
   208  	xxx_messageInfo_ReadResponse.DiscardUnknown(m)
   209  }
   210  
   211  var xxx_messageInfo_ReadResponse proto.InternalMessageInfo
   212  
   213  func (m *ReadResponse) GetResults() []*QueryResult {
   214  	if m != nil {
   215  		return m.Results
   216  	}
   217  	return nil
   218  }
   219  
   220  type Query struct {
   221  	StartTimestampMs int64           `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"`
   222  	EndTimestampMs   int64           `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"`
   223  	Matchers         []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers,proto3" json:"matchers,omitempty"`
   224  	Hints            *ReadHints      `protobuf:"bytes,4,opt,name=hints,proto3" json:"hints,omitempty"`
   225  }
   226  
   227  func (m *Query) Reset()         { *m = Query{} }
   228  func (m *Query) String() string { return proto.CompactTextString(m) }
   229  func (*Query) ProtoMessage()    {}
   230  func (*Query) Descriptor() ([]byte, []int) {
   231  	return fileDescriptor_b3df75c58e6767bb, []int{3}
   232  }
   233  func (m *Query) XXX_Unmarshal(b []byte) error {
   234  	return m.Unmarshal(b)
   235  }
   236  func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   237  	if deterministic {
   238  		return xxx_messageInfo_Query.Marshal(b, m, deterministic)
   239  	} else {
   240  		b = b[:cap(b)]
   241  		n, err := m.MarshalToSizedBuffer(b)
   242  		if err != nil {
   243  			return nil, err
   244  		}
   245  		return b[:n], nil
   246  	}
   247  }
   248  func (m *Query) XXX_Merge(src proto.Message) {
   249  	xxx_messageInfo_Query.Merge(m, src)
   250  }
   251  func (m *Query) XXX_Size() int {
   252  	return m.Size()
   253  }
   254  func (m *Query) XXX_DiscardUnknown() {
   255  	xxx_messageInfo_Query.DiscardUnknown(m)
   256  }
   257  
   258  var xxx_messageInfo_Query proto.InternalMessageInfo
   259  
   260  func (m *Query) GetStartTimestampMs() int64 {
   261  	if m != nil {
   262  		return m.StartTimestampMs
   263  	}
   264  	return 0
   265  }
   266  
   267  func (m *Query) GetEndTimestampMs() int64 {
   268  	if m != nil {
   269  		return m.EndTimestampMs
   270  	}
   271  	return 0
   272  }
   273  
   274  func (m *Query) GetMatchers() []*LabelMatcher {
   275  	if m != nil {
   276  		return m.Matchers
   277  	}
   278  	return nil
   279  }
   280  
   281  func (m *Query) GetHints() *ReadHints {
   282  	if m != nil {
   283  		return m.Hints
   284  	}
   285  	return nil
   286  }
   287  
   288  type QueryResult struct {
   289  	// Samples within a time series must be ordered by time.
   290  	Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries,proto3" json:"timeseries,omitempty"`
   291  }
   292  
   293  func (m *QueryResult) Reset()         { *m = QueryResult{} }
   294  func (m *QueryResult) String() string { return proto.CompactTextString(m) }
   295  func (*QueryResult) ProtoMessage()    {}
   296  func (*QueryResult) Descriptor() ([]byte, []int) {
   297  	return fileDescriptor_b3df75c58e6767bb, []int{4}
   298  }
   299  func (m *QueryResult) XXX_Unmarshal(b []byte) error {
   300  	return m.Unmarshal(b)
   301  }
   302  func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   303  	if deterministic {
   304  		return xxx_messageInfo_QueryResult.Marshal(b, m, deterministic)
   305  	} else {
   306  		b = b[:cap(b)]
   307  		n, err := m.MarshalToSizedBuffer(b)
   308  		if err != nil {
   309  			return nil, err
   310  		}
   311  		return b[:n], nil
   312  	}
   313  }
   314  func (m *QueryResult) XXX_Merge(src proto.Message) {
   315  	xxx_messageInfo_QueryResult.Merge(m, src)
   316  }
   317  func (m *QueryResult) XXX_Size() int {
   318  	return m.Size()
   319  }
   320  func (m *QueryResult) XXX_DiscardUnknown() {
   321  	xxx_messageInfo_QueryResult.DiscardUnknown(m)
   322  }
   323  
   324  var xxx_messageInfo_QueryResult proto.InternalMessageInfo
   325  
   326  func (m *QueryResult) GetTimeseries() []*TimeSeries {
   327  	if m != nil {
   328  		return m.Timeseries
   329  	}
   330  	return nil
   331  }
   332  
   333  // ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
   334  // We strictly stream full series after series, optionally split by time. This means that a single frame can contain
   335  // partition of the single series, but once a new series is started to be streamed it means that no more chunks will
   336  // be sent for previous one.
   337  type ChunkedReadResponse struct {
   338  	ChunkedSeries []*ChunkedSeries `protobuf:"bytes,1,rep,name=chunked_series,json=chunkedSeries,proto3" json:"chunked_series,omitempty"`
   339  	// query_index represents an index of the query from ReadRequest.queries these chunks relates to.
   340  	QueryIndex int64 `protobuf:"varint,2,opt,name=query_index,json=queryIndex,proto3" json:"query_index,omitempty"`
   341  }
   342  
   343  func (m *ChunkedReadResponse) Reset()         { *m = ChunkedReadResponse{} }
   344  func (m *ChunkedReadResponse) String() string { return proto.CompactTextString(m) }
   345  func (*ChunkedReadResponse) ProtoMessage()    {}
   346  func (*ChunkedReadResponse) Descriptor() ([]byte, []int) {
   347  	return fileDescriptor_b3df75c58e6767bb, []int{5}
   348  }
   349  func (m *ChunkedReadResponse) XXX_Unmarshal(b []byte) error {
   350  	return m.Unmarshal(b)
   351  }
   352  func (m *ChunkedReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   353  	if deterministic {
   354  		return xxx_messageInfo_ChunkedReadResponse.Marshal(b, m, deterministic)
   355  	} else {
   356  		b = b[:cap(b)]
   357  		n, err := m.MarshalToSizedBuffer(b)
   358  		if err != nil {
   359  			return nil, err
   360  		}
   361  		return b[:n], nil
   362  	}
   363  }
   364  func (m *ChunkedReadResponse) XXX_Merge(src proto.Message) {
   365  	xxx_messageInfo_ChunkedReadResponse.Merge(m, src)
   366  }
   367  func (m *ChunkedReadResponse) XXX_Size() int {
   368  	return m.Size()
   369  }
   370  func (m *ChunkedReadResponse) XXX_DiscardUnknown() {
   371  	xxx_messageInfo_ChunkedReadResponse.DiscardUnknown(m)
   372  }
   373  
   374  var xxx_messageInfo_ChunkedReadResponse proto.InternalMessageInfo
   375  
   376  func (m *ChunkedReadResponse) GetChunkedSeries() []*ChunkedSeries {
   377  	if m != nil {
   378  		return m.ChunkedSeries
   379  	}
   380  	return nil
   381  }
   382  
   383  func (m *ChunkedReadResponse) GetQueryIndex() int64 {
   384  	if m != nil {
   385  		return m.QueryIndex
   386  	}
   387  	return 0
   388  }
   389  
   390  func init() {
   391  	proto.RegisterEnum("prometheus_copy.ReadRequest_ResponseType", ReadRequest_ResponseType_name, ReadRequest_ResponseType_value)
   392  	proto.RegisterType((*WriteRequest)(nil), "prometheus_copy.WriteRequest")
   393  	proto.RegisterType((*ReadRequest)(nil), "prometheus_copy.ReadRequest")
   394  	proto.RegisterType((*ReadResponse)(nil), "prometheus_copy.ReadResponse")
   395  	proto.RegisterType((*Query)(nil), "prometheus_copy.Query")
   396  	proto.RegisterType((*QueryResult)(nil), "prometheus_copy.QueryResult")
   397  	proto.RegisterType((*ChunkedReadResponse)(nil), "prometheus_copy.ChunkedReadResponse")
   398  }
   399  
   400  func init() { proto.RegisterFile("store/storepb/prompb/remote.proto", fileDescriptor_b3df75c58e6767bb) }
   401  
   402  var fileDescriptor_b3df75c58e6767bb = []byte{
   403  	// 535 bytes of a gzipped FileDescriptorProto
   404  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x30,
   405  	0x18, 0xc6, 0x9b, 0xb5, 0x5b, 0xab, 0x37, 0xa3, 0x54, 0x1e, 0xb0, 0xaa, 0x40, 0x5a, 0x72, 0x2a,
   406  	0x12, 0x6a, 0xa7, 0x82, 0x90, 0x10, 0xa7, 0x6e, 0x14, 0x8d, 0xb1, 0xf0, 0xc7, 0x2d, 0x02, 0x71,
   407  	0x89, 0xdc, 0xe4, 0xd5, 0x1a, 0xb1, 0xfc, 0x99, 0xed, 0x48, 0xf4, 0xc0, 0x77, 0xe0, 0xcc, 0x27,
   408  	0xda, 0x81, 0xc3, 0x8e, 0x3b, 0x21, 0xd4, 0x7e, 0x11, 0x14, 0x27, 0xa9, 0x32, 0x3a, 0x0e, 0x5c,
   409  	0x22, 0xe7, 0xf1, 0xef, 0x79, 0x6c, 0xbf, 0x7e, 0x0d, 0x0f, 0x84, 0x0c, 0x39, 0xf6, 0xd5, 0x37,
   410  	0x9a, 0xf6, 0x23, 0x1e, 0xfa, 0xd1, 0xb4, 0xcf, 0xd1, 0x0f, 0x25, 0xf6, 0x22, 0x1e, 0xca, 0x90,
   411  	0xdc, 0x4c, 0x44, 0x94, 0x33, 0x8c, 0x85, 0xed, 0x84, 0xd1, 0xbc, 0xd5, 0xb9, 0xd6, 0x23, 0xe7,
   412  	0x11, 0x8a, 0xd4, 0xd2, 0xba, 0x75, 0x12, 0x9e, 0x84, 0x6a, 0xd8, 0x4f, 0x46, 0xa9, 0x6a, 0xfe,
   413  	0xd0, 0x60, 0xfb, 0x23, 0xf7, 0x24, 0x52, 0x3c, 0x8b, 0x51, 0x48, 0x32, 0x04, 0x90, 0x9e, 0x8f,
   414  	0x02, 0xb9, 0x87, 0xa2, 0xa9, 0x75, 0xca, 0x5d, 0x7d, 0x70, 0xb7, 0xf7, 0xd7, 0x72, 0xbd, 0x89,
   415  	0xe7, 0xe3, 0x58, 0x21, 0xfb, 0x95, 0xf3, 0x5f, 0xed, 0x12, 0x2d, 0x98, 0xc8, 0x10, 0x6a, 0x3e,
   416  	0x4a, 0xe6, 0x32, 0xc9, 0x9a, 0x65, 0x15, 0xd0, 0x5e, 0x0b, 0xb0, 0x50, 0x72, 0xcf, 0xb1, 0x32,
   417  	0x2c, 0x0b, 0x59, 0xd9, 0x8e, 0x2a, 0xb5, 0x8d, 0x46, 0xd9, 0xbc, 0xd4, 0x40, 0xa7, 0xc8, 0xdc,
   418  	0x7c, 0x6f, 0x7b, 0x50, 0x3d, 0x8b, 0x8b, 0x1b, 0xbb, 0xb3, 0x96, 0xfb, 0x3e, 0x46, 0x3e, 0xa7,
   419  	0x39, 0x46, 0x18, 0xec, 0x32, 0xc7, 0xc1, 0x48, 0xa2, 0x6b, 0x73, 0x14, 0x51, 0x18, 0x08, 0xb4,
   420  	0x55, 0x55, 0x9a, 0x1b, 0x9d, 0x72, 0xb7, 0x3e, 0x78, 0xb8, 0x96, 0x50, 0x58, 0xb0, 0x47, 0x33,
   421  	0xcb, 0x64, 0x1e, 0x21, 0xbd, 0x9d, 0x27, 0x15, 0x55, 0x61, 0x3e, 0x81, 0xed, 0xa2, 0x40, 0x74,
   422  	0xa8, 0x8e, 0x87, 0xd6, 0xbb, 0xe3, 0xd1, 0xb8, 0x51, 0x22, 0xbb, 0xb0, 0x33, 0x9e, 0xd0, 0xd1,
   423  	0xd0, 0x1a, 0xbd, 0xb0, 0x3f, 0xbd, 0xa5, 0xf6, 0xc1, 0xe1, 0x87, 0x37, 0xaf, 0xc7, 0x0d, 0xcd,
   424  	0x7c, 0x99, 0xb8, 0xd8, 0x2a, 0x8a, 0x3c, 0x85, 0x2a, 0x47, 0x11, 0x9f, 0xca, 0xfc, 0x68, 0xf7,
   425  	0xfe, 0x71, 0x34, 0x05, 0xd1, 0x1c, 0x36, 0x7f, 0x6a, 0xb0, 0xa9, 0x26, 0xc8, 0x23, 0x20, 0x42,
   426  	0x32, 0x2e, 0x6d, 0x75, 0x13, 0x92, 0xf9, 0x91, 0xed, 0x27, 0x61, 0x5a, 0xb7, 0x4c, 0x1b, 0x6a,
   427  	0x66, 0x92, 0x4f, 0x58, 0x82, 0x74, 0xa1, 0x81, 0x81, 0x7b, 0x95, 0xdd, 0x50, 0x6c, 0x1d, 0x03,
   428  	0xb7, 0x48, 0x3e, 0x83, 0x9a, 0xcf, 0xa4, 0x33, 0x43, 0x2e, 0xb2, 0xdb, 0xbc, 0xbf, 0xb6, 0xb5,
   429  	0x63, 0x36, 0xc5, 0x53, 0x2b, 0xa5, 0xe8, 0x0a, 0x27, 0x7b, 0xb0, 0x39, 0xf3, 0x02, 0x29, 0x9a,
   430  	0x95, 0x8e, 0xd6, 0xd5, 0x07, 0xad, 0x6b, 0x6b, 0x7d, 0x98, 0x10, 0x34, 0x05, 0xcd, 0x23, 0xd0,
   431  	0x0b, 0xc7, 0x24, 0xcf, 0xff, 0xb3, 0x19, 0x8b, 0x6d, 0x68, 0x7e, 0x83, 0x9d, 0x83, 0x59, 0x1c,
   432  	0x7c, 0x49, 0x2e, 0xac, 0x50, 0xe9, 0x11, 0xd4, 0x9d, 0x54, 0xb6, 0xaf, 0xe4, 0x1a, 0x6b, 0xb9,
   433  	0x99, 0x3b, 0x8b, 0xbe, 0xe1, 0x14, 0x7f, 0x49, 0x1b, 0xf4, 0xa4, 0xc9, 0xe6, 0xb6, 0x17, 0xb8,
   434  	0xf8, 0x35, 0xab, 0x1d, 0x28, 0xe9, 0x55, 0xa2, 0xec, 0x77, 0xce, 0x17, 0x86, 0x76, 0xb1, 0x30,
   435  	0xb4, 0xdf, 0x0b, 0x43, 0xfb, 0xbe, 0x34, 0x4a, 0x17, 0x4b, 0xa3, 0x74, 0xb9, 0x34, 0x4a, 0x9f,
   436  	0xb7, 0xd2, 0xd7, 0x39, 0xdd, 0x52, 0x4f, 0xf0, 0xf1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32,
   437  	0xa1, 0xf6, 0xc4, 0xf0, 0x03, 0x00, 0x00,
   438  }
   439  
   440  func (m *WriteRequest) Marshal() (dAtA []byte, err error) {
   441  	size := m.Size()
   442  	dAtA = make([]byte, size)
   443  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   444  	if err != nil {
   445  		return nil, err
   446  	}
   447  	return dAtA[:n], nil
   448  }
   449  
   450  func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error) {
   451  	size := m.Size()
   452  	return m.MarshalToSizedBuffer(dAtA[:size])
   453  }
   454  
   455  func (m *WriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   456  	i := len(dAtA)
   457  	_ = i
   458  	var l int
   459  	_ = l
   460  	if len(m.Metadata) > 0 {
   461  		for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- {
   462  			{
   463  				size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   464  				if err != nil {
   465  					return 0, err
   466  				}
   467  				i -= size
   468  				i = encodeVarintRemote(dAtA, i, uint64(size))
   469  			}
   470  			i--
   471  			dAtA[i] = 0x1a
   472  		}
   473  	}
   474  	if len(m.Timeseries) > 0 {
   475  		for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- {
   476  			{
   477  				size, err := m.Timeseries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   478  				if err != nil {
   479  					return 0, err
   480  				}
   481  				i -= size
   482  				i = encodeVarintRemote(dAtA, i, uint64(size))
   483  			}
   484  			i--
   485  			dAtA[i] = 0xa
   486  		}
   487  	}
   488  	return len(dAtA) - i, nil
   489  }
   490  
   491  func (m *ReadRequest) Marshal() (dAtA []byte, err error) {
   492  	size := m.Size()
   493  	dAtA = make([]byte, size)
   494  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   495  	if err != nil {
   496  		return nil, err
   497  	}
   498  	return dAtA[:n], nil
   499  }
   500  
   501  func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error) {
   502  	size := m.Size()
   503  	return m.MarshalToSizedBuffer(dAtA[:size])
   504  }
   505  
   506  func (m *ReadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   507  	i := len(dAtA)
   508  	_ = i
   509  	var l int
   510  	_ = l
   511  	if len(m.AcceptedResponseTypes) > 0 {
   512  		dAtA2 := make([]byte, len(m.AcceptedResponseTypes)*10)
   513  		var j1 int
   514  		for _, num := range m.AcceptedResponseTypes {
   515  			for num >= 1<<7 {
   516  				dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
   517  				num >>= 7
   518  				j1++
   519  			}
   520  			dAtA2[j1] = uint8(num)
   521  			j1++
   522  		}
   523  		i -= j1
   524  		copy(dAtA[i:], dAtA2[:j1])
   525  		i = encodeVarintRemote(dAtA, i, uint64(j1))
   526  		i--
   527  		dAtA[i] = 0x12
   528  	}
   529  	if len(m.Queries) > 0 {
   530  		for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- {
   531  			{
   532  				size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   533  				if err != nil {
   534  					return 0, err
   535  				}
   536  				i -= size
   537  				i = encodeVarintRemote(dAtA, i, uint64(size))
   538  			}
   539  			i--
   540  			dAtA[i] = 0xa
   541  		}
   542  	}
   543  	return len(dAtA) - i, nil
   544  }
   545  
   546  func (m *ReadResponse) Marshal() (dAtA []byte, err error) {
   547  	size := m.Size()
   548  	dAtA = make([]byte, size)
   549  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   550  	if err != nil {
   551  		return nil, err
   552  	}
   553  	return dAtA[:n], nil
   554  }
   555  
   556  func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) {
   557  	size := m.Size()
   558  	return m.MarshalToSizedBuffer(dAtA[:size])
   559  }
   560  
   561  func (m *ReadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   562  	i := len(dAtA)
   563  	_ = i
   564  	var l int
   565  	_ = l
   566  	if len(m.Results) > 0 {
   567  		for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- {
   568  			{
   569  				size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   570  				if err != nil {
   571  					return 0, err
   572  				}
   573  				i -= size
   574  				i = encodeVarintRemote(dAtA, i, uint64(size))
   575  			}
   576  			i--
   577  			dAtA[i] = 0xa
   578  		}
   579  	}
   580  	return len(dAtA) - i, nil
   581  }
   582  
   583  func (m *Query) Marshal() (dAtA []byte, err error) {
   584  	size := m.Size()
   585  	dAtA = make([]byte, size)
   586  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   587  	if err != nil {
   588  		return nil, err
   589  	}
   590  	return dAtA[:n], nil
   591  }
   592  
   593  func (m *Query) MarshalTo(dAtA []byte) (int, error) {
   594  	size := m.Size()
   595  	return m.MarshalToSizedBuffer(dAtA[:size])
   596  }
   597  
   598  func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   599  	i := len(dAtA)
   600  	_ = i
   601  	var l int
   602  	_ = l
   603  	if m.Hints != nil {
   604  		{
   605  			size, err := m.Hints.MarshalToSizedBuffer(dAtA[:i])
   606  			if err != nil {
   607  				return 0, err
   608  			}
   609  			i -= size
   610  			i = encodeVarintRemote(dAtA, i, uint64(size))
   611  		}
   612  		i--
   613  		dAtA[i] = 0x22
   614  	}
   615  	if len(m.Matchers) > 0 {
   616  		for iNdEx := len(m.Matchers) - 1; iNdEx >= 0; iNdEx-- {
   617  			{
   618  				size, err := m.Matchers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   619  				if err != nil {
   620  					return 0, err
   621  				}
   622  				i -= size
   623  				i = encodeVarintRemote(dAtA, i, uint64(size))
   624  			}
   625  			i--
   626  			dAtA[i] = 0x1a
   627  		}
   628  	}
   629  	if m.EndTimestampMs != 0 {
   630  		i = encodeVarintRemote(dAtA, i, uint64(m.EndTimestampMs))
   631  		i--
   632  		dAtA[i] = 0x10
   633  	}
   634  	if m.StartTimestampMs != 0 {
   635  		i = encodeVarintRemote(dAtA, i, uint64(m.StartTimestampMs))
   636  		i--
   637  		dAtA[i] = 0x8
   638  	}
   639  	return len(dAtA) - i, nil
   640  }
   641  
   642  func (m *QueryResult) Marshal() (dAtA []byte, err error) {
   643  	size := m.Size()
   644  	dAtA = make([]byte, size)
   645  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   646  	if err != nil {
   647  		return nil, err
   648  	}
   649  	return dAtA[:n], nil
   650  }
   651  
   652  func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) {
   653  	size := m.Size()
   654  	return m.MarshalToSizedBuffer(dAtA[:size])
   655  }
   656  
   657  func (m *QueryResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   658  	i := len(dAtA)
   659  	_ = i
   660  	var l int
   661  	_ = l
   662  	if len(m.Timeseries) > 0 {
   663  		for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- {
   664  			{
   665  				size, err := m.Timeseries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   666  				if err != nil {
   667  					return 0, err
   668  				}
   669  				i -= size
   670  				i = encodeVarintRemote(dAtA, i, uint64(size))
   671  			}
   672  			i--
   673  			dAtA[i] = 0xa
   674  		}
   675  	}
   676  	return len(dAtA) - i, nil
   677  }
   678  
   679  func (m *ChunkedReadResponse) Marshal() (dAtA []byte, err error) {
   680  	size := m.Size()
   681  	dAtA = make([]byte, size)
   682  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   683  	if err != nil {
   684  		return nil, err
   685  	}
   686  	return dAtA[:n], nil
   687  }
   688  
   689  func (m *ChunkedReadResponse) MarshalTo(dAtA []byte) (int, error) {
   690  	size := m.Size()
   691  	return m.MarshalToSizedBuffer(dAtA[:size])
   692  }
   693  
   694  func (m *ChunkedReadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   695  	i := len(dAtA)
   696  	_ = i
   697  	var l int
   698  	_ = l
   699  	if m.QueryIndex != 0 {
   700  		i = encodeVarintRemote(dAtA, i, uint64(m.QueryIndex))
   701  		i--
   702  		dAtA[i] = 0x10
   703  	}
   704  	if len(m.ChunkedSeries) > 0 {
   705  		for iNdEx := len(m.ChunkedSeries) - 1; iNdEx >= 0; iNdEx-- {
   706  			{
   707  				size, err := m.ChunkedSeries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   708  				if err != nil {
   709  					return 0, err
   710  				}
   711  				i -= size
   712  				i = encodeVarintRemote(dAtA, i, uint64(size))
   713  			}
   714  			i--
   715  			dAtA[i] = 0xa
   716  		}
   717  	}
   718  	return len(dAtA) - i, nil
   719  }
   720  
   721  func encodeVarintRemote(dAtA []byte, offset int, v uint64) int {
   722  	offset -= sovRemote(v)
   723  	base := offset
   724  	for v >= 1<<7 {
   725  		dAtA[offset] = uint8(v&0x7f | 0x80)
   726  		v >>= 7
   727  		offset++
   728  	}
   729  	dAtA[offset] = uint8(v)
   730  	return base
   731  }
   732  func (m *WriteRequest) Size() (n int) {
   733  	if m == nil {
   734  		return 0
   735  	}
   736  	var l int
   737  	_ = l
   738  	if len(m.Timeseries) > 0 {
   739  		for _, e := range m.Timeseries {
   740  			l = e.Size()
   741  			n += 1 + l + sovRemote(uint64(l))
   742  		}
   743  	}
   744  	if len(m.Metadata) > 0 {
   745  		for _, e := range m.Metadata {
   746  			l = e.Size()
   747  			n += 1 + l + sovRemote(uint64(l))
   748  		}
   749  	}
   750  	return n
   751  }
   752  
   753  func (m *ReadRequest) Size() (n int) {
   754  	if m == nil {
   755  		return 0
   756  	}
   757  	var l int
   758  	_ = l
   759  	if len(m.Queries) > 0 {
   760  		for _, e := range m.Queries {
   761  			l = e.Size()
   762  			n += 1 + l + sovRemote(uint64(l))
   763  		}
   764  	}
   765  	if len(m.AcceptedResponseTypes) > 0 {
   766  		l = 0
   767  		for _, e := range m.AcceptedResponseTypes {
   768  			l += sovRemote(uint64(e))
   769  		}
   770  		n += 1 + sovRemote(uint64(l)) + l
   771  	}
   772  	return n
   773  }
   774  
   775  func (m *ReadResponse) Size() (n int) {
   776  	if m == nil {
   777  		return 0
   778  	}
   779  	var l int
   780  	_ = l
   781  	if len(m.Results) > 0 {
   782  		for _, e := range m.Results {
   783  			l = e.Size()
   784  			n += 1 + l + sovRemote(uint64(l))
   785  		}
   786  	}
   787  	return n
   788  }
   789  
   790  func (m *Query) Size() (n int) {
   791  	if m == nil {
   792  		return 0
   793  	}
   794  	var l int
   795  	_ = l
   796  	if m.StartTimestampMs != 0 {
   797  		n += 1 + sovRemote(uint64(m.StartTimestampMs))
   798  	}
   799  	if m.EndTimestampMs != 0 {
   800  		n += 1 + sovRemote(uint64(m.EndTimestampMs))
   801  	}
   802  	if len(m.Matchers) > 0 {
   803  		for _, e := range m.Matchers {
   804  			l = e.Size()
   805  			n += 1 + l + sovRemote(uint64(l))
   806  		}
   807  	}
   808  	if m.Hints != nil {
   809  		l = m.Hints.Size()
   810  		n += 1 + l + sovRemote(uint64(l))
   811  	}
   812  	return n
   813  }
   814  
   815  func (m *QueryResult) Size() (n int) {
   816  	if m == nil {
   817  		return 0
   818  	}
   819  	var l int
   820  	_ = l
   821  	if len(m.Timeseries) > 0 {
   822  		for _, e := range m.Timeseries {
   823  			l = e.Size()
   824  			n += 1 + l + sovRemote(uint64(l))
   825  		}
   826  	}
   827  	return n
   828  }
   829  
   830  func (m *ChunkedReadResponse) Size() (n int) {
   831  	if m == nil {
   832  		return 0
   833  	}
   834  	var l int
   835  	_ = l
   836  	if len(m.ChunkedSeries) > 0 {
   837  		for _, e := range m.ChunkedSeries {
   838  			l = e.Size()
   839  			n += 1 + l + sovRemote(uint64(l))
   840  		}
   841  	}
   842  	if m.QueryIndex != 0 {
   843  		n += 1 + sovRemote(uint64(m.QueryIndex))
   844  	}
   845  	return n
   846  }
   847  
   848  func sovRemote(x uint64) (n int) {
   849  	return (math_bits.Len64(x|1) + 6) / 7
   850  }
   851  func sozRemote(x uint64) (n int) {
   852  	return sovRemote(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   853  }
   854  func (m *WriteRequest) Unmarshal(dAtA []byte) error {
   855  	l := len(dAtA)
   856  	iNdEx := 0
   857  	for iNdEx < l {
   858  		preIndex := iNdEx
   859  		var wire uint64
   860  		for shift := uint(0); ; shift += 7 {
   861  			if shift >= 64 {
   862  				return ErrIntOverflowRemote
   863  			}
   864  			if iNdEx >= l {
   865  				return io.ErrUnexpectedEOF
   866  			}
   867  			b := dAtA[iNdEx]
   868  			iNdEx++
   869  			wire |= uint64(b&0x7F) << shift
   870  			if b < 0x80 {
   871  				break
   872  			}
   873  		}
   874  		fieldNum := int32(wire >> 3)
   875  		wireType := int(wire & 0x7)
   876  		if wireType == 4 {
   877  			return fmt.Errorf("proto: WriteRequest: wiretype end group for non-group")
   878  		}
   879  		if fieldNum <= 0 {
   880  			return fmt.Errorf("proto: WriteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   881  		}
   882  		switch fieldNum {
   883  		case 1:
   884  			if wireType != 2 {
   885  				return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
   886  			}
   887  			var msglen int
   888  			for shift := uint(0); ; shift += 7 {
   889  				if shift >= 64 {
   890  					return ErrIntOverflowRemote
   891  				}
   892  				if iNdEx >= l {
   893  					return io.ErrUnexpectedEOF
   894  				}
   895  				b := dAtA[iNdEx]
   896  				iNdEx++
   897  				msglen |= int(b&0x7F) << shift
   898  				if b < 0x80 {
   899  					break
   900  				}
   901  			}
   902  			if msglen < 0 {
   903  				return ErrInvalidLengthRemote
   904  			}
   905  			postIndex := iNdEx + msglen
   906  			if postIndex < 0 {
   907  				return ErrInvalidLengthRemote
   908  			}
   909  			if postIndex > l {
   910  				return io.ErrUnexpectedEOF
   911  			}
   912  			m.Timeseries = append(m.Timeseries, TimeSeries{})
   913  			if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   914  				return err
   915  			}
   916  			iNdEx = postIndex
   917  		case 3:
   918  			if wireType != 2 {
   919  				return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
   920  			}
   921  			var msglen int
   922  			for shift := uint(0); ; shift += 7 {
   923  				if shift >= 64 {
   924  					return ErrIntOverflowRemote
   925  				}
   926  				if iNdEx >= l {
   927  					return io.ErrUnexpectedEOF
   928  				}
   929  				b := dAtA[iNdEx]
   930  				iNdEx++
   931  				msglen |= int(b&0x7F) << shift
   932  				if b < 0x80 {
   933  					break
   934  				}
   935  			}
   936  			if msglen < 0 {
   937  				return ErrInvalidLengthRemote
   938  			}
   939  			postIndex := iNdEx + msglen
   940  			if postIndex < 0 {
   941  				return ErrInvalidLengthRemote
   942  			}
   943  			if postIndex > l {
   944  				return io.ErrUnexpectedEOF
   945  			}
   946  			m.Metadata = append(m.Metadata, MetricMetadata{})
   947  			if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   948  				return err
   949  			}
   950  			iNdEx = postIndex
   951  		default:
   952  			iNdEx = preIndex
   953  			skippy, err := skipRemote(dAtA[iNdEx:])
   954  			if err != nil {
   955  				return err
   956  			}
   957  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   958  				return ErrInvalidLengthRemote
   959  			}
   960  			if (iNdEx + skippy) > l {
   961  				return io.ErrUnexpectedEOF
   962  			}
   963  			iNdEx += skippy
   964  		}
   965  	}
   966  
   967  	if iNdEx > l {
   968  		return io.ErrUnexpectedEOF
   969  	}
   970  	return nil
   971  }
   972  func (m *ReadRequest) Unmarshal(dAtA []byte) error {
   973  	l := len(dAtA)
   974  	iNdEx := 0
   975  	for iNdEx < l {
   976  		preIndex := iNdEx
   977  		var wire uint64
   978  		for shift := uint(0); ; shift += 7 {
   979  			if shift >= 64 {
   980  				return ErrIntOverflowRemote
   981  			}
   982  			if iNdEx >= l {
   983  				return io.ErrUnexpectedEOF
   984  			}
   985  			b := dAtA[iNdEx]
   986  			iNdEx++
   987  			wire |= uint64(b&0x7F) << shift
   988  			if b < 0x80 {
   989  				break
   990  			}
   991  		}
   992  		fieldNum := int32(wire >> 3)
   993  		wireType := int(wire & 0x7)
   994  		if wireType == 4 {
   995  			return fmt.Errorf("proto: ReadRequest: wiretype end group for non-group")
   996  		}
   997  		if fieldNum <= 0 {
   998  			return fmt.Errorf("proto: ReadRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   999  		}
  1000  		switch fieldNum {
  1001  		case 1:
  1002  			if wireType != 2 {
  1003  				return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType)
  1004  			}
  1005  			var msglen int
  1006  			for shift := uint(0); ; shift += 7 {
  1007  				if shift >= 64 {
  1008  					return ErrIntOverflowRemote
  1009  				}
  1010  				if iNdEx >= l {
  1011  					return io.ErrUnexpectedEOF
  1012  				}
  1013  				b := dAtA[iNdEx]
  1014  				iNdEx++
  1015  				msglen |= int(b&0x7F) << shift
  1016  				if b < 0x80 {
  1017  					break
  1018  				}
  1019  			}
  1020  			if msglen < 0 {
  1021  				return ErrInvalidLengthRemote
  1022  			}
  1023  			postIndex := iNdEx + msglen
  1024  			if postIndex < 0 {
  1025  				return ErrInvalidLengthRemote
  1026  			}
  1027  			if postIndex > l {
  1028  				return io.ErrUnexpectedEOF
  1029  			}
  1030  			m.Queries = append(m.Queries, &Query{})
  1031  			if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1032  				return err
  1033  			}
  1034  			iNdEx = postIndex
  1035  		case 2:
  1036  			if wireType == 0 {
  1037  				var v ReadRequest_ResponseType
  1038  				for shift := uint(0); ; shift += 7 {
  1039  					if shift >= 64 {
  1040  						return ErrIntOverflowRemote
  1041  					}
  1042  					if iNdEx >= l {
  1043  						return io.ErrUnexpectedEOF
  1044  					}
  1045  					b := dAtA[iNdEx]
  1046  					iNdEx++
  1047  					v |= ReadRequest_ResponseType(b&0x7F) << shift
  1048  					if b < 0x80 {
  1049  						break
  1050  					}
  1051  				}
  1052  				m.AcceptedResponseTypes = append(m.AcceptedResponseTypes, v)
  1053  			} else if wireType == 2 {
  1054  				var packedLen int
  1055  				for shift := uint(0); ; shift += 7 {
  1056  					if shift >= 64 {
  1057  						return ErrIntOverflowRemote
  1058  					}
  1059  					if iNdEx >= l {
  1060  						return io.ErrUnexpectedEOF
  1061  					}
  1062  					b := dAtA[iNdEx]
  1063  					iNdEx++
  1064  					packedLen |= int(b&0x7F) << shift
  1065  					if b < 0x80 {
  1066  						break
  1067  					}
  1068  				}
  1069  				if packedLen < 0 {
  1070  					return ErrInvalidLengthRemote
  1071  				}
  1072  				postIndex := iNdEx + packedLen
  1073  				if postIndex < 0 {
  1074  					return ErrInvalidLengthRemote
  1075  				}
  1076  				if postIndex > l {
  1077  					return io.ErrUnexpectedEOF
  1078  				}
  1079  				var elementCount int
  1080  				if elementCount != 0 && len(m.AcceptedResponseTypes) == 0 {
  1081  					m.AcceptedResponseTypes = make([]ReadRequest_ResponseType, 0, elementCount)
  1082  				}
  1083  				for iNdEx < postIndex {
  1084  					var v ReadRequest_ResponseType
  1085  					for shift := uint(0); ; shift += 7 {
  1086  						if shift >= 64 {
  1087  							return ErrIntOverflowRemote
  1088  						}
  1089  						if iNdEx >= l {
  1090  							return io.ErrUnexpectedEOF
  1091  						}
  1092  						b := dAtA[iNdEx]
  1093  						iNdEx++
  1094  						v |= ReadRequest_ResponseType(b&0x7F) << shift
  1095  						if b < 0x80 {
  1096  							break
  1097  						}
  1098  					}
  1099  					m.AcceptedResponseTypes = append(m.AcceptedResponseTypes, v)
  1100  				}
  1101  			} else {
  1102  				return fmt.Errorf("proto: wrong wireType = %d for field AcceptedResponseTypes", wireType)
  1103  			}
  1104  		default:
  1105  			iNdEx = preIndex
  1106  			skippy, err := skipRemote(dAtA[iNdEx:])
  1107  			if err != nil {
  1108  				return err
  1109  			}
  1110  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1111  				return ErrInvalidLengthRemote
  1112  			}
  1113  			if (iNdEx + skippy) > l {
  1114  				return io.ErrUnexpectedEOF
  1115  			}
  1116  			iNdEx += skippy
  1117  		}
  1118  	}
  1119  
  1120  	if iNdEx > l {
  1121  		return io.ErrUnexpectedEOF
  1122  	}
  1123  	return nil
  1124  }
  1125  func (m *ReadResponse) Unmarshal(dAtA []byte) error {
  1126  	l := len(dAtA)
  1127  	iNdEx := 0
  1128  	for iNdEx < l {
  1129  		preIndex := iNdEx
  1130  		var wire uint64
  1131  		for shift := uint(0); ; shift += 7 {
  1132  			if shift >= 64 {
  1133  				return ErrIntOverflowRemote
  1134  			}
  1135  			if iNdEx >= l {
  1136  				return io.ErrUnexpectedEOF
  1137  			}
  1138  			b := dAtA[iNdEx]
  1139  			iNdEx++
  1140  			wire |= uint64(b&0x7F) << shift
  1141  			if b < 0x80 {
  1142  				break
  1143  			}
  1144  		}
  1145  		fieldNum := int32(wire >> 3)
  1146  		wireType := int(wire & 0x7)
  1147  		if wireType == 4 {
  1148  			return fmt.Errorf("proto: ReadResponse: wiretype end group for non-group")
  1149  		}
  1150  		if fieldNum <= 0 {
  1151  			return fmt.Errorf("proto: ReadResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1152  		}
  1153  		switch fieldNum {
  1154  		case 1:
  1155  			if wireType != 2 {
  1156  				return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType)
  1157  			}
  1158  			var msglen int
  1159  			for shift := uint(0); ; shift += 7 {
  1160  				if shift >= 64 {
  1161  					return ErrIntOverflowRemote
  1162  				}
  1163  				if iNdEx >= l {
  1164  					return io.ErrUnexpectedEOF
  1165  				}
  1166  				b := dAtA[iNdEx]
  1167  				iNdEx++
  1168  				msglen |= int(b&0x7F) << shift
  1169  				if b < 0x80 {
  1170  					break
  1171  				}
  1172  			}
  1173  			if msglen < 0 {
  1174  				return ErrInvalidLengthRemote
  1175  			}
  1176  			postIndex := iNdEx + msglen
  1177  			if postIndex < 0 {
  1178  				return ErrInvalidLengthRemote
  1179  			}
  1180  			if postIndex > l {
  1181  				return io.ErrUnexpectedEOF
  1182  			}
  1183  			m.Results = append(m.Results, &QueryResult{})
  1184  			if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1185  				return err
  1186  			}
  1187  			iNdEx = postIndex
  1188  		default:
  1189  			iNdEx = preIndex
  1190  			skippy, err := skipRemote(dAtA[iNdEx:])
  1191  			if err != nil {
  1192  				return err
  1193  			}
  1194  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1195  				return ErrInvalidLengthRemote
  1196  			}
  1197  			if (iNdEx + skippy) > l {
  1198  				return io.ErrUnexpectedEOF
  1199  			}
  1200  			iNdEx += skippy
  1201  		}
  1202  	}
  1203  
  1204  	if iNdEx > l {
  1205  		return io.ErrUnexpectedEOF
  1206  	}
  1207  	return nil
  1208  }
  1209  func (m *Query) Unmarshal(dAtA []byte) error {
  1210  	l := len(dAtA)
  1211  	iNdEx := 0
  1212  	for iNdEx < l {
  1213  		preIndex := iNdEx
  1214  		var wire uint64
  1215  		for shift := uint(0); ; shift += 7 {
  1216  			if shift >= 64 {
  1217  				return ErrIntOverflowRemote
  1218  			}
  1219  			if iNdEx >= l {
  1220  				return io.ErrUnexpectedEOF
  1221  			}
  1222  			b := dAtA[iNdEx]
  1223  			iNdEx++
  1224  			wire |= uint64(b&0x7F) << shift
  1225  			if b < 0x80 {
  1226  				break
  1227  			}
  1228  		}
  1229  		fieldNum := int32(wire >> 3)
  1230  		wireType := int(wire & 0x7)
  1231  		if wireType == 4 {
  1232  			return fmt.Errorf("proto: Query: wiretype end group for non-group")
  1233  		}
  1234  		if fieldNum <= 0 {
  1235  			return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire)
  1236  		}
  1237  		switch fieldNum {
  1238  		case 1:
  1239  			if wireType != 0 {
  1240  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestampMs", wireType)
  1241  			}
  1242  			m.StartTimestampMs = 0
  1243  			for shift := uint(0); ; shift += 7 {
  1244  				if shift >= 64 {
  1245  					return ErrIntOverflowRemote
  1246  				}
  1247  				if iNdEx >= l {
  1248  					return io.ErrUnexpectedEOF
  1249  				}
  1250  				b := dAtA[iNdEx]
  1251  				iNdEx++
  1252  				m.StartTimestampMs |= int64(b&0x7F) << shift
  1253  				if b < 0x80 {
  1254  					break
  1255  				}
  1256  			}
  1257  		case 2:
  1258  			if wireType != 0 {
  1259  				return fmt.Errorf("proto: wrong wireType = %d for field EndTimestampMs", wireType)
  1260  			}
  1261  			m.EndTimestampMs = 0
  1262  			for shift := uint(0); ; shift += 7 {
  1263  				if shift >= 64 {
  1264  					return ErrIntOverflowRemote
  1265  				}
  1266  				if iNdEx >= l {
  1267  					return io.ErrUnexpectedEOF
  1268  				}
  1269  				b := dAtA[iNdEx]
  1270  				iNdEx++
  1271  				m.EndTimestampMs |= int64(b&0x7F) << shift
  1272  				if b < 0x80 {
  1273  					break
  1274  				}
  1275  			}
  1276  		case 3:
  1277  			if wireType != 2 {
  1278  				return fmt.Errorf("proto: wrong wireType = %d for field Matchers", wireType)
  1279  			}
  1280  			var msglen int
  1281  			for shift := uint(0); ; shift += 7 {
  1282  				if shift >= 64 {
  1283  					return ErrIntOverflowRemote
  1284  				}
  1285  				if iNdEx >= l {
  1286  					return io.ErrUnexpectedEOF
  1287  				}
  1288  				b := dAtA[iNdEx]
  1289  				iNdEx++
  1290  				msglen |= int(b&0x7F) << shift
  1291  				if b < 0x80 {
  1292  					break
  1293  				}
  1294  			}
  1295  			if msglen < 0 {
  1296  				return ErrInvalidLengthRemote
  1297  			}
  1298  			postIndex := iNdEx + msglen
  1299  			if postIndex < 0 {
  1300  				return ErrInvalidLengthRemote
  1301  			}
  1302  			if postIndex > l {
  1303  				return io.ErrUnexpectedEOF
  1304  			}
  1305  			m.Matchers = append(m.Matchers, &LabelMatcher{})
  1306  			if err := m.Matchers[len(m.Matchers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1307  				return err
  1308  			}
  1309  			iNdEx = postIndex
  1310  		case 4:
  1311  			if wireType != 2 {
  1312  				return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType)
  1313  			}
  1314  			var msglen int
  1315  			for shift := uint(0); ; shift += 7 {
  1316  				if shift >= 64 {
  1317  					return ErrIntOverflowRemote
  1318  				}
  1319  				if iNdEx >= l {
  1320  					return io.ErrUnexpectedEOF
  1321  				}
  1322  				b := dAtA[iNdEx]
  1323  				iNdEx++
  1324  				msglen |= int(b&0x7F) << shift
  1325  				if b < 0x80 {
  1326  					break
  1327  				}
  1328  			}
  1329  			if msglen < 0 {
  1330  				return ErrInvalidLengthRemote
  1331  			}
  1332  			postIndex := iNdEx + msglen
  1333  			if postIndex < 0 {
  1334  				return ErrInvalidLengthRemote
  1335  			}
  1336  			if postIndex > l {
  1337  				return io.ErrUnexpectedEOF
  1338  			}
  1339  			if m.Hints == nil {
  1340  				m.Hints = &ReadHints{}
  1341  			}
  1342  			if err := m.Hints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1343  				return err
  1344  			}
  1345  			iNdEx = postIndex
  1346  		default:
  1347  			iNdEx = preIndex
  1348  			skippy, err := skipRemote(dAtA[iNdEx:])
  1349  			if err != nil {
  1350  				return err
  1351  			}
  1352  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1353  				return ErrInvalidLengthRemote
  1354  			}
  1355  			if (iNdEx + skippy) > l {
  1356  				return io.ErrUnexpectedEOF
  1357  			}
  1358  			iNdEx += skippy
  1359  		}
  1360  	}
  1361  
  1362  	if iNdEx > l {
  1363  		return io.ErrUnexpectedEOF
  1364  	}
  1365  	return nil
  1366  }
  1367  func (m *QueryResult) Unmarshal(dAtA []byte) error {
  1368  	l := len(dAtA)
  1369  	iNdEx := 0
  1370  	for iNdEx < l {
  1371  		preIndex := iNdEx
  1372  		var wire uint64
  1373  		for shift := uint(0); ; shift += 7 {
  1374  			if shift >= 64 {
  1375  				return ErrIntOverflowRemote
  1376  			}
  1377  			if iNdEx >= l {
  1378  				return io.ErrUnexpectedEOF
  1379  			}
  1380  			b := dAtA[iNdEx]
  1381  			iNdEx++
  1382  			wire |= uint64(b&0x7F) << shift
  1383  			if b < 0x80 {
  1384  				break
  1385  			}
  1386  		}
  1387  		fieldNum := int32(wire >> 3)
  1388  		wireType := int(wire & 0x7)
  1389  		if wireType == 4 {
  1390  			return fmt.Errorf("proto: QueryResult: wiretype end group for non-group")
  1391  		}
  1392  		if fieldNum <= 0 {
  1393  			return fmt.Errorf("proto: QueryResult: illegal tag %d (wire type %d)", fieldNum, wire)
  1394  		}
  1395  		switch fieldNum {
  1396  		case 1:
  1397  			if wireType != 2 {
  1398  				return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType)
  1399  			}
  1400  			var msglen int
  1401  			for shift := uint(0); ; shift += 7 {
  1402  				if shift >= 64 {
  1403  					return ErrIntOverflowRemote
  1404  				}
  1405  				if iNdEx >= l {
  1406  					return io.ErrUnexpectedEOF
  1407  				}
  1408  				b := dAtA[iNdEx]
  1409  				iNdEx++
  1410  				msglen |= int(b&0x7F) << shift
  1411  				if b < 0x80 {
  1412  					break
  1413  				}
  1414  			}
  1415  			if msglen < 0 {
  1416  				return ErrInvalidLengthRemote
  1417  			}
  1418  			postIndex := iNdEx + msglen
  1419  			if postIndex < 0 {
  1420  				return ErrInvalidLengthRemote
  1421  			}
  1422  			if postIndex > l {
  1423  				return io.ErrUnexpectedEOF
  1424  			}
  1425  			m.Timeseries = append(m.Timeseries, &TimeSeries{})
  1426  			if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1427  				return err
  1428  			}
  1429  			iNdEx = postIndex
  1430  		default:
  1431  			iNdEx = preIndex
  1432  			skippy, err := skipRemote(dAtA[iNdEx:])
  1433  			if err != nil {
  1434  				return err
  1435  			}
  1436  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1437  				return ErrInvalidLengthRemote
  1438  			}
  1439  			if (iNdEx + skippy) > l {
  1440  				return io.ErrUnexpectedEOF
  1441  			}
  1442  			iNdEx += skippy
  1443  		}
  1444  	}
  1445  
  1446  	if iNdEx > l {
  1447  		return io.ErrUnexpectedEOF
  1448  	}
  1449  	return nil
  1450  }
  1451  func (m *ChunkedReadResponse) Unmarshal(dAtA []byte) error {
  1452  	l := len(dAtA)
  1453  	iNdEx := 0
  1454  	for iNdEx < l {
  1455  		preIndex := iNdEx
  1456  		var wire uint64
  1457  		for shift := uint(0); ; shift += 7 {
  1458  			if shift >= 64 {
  1459  				return ErrIntOverflowRemote
  1460  			}
  1461  			if iNdEx >= l {
  1462  				return io.ErrUnexpectedEOF
  1463  			}
  1464  			b := dAtA[iNdEx]
  1465  			iNdEx++
  1466  			wire |= uint64(b&0x7F) << shift
  1467  			if b < 0x80 {
  1468  				break
  1469  			}
  1470  		}
  1471  		fieldNum := int32(wire >> 3)
  1472  		wireType := int(wire & 0x7)
  1473  		if wireType == 4 {
  1474  			return fmt.Errorf("proto: ChunkedReadResponse: wiretype end group for non-group")
  1475  		}
  1476  		if fieldNum <= 0 {
  1477  			return fmt.Errorf("proto: ChunkedReadResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1478  		}
  1479  		switch fieldNum {
  1480  		case 1:
  1481  			if wireType != 2 {
  1482  				return fmt.Errorf("proto: wrong wireType = %d for field ChunkedSeries", wireType)
  1483  			}
  1484  			var msglen int
  1485  			for shift := uint(0); ; shift += 7 {
  1486  				if shift >= 64 {
  1487  					return ErrIntOverflowRemote
  1488  				}
  1489  				if iNdEx >= l {
  1490  					return io.ErrUnexpectedEOF
  1491  				}
  1492  				b := dAtA[iNdEx]
  1493  				iNdEx++
  1494  				msglen |= int(b&0x7F) << shift
  1495  				if b < 0x80 {
  1496  					break
  1497  				}
  1498  			}
  1499  			if msglen < 0 {
  1500  				return ErrInvalidLengthRemote
  1501  			}
  1502  			postIndex := iNdEx + msglen
  1503  			if postIndex < 0 {
  1504  				return ErrInvalidLengthRemote
  1505  			}
  1506  			if postIndex > l {
  1507  				return io.ErrUnexpectedEOF
  1508  			}
  1509  			m.ChunkedSeries = append(m.ChunkedSeries, &ChunkedSeries{})
  1510  			if err := m.ChunkedSeries[len(m.ChunkedSeries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1511  				return err
  1512  			}
  1513  			iNdEx = postIndex
  1514  		case 2:
  1515  			if wireType != 0 {
  1516  				return fmt.Errorf("proto: wrong wireType = %d for field QueryIndex", wireType)
  1517  			}
  1518  			m.QueryIndex = 0
  1519  			for shift := uint(0); ; shift += 7 {
  1520  				if shift >= 64 {
  1521  					return ErrIntOverflowRemote
  1522  				}
  1523  				if iNdEx >= l {
  1524  					return io.ErrUnexpectedEOF
  1525  				}
  1526  				b := dAtA[iNdEx]
  1527  				iNdEx++
  1528  				m.QueryIndex |= int64(b&0x7F) << shift
  1529  				if b < 0x80 {
  1530  					break
  1531  				}
  1532  			}
  1533  		default:
  1534  			iNdEx = preIndex
  1535  			skippy, err := skipRemote(dAtA[iNdEx:])
  1536  			if err != nil {
  1537  				return err
  1538  			}
  1539  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1540  				return ErrInvalidLengthRemote
  1541  			}
  1542  			if (iNdEx + skippy) > l {
  1543  				return io.ErrUnexpectedEOF
  1544  			}
  1545  			iNdEx += skippy
  1546  		}
  1547  	}
  1548  
  1549  	if iNdEx > l {
  1550  		return io.ErrUnexpectedEOF
  1551  	}
  1552  	return nil
  1553  }
  1554  func skipRemote(dAtA []byte) (n int, err error) {
  1555  	l := len(dAtA)
  1556  	iNdEx := 0
  1557  	depth := 0
  1558  	for iNdEx < l {
  1559  		var wire uint64
  1560  		for shift := uint(0); ; shift += 7 {
  1561  			if shift >= 64 {
  1562  				return 0, ErrIntOverflowRemote
  1563  			}
  1564  			if iNdEx >= l {
  1565  				return 0, io.ErrUnexpectedEOF
  1566  			}
  1567  			b := dAtA[iNdEx]
  1568  			iNdEx++
  1569  			wire |= (uint64(b) & 0x7F) << shift
  1570  			if b < 0x80 {
  1571  				break
  1572  			}
  1573  		}
  1574  		wireType := int(wire & 0x7)
  1575  		switch wireType {
  1576  		case 0:
  1577  			for shift := uint(0); ; shift += 7 {
  1578  				if shift >= 64 {
  1579  					return 0, ErrIntOverflowRemote
  1580  				}
  1581  				if iNdEx >= l {
  1582  					return 0, io.ErrUnexpectedEOF
  1583  				}
  1584  				iNdEx++
  1585  				if dAtA[iNdEx-1] < 0x80 {
  1586  					break
  1587  				}
  1588  			}
  1589  		case 1:
  1590  			iNdEx += 8
  1591  		case 2:
  1592  			var length int
  1593  			for shift := uint(0); ; shift += 7 {
  1594  				if shift >= 64 {
  1595  					return 0, ErrIntOverflowRemote
  1596  				}
  1597  				if iNdEx >= l {
  1598  					return 0, io.ErrUnexpectedEOF
  1599  				}
  1600  				b := dAtA[iNdEx]
  1601  				iNdEx++
  1602  				length |= (int(b) & 0x7F) << shift
  1603  				if b < 0x80 {
  1604  					break
  1605  				}
  1606  			}
  1607  			if length < 0 {
  1608  				return 0, ErrInvalidLengthRemote
  1609  			}
  1610  			iNdEx += length
  1611  		case 3:
  1612  			depth++
  1613  		case 4:
  1614  			if depth == 0 {
  1615  				return 0, ErrUnexpectedEndOfGroupRemote
  1616  			}
  1617  			depth--
  1618  		case 5:
  1619  			iNdEx += 4
  1620  		default:
  1621  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1622  		}
  1623  		if iNdEx < 0 {
  1624  			return 0, ErrInvalidLengthRemote
  1625  		}
  1626  		if depth == 0 {
  1627  			return iNdEx, nil
  1628  		}
  1629  	}
  1630  	return 0, io.ErrUnexpectedEOF
  1631  }
  1632  
  1633  var (
  1634  	ErrInvalidLengthRemote        = fmt.Errorf("proto: negative length found during unmarshaling")
  1635  	ErrIntOverflowRemote          = fmt.Errorf("proto: integer overflow")
  1636  	ErrUnexpectedEndOfGroupRemote = fmt.Errorf("proto: unexpected end of group")
  1637  )