diff --git a/api/seqproxyapi/v1/seq_proxy_api.proto b/api/seqproxyapi/v1/seq_proxy_api.proto index c261ea36..fe1f8f7d 100644 --- a/api/seqproxyapi/v1/seq_proxy_api.proto +++ b/api/seqproxyapi/v1/seq_proxy_api.proto @@ -120,6 +120,13 @@ service SeqProxyApi { body: "*" }; } + + rpc StreamSearch(stream StreamSearchRequest) returns (stream StreamSearchResponse) { + option (google.api.http) = { + post: "/stream-search" + body: "*" + }; + } } // Custom error code, returned by seq-db proxy. @@ -436,3 +443,78 @@ message ExportAsyncSearchRequest { message ExportResponse { Document doc = 1; // Response document. } + +message StreamSearchRequest { + oneof RequestType { + StreamSearchQuery query = 1; + StreamControl control = 2; + } +} + +message StreamSearchQuery { + string query = 1; // Search query. + google.protobuf.Timestamp from = 2; // Lower bound for search (inclusive). + google.protobuf.Timestamp to = 3; // Upper bound for search (inclusive). + bool explain = 4; // Should request be explained (tracing will be provided with the result). + string offset_id = 5; // ID offset for pagination. + bool with_total = 6; // Should total number of documents be returned in response. +} + +message StreamControl { + ControlAction action = 1; +} + +enum ControlAction { + CONTROL_ACTION_UNSPECIFIED = 0; + FINALIZE = 1; // Indicates correct stream termination, will get Summary after + CANCEL = 2; // Some client error, termination stream immediately, no need for Summary +} + +message StreamSearchResponse { + oneof ResponseType { + ResponseHeader header = 1; + ResponseData data = 2; + ResponseSummary summary = 3; + } +} + +message ResponseHeader { + repeated Typing typing = 1; +} + +message Typing { + string title = 1; + DataType type = 2; +} + +enum DataType { + BYTES = 0; + SEQ_ID = 1; + RAW_DOCUMENT = 2; + STRING = 3; + UINT32 = 4; + UINT64 = 5; + INT32 = 6; + INT64 = 7; + FLOAT64 = 8; + // TODO: later we will need array data types, such as: + // StringArray, Uin64Array, Float64Array etc. +} + +message ResponseData { + RecordsBatch batch = 1; +} + +message RecordsBatch { + repeated Record records = 1; +} + +message Record { + repeated bytes raw_data = 1; +} + +message ResponseSummary { + uint64 total = 1; + Error error = 2; + optional ExplainEntry explain = 3; +} diff --git a/asyncsearcher/async_searcher.go b/asyncsearcher/async_searcher.go index 05a70437..21d69260 100644 --- a/asyncsearcher/async_searcher.go +++ b/asyncsearcher/async_searcher.go @@ -228,6 +228,9 @@ func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest, fracProvider fraction if err != nil { return err } + if err := ast.ValidatePipes(); err != nil { + return err + } r.Params.AST = ast.Root now := timeNow() @@ -346,6 +349,9 @@ func (as *AsyncSearcher) doSearch(id string, fracProvider fractionAcquirer) { if err != nil { panic(fmt.Errorf("BUG: search query must be valid: %s", err)) } + if err := ast.ValidatePipes(); err != nil { + panic(fmt.Errorf("BUG: search query must be valid: %s", err)) + } info.Request.Params.AST = ast.Root } diff --git a/parser/seqql.go b/parser/seqql.go index 9af8d08f..a739a1f1 100644 --- a/parser/seqql.go +++ b/parser/seqql.go @@ -25,6 +25,27 @@ func (q *SeqQLQuery) SeqQLString() string { return b.String() } +// streamOnlyPipes are the pipes valid only for the StreamSearch method. Non-stream +// callers reject them via SeqQLQuery.ValidatePipes. +var streamOnlyPipes = map[string]struct{}{ + "stats": {}, + "sort": {}, + "limit": {}, + "offset": {}, +} + +// ValidatePipes returns an error if the query contains any stream-only pipe (stats, +// sort, limit, offset). It is used by methods that do not support stream-only pipes +// to reject them after parsing. ParseSeqQL itself does not perform this check. +func (q *SeqQLQuery) ValidatePipes() error { + for _, p := range q.Pipes { + if _, ok := streamOnlyPipes[p.Name()]; ok { + return fmt.Errorf("pipe '%s' is not allowed", p.Name()) + } + } + return nil +} + func parse(q string, mapping seq.Mapping) (SeqQLQuery, error) { lex := newLexer(q) diff --git a/parser/seqql_filter_test.go b/parser/seqql_filter_test.go index 64902186..6b1b6cc7 100644 --- a/parser/seqql_filter_test.go +++ b/parser/seqql_filter_test.go @@ -403,7 +403,10 @@ func TestParseSeqQLError(t *testing.T) { // Test pipes. test(`message:--||`, `unknown pipe: |`) test(`source_type:access* | fields message | fields except login:admin`, `parsing 'fields' pipe: unexpected symbol ":"`) - test(`source_type:access* | fields message | fields login`, `multiple field filters is not allowed`) + test(`source_type:access* | stats count by (service) | stats count by (login)`, `multiple 'stats' pipes are not allowed`) + test(`source_type:access* | sort asc | sort desc`, `multiple 'sort' pipes are not allowed`) + test(`source_type:access* | limit 10 | limit 20`, `multiple 'limit' pipes are not allowed`) + test(`source_type:access* | offset 10 | offset 20`, `multiple 'offset' pipes are not allowed`) test(`* | fields event, `, `parsing 'fields' pipe: trailing comma not allowed`) } diff --git a/parser/seqql_pipes.go b/parser/seqql_pipes.go index 6e005472..17ae849d 100644 --- a/parser/seqql_pipes.go +++ b/parser/seqql_pipes.go @@ -11,9 +11,33 @@ type Pipe interface { DumpSeqQL(*strings.Builder) } +// pipeOrder defines the allowed order of pipes in a SeqQL query: +// stats | fields | sort | limit | offset. Any pipe may be omitted, but the +// present ones must appear in this exact sequence. The value is the position of +// the pipe in that sequence. +var pipeOrder = map[string]int{ + "stats": 0, + "fields": 1, + "sort": 2, + "limit": 3, + "offset": 4, +} + +var pipeNameFromOrder = map[int]string{ + 0: "stats", + 1: "fields", + 2: "sort", + 3: "limit", + 4: "offset", +} + +// parsePipes parses the pipe stage of a SeqQL query. The pipes must appear in +// the fixed order stats | fields | sort | limit | offset; pipes may be omitted, +// but none may appear out of order. func parsePipes(lex *lexer) ([]Pipe, error) { - // Counter of 'fields' pipes. - fieldFilters := 0 + seen := make(map[string]struct{}) + lastOrder := -1 + var pipes []Pipe for !lex.IsEnd() { if !lex.IsKeyword("|") { @@ -21,22 +45,59 @@ func parsePipes(lex *lexer) ([]Pipe, error) { } lex.Next() + var name string + switch { case lex.IsKeyword("fields"): + name = "fields" p, err := parsePipeFields(lex) if err != nil { return nil, fmt.Errorf("parsing 'fields' pipe: %s", err) } pipes = append(pipes, p) - fieldFilters++ + case lex.IsKeyword("stats"): + name = "stats" + p, err := parsePipeStats(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'stats' pipe: %s", err) + } + pipes = append(pipes, p) + case lex.IsKeyword("sort"): + name = "sort" + p, err := parsePipeSort(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'sort' pipe: %s", err) + } + pipes = append(pipes, p) + case lex.IsKeyword("limit"): + name = "limit" + p, err := parsePipeLimit(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'limit' pipe: %s", err) + } + pipes = append(pipes, p) + case lex.IsKeyword("offset"): + name = "offset" + p, err := parsePipeOffset(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'offset' pipe: %s", err) + } + pipes = append(pipes, p) default: return nil, fmt.Errorf("unknown pipe: %s", lex.Token) } - if fieldFilters > 1 { - return nil, fmt.Errorf("multiple field filters is not allowed") + if _, ok := seen[name]; ok { + return nil, fmt.Errorf("multiple '%s' pipes are not allowed", name) + } + if order := pipeOrder[name]; order <= lastOrder { + return nil, fmt.Errorf("pipe '%s' must come before '%s'", pipeNameFromOrder[lastOrder], name) } + + seen[name] = struct{}{} + lastOrder = pipeOrder[name] } + return pipes, nil } @@ -62,6 +123,50 @@ func (f *PipeFields) DumpSeqQL(o *strings.Builder) { } } +type StatsAgg struct { + Func string + Field string + GroupBy string + Interval string + Quantiles []float64 +} + +type PipeStats struct { + Aggs []StatsAgg +} + +func (p *PipeStats) Name() string { + return "stats" +} + +func (p *PipeStats) DumpSeqQL(o *strings.Builder) { + o.WriteString("stats ") + for i, agg := range p.Aggs { + if i > 0 { + o.WriteString(", ") + } + o.WriteString(agg.Func) + if agg.Field != "" { + o.WriteString("(") + o.WriteString(quoteTokenIfNeeded(agg.Field)) + for _, q := range agg.Quantiles { + fmt.Fprintf(o, ", %v", q) + } + o.WriteString(")") + } + if agg.GroupBy != "" { + o.WriteString(" by (") + o.WriteString(quoteTokenIfNeeded(agg.GroupBy)) + o.WriteString(")") + } + if agg.Interval != "" { + o.WriteString(" interval(") + o.WriteString(agg.Interval) + o.WriteString(")") + } + } +} + func parsePipeFields(lex *lexer) (*PipeFields, error) { if !lex.IsKeyword("fields") { return nil, fmt.Errorf("missing 'fields' keyword") @@ -85,6 +190,222 @@ func parsePipeFields(lex *lexer) (*PipeFields, error) { }, nil } +func parsePipeStats(lex *lexer) (*PipeStats, error) { + if !lex.IsKeyword("stats") { + return nil, fmt.Errorf("missing 'stats' keyword") + } + lex.Next() + + var aggs []StatsAgg + for { + agg, err := parseStatsAgg(lex) + if err != nil { + return nil, err + } + aggs = append(aggs, agg) + + if !lex.IsKeyword(",") { + break + } + lex.Next() + } + + if len(aggs) == 0 { + return nil, fmt.Errorf("at least one aggregation is required") + } + + return &PipeStats{Aggs: aggs}, nil +} + +type PipeLimit struct { + Limit int +} + +func (l *PipeLimit) Name() string { + return "limit" +} + +func (l *PipeLimit) DumpSeqQL(o *strings.Builder) { + o.WriteString("limit ") + o.WriteString(strconv.Itoa(l.Limit)) +} + +func parsePipeLimit(lex *lexer) (*PipeLimit, error) { + if !lex.IsKeyword("limit") { + return nil, fmt.Errorf("missing 'limit' keyword") + } + lex.Next() + + limitStr := lex.Token + if limitStr == "" { + return nil, fmt.Errorf("missing limit value") + } + + limit, err := strconv.Atoi(limitStr) + if err != nil { + return nil, fmt.Errorf("invalid limit value: %s", limitStr) + } + + if limit <= 0 { + return nil, fmt.Errorf("limit must be greater than 0, got %d", limit) + } + + lex.Next() + + return &PipeLimit{Limit: limit}, nil +} + +type PipeOffset struct { + Offset int +} + +func (l *PipeOffset) Name() string { + return "offset" +} + +func (l *PipeOffset) DumpSeqQL(o *strings.Builder) { + o.WriteString("offset ") + o.WriteString(strconv.Itoa(l.Offset)) +} + +func parsePipeOffset(lex *lexer) (*PipeOffset, error) { + if !lex.IsKeyword("offset") { + return nil, fmt.Errorf("missing 'offset' keyword") + } + lex.Next() + + offsetStr := lex.Token + if offsetStr == "" { + return nil, fmt.Errorf("missing offset value") + } + + offset, err := strconv.Atoi(offsetStr) + if err != nil { + return nil, fmt.Errorf("invalid offset value: %s", offsetStr) + } + + if offset <= 0 { + return nil, fmt.Errorf("offset must be greater than 0, got %d", offset) + } + + lex.Next() + + return &PipeOffset{Offset: offset}, nil +} + +type PipeSort struct { + Order string +} + +func (s *PipeSort) Name() string { + return "sort" +} + +func (s *PipeSort) DumpSeqQL(o *strings.Builder) { + o.WriteString("sort ") + o.WriteString(s.Order) +} + +func parsePipeSort(lex *lexer) (*PipeSort, error) { + if !lex.IsKeyword("sort") { + return nil, fmt.Errorf("missing 'sort' keyword") + } + lex.Next() + + if !lex.IsKeywords("asc", "desc") { + return nil, fmt.Errorf("expected `asc` or `desc` order") + } + + order := lex.Token + lex.Next() + + return &PipeSort{ + Order: order, + }, nil +} + +func parseStatsAgg(lex *lexer) (StatsAgg, error) { + var agg StatsAgg + + if !lex.IsKeywords("count", "sum", "min", "max", "avg", "quantile", "unique", "unique_count") { + return agg, fmt.Errorf("expected aggregation function (count, sum, min, max, avg, quantile, unique, unique_count), got %s", lex.Token) + } + agg.Func = strings.ToLower(lex.Token) + lex.Next() + + if lex.IsKeyword("(") { + lex.Next() + field, err := parseCompositeTokenReplaceWildcards(lex) + if err != nil { + return agg, err + } + agg.Field = field + + for lex.IsKeyword(",") { + lex.Next() + q, err := parseNumber(lex) + if err != nil { + return agg, fmt.Errorf("failed to parse quantile: %w", err) + } + agg.Quantiles = append(agg.Quantiles, q) + } + + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after field, got %s", lex.Token) + } + lex.Next() + } + + if lex.IsKeyword("by") { + lex.Next() + if !lex.IsKeyword("(") { + return agg, fmt.Errorf("expected '(' after 'by', got %s", lex.Token) + } + lex.Next() + groupBy, err := parseCompositeTokenReplaceWildcards(lex) + if err != nil { + return agg, err + } + agg.GroupBy = groupBy + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after groupBy, got %s", lex.Token) + } + lex.Next() + } + + if lex.IsKeyword("interval") { + lex.Next() + if !lex.IsKeyword("(") { + return agg, fmt.Errorf("expected '(' after 'interval', got %s", lex.Token) + } + lex.Next() + interval := lex.Token + if interval == "" { + return agg, fmt.Errorf("expected interval value, got %s", lex.Token) + } + agg.Interval = interval + lex.Next() + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after interval, got %s", lex.Token) + } + lex.Next() + } + + return agg, nil +} + +func parseNumber(lex *lexer) (float64, error) { + if lex.Token == "" { + return 0, fmt.Errorf("expected number, got empty token") + } + q, err := strconv.ParseFloat(lex.Token, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse number %s: %w", lex.Token, err) + } + lex.Next() + return q, nil +} + func parseFieldList(lex *lexer) ([]string, error) { var fields []string trailingComma := false @@ -149,7 +470,7 @@ var reservedKeywords = uniqueTokens([]string{ "|", // Pipe specific keywords. - "fields", "except", + "fields", "except", "limit", "offset", "sort", "stats", "by", "interval", "unique_count", "asc", "desc", }) func needQuoteToken(s string) bool { diff --git a/parser/seqql_pipes_test.go b/parser/seqql_pipes_test.go index 2313b20d..2d92f273 100644 --- a/parser/seqql_pipes_test.go +++ b/parser/seqql_pipes_test.go @@ -38,3 +38,178 @@ func TestParsePipeFieldsExcept(t *testing.T) { test(`* | fields except "_\\message*"`, `* | fields except "_\\message\*"`) test(`* | fields except k8s_namespace`, `* | fields except k8s_namespace`) } + +func TestParsePipeStats(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats count by (service)", "service:my-service | stats count by (service)") + test("service:my-service | stats sum(level) by (service)", "service:my-service | stats sum(level) by (service)") + test("service:my-service | stats count by (service) interval(1m)", "service:my-service | stats count by (service) interval(1m)") + test("service:my-service | stats min(response_time) by (service)", "service:my-service | stats min(response_time) by (service)") + test("service:my-service | stats max(response_time) by (service)", "service:my-service | stats max(response_time) by (service)") + test("service:my-service | stats avg(response_time) by (service)", "service:my-service | stats avg(response_time) by (service)") + test("service:my-service | stats unique by (service)", "service:my-service | stats unique by (service)") + test("service:my-service | stats unique_count by (service)", "service:my-service | stats unique_count by (service)") +} + +func TestParsePipeStatsMultiple(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats count by (service), sum(level) by (service)", "service:my-service | stats count by (service), sum(level) by (service)") + test("service:my-service | stats count by (service) interval(1m), sum(level) by (service) interval(1m)", "service:my-service | stats count by (service) interval(1m), sum(level) by (service) interval(1m)") +} + +func TestParsePipeStatsQuantile(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats quantile(response_time, 0.5, 0.95) by (service)", "service:my-service | stats quantile(response_time, 0.5, 0.95) by (service)") +} + +func TestParsePipeSort(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my_service | sort asc", "service:my_service | sort asc") + test("service:my_service | sort desc", "service:my_service | sort desc") +} + +func TestParsePipeSortErrors(t *testing.T) { + test := func(q string) { + t.Helper() + _, err := ParseSeqQL(q, nil) + require.Error(t, err) + } + + test(`service:my_service | sort invalid_order`) + test(`service:my_service | sort asc | sort desc`) + test("service:my_service | sort") +} + +func TestParsePipeLimit(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my_service | limit 10", "service:my_service | limit 10") + test("service:my_service | limit 100", "service:my_service | limit 100") + test("service:my_service | limit 100 | offset 100", "service:my_service | limit 100 | offset 100") +} + +func TestParsePipeLimitErrors(t *testing.T) { + test := func(q string) { + t.Helper() + _, err := ParseSeqQL(q, nil) + require.Error(t, err) + } + + test(`service:my_service | limit`) + test(`service:my_service | limit abc`) + test(`service:my_service | limit 0`) + test(`service:my_service | limit -1`) + test(`service:my_service | limit 10 | limit 20`) +} + +func TestParsePipeOffset(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my_service | offset 10", "service:my_service | offset 10") + test("service:my_service | offset 100", "service:my_service | offset 100") + test("service:my_service | limit 100 | offset 100", "service:my_service | limit 100 | offset 100") +} + +func TestParsePipeOffsetErrors(t *testing.T) { + test := func(q string) { + t.Helper() + _, err := ParseSeqQL(q, nil) + require.Error(t, err) + } + + test(`service:my_service | offset`) + test(`service:my_service | offset abc`) + test(`service:my_service | offset 0`) + test(`service:my_service | offset -1`) + test(`service:my_service | offset 10 | offset 20`) +} + +// Stream-only pipes are parsed by ParseSeqQL but must be rejected by methods that +// do not support them via ValidatePipes(). +func TestParseSeqQLRejectsStreamPipes(t *testing.T) { + test := func(q string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Error(t, query.ValidatePipes()) + } + + test(`service:my_service | stats count by (service)`) + test(`service:my_service | sort asc`) + test(`service:my_service | limit 10`) + test(`service:my_service | offset 10`) +} + +func TestValidatePipesAllowsFields(t *testing.T) { + t.Parallel() + query, err := ParseSeqQL(`service:my_service | fields message, level`, nil) + require.NoError(t, err) + require.NoError(t, query.ValidatePipes()) +} + +func TestParsePipeOrder(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test( + "service:my_service | stats count by (service) | fields message | sort asc | limit 10 | offset 5", + "service:my_service | stats count by (service) | fields message | sort asc | limit 10 | offset 5", + ) + test("service:my_service | stats count by (service) | limit 10", "service:my_service | stats count by (service) | limit 10") + test("service:my_service | fields message | offset 5", "service:my_service | fields message | offset 5") + test("service:my_service | sort asc | limit 10", "service:my_service | sort asc | limit 10") + test("service:my_service | fields message | sort asc", "service:my_service | fields message | sort asc") +} + +func TestParsePipeOrderErrors(t *testing.T) { + test := func(q string) { + t.Helper() + _, err := ParseSeqQL(q, nil) + require.Error(t, err) + } + + test(`service:my_service | fields message | stats count by (service)`) + test(`service:my_service | sort asc | fields message`) + test(`service:my_service | limit 10 | sort asc`) + test(`service:my_service | offset 5 | limit 10`) + test(`service:my_service | offset 5 | sort asc | limit 10`) + test(`service:my_service | offset 5 | limit 10 | sort asc | fields message | stats count by (service)`) +} diff --git a/pkg/seqproxyapi/v1/marshaler.go b/pkg/seqproxyapi/v1/marshaler.go index ebb34c9c..4a8910d6 100644 --- a/pkg/seqproxyapi/v1/marshaler.go +++ b/pkg/seqproxyapi/v1/marshaler.go @@ -2,6 +2,7 @@ package seqproxyapi import ( "bytes" + "encoding/binary" "encoding/json" "math" "strconv" @@ -258,3 +259,54 @@ func (r *FetchAsyncSearchResultResponse) MarshalJSON() ([]byte, error) { func (i *AsyncSearchesListItem) MarshalJSON() ([]byte, error) { return pbMarshaller.Marshal(i) } + +// streamSearchDocColumns is the number of columns carried by a document record +// produced by StreamSearch: id (SEQ_ID), time (UINT64), data (RAW_DOCUMENT). +const streamSearchDocColumns = 3 + +// streamSearchAggColumns is the number of columns carried by an aggregation +// bucket record produced by StreamSearch: key (STRING), value (FLOAT64). +const streamSearchAggColumns = 2 + +// MarshalJSON formats a StreamSearch record into a human-readable JSON array. +// +// The record layout is fixed by the proxy StreamSearch implementation and is +// distinguished by the number of raw_data cells: +// - documents (3 cells): [id, time(nanoseconds, big-endian uint64), data] +// where data is inlined as a json.RawMessage and time is rendered as an +// RFC3339Nano string; +// - aggregation buckets (2 cells): [key, value(big-endian float64)]. +// +// For any other layout the raw cells are emitted as-is (base64 for bytes). +func (r *Record) MarshalJSON() ([]byte, error) { + cells := r.GetRawData() + switch len(cells) { + case streamSearchDocColumns: + // cells[1] is a big-endian uint64 storing the document MID (nanoseconds). + var ts time.Time + if len(cells[1]) == 8 { + ts = time.Unix(0, int64(binary.BigEndian.Uint64(cells[1]))).UTC() + } + return json.Marshal([]any{ + string(cells[0]), // id + ts.Format(time.RFC3339Nano), + json.RawMessage(cells[2]), // data, inlined as JSON + }) + case streamSearchAggColumns: + // cells[1] is a big-endian float64 storing the aggregation value. + var value float64 + if len(cells[1]) == 8 { + value = math.Float64frombits(binary.BigEndian.Uint64(cells[1])) + } + val := json.RawMessage(strconv.FormatFloat(value, 'f', -1, 64)) + if math.IsNaN(value) || math.IsInf(value, 0) { + val = json.RawMessage(strconv.Quote(string(val))) + } + return json.Marshal([]any{ + string(cells[0]), // key + val, // value + }) + default: + return json.Marshal(cells) + } +} diff --git a/pkg/seqproxyapi/v1/marshaler_test.go b/pkg/seqproxyapi/v1/marshaler_test.go index 08d27462..fc6f9217 100644 --- a/pkg/seqproxyapi/v1/marshaler_test.go +++ b/pkg/seqproxyapi/v1/marshaler_test.go @@ -1,6 +1,7 @@ package seqproxyapi import ( + "encoding/binary" "encoding/json" "math" "testing" @@ -145,3 +146,64 @@ func TestFetchAsyncSearchResultResponseMarshalJSON(t *testing.T) { `{"status":"AsyncSearchStatusCanceled","request":{"retention":"3600s","query":{"query":"message:some_message","from":"2025-07-01T05:20:00Z","to":"2025-08-01T05:20:00Z","explain":false,"downsample":0},"aggs":[],"withDocs":true,"size":"100"},"response":{"docs":[{"id":"46e48be997010000-e70163d0fa7582e4","data":{"message":"some_message","level":3},"time":"2025-07-08T10:19:08.742Z"}],"hist":{}},"progress":1,"disk_usage":"488","started_at":"2025-07-25T12:25:57.672Z","expires_at":"2025-07-25T13:25:57.672Z","canceled_at":"2025-07-25T12:34:26.577Z"}`, ) } + +func TestRecordMarshalJSON(t *testing.T) { + r := require.New(t) + + t.Run("documents", func(t *testing.T) { + ns := time.Date(2025, 7, 8, 10, 19, 8, 742000000, time.UTC).UnixNano() + timeBuf := make([]byte, 8) + binary.BigEndian.PutUint64(timeBuf, uint64(ns)) + + rec := &Record{RawData: [][]byte{ + []byte("46e48be997010000-e70163d0fa7582e4"), + timeBuf, + []byte(`{"message":"some_message","level":3}`), + }} + + raw, err := json.Marshal(rec) + r.NoError(err) + r.Equal( + `["46e48be997010000-e70163d0fa7582e4","2025-07-08T10:19:08.742Z",{"message":"some_message","level":3}]`, + string(raw), + ) + }) + + t.Run("aggregation buckets", func(t *testing.T) { + valueBuf := make([]byte, 8) + binary.BigEndian.PutUint64(valueBuf, math.Float64bits(42.5)) + + rec := &Record{RawData: [][]byte{ + []byte("service-a"), + valueBuf, + }} + + raw, err := json.Marshal(rec) + r.NoError(err) + r.Equal(`["service-a",42.5]`, string(raw)) + }) + + t.Run("aggregation bucket with NaN", func(t *testing.T) { + valueBuf := make([]byte, 8) + binary.BigEndian.PutUint64(valueBuf, math.Float64bits(math.NaN())) + + rec := &Record{RawData: [][]byte{ + []byte("service-a"), + valueBuf, + }} + + raw, err := json.Marshal(rec) + r.NoError(err) + r.Equal(`["service-a","NaN"]`, string(raw)) + }) + + t.Run("unknown layout falls back to raw bytes", func(t *testing.T) { + rec := &Record{RawData: [][]byte{[]byte("only"), []byte("two"), []byte("three"), []byte("four")}} + raw, err := json.Marshal(rec) + r.NoError(err) + // encoding/json marshals [][]byte as an array of base64 strings. + var decoded [][]byte + r.NoError(json.Unmarshal(raw, &decoded)) + r.Equal(rec.RawData, decoded) + }) +} diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go index f96268ec..904790ab 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.5 -// protoc v5.29.3 +// protoc v7.35.1 // source: seqproxyapi/v1/seq_proxy_api.proto package seqproxyapi @@ -247,6 +247,122 @@ func (AsyncSearchStatus) EnumDescriptor() ([]byte, []int) { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{3} } +type ControlAction int32 + +const ( + ControlAction_CONTROL_ACTION_UNSPECIFIED ControlAction = 0 + ControlAction_FINALIZE ControlAction = 1 // Indicates correct stream termination, will get Summary after + ControlAction_CANCEL ControlAction = 2 // Some client error, termination stream immediately, no need for Summary +) + +// Enum value maps for ControlAction. +var ( + ControlAction_name = map[int32]string{ + 0: "CONTROL_ACTION_UNSPECIFIED", + 1: "FINALIZE", + 2: "CANCEL", + } + ControlAction_value = map[string]int32{ + "CONTROL_ACTION_UNSPECIFIED": 0, + "FINALIZE": 1, + "CANCEL": 2, + } +) + +func (x ControlAction) Enum() *ControlAction { + p := new(ControlAction) + *p = x + return p +} + +func (x ControlAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ControlAction) Descriptor() protoreflect.EnumDescriptor { + return file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[4].Descriptor() +} + +func (ControlAction) Type() protoreflect.EnumType { + return &file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[4] +} + +func (x ControlAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ControlAction.Descriptor instead. +func (ControlAction) EnumDescriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{4} +} + +type DataType int32 + +const ( + DataType_BYTES DataType = 0 + DataType_SEQ_ID DataType = 1 + DataType_RAW_DOCUMENT DataType = 2 + DataType_STRING DataType = 3 + DataType_UINT32 DataType = 4 + DataType_UINT64 DataType = 5 + DataType_INT32 DataType = 6 + DataType_INT64 DataType = 7 + DataType_FLOAT64 DataType = 8 +) + +// Enum value maps for DataType. +var ( + DataType_name = map[int32]string{ + 0: "BYTES", + 1: "SEQ_ID", + 2: "RAW_DOCUMENT", + 3: "STRING", + 4: "UINT32", + 5: "UINT64", + 6: "INT32", + 7: "INT64", + 8: "FLOAT64", + } + DataType_value = map[string]int32{ + "BYTES": 0, + "SEQ_ID": 1, + "RAW_DOCUMENT": 2, + "STRING": 3, + "UINT32": 4, + "UINT64": 5, + "INT32": 6, + "INT64": 7, + "FLOAT64": 8, + } +) + +func (x DataType) Enum() *DataType { + p := new(DataType) + *p = x + return p +} + +func (x DataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataType) Descriptor() protoreflect.EnumDescriptor { + return file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[5].Descriptor() +} + +func (DataType) Type() protoreflect.EnumType { + return &file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[5] +} + +func (x DataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataType.Descriptor instead. +func (DataType) EnumDescriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{5} +} + // Additional details provided if an error during request handling occurred. type Error struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2521,6 +2637,602 @@ func (x *ExportResponse) GetDoc() *Document { return nil } +type StreamSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to RequestType: + // + // *StreamSearchRequest_Query + // *StreamSearchRequest_Control + RequestType isStreamSearchRequest_RequestType `protobuf_oneof:"RequestType"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamSearchRequest) Reset() { + *x = StreamSearchRequest{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSearchRequest) ProtoMessage() {} + +func (x *StreamSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSearchRequest.ProtoReflect.Descriptor instead. +func (*StreamSearchRequest) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{37} +} + +func (x *StreamSearchRequest) GetRequestType() isStreamSearchRequest_RequestType { + if x != nil { + return x.RequestType + } + return nil +} + +func (x *StreamSearchRequest) GetQuery() *StreamSearchQuery { + if x != nil { + if x, ok := x.RequestType.(*StreamSearchRequest_Query); ok { + return x.Query + } + } + return nil +} + +func (x *StreamSearchRequest) GetControl() *StreamControl { + if x != nil { + if x, ok := x.RequestType.(*StreamSearchRequest_Control); ok { + return x.Control + } + } + return nil +} + +type isStreamSearchRequest_RequestType interface { + isStreamSearchRequest_RequestType() +} + +type StreamSearchRequest_Query struct { + Query *StreamSearchQuery `protobuf:"bytes,1,opt,name=query,proto3,oneof"` +} + +type StreamSearchRequest_Control struct { + Control *StreamControl `protobuf:"bytes,2,opt,name=control,proto3,oneof"` +} + +func (*StreamSearchRequest_Query) isStreamSearchRequest_RequestType() {} + +func (*StreamSearchRequest_Control) isStreamSearchRequest_RequestType() {} + +type StreamSearchQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // Search query. + From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // Lower bound for search (inclusive). + To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // Upper bound for search (inclusive). + Explain bool `protobuf:"varint,4,opt,name=explain,proto3" json:"explain,omitempty"` // Should request be explained (tracing will be provided with the result). + OffsetId string `protobuf:"bytes,5,opt,name=offset_id,json=offsetId,proto3" json:"offset_id,omitempty"` // ID offset for pagination. + WithTotal bool `protobuf:"varint,6,opt,name=with_total,json=withTotal,proto3" json:"with_total,omitempty"` // Should total number of documents be returned in response. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamSearchQuery) Reset() { + *x = StreamSearchQuery{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamSearchQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSearchQuery) ProtoMessage() {} + +func (x *StreamSearchQuery) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSearchQuery.ProtoReflect.Descriptor instead. +func (*StreamSearchQuery) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{38} +} + +func (x *StreamSearchQuery) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *StreamSearchQuery) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *StreamSearchQuery) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +func (x *StreamSearchQuery) GetExplain() bool { + if x != nil { + return x.Explain + } + return false +} + +func (x *StreamSearchQuery) GetOffsetId() string { + if x != nil { + return x.OffsetId + } + return "" +} + +func (x *StreamSearchQuery) GetWithTotal() bool { + if x != nil { + return x.WithTotal + } + return false +} + +type StreamControl struct { + state protoimpl.MessageState `protogen:"open.v1"` + Action ControlAction `protobuf:"varint,1,opt,name=action,proto3,enum=seqproxyapi.v1.ControlAction" json:"action,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamControl) Reset() { + *x = StreamControl{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamControl) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamControl) ProtoMessage() {} + +func (x *StreamControl) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamControl.ProtoReflect.Descriptor instead. +func (*StreamControl) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{39} +} + +func (x *StreamControl) GetAction() ControlAction { + if x != nil { + return x.Action + } + return ControlAction_CONTROL_ACTION_UNSPECIFIED +} + +type StreamSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ResponseType: + // + // *StreamSearchResponse_Header + // *StreamSearchResponse_Data + // *StreamSearchResponse_Summary + ResponseType isStreamSearchResponse_ResponseType `protobuf_oneof:"ResponseType"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StreamSearchResponse) Reset() { + *x = StreamSearchResponse{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StreamSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamSearchResponse) ProtoMessage() {} + +func (x *StreamSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamSearchResponse.ProtoReflect.Descriptor instead. +func (*StreamSearchResponse) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{40} +} + +func (x *StreamSearchResponse) GetResponseType() isStreamSearchResponse_ResponseType { + if x != nil { + return x.ResponseType + } + return nil +} + +func (x *StreamSearchResponse) GetHeader() *ResponseHeader { + if x != nil { + if x, ok := x.ResponseType.(*StreamSearchResponse_Header); ok { + return x.Header + } + } + return nil +} + +func (x *StreamSearchResponse) GetData() *ResponseData { + if x != nil { + if x, ok := x.ResponseType.(*StreamSearchResponse_Data); ok { + return x.Data + } + } + return nil +} + +func (x *StreamSearchResponse) GetSummary() *ResponseSummary { + if x != nil { + if x, ok := x.ResponseType.(*StreamSearchResponse_Summary); ok { + return x.Summary + } + } + return nil +} + +type isStreamSearchResponse_ResponseType interface { + isStreamSearchResponse_ResponseType() +} + +type StreamSearchResponse_Header struct { + Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type StreamSearchResponse_Data struct { + Data *ResponseData `protobuf:"bytes,2,opt,name=data,proto3,oneof"` +} + +type StreamSearchResponse_Summary struct { + Summary *ResponseSummary `protobuf:"bytes,3,opt,name=summary,proto3,oneof"` +} + +func (*StreamSearchResponse_Header) isStreamSearchResponse_ResponseType() {} + +func (*StreamSearchResponse_Data) isStreamSearchResponse_ResponseType() {} + +func (*StreamSearchResponse_Summary) isStreamSearchResponse_ResponseType() {} + +type ResponseHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + Typing []*Typing `protobuf:"bytes,1,rep,name=typing,proto3" json:"typing,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseHeader) Reset() { + *x = ResponseHeader{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseHeader) ProtoMessage() {} + +func (x *ResponseHeader) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead. +func (*ResponseHeader) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{41} +} + +func (x *ResponseHeader) GetTyping() []*Typing { + if x != nil { + return x.Typing + } + return nil +} + +type Typing struct { + state protoimpl.MessageState `protogen:"open.v1"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Type DataType `protobuf:"varint,2,opt,name=type,proto3,enum=seqproxyapi.v1.DataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Typing) Reset() { + *x = Typing{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Typing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Typing) ProtoMessage() {} + +func (x *Typing) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Typing.ProtoReflect.Descriptor instead. +func (*Typing) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{42} +} + +func (x *Typing) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Typing) GetType() DataType { + if x != nil { + return x.Type + } + return DataType_BYTES +} + +type ResponseData struct { + state protoimpl.MessageState `protogen:"open.v1"` + Batch *RecordsBatch `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseData) Reset() { + *x = ResponseData{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseData) ProtoMessage() {} + +func (x *ResponseData) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseData.ProtoReflect.Descriptor instead. +func (*ResponseData) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{43} +} + +func (x *ResponseData) GetBatch() *RecordsBatch { + if x != nil { + return x.Batch + } + return nil +} + +type RecordsBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordsBatch) Reset() { + *x = RecordsBatch{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordsBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordsBatch) ProtoMessage() {} + +func (x *RecordsBatch) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordsBatch.ProtoReflect.Descriptor instead. +func (*RecordsBatch) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{44} +} + +func (x *RecordsBatch) GetRecords() []*Record { + if x != nil { + return x.Records + } + return nil +} + +type Record struct { + state protoimpl.MessageState `protogen:"open.v1"` + RawData [][]byte `protobuf:"bytes,1,rep,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Record) Reset() { + *x = Record{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Record) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Record) ProtoMessage() {} + +func (x *Record) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Record.ProtoReflect.Descriptor instead. +func (*Record) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{45} +} + +func (x *Record) GetRawData() [][]byte { + if x != nil { + return x.RawData + } + return nil +} + +type ResponseSummary struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + Explain *ExplainEntry `protobuf:"bytes,3,opt,name=explain,proto3,oneof" json:"explain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResponseSummary) Reset() { + *x = ResponseSummary{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResponseSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseSummary) ProtoMessage() {} + +func (x *ResponseSummary) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseSummary.ProtoReflect.Descriptor instead. +func (*ResponseSummary) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{46} +} + +func (x *ResponseSummary) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *ResponseSummary) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + +func (x *ResponseSummary) GetExplain() *ExplainEntry { + if x != nil { + return x.Explain + } + return nil +} + // Key-value pair containing result of single aggregation. type Aggregation_Bucket struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2535,7 +3247,7 @@ type Aggregation_Bucket struct { func (x *Aggregation_Bucket) Reset() { *x = Aggregation_Bucket{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2547,7 +3259,7 @@ func (x *Aggregation_Bucket) String() string { func (*Aggregation_Bucket) ProtoMessage() {} func (x *Aggregation_Bucket) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2609,7 +3321,7 @@ type Histogram_Bucket struct { func (x *Histogram_Bucket) Reset() { *x = Histogram_Bucket{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2621,7 +3333,7 @@ func (x *Histogram_Bucket) String() string { func (*Histogram_Bucket) ProtoMessage() {} func (x *Histogram_Bucket) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2666,7 +3378,7 @@ type FetchRequest_FieldsFilter struct { func (x *FetchRequest_FieldsFilter) Reset() { *x = FetchRequest_FieldsFilter{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[39] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2678,7 +3390,7 @@ func (x *FetchRequest_FieldsFilter) String() string { func (*FetchRequest_FieldsFilter) ProtoMessage() {} func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[39] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3088,148 +3800,239 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x03, 0x64, 0x6f, 0x63, 0x2a, 0x82, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x10, - 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, - 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, - 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, - 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x53, 0x5f, 0x48, 0x49, 0x54, 0x10, 0x03, 0x2a, 0xac, 0x01, 0x0a, 0x07, 0x41, 0x67, - 0x67, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, - 0x43, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, - 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x41, - 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x10, 0x0a, - 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x03, 0x12, - 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x41, 0x56, 0x47, 0x10, - 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x51, 0x55, - 0x41, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, 0x5f, - 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, 0x06, 0x12, 0x19, 0x0a, - 0x15, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, - 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x07, 0x2a, 0x26, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, - 0x2a, 0x8a, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x73, 0x79, 0x6e, 0x63, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x6f, 0x6e, 0x65, - 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, - 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x9d, 0x0d, - 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, 0x5b, 0x0a, - 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, - 0x2a, 0x22, 0x07, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0d, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x2e, 0x73, 0x65, - 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, - 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2d, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x76, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, + 0x03, 0x64, 0x6f, 0x63, 0x22, 0x9a, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2e, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, + 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x22, + 0x46, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x12, 0x35, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, + 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x0e, 0x0a, 0x0c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x0e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, + 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x79, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x4c, 0x0a, + 0x06, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2c, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x05, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x65, 0x71, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, + 0x40, 0x0a, 0x0c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x30, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x22, 0x23, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, + 0x61, 0x77, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, + 0x61, 0x77, 0x44, 0x61, 0x74, 0x61, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3b, 0x0a, + 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x07, + 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x65, + 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2a, 0x82, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, + 0x4f, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, + 0x53, 0x45, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x48, 0x49, 0x54, 0x10, 0x03, 0x2a, 0xac, 0x01, 0x0a, 0x07, + 0x41, 0x67, 0x67, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x47, 0x47, 0x5f, 0x46, + 0x55, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, + 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x41, 0x58, 0x10, + 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x41, 0x56, + 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, + 0x51, 0x55, 0x41, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, + 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, 0x06, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, + 0x55, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x07, 0x2a, 0x26, 0x0a, 0x05, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x53, + 0x43, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x43, + 0x10, 0x01, 0x2a, 0x8a, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x6f, + 0x6e, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, + 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x2a, + 0x49, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x02, 0x2a, 0x7a, 0x0a, 0x08, 0x44, 0x61, + 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x51, 0x5f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x52, 0x41, 0x57, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, + 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, + 0x34, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x06, 0x12, 0x09, + 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, + 0x41, 0x54, 0x36, 0x34, 0x10, 0x08, 0x32, 0x97, 0x0e, 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, 0x5b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x71, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x76, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, - 0x22, 0x0a, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x2e, 0x73, - 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, - 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x54, - 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x66, 0x65, 0x74, - 0x63, 0x68, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, 0x71, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x68, 0x69, + 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x54, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x12, 0x1c, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, + 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0x5d, 0x0a, + 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0b, 0x12, 0x09, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, - 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, - 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, - 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, - 0x2a, 0x22, 0x07, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, - 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x71, + 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x30, 0x01, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, + 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, - 0x0f, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x12, 0x99, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x65, - 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x71, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x94, 0x01, 0x0a, - 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, + 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, + 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x94, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, 0x22, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x8d, 0x01, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, - 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, - 0x22, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, - 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x12, 0x8d, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, - 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x2a, 0x1b, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x73, - 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x65, 0x71, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, - 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, - 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, - 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x30, 0x01, 0x42, 0x3b, 0x5a, - 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, - 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x73, - 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x2a, + 0x1b, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x73, + 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x61, + 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x30, 0x01, 0x12, 0x78, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x23, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x28, 0x01, 0x30, 0x01, + 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -3244,149 +4047,177 @@ func file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP() []byte { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescData } -var file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes = make([]protoimpl.MessageInfo, 50) var file_seqproxyapi_v1_seq_proxy_api_proto_goTypes = []any{ (ErrorCode)(0), // 0: seqproxyapi.v1.ErrorCode (AggFunc)(0), // 1: seqproxyapi.v1.AggFunc (Order)(0), // 2: seqproxyapi.v1.Order (AsyncSearchStatus)(0), // 3: seqproxyapi.v1.AsyncSearchStatus - (*Error)(nil), // 4: seqproxyapi.v1.Error - (*Document)(nil), // 5: seqproxyapi.v1.Document - (*Aggregation)(nil), // 6: seqproxyapi.v1.Aggregation - (*Histogram)(nil), // 7: seqproxyapi.v1.Histogram - (*SearchQuery)(nil), // 8: seqproxyapi.v1.SearchQuery - (*AggQuery)(nil), // 9: seqproxyapi.v1.AggQuery - (*HistQuery)(nil), // 10: seqproxyapi.v1.HistQuery - (*ExplainEntry)(nil), // 11: seqproxyapi.v1.ExplainEntry - (*SearchRequest)(nil), // 12: seqproxyapi.v1.SearchRequest - (*ComplexSearchRequest)(nil), // 13: seqproxyapi.v1.ComplexSearchRequest - (*SearchResponse)(nil), // 14: seqproxyapi.v1.SearchResponse - (*ComplexSearchResponse)(nil), // 15: seqproxyapi.v1.ComplexSearchResponse - (*StartAsyncSearchRequest)(nil), // 16: seqproxyapi.v1.StartAsyncSearchRequest - (*StartAsyncSearchResponse)(nil), // 17: seqproxyapi.v1.StartAsyncSearchResponse - (*FetchAsyncSearchResultRequest)(nil), // 18: seqproxyapi.v1.FetchAsyncSearchResultRequest - (*FetchAsyncSearchResultResponse)(nil), // 19: seqproxyapi.v1.FetchAsyncSearchResultResponse - (*CancelAsyncSearchRequest)(nil), // 20: seqproxyapi.v1.CancelAsyncSearchRequest - (*CancelAsyncSearchResponse)(nil), // 21: seqproxyapi.v1.CancelAsyncSearchResponse - (*DeleteAsyncSearchRequest)(nil), // 22: seqproxyapi.v1.DeleteAsyncSearchRequest - (*DeleteAsyncSearchResponse)(nil), // 23: seqproxyapi.v1.DeleteAsyncSearchResponse - (*GetAsyncSearchesListRequest)(nil), // 24: seqproxyapi.v1.GetAsyncSearchesListRequest - (*GetAsyncSearchesListResponse)(nil), // 25: seqproxyapi.v1.GetAsyncSearchesListResponse - (*AsyncSearchesListItem)(nil), // 26: seqproxyapi.v1.AsyncSearchesListItem - (*GetAggregationRequest)(nil), // 27: seqproxyapi.v1.GetAggregationRequest - (*GetAggregationResponse)(nil), // 28: seqproxyapi.v1.GetAggregationResponse - (*GetHistogramRequest)(nil), // 29: seqproxyapi.v1.GetHistogramRequest - (*GetHistogramResponse)(nil), // 30: seqproxyapi.v1.GetHistogramResponse - (*FetchRequest)(nil), // 31: seqproxyapi.v1.FetchRequest - (*MappingRequest)(nil), // 32: seqproxyapi.v1.MappingRequest - (*MappingResponse)(nil), // 33: seqproxyapi.v1.MappingResponse - (*StatusRequest)(nil), // 34: seqproxyapi.v1.StatusRequest - (*StatusResponse)(nil), // 35: seqproxyapi.v1.StatusResponse - (*StoreStatus)(nil), // 36: seqproxyapi.v1.StoreStatus - (*StoreStatusValues)(nil), // 37: seqproxyapi.v1.StoreStatusValues - (*ExportRequest)(nil), // 38: seqproxyapi.v1.ExportRequest - (*ExportAsyncSearchRequest)(nil), // 39: seqproxyapi.v1.ExportAsyncSearchRequest - (*ExportResponse)(nil), // 40: seqproxyapi.v1.ExportResponse - (*Aggregation_Bucket)(nil), // 41: seqproxyapi.v1.Aggregation.Bucket - (*Histogram_Bucket)(nil), // 42: seqproxyapi.v1.Histogram.Bucket - (*FetchRequest_FieldsFilter)(nil), // 43: seqproxyapi.v1.FetchRequest.FieldsFilter - (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 45: google.protobuf.Duration + (ControlAction)(0), // 4: seqproxyapi.v1.ControlAction + (DataType)(0), // 5: seqproxyapi.v1.DataType + (*Error)(nil), // 6: seqproxyapi.v1.Error + (*Document)(nil), // 7: seqproxyapi.v1.Document + (*Aggregation)(nil), // 8: seqproxyapi.v1.Aggregation + (*Histogram)(nil), // 9: seqproxyapi.v1.Histogram + (*SearchQuery)(nil), // 10: seqproxyapi.v1.SearchQuery + (*AggQuery)(nil), // 11: seqproxyapi.v1.AggQuery + (*HistQuery)(nil), // 12: seqproxyapi.v1.HistQuery + (*ExplainEntry)(nil), // 13: seqproxyapi.v1.ExplainEntry + (*SearchRequest)(nil), // 14: seqproxyapi.v1.SearchRequest + (*ComplexSearchRequest)(nil), // 15: seqproxyapi.v1.ComplexSearchRequest + (*SearchResponse)(nil), // 16: seqproxyapi.v1.SearchResponse + (*ComplexSearchResponse)(nil), // 17: seqproxyapi.v1.ComplexSearchResponse + (*StartAsyncSearchRequest)(nil), // 18: seqproxyapi.v1.StartAsyncSearchRequest + (*StartAsyncSearchResponse)(nil), // 19: seqproxyapi.v1.StartAsyncSearchResponse + (*FetchAsyncSearchResultRequest)(nil), // 20: seqproxyapi.v1.FetchAsyncSearchResultRequest + (*FetchAsyncSearchResultResponse)(nil), // 21: seqproxyapi.v1.FetchAsyncSearchResultResponse + (*CancelAsyncSearchRequest)(nil), // 22: seqproxyapi.v1.CancelAsyncSearchRequest + (*CancelAsyncSearchResponse)(nil), // 23: seqproxyapi.v1.CancelAsyncSearchResponse + (*DeleteAsyncSearchRequest)(nil), // 24: seqproxyapi.v1.DeleteAsyncSearchRequest + (*DeleteAsyncSearchResponse)(nil), // 25: seqproxyapi.v1.DeleteAsyncSearchResponse + (*GetAsyncSearchesListRequest)(nil), // 26: seqproxyapi.v1.GetAsyncSearchesListRequest + (*GetAsyncSearchesListResponse)(nil), // 27: seqproxyapi.v1.GetAsyncSearchesListResponse + (*AsyncSearchesListItem)(nil), // 28: seqproxyapi.v1.AsyncSearchesListItem + (*GetAggregationRequest)(nil), // 29: seqproxyapi.v1.GetAggregationRequest + (*GetAggregationResponse)(nil), // 30: seqproxyapi.v1.GetAggregationResponse + (*GetHistogramRequest)(nil), // 31: seqproxyapi.v1.GetHistogramRequest + (*GetHistogramResponse)(nil), // 32: seqproxyapi.v1.GetHistogramResponse + (*FetchRequest)(nil), // 33: seqproxyapi.v1.FetchRequest + (*MappingRequest)(nil), // 34: seqproxyapi.v1.MappingRequest + (*MappingResponse)(nil), // 35: seqproxyapi.v1.MappingResponse + (*StatusRequest)(nil), // 36: seqproxyapi.v1.StatusRequest + (*StatusResponse)(nil), // 37: seqproxyapi.v1.StatusResponse + (*StoreStatus)(nil), // 38: seqproxyapi.v1.StoreStatus + (*StoreStatusValues)(nil), // 39: seqproxyapi.v1.StoreStatusValues + (*ExportRequest)(nil), // 40: seqproxyapi.v1.ExportRequest + (*ExportAsyncSearchRequest)(nil), // 41: seqproxyapi.v1.ExportAsyncSearchRequest + (*ExportResponse)(nil), // 42: seqproxyapi.v1.ExportResponse + (*StreamSearchRequest)(nil), // 43: seqproxyapi.v1.StreamSearchRequest + (*StreamSearchQuery)(nil), // 44: seqproxyapi.v1.StreamSearchQuery + (*StreamControl)(nil), // 45: seqproxyapi.v1.StreamControl + (*StreamSearchResponse)(nil), // 46: seqproxyapi.v1.StreamSearchResponse + (*ResponseHeader)(nil), // 47: seqproxyapi.v1.ResponseHeader + (*Typing)(nil), // 48: seqproxyapi.v1.Typing + (*ResponseData)(nil), // 49: seqproxyapi.v1.ResponseData + (*RecordsBatch)(nil), // 50: seqproxyapi.v1.RecordsBatch + (*Record)(nil), // 51: seqproxyapi.v1.Record + (*ResponseSummary)(nil), // 52: seqproxyapi.v1.ResponseSummary + (*Aggregation_Bucket)(nil), // 53: seqproxyapi.v1.Aggregation.Bucket + (*Histogram_Bucket)(nil), // 54: seqproxyapi.v1.Histogram.Bucket + (*FetchRequest_FieldsFilter)(nil), // 55: seqproxyapi.v1.FetchRequest.FieldsFilter + (*timestamppb.Timestamp)(nil), // 56: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 57: google.protobuf.Duration } var file_seqproxyapi_v1_seq_proxy_api_proto_depIdxs = []int32{ 0, // 0: seqproxyapi.v1.Error.code:type_name -> seqproxyapi.v1.ErrorCode - 44, // 1: seqproxyapi.v1.Document.time:type_name -> google.protobuf.Timestamp - 41, // 2: seqproxyapi.v1.Aggregation.buckets:type_name -> seqproxyapi.v1.Aggregation.Bucket - 42, // 3: seqproxyapi.v1.Histogram.buckets:type_name -> seqproxyapi.v1.Histogram.Bucket - 44, // 4: seqproxyapi.v1.SearchQuery.from:type_name -> google.protobuf.Timestamp - 44, // 5: seqproxyapi.v1.SearchQuery.to:type_name -> google.protobuf.Timestamp + 56, // 1: seqproxyapi.v1.Document.time:type_name -> google.protobuf.Timestamp + 53, // 2: seqproxyapi.v1.Aggregation.buckets:type_name -> seqproxyapi.v1.Aggregation.Bucket + 54, // 3: seqproxyapi.v1.Histogram.buckets:type_name -> seqproxyapi.v1.Histogram.Bucket + 56, // 4: seqproxyapi.v1.SearchQuery.from:type_name -> google.protobuf.Timestamp + 56, // 5: seqproxyapi.v1.SearchQuery.to:type_name -> google.protobuf.Timestamp 1, // 6: seqproxyapi.v1.AggQuery.func:type_name -> seqproxyapi.v1.AggFunc - 45, // 7: seqproxyapi.v1.ExplainEntry.duration:type_name -> google.protobuf.Duration - 11, // 8: seqproxyapi.v1.ExplainEntry.children:type_name -> seqproxyapi.v1.ExplainEntry - 8, // 9: seqproxyapi.v1.SearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 57, // 7: seqproxyapi.v1.ExplainEntry.duration:type_name -> google.protobuf.Duration + 13, // 8: seqproxyapi.v1.ExplainEntry.children:type_name -> seqproxyapi.v1.ExplainEntry + 10, // 9: seqproxyapi.v1.SearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery 2, // 10: seqproxyapi.v1.SearchRequest.order:type_name -> seqproxyapi.v1.Order - 8, // 11: seqproxyapi.v1.ComplexSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 9, // 12: seqproxyapi.v1.ComplexSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 10, // 13: seqproxyapi.v1.ComplexSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 10, // 11: seqproxyapi.v1.ComplexSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 11, // 12: seqproxyapi.v1.ComplexSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 12, // 13: seqproxyapi.v1.ComplexSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery 2, // 14: seqproxyapi.v1.ComplexSearchRequest.order:type_name -> seqproxyapi.v1.Order - 5, // 15: seqproxyapi.v1.SearchResponse.docs:type_name -> seqproxyapi.v1.Document - 4, // 16: seqproxyapi.v1.SearchResponse.error:type_name -> seqproxyapi.v1.Error - 5, // 17: seqproxyapi.v1.ComplexSearchResponse.docs:type_name -> seqproxyapi.v1.Document - 6, // 18: seqproxyapi.v1.ComplexSearchResponse.aggs:type_name -> seqproxyapi.v1.Aggregation - 7, // 19: seqproxyapi.v1.ComplexSearchResponse.hist:type_name -> seqproxyapi.v1.Histogram - 4, // 20: seqproxyapi.v1.ComplexSearchResponse.error:type_name -> seqproxyapi.v1.Error - 11, // 21: seqproxyapi.v1.ComplexSearchResponse.explain:type_name -> seqproxyapi.v1.ExplainEntry - 45, // 22: seqproxyapi.v1.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration - 8, // 23: seqproxyapi.v1.StartAsyncSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 9, // 24: seqproxyapi.v1.StartAsyncSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 10, // 25: seqproxyapi.v1.StartAsyncSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 7, // 15: seqproxyapi.v1.SearchResponse.docs:type_name -> seqproxyapi.v1.Document + 6, // 16: seqproxyapi.v1.SearchResponse.error:type_name -> seqproxyapi.v1.Error + 7, // 17: seqproxyapi.v1.ComplexSearchResponse.docs:type_name -> seqproxyapi.v1.Document + 8, // 18: seqproxyapi.v1.ComplexSearchResponse.aggs:type_name -> seqproxyapi.v1.Aggregation + 9, // 19: seqproxyapi.v1.ComplexSearchResponse.hist:type_name -> seqproxyapi.v1.Histogram + 6, // 20: seqproxyapi.v1.ComplexSearchResponse.error:type_name -> seqproxyapi.v1.Error + 13, // 21: seqproxyapi.v1.ComplexSearchResponse.explain:type_name -> seqproxyapi.v1.ExplainEntry + 57, // 22: seqproxyapi.v1.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration + 10, // 23: seqproxyapi.v1.StartAsyncSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 11, // 24: seqproxyapi.v1.StartAsyncSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 12, // 25: seqproxyapi.v1.StartAsyncSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery 2, // 26: seqproxyapi.v1.FetchAsyncSearchResultRequest.order:type_name -> seqproxyapi.v1.Order 3, // 27: seqproxyapi.v1.FetchAsyncSearchResultResponse.status:type_name -> seqproxyapi.v1.AsyncSearchStatus - 16, // 28: seqproxyapi.v1.FetchAsyncSearchResultResponse.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest - 15, // 29: seqproxyapi.v1.FetchAsyncSearchResultResponse.response:type_name -> seqproxyapi.v1.ComplexSearchResponse - 44, // 30: seqproxyapi.v1.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp - 44, // 31: seqproxyapi.v1.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp - 44, // 32: seqproxyapi.v1.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp - 4, // 33: seqproxyapi.v1.FetchAsyncSearchResultResponse.error:type_name -> seqproxyapi.v1.Error + 18, // 28: seqproxyapi.v1.FetchAsyncSearchResultResponse.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest + 17, // 29: seqproxyapi.v1.FetchAsyncSearchResultResponse.response:type_name -> seqproxyapi.v1.ComplexSearchResponse + 56, // 30: seqproxyapi.v1.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp + 56, // 31: seqproxyapi.v1.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp + 56, // 32: seqproxyapi.v1.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp + 6, // 33: seqproxyapi.v1.FetchAsyncSearchResultResponse.error:type_name -> seqproxyapi.v1.Error 3, // 34: seqproxyapi.v1.GetAsyncSearchesListRequest.status:type_name -> seqproxyapi.v1.AsyncSearchStatus - 26, // 35: seqproxyapi.v1.GetAsyncSearchesListResponse.searches:type_name -> seqproxyapi.v1.AsyncSearchesListItem - 4, // 36: seqproxyapi.v1.GetAsyncSearchesListResponse.error:type_name -> seqproxyapi.v1.Error + 28, // 35: seqproxyapi.v1.GetAsyncSearchesListResponse.searches:type_name -> seqproxyapi.v1.AsyncSearchesListItem + 6, // 36: seqproxyapi.v1.GetAsyncSearchesListResponse.error:type_name -> seqproxyapi.v1.Error 3, // 37: seqproxyapi.v1.AsyncSearchesListItem.status:type_name -> seqproxyapi.v1.AsyncSearchStatus - 16, // 38: seqproxyapi.v1.AsyncSearchesListItem.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest - 44, // 39: seqproxyapi.v1.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp - 44, // 40: seqproxyapi.v1.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp - 44, // 41: seqproxyapi.v1.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp - 8, // 42: seqproxyapi.v1.GetAggregationRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 9, // 43: seqproxyapi.v1.GetAggregationRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 6, // 44: seqproxyapi.v1.GetAggregationResponse.aggs:type_name -> seqproxyapi.v1.Aggregation - 4, // 45: seqproxyapi.v1.GetAggregationResponse.error:type_name -> seqproxyapi.v1.Error - 8, // 46: seqproxyapi.v1.GetHistogramRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 10, // 47: seqproxyapi.v1.GetHistogramRequest.hist:type_name -> seqproxyapi.v1.HistQuery - 7, // 48: seqproxyapi.v1.GetHistogramResponse.hist:type_name -> seqproxyapi.v1.Histogram - 4, // 49: seqproxyapi.v1.GetHistogramResponse.error:type_name -> seqproxyapi.v1.Error - 43, // 50: seqproxyapi.v1.FetchRequest.fields_filter:type_name -> seqproxyapi.v1.FetchRequest.FieldsFilter - 44, // 51: seqproxyapi.v1.StatusResponse.oldest_storage_time:type_name -> google.protobuf.Timestamp - 36, // 52: seqproxyapi.v1.StatusResponse.stores:type_name -> seqproxyapi.v1.StoreStatus - 37, // 53: seqproxyapi.v1.StoreStatus.values:type_name -> seqproxyapi.v1.StoreStatusValues - 44, // 54: seqproxyapi.v1.StoreStatusValues.oldest_time:type_name -> google.protobuf.Timestamp - 8, // 55: seqproxyapi.v1.ExportRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 5, // 56: seqproxyapi.v1.ExportResponse.doc:type_name -> seqproxyapi.v1.Document - 44, // 57: seqproxyapi.v1.Aggregation.Bucket.ts:type_name -> google.protobuf.Timestamp - 44, // 58: seqproxyapi.v1.Histogram.Bucket.ts:type_name -> google.protobuf.Timestamp - 12, // 59: seqproxyapi.v1.SeqProxyApi.Search:input_type -> seqproxyapi.v1.SearchRequest - 13, // 60: seqproxyapi.v1.SeqProxyApi.ComplexSearch:input_type -> seqproxyapi.v1.ComplexSearchRequest - 27, // 61: seqproxyapi.v1.SeqProxyApi.GetAggregation:input_type -> seqproxyapi.v1.GetAggregationRequest - 29, // 62: seqproxyapi.v1.SeqProxyApi.GetHistogram:input_type -> seqproxyapi.v1.GetHistogramRequest - 31, // 63: seqproxyapi.v1.SeqProxyApi.Fetch:input_type -> seqproxyapi.v1.FetchRequest - 32, // 64: seqproxyapi.v1.SeqProxyApi.Mapping:input_type -> seqproxyapi.v1.MappingRequest - 34, // 65: seqproxyapi.v1.SeqProxyApi.Status:input_type -> seqproxyapi.v1.StatusRequest - 38, // 66: seqproxyapi.v1.SeqProxyApi.Export:input_type -> seqproxyapi.v1.ExportRequest - 16, // 67: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:input_type -> seqproxyapi.v1.StartAsyncSearchRequest - 18, // 68: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:input_type -> seqproxyapi.v1.FetchAsyncSearchResultRequest - 20, // 69: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:input_type -> seqproxyapi.v1.CancelAsyncSearchRequest - 22, // 70: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:input_type -> seqproxyapi.v1.DeleteAsyncSearchRequest - 24, // 71: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:input_type -> seqproxyapi.v1.GetAsyncSearchesListRequest - 39, // 72: seqproxyapi.v1.SeqProxyApi.ExportAsyncSearch:input_type -> seqproxyapi.v1.ExportAsyncSearchRequest - 14, // 73: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse - 15, // 74: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse - 28, // 75: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse - 30, // 76: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse - 5, // 77: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document - 33, // 78: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse - 35, // 79: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse - 40, // 80: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse - 17, // 81: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse - 19, // 82: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse - 21, // 83: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse - 23, // 84: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse - 25, // 85: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse - 40, // 86: seqproxyapi.v1.SeqProxyApi.ExportAsyncSearch:output_type -> seqproxyapi.v1.ExportResponse - 73, // [73:87] is the sub-list for method output_type - 59, // [59:73] is the sub-list for method input_type - 59, // [59:59] is the sub-list for extension type_name - 59, // [59:59] is the sub-list for extension extendee - 0, // [0:59] is the sub-list for field type_name + 18, // 38: seqproxyapi.v1.AsyncSearchesListItem.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest + 56, // 39: seqproxyapi.v1.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp + 56, // 40: seqproxyapi.v1.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp + 56, // 41: seqproxyapi.v1.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp + 10, // 42: seqproxyapi.v1.GetAggregationRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 11, // 43: seqproxyapi.v1.GetAggregationRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 8, // 44: seqproxyapi.v1.GetAggregationResponse.aggs:type_name -> seqproxyapi.v1.Aggregation + 6, // 45: seqproxyapi.v1.GetAggregationResponse.error:type_name -> seqproxyapi.v1.Error + 10, // 46: seqproxyapi.v1.GetHistogramRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 12, // 47: seqproxyapi.v1.GetHistogramRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 9, // 48: seqproxyapi.v1.GetHistogramResponse.hist:type_name -> seqproxyapi.v1.Histogram + 6, // 49: seqproxyapi.v1.GetHistogramResponse.error:type_name -> seqproxyapi.v1.Error + 55, // 50: seqproxyapi.v1.FetchRequest.fields_filter:type_name -> seqproxyapi.v1.FetchRequest.FieldsFilter + 56, // 51: seqproxyapi.v1.StatusResponse.oldest_storage_time:type_name -> google.protobuf.Timestamp + 38, // 52: seqproxyapi.v1.StatusResponse.stores:type_name -> seqproxyapi.v1.StoreStatus + 39, // 53: seqproxyapi.v1.StoreStatus.values:type_name -> seqproxyapi.v1.StoreStatusValues + 56, // 54: seqproxyapi.v1.StoreStatusValues.oldest_time:type_name -> google.protobuf.Timestamp + 10, // 55: seqproxyapi.v1.ExportRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 7, // 56: seqproxyapi.v1.ExportResponse.doc:type_name -> seqproxyapi.v1.Document + 44, // 57: seqproxyapi.v1.StreamSearchRequest.query:type_name -> seqproxyapi.v1.StreamSearchQuery + 45, // 58: seqproxyapi.v1.StreamSearchRequest.control:type_name -> seqproxyapi.v1.StreamControl + 56, // 59: seqproxyapi.v1.StreamSearchQuery.from:type_name -> google.protobuf.Timestamp + 56, // 60: seqproxyapi.v1.StreamSearchQuery.to:type_name -> google.protobuf.Timestamp + 4, // 61: seqproxyapi.v1.StreamControl.action:type_name -> seqproxyapi.v1.ControlAction + 47, // 62: seqproxyapi.v1.StreamSearchResponse.header:type_name -> seqproxyapi.v1.ResponseHeader + 49, // 63: seqproxyapi.v1.StreamSearchResponse.data:type_name -> seqproxyapi.v1.ResponseData + 52, // 64: seqproxyapi.v1.StreamSearchResponse.summary:type_name -> seqproxyapi.v1.ResponseSummary + 48, // 65: seqproxyapi.v1.ResponseHeader.typing:type_name -> seqproxyapi.v1.Typing + 5, // 66: seqproxyapi.v1.Typing.type:type_name -> seqproxyapi.v1.DataType + 50, // 67: seqproxyapi.v1.ResponseData.batch:type_name -> seqproxyapi.v1.RecordsBatch + 51, // 68: seqproxyapi.v1.RecordsBatch.records:type_name -> seqproxyapi.v1.Record + 6, // 69: seqproxyapi.v1.ResponseSummary.error:type_name -> seqproxyapi.v1.Error + 13, // 70: seqproxyapi.v1.ResponseSummary.explain:type_name -> seqproxyapi.v1.ExplainEntry + 56, // 71: seqproxyapi.v1.Aggregation.Bucket.ts:type_name -> google.protobuf.Timestamp + 56, // 72: seqproxyapi.v1.Histogram.Bucket.ts:type_name -> google.protobuf.Timestamp + 14, // 73: seqproxyapi.v1.SeqProxyApi.Search:input_type -> seqproxyapi.v1.SearchRequest + 15, // 74: seqproxyapi.v1.SeqProxyApi.ComplexSearch:input_type -> seqproxyapi.v1.ComplexSearchRequest + 29, // 75: seqproxyapi.v1.SeqProxyApi.GetAggregation:input_type -> seqproxyapi.v1.GetAggregationRequest + 31, // 76: seqproxyapi.v1.SeqProxyApi.GetHistogram:input_type -> seqproxyapi.v1.GetHistogramRequest + 33, // 77: seqproxyapi.v1.SeqProxyApi.Fetch:input_type -> seqproxyapi.v1.FetchRequest + 34, // 78: seqproxyapi.v1.SeqProxyApi.Mapping:input_type -> seqproxyapi.v1.MappingRequest + 36, // 79: seqproxyapi.v1.SeqProxyApi.Status:input_type -> seqproxyapi.v1.StatusRequest + 40, // 80: seqproxyapi.v1.SeqProxyApi.Export:input_type -> seqproxyapi.v1.ExportRequest + 18, // 81: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:input_type -> seqproxyapi.v1.StartAsyncSearchRequest + 20, // 82: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:input_type -> seqproxyapi.v1.FetchAsyncSearchResultRequest + 22, // 83: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:input_type -> seqproxyapi.v1.CancelAsyncSearchRequest + 24, // 84: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:input_type -> seqproxyapi.v1.DeleteAsyncSearchRequest + 26, // 85: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:input_type -> seqproxyapi.v1.GetAsyncSearchesListRequest + 41, // 86: seqproxyapi.v1.SeqProxyApi.ExportAsyncSearch:input_type -> seqproxyapi.v1.ExportAsyncSearchRequest + 43, // 87: seqproxyapi.v1.SeqProxyApi.StreamSearch:input_type -> seqproxyapi.v1.StreamSearchRequest + 16, // 88: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse + 17, // 89: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse + 30, // 90: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse + 32, // 91: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse + 7, // 92: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document + 35, // 93: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse + 37, // 94: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse + 42, // 95: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse + 19, // 96: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse + 21, // 97: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse + 23, // 98: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse + 25, // 99: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse + 27, // 100: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse + 42, // 101: seqproxyapi.v1.SeqProxyApi.ExportAsyncSearch:output_type -> seqproxyapi.v1.ExportResponse + 46, // 102: seqproxyapi.v1.SeqProxyApi.StreamSearch:output_type -> seqproxyapi.v1.StreamSearchResponse + 88, // [88:103] is the sub-list for method output_type + 73, // [73:88] is the sub-list for method input_type + 73, // [73:73] is the sub-list for extension type_name + 73, // [73:73] is the sub-list for extension extendee + 0, // [0:73] is the sub-list for field type_name } func init() { file_seqproxyapi_v1_seq_proxy_api_proto_init() } @@ -3403,14 +4234,24 @@ func file_seqproxyapi_v1_seq_proxy_api_proto_init() { file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[22].OneofWrappers = []any{} file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31].OneofWrappers = []any{} file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32].OneofWrappers = []any{} - file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37].OneofWrappers = []any{ + (*StreamSearchRequest_Query)(nil), + (*StreamSearchRequest_Control)(nil), + } + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[40].OneofWrappers = []any{ + (*StreamSearchResponse_Header)(nil), + (*StreamSearchResponse_Data)(nil), + (*StreamSearchResponse_Summary)(nil), + } + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[46].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[47].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc), len(file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc)), - NumEnums: 4, - NumMessages: 40, + NumEnums: 6, + NumMessages: 50, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go index 9a4ece1a..c06ff205 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go @@ -371,6 +371,53 @@ func request_SeqProxyApi_ExportAsyncSearch_0(ctx context.Context, marshaler runt return stream, metadata, nil } +func request_SeqProxyApi_StreamSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (SeqProxyApi_StreamSearchClient, runtime.ServerMetadata, chan error, error) { + var metadata runtime.ServerMetadata + errChan := make(chan error, 1) + stream, err := client.StreamSearch(ctx) + if err != nil { + grpclog.Errorf("Failed to start streaming: %v", err) + close(errChan) + return nil, metadata, errChan, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq StreamSearchRequest + err := dec.Decode(&protoReq) + if errors.Is(err, io.EOF) { + return err + } + if err != nil { + grpclog.Errorf("Failed to decode request: %v", err) + return status.Errorf(codes.InvalidArgument, "Failed to decode request: %v", err) + } + if err := stream.Send(&protoReq); err != nil { + grpclog.Errorf("Failed to send request: %v", err) + return err + } + return nil + } + go func() { + defer close(errChan) + for { + if err := handleSend(); err != nil { + errChan <- err + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Errorf("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Errorf("Failed to get header from client: %v", err) + return nil, metadata, errChan, err + } + metadata.HeaderMD = header + return stream, metadata, errChan, nil +} + // RegisterSeqProxyApiHandlerServer registers the http handlers for service SeqProxyApi to "mux". // UnaryRPC :call SeqProxyApiServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -619,6 +666,13 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux return }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_StreamSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + return nil } @@ -896,6 +950,31 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_ExportAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_StreamSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/StreamSearch", runtime.WithHTTPPathPattern("/stream-search")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + resp, md, reqErrChan, err := request_SeqProxyApi_StreamSearch_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + go func() { + for err := range reqErrChan { + if err != nil && !errors.Is(err, io.EOF) { + runtime.HTTPStreamError(annotatedContext, mux, outboundMarshaler, w, req, err) + } + } + }() + forward_SeqProxyApi_StreamSearch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + }) return nil } @@ -914,6 +993,7 @@ var ( pattern_SeqProxyApi_DeleteAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"async-searches", "search_id"}, "")) pattern_SeqProxyApi_GetAsyncSearchesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"async-searches", "list"}, "")) pattern_SeqProxyApi_ExportAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"async-searches", "export"}, "")) + pattern_SeqProxyApi_StreamSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"stream-search"}, "")) ) var ( @@ -931,4 +1011,5 @@ var ( forward_SeqProxyApi_DeleteAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_ExportAsyncSearch_0 = runtime.ForwardResponseStream + forward_SeqProxyApi_StreamSearch_0 = runtime.ForwardResponseStream ) diff --git a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go index 59358201..c9ddd31a 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go @@ -904,6 +904,257 @@ func (m *ExportResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *StreamSearchRequest) CloneVT() *StreamSearchRequest { + if m == nil { + return (*StreamSearchRequest)(nil) + } + r := new(StreamSearchRequest) + if m.RequestType != nil { + r.RequestType = m.RequestType.(interface { + CloneVT() isStreamSearchRequest_RequestType + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StreamSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StreamSearchRequest_Query) CloneVT() isStreamSearchRequest_RequestType { + if m == nil { + return (*StreamSearchRequest_Query)(nil) + } + r := new(StreamSearchRequest_Query) + r.Query = m.Query.CloneVT() + return r +} + +func (m *StreamSearchRequest_Control) CloneVT() isStreamSearchRequest_RequestType { + if m == nil { + return (*StreamSearchRequest_Control)(nil) + } + r := new(StreamSearchRequest_Control) + r.Control = m.Control.CloneVT() + return r +} + +func (m *StreamSearchQuery) CloneVT() *StreamSearchQuery { + if m == nil { + return (*StreamSearchQuery)(nil) + } + r := new(StreamSearchQuery) + r.Query = m.Query + r.From = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.From).CloneVT()) + r.To = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.To).CloneVT()) + r.Explain = m.Explain + r.OffsetId = m.OffsetId + r.WithTotal = m.WithTotal + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StreamSearchQuery) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StreamControl) CloneVT() *StreamControl { + if m == nil { + return (*StreamControl)(nil) + } + r := new(StreamControl) + r.Action = m.Action + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StreamControl) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StreamSearchResponse) CloneVT() *StreamSearchResponse { + if m == nil { + return (*StreamSearchResponse)(nil) + } + r := new(StreamSearchResponse) + if m.ResponseType != nil { + r.ResponseType = m.ResponseType.(interface { + CloneVT() isStreamSearchResponse_ResponseType + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *StreamSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *StreamSearchResponse_Header) CloneVT() isStreamSearchResponse_ResponseType { + if m == nil { + return (*StreamSearchResponse_Header)(nil) + } + r := new(StreamSearchResponse_Header) + r.Header = m.Header.CloneVT() + return r +} + +func (m *StreamSearchResponse_Data) CloneVT() isStreamSearchResponse_ResponseType { + if m == nil { + return (*StreamSearchResponse_Data)(nil) + } + r := new(StreamSearchResponse_Data) + r.Data = m.Data.CloneVT() + return r +} + +func (m *StreamSearchResponse_Summary) CloneVT() isStreamSearchResponse_ResponseType { + if m == nil { + return (*StreamSearchResponse_Summary)(nil) + } + r := new(StreamSearchResponse_Summary) + r.Summary = m.Summary.CloneVT() + return r +} + +func (m *ResponseHeader) CloneVT() *ResponseHeader { + if m == nil { + return (*ResponseHeader)(nil) + } + r := new(ResponseHeader) + if rhs := m.Typing; rhs != nil { + tmpContainer := make([]*Typing, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Typing = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResponseHeader) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Typing) CloneVT() *Typing { + if m == nil { + return (*Typing)(nil) + } + r := new(Typing) + r.Title = m.Title + r.Type = m.Type + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Typing) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResponseData) CloneVT() *ResponseData { + if m == nil { + return (*ResponseData)(nil) + } + r := new(ResponseData) + r.Batch = m.Batch.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResponseData) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *RecordsBatch) CloneVT() *RecordsBatch { + if m == nil { + return (*RecordsBatch)(nil) + } + r := new(RecordsBatch) + if rhs := m.Records; rhs != nil { + tmpContainer := make([]*Record, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Records = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *RecordsBatch) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Record) CloneVT() *Record { + if m == nil { + return (*Record)(nil) + } + r := new(Record) + if rhs := m.RawData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.RawData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Record) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *ResponseSummary) CloneVT() *ResponseSummary { + if m == nil { + return (*ResponseSummary)(nil) + } + r := new(ResponseSummary) + r.Total = m.Total + r.Error = m.Error.CloneVT() + r.Explain = m.Explain.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *ResponseSummary) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (this *Error) EqualVT(that *Error) bool { if this == that { return true @@ -2108,1072 +2359,1140 @@ func (this *ExportResponse) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// SeqProxyApiClient is the client API for SeqProxyApi service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type SeqProxyApiClient interface { - // Fetch documents for given SearchQuery. - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) - // Fetch documents, aggregations and histograms for given queries correspondingly. - ComplexSearch(ctx context.Context, in *ComplexSearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) - // Fetch aggregations for given SearchQuery and AggQueries. - GetAggregation(ctx context.Context, in *GetAggregationRequest, opts ...grpc.CallOption) (*GetAggregationResponse, error) - // Fetch histogram for given SearchQuery and HistQuery. - GetHistogram(ctx context.Context, in *GetHistogramRequest, opts ...grpc.CallOption) (*GetHistogramResponse, error) - // Fetch documents by the corresponding seq-ids. - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (SeqProxyApi_FetchClient, error) - // Fetch current seq-db mapping. - Mapping(ctx context.Context, in *MappingRequest, opts ...grpc.CallOption) (*MappingResponse, error) - // Fetch seq-db store's availability information. - Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) - // Stream documents for given SearchQuery. Same as Search, but returns streaming response. - Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportClient, error) - // Starts a new asynchronous search operation. - // The server processes the request in the background and returns a search ID. - StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) - // Fetches the result or current status of a previously started async search. - // Clients should use the search ID returned by StartAsyncSearch. - FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) - // Cancels an ongoing asynchronous search operation if it hasn't completed yet. - CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) - // Frees up resources if the result is no longer needed. - DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) - // Fetch list of async searches. - GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) - // Stream documents for given async search ID. - ExportAsyncSearch(ctx context.Context, in *ExportAsyncSearchRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportAsyncSearchClient, error) -} - -type seqProxyApiClient struct { - cc grpc.ClientConnInterface -} - -func NewSeqProxyApiClient(cc grpc.ClientConnInterface) SeqProxyApiClient { - return &seqProxyApiClient{cc} +func (this *StreamSearchRequest) EqualVT(that *StreamSearchRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.RequestType == nil && that.RequestType != nil { + return false + } else if this.RequestType != nil { + if that.RequestType == nil { + return false + } + if !this.RequestType.(interface { + EqualVT(isStreamSearchRequest_RequestType) bool + }).EqualVT(that.RequestType) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) } -func (c *seqProxyApiClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Search", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StreamSearchRequest) + if !ok { + return false } - return out, nil + return this.EqualVT(that) } - -func (c *seqProxyApiClient) ComplexSearch(ctx context.Context, in *ComplexSearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) { - out := new(ComplexSearchResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/ComplexSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchRequest_Query) EqualVT(thatIface isStreamSearchRequest_RequestType) bool { + that, ok := thatIface.(*StreamSearchRequest_Query) + if !ok { + return false } - return out, nil + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Query, that.Query; p != q { + if p == nil { + p = &StreamSearchQuery{} + } + if q == nil { + q = &StreamSearchQuery{} + } + if !p.EqualVT(q) { + return false + } + } + return true } -func (c *seqProxyApiClient) GetAggregation(ctx context.Context, in *GetAggregationRequest, opts ...grpc.CallOption) (*GetAggregationResponse, error) { - out := new(GetAggregationResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetAggregation", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchRequest_Control) EqualVT(thatIface isStreamSearchRequest_RequestType) bool { + that, ok := thatIface.(*StreamSearchRequest_Control) + if !ok { + return false } - return out, nil -} - -func (c *seqProxyApiClient) GetHistogram(ctx context.Context, in *GetHistogramRequest, opts ...grpc.CallOption) (*GetHistogramResponse, error) { - out := new(GetHistogramResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetHistogram", in, out, opts...) - if err != nil { - return nil, err + if this == that { + return true } - return out, nil + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Control, that.Control; p != q { + if p == nil { + p = &StreamControl{} + } + if q == nil { + q = &StreamControl{} + } + if !p.EqualVT(q) { + return false + } + } + return true } -func (c *seqProxyApiClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (SeqProxyApi_FetchClient, error) { - stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[0], "/seqproxyapi.v1.SeqProxyApi/Fetch", opts...) - if err != nil { - return nil, err +func (this *StreamSearchQuery) EqualVT(that *StreamSearchQuery) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - x := &seqProxyApiFetchClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err + if this.Query != that.Query { + return false } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err + if !(*timestamppb1.Timestamp)(this.From).EqualVT((*timestamppb1.Timestamp)(that.From)) { + return false } - return x, nil + if !(*timestamppb1.Timestamp)(this.To).EqualVT((*timestamppb1.Timestamp)(that.To)) { + return false + } + if this.Explain != that.Explain { + return false + } + if this.OffsetId != that.OffsetId { + return false + } + if this.WithTotal != that.WithTotal { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -type SeqProxyApi_FetchClient interface { - Recv() (*Document, error) - grpc.ClientStream +func (this *StreamSearchQuery) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StreamSearchQuery) + if !ok { + return false + } + return this.EqualVT(that) } - -type seqProxyApiFetchClient struct { - grpc.ClientStream +func (this *StreamControl) EqualVT(that *StreamControl) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Action != that.Action { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -func (x *seqProxyApiFetchClient) Recv() (*Document, error) { - m := new(Document) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (this *StreamControl) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StreamControl) + if !ok { + return false } - return m, nil + return this.EqualVT(that) } - -func (c *seqProxyApiClient) Mapping(ctx context.Context, in *MappingRequest, opts ...grpc.CallOption) (*MappingResponse, error) { - out := new(MappingResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Mapping", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchResponse) EqualVT(that *StreamSearchResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - return out, nil + if this.ResponseType == nil && that.ResponseType != nil { + return false + } else if this.ResponseType != nil { + if that.ResponseType == nil { + return false + } + if !this.ResponseType.(interface { + EqualVT(isStreamSearchResponse_ResponseType) bool + }).EqualVT(that.ResponseType) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) } -func (c *seqProxyApiClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { - out := new(StatusResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Status", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StreamSearchResponse) + if !ok { + return false } - return out, nil + return this.EqualVT(that) } - -func (c *seqProxyApiClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportClient, error) { - stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[1], "/seqproxyapi.v1.SeqProxyApi/Export", opts...) - if err != nil { - return nil, err +func (this *StreamSearchResponse_Header) EqualVT(thatIface isStreamSearchResponse_ResponseType) bool { + that, ok := thatIface.(*StreamSearchResponse_Header) + if !ok { + return false } - x := &seqProxyApiExportClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err + if this == that { + return true } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err + if this == nil && that != nil || this != nil && that == nil { + return false } - return x, nil -} - -type SeqProxyApi_ExportClient interface { - Recv() (*ExportResponse, error) - grpc.ClientStream -} - -type seqProxyApiExportClient struct { - grpc.ClientStream -} - -func (x *seqProxyApiExportClient) Recv() (*ExportResponse, error) { - m := new(ExportResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err + if p, q := this.Header, that.Header; p != q { + if p == nil { + p = &ResponseHeader{} + } + if q == nil { + q = &ResponseHeader{} + } + if !p.EqualVT(q) { + return false + } } - return m, nil + return true } -func (c *seqProxyApiClient) StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) { - out := new(StartAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchResponse_Data) EqualVT(thatIface isStreamSearchResponse_ResponseType) bool { + that, ok := thatIface.(*StreamSearchResponse_Data) + if !ok { + return false } - return out, nil -} - -func (c *seqProxyApiClient) FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) { - out := new(FetchAsyncSearchResultResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", in, out, opts...) - if err != nil { - return nil, err + if this == that { + return true } - return out, nil + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Data, that.Data; p != q { + if p == nil { + p = &ResponseData{} + } + if q == nil { + q = &ResponseData{} + } + if !p.EqualVT(q) { + return false + } + } + return true } -func (c *seqProxyApiClient) CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) { - out := new(CancelAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *StreamSearchResponse_Summary) EqualVT(thatIface isStreamSearchResponse_ResponseType) bool { + that, ok := thatIface.(*StreamSearchResponse_Summary) + if !ok { + return false } - return out, nil + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Summary, that.Summary; p != q { + if p == nil { + p = &ResponseSummary{} + } + if q == nil { + q = &ResponseSummary{} + } + if !p.EqualVT(q) { + return false + } + } + return true } -func (c *seqProxyApiClient) DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) { - out := new(DeleteAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *ResponseHeader) EqualVT(that *ResponseHeader) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - return out, nil + if len(this.Typing) != len(that.Typing) { + return false + } + for i, vx := range this.Typing { + vy := that.Typing[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Typing{} + } + if q == nil { + q = &Typing{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) } -func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) { - out := new(GetAsyncSearchesListResponse) - err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", in, out, opts...) - if err != nil { - return nil, err +func (this *ResponseHeader) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResponseHeader) + if !ok { + return false } - return out, nil + return this.EqualVT(that) } - -func (c *seqProxyApiClient) ExportAsyncSearch(ctx context.Context, in *ExportAsyncSearchRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportAsyncSearchClient, error) { - stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[2], "/seqproxyapi.v1.SeqProxyApi/ExportAsyncSearch", opts...) - if err != nil { - return nil, err +func (this *Typing) EqualVT(that *Typing) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - x := &seqProxyApiExportAsyncSearchClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err + if this.Title != that.Title { + return false } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err + if this.Type != that.Type { + return false } - return x, nil + return string(this.unknownFields) == string(that.unknownFields) } -type SeqProxyApi_ExportAsyncSearchClient interface { - Recv() (*ExportResponse, error) - grpc.ClientStream +func (this *Typing) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Typing) + if !ok { + return false + } + return this.EqualVT(that) } - -type seqProxyApiExportAsyncSearchClient struct { - grpc.ClientStream +func (this *ResponseData) EqualVT(that *ResponseData) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Batch.EqualVT(that.Batch) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -func (x *seqProxyApiExportAsyncSearchClient) Recv() (*ExportResponse, error) { - m := new(ExportResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (this *ResponseData) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResponseData) + if !ok { + return false } - return m, nil + return this.EqualVT(that) +} +func (this *RecordsBatch) EqualVT(that *RecordsBatch) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Records) != len(that.Records) { + return false + } + for i, vx := range this.Records { + vy := that.Records[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Record{} + } + if q == nil { + q = &Record{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) } -// SeqProxyApiServer is the server API for SeqProxyApi service. -// All implementations must embed UnimplementedSeqProxyApiServer -// for forward compatibility -type SeqProxyApiServer interface { +func (this *RecordsBatch) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*RecordsBatch) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Record) EqualVT(that *Record) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.RawData) != len(that.RawData) { + return false + } + for i, vx := range this.RawData { + vy := that.RawData[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Record) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Record) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *ResponseSummary) EqualVT(that *ResponseSummary) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Total != that.Total { + return false + } + if !this.Error.EqualVT(that.Error) { + return false + } + if !this.Explain.EqualVT(that.Explain) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *ResponseSummary) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*ResponseSummary) + if !ok { + return false + } + return this.EqualVT(that) +} + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SeqProxyApiClient is the client API for SeqProxyApi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SeqProxyApiClient interface { // Fetch documents for given SearchQuery. - Search(context.Context, *SearchRequest) (*SearchResponse, error) + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) // Fetch documents, aggregations and histograms for given queries correspondingly. - ComplexSearch(context.Context, *ComplexSearchRequest) (*ComplexSearchResponse, error) + ComplexSearch(ctx context.Context, in *ComplexSearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) // Fetch aggregations for given SearchQuery and AggQueries. - GetAggregation(context.Context, *GetAggregationRequest) (*GetAggregationResponse, error) + GetAggregation(ctx context.Context, in *GetAggregationRequest, opts ...grpc.CallOption) (*GetAggregationResponse, error) // Fetch histogram for given SearchQuery and HistQuery. - GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) + GetHistogram(ctx context.Context, in *GetHistogramRequest, opts ...grpc.CallOption) (*GetHistogramResponse, error) // Fetch documents by the corresponding seq-ids. - Fetch(*FetchRequest, SeqProxyApi_FetchServer) error + Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (SeqProxyApi_FetchClient, error) // Fetch current seq-db mapping. - Mapping(context.Context, *MappingRequest) (*MappingResponse, error) + Mapping(ctx context.Context, in *MappingRequest, opts ...grpc.CallOption) (*MappingResponse, error) // Fetch seq-db store's availability information. - Status(context.Context, *StatusRequest) (*StatusResponse, error) + Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // Stream documents for given SearchQuery. Same as Search, but returns streaming response. - Export(*ExportRequest, SeqProxyApi_ExportServer) error + Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportClient, error) // Starts a new asynchronous search operation. // The server processes the request in the background and returns a search ID. - StartAsyncSearch(context.Context, *StartAsyncSearchRequest) (*StartAsyncSearchResponse, error) + StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) // Fetches the result or current status of a previously started async search. // Clients should use the search ID returned by StartAsyncSearch. - FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) + FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) // Cancels an ongoing asynchronous search operation if it hasn't completed yet. - CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) + CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) // Frees up resources if the result is no longer needed. - DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) + DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. - GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) + GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) // Stream documents for given async search ID. - ExportAsyncSearch(*ExportAsyncSearchRequest, SeqProxyApi_ExportAsyncSearchServer) error - mustEmbedUnimplementedSeqProxyApiServer() -} - -// UnimplementedSeqProxyApiServer must be embedded to have forward compatible implementations. -type UnimplementedSeqProxyApiServer struct { + ExportAsyncSearch(ctx context.Context, in *ExportAsyncSearchRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportAsyncSearchClient, error) + StreamSearch(ctx context.Context, opts ...grpc.CallOption) (SeqProxyApi_StreamSearchClient, error) } -func (UnimplementedSeqProxyApiServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") -} -func (UnimplementedSeqProxyApiServer) ComplexSearch(context.Context, *ComplexSearchRequest) (*ComplexSearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ComplexSearch not implemented") -} -func (UnimplementedSeqProxyApiServer) GetAggregation(context.Context, *GetAggregationRequest) (*GetAggregationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAggregation not implemented") -} -func (UnimplementedSeqProxyApiServer) GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") -} -func (UnimplementedSeqProxyApiServer) Fetch(*FetchRequest, SeqProxyApi_FetchServer) error { - return status.Errorf(codes.Unimplemented, "method Fetch not implemented") -} -func (UnimplementedSeqProxyApiServer) Mapping(context.Context, *MappingRequest) (*MappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Mapping not implemented") -} -func (UnimplementedSeqProxyApiServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (UnimplementedSeqProxyApiServer) Export(*ExportRequest, SeqProxyApi_ExportServer) error { - return status.Errorf(codes.Unimplemented, "method Export not implemented") -} -func (UnimplementedSeqProxyApiServer) StartAsyncSearch(context.Context, *StartAsyncSearchRequest) (*StartAsyncSearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartAsyncSearch not implemented") -} -func (UnimplementedSeqProxyApiServer) FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchAsyncSearchResult not implemented") -} -func (UnimplementedSeqProxyApiServer) CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelAsyncSearch not implemented") -} -func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAsyncSearch not implemented") -} -func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") -} -func (UnimplementedSeqProxyApiServer) ExportAsyncSearch(*ExportAsyncSearchRequest, SeqProxyApi_ExportAsyncSearchServer) error { - return status.Errorf(codes.Unimplemented, "method ExportAsyncSearch not implemented") +type seqProxyApiClient struct { + cc grpc.ClientConnInterface } -func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} -// UnsafeSeqProxyApiServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SeqProxyApiServer will -// result in compilation errors. -type UnsafeSeqProxyApiServer interface { - mustEmbedUnimplementedSeqProxyApiServer() +func NewSeqProxyApiClient(cc grpc.ClientConnInterface) SeqProxyApiClient { + return &seqProxyApiClient{cc} } -func RegisterSeqProxyApiServer(s grpc.ServiceRegistrar, srv SeqProxyApiServer) { - s.RegisterService(&SeqProxyApi_ServiceDesc, srv) +func (c *seqProxyApiClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Search", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func _SeqProxyApi_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) ComplexSearch(ctx context.Context, in *ComplexSearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) { + out := new(ComplexSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/ComplexSearch", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).Search(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/Search", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).Search(ctx, req.(*SearchRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_ComplexSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ComplexSearchRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) GetAggregation(ctx context.Context, in *GetAggregationRequest, opts ...grpc.CallOption) (*GetAggregationResponse, error) { + out := new(GetAggregationResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetAggregation", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).ComplexSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/ComplexSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).ComplexSearch(ctx, req.(*ComplexSearchRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_GetAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAggregationRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) GetHistogram(ctx context.Context, in *GetHistogramRequest, opts ...grpc.CallOption) (*GetHistogramResponse, error) { + out := new(GetHistogramResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetHistogram", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).GetAggregation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetAggregation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).GetAggregation(ctx, req.(*GetAggregationRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_GetHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetHistogramRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (SeqProxyApi_FetchClient, error) { + stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[0], "/seqproxyapi.v1.SeqProxyApi/Fetch", opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).GetHistogram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetHistogram", + x := &seqProxyApiFetchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).GetHistogram(ctx, req.(*GetHistogramRequest)) + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return x, nil } -func _SeqProxyApi_Fetch_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(FetchRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SeqProxyApiServer).Fetch(m, &seqProxyApiFetchServer{stream}) +type SeqProxyApi_FetchClient interface { + Recv() (*Document, error) + grpc.ClientStream } -type SeqProxyApi_FetchServer interface { - Send(*Document) error - grpc.ServerStream +type seqProxyApiFetchClient struct { + grpc.ClientStream } -type seqProxyApiFetchServer struct { - grpc.ServerStream +func (x *seqProxyApiFetchClient) Recv() (*Document, error) { + m := new(Document) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } -func (x *seqProxyApiFetchServer) Send(m *Document) error { - return x.ServerStream.SendMsg(m) +func (c *seqProxyApiClient) Mapping(ctx context.Context, in *MappingRequest, opts ...grpc.CallOption) (*MappingResponse, error) { + out := new(MappingResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Mapping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func _SeqProxyApi_Mapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MappingRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { + out := new(StatusResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/Status", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).Mapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/Mapping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).Mapping(ctx, req.(*MappingRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportClient, error) { + stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[1], "/seqproxyapi.v1.SeqProxyApi/Export", opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).Status(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/Status", + x := &seqProxyApiExportClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).Status(ctx, req.(*StatusRequest)) + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return x, nil } -func _SeqProxyApi_Export_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ExportRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SeqProxyApiServer).Export(m, &seqProxyApiExportServer{stream}) +type SeqProxyApi_ExportClient interface { + Recv() (*ExportResponse, error) + grpc.ClientStream } -type SeqProxyApi_ExportServer interface { - Send(*ExportResponse) error - grpc.ServerStream +type seqProxyApiExportClient struct { + grpc.ClientStream } -type seqProxyApiExportServer struct { - grpc.ServerStream +func (x *seqProxyApiExportClient) Recv() (*ExportResponse, error) { + m := new(ExportResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } -func (x *seqProxyApiExportServer) Send(m *ExportResponse) error { - return x.ServerStream.SendMsg(m) +func (c *seqProxyApiClient) StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) { + out := new(StartAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func _SeqProxyApi_StartAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartAsyncSearchRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) { + out := new(FetchAsyncSearchResultResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).StartAsyncSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).StartAsyncSearch(ctx, req.(*StartAsyncSearchRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_FetchAsyncSearchResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchAsyncSearchResultRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) { + out := new(CancelAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).FetchAsyncSearchResult(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).FetchAsyncSearchResult(ctx, req.(*FetchAsyncSearchResultRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_CancelAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelAsyncSearchRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) { + out := new(DeleteAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).CancelAsyncSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).CancelAsyncSearch(ctx, req.(*CancelAsyncSearchRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_DeleteAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAsyncSearchRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) { + out := new(GetAsyncSearchesListResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", in, out, opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, req.(*DeleteAsyncSearchRequest)) - } - return interceptor(ctx, in, info, handler) + return out, nil } -func _SeqProxyApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAsyncSearchesListRequest) - if err := dec(in); err != nil { +func (c *seqProxyApiClient) ExportAsyncSearch(ctx context.Context, in *ExportAsyncSearchRequest, opts ...grpc.CallOption) (SeqProxyApi_ExportAsyncSearchClient, error) { + stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[2], "/seqproxyapi.v1.SeqProxyApi/ExportAsyncSearch", opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, in) + x := &seqProxyApiExportAsyncSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, req.(*GetAsyncSearchesListRequest)) + return x, nil +} + +type SeqProxyApi_ExportAsyncSearchClient interface { + Recv() (*ExportResponse, error) + grpc.ClientStream +} + +type seqProxyApiExportAsyncSearchClient struct { + grpc.ClientStream +} + +func (x *seqProxyApiExportAsyncSearchClient) Recv() (*ExportResponse, error) { + m := new(ExportResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return m, nil } -func _SeqProxyApi_ExportAsyncSearch_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ExportAsyncSearchRequest) - if err := stream.RecvMsg(m); err != nil { - return err +func (c *seqProxyApiClient) StreamSearch(ctx context.Context, opts ...grpc.CallOption) (SeqProxyApi_StreamSearchClient, error) { + stream, err := c.cc.NewStream(ctx, &SeqProxyApi_ServiceDesc.Streams[3], "/seqproxyapi.v1.SeqProxyApi/StreamSearch", opts...) + if err != nil { + return nil, err } - return srv.(SeqProxyApiServer).ExportAsyncSearch(m, &seqProxyApiExportAsyncSearchServer{stream}) + x := &seqProxyApiStreamSearchClient{stream} + return x, nil } -type SeqProxyApi_ExportAsyncSearchServer interface { - Send(*ExportResponse) error - grpc.ServerStream +type SeqProxyApi_StreamSearchClient interface { + Send(*StreamSearchRequest) error + Recv() (*StreamSearchResponse, error) + grpc.ClientStream } -type seqProxyApiExportAsyncSearchServer struct { - grpc.ServerStream +type seqProxyApiStreamSearchClient struct { + grpc.ClientStream } -func (x *seqProxyApiExportAsyncSearchServer) Send(m *ExportResponse) error { - return x.ServerStream.SendMsg(m) +func (x *seqProxyApiStreamSearchClient) Send(m *StreamSearchRequest) error { + return x.ClientStream.SendMsg(m) } -// SeqProxyApi_ServiceDesc is the grpc.ServiceDesc for SeqProxyApi service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SeqProxyApi_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "seqproxyapi.v1.SeqProxyApi", - HandlerType: (*SeqProxyApiServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Search", - Handler: _SeqProxyApi_Search_Handler, - }, - { - MethodName: "ComplexSearch", - Handler: _SeqProxyApi_ComplexSearch_Handler, - }, - { - MethodName: "GetAggregation", - Handler: _SeqProxyApi_GetAggregation_Handler, - }, - { - MethodName: "GetHistogram", - Handler: _SeqProxyApi_GetHistogram_Handler, - }, - { - MethodName: "Mapping", - Handler: _SeqProxyApi_Mapping_Handler, - }, - { - MethodName: "Status", - Handler: _SeqProxyApi_Status_Handler, - }, - { - MethodName: "StartAsyncSearch", - Handler: _SeqProxyApi_StartAsyncSearch_Handler, - }, - { - MethodName: "FetchAsyncSearchResult", - Handler: _SeqProxyApi_FetchAsyncSearchResult_Handler, - }, - { - MethodName: "CancelAsyncSearch", - Handler: _SeqProxyApi_CancelAsyncSearch_Handler, - }, - { - MethodName: "DeleteAsyncSearch", - Handler: _SeqProxyApi_DeleteAsyncSearch_Handler, - }, - { - MethodName: "GetAsyncSearchesList", - Handler: _SeqProxyApi_GetAsyncSearchesList_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Fetch", - Handler: _SeqProxyApi_Fetch_Handler, - ServerStreams: true, - }, - { - StreamName: "Export", - Handler: _SeqProxyApi_Export_Handler, - ServerStreams: true, - }, - { - StreamName: "ExportAsyncSearch", - Handler: _SeqProxyApi_ExportAsyncSearch_Handler, - ServerStreams: true, - }, - }, - Metadata: "seqproxyapi/v1/seq_proxy_api.proto", -} - -func (m *Error) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { +func (x *seqProxyApiStreamSearchClient) Recv() (*StreamSearchResponse, error) { + m := new(StreamSearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } - return dAtA[:n], nil + return m, nil } -func (m *Error) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +// SeqProxyApiServer is the server API for SeqProxyApi service. +// All implementations must embed UnimplementedSeqProxyApiServer +// for forward compatibility +type SeqProxyApiServer interface { + // Fetch documents for given SearchQuery. + Search(context.Context, *SearchRequest) (*SearchResponse, error) + // Fetch documents, aggregations and histograms for given queries correspondingly. + ComplexSearch(context.Context, *ComplexSearchRequest) (*ComplexSearchResponse, error) + // Fetch aggregations for given SearchQuery and AggQueries. + GetAggregation(context.Context, *GetAggregationRequest) (*GetAggregationResponse, error) + // Fetch histogram for given SearchQuery and HistQuery. + GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) + // Fetch documents by the corresponding seq-ids. + Fetch(*FetchRequest, SeqProxyApi_FetchServer) error + // Fetch current seq-db mapping. + Mapping(context.Context, *MappingRequest) (*MappingResponse, error) + // Fetch seq-db store's availability information. + Status(context.Context, *StatusRequest) (*StatusResponse, error) + // Stream documents for given SearchQuery. Same as Search, but returns streaming response. + Export(*ExportRequest, SeqProxyApi_ExportServer) error + // Starts a new asynchronous search operation. + // The server processes the request in the background and returns a search ID. + StartAsyncSearch(context.Context, *StartAsyncSearchRequest) (*StartAsyncSearchResponse, error) + // Fetches the result or current status of a previously started async search. + // Clients should use the search ID returned by StartAsyncSearch. + FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) + // Cancels an ongoing asynchronous search operation if it hasn't completed yet. + CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) + // Frees up resources if the result is no longer needed. + DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) + // Fetch list of async searches. + GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) + // Stream documents for given async search ID. + ExportAsyncSearch(*ExportAsyncSearchRequest, SeqProxyApi_ExportAsyncSearchServer) error + StreamSearch(SeqProxyApi_StreamSearchServer) error + mustEmbedUnimplementedSeqProxyApiServer() } -func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +// UnimplementedSeqProxyApiServer must be embedded to have forward compatible implementations. +type UnimplementedSeqProxyApiServer struct { } -func (m *Document) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (UnimplementedSeqProxyApiServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") +} +func (UnimplementedSeqProxyApiServer) ComplexSearch(context.Context, *ComplexSearchRequest) (*ComplexSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ComplexSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) GetAggregation(context.Context, *GetAggregationRequest) (*GetAggregationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAggregation not implemented") +} +func (UnimplementedSeqProxyApiServer) GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") +} +func (UnimplementedSeqProxyApiServer) Fetch(*FetchRequest, SeqProxyApi_FetchServer) error { + return status.Errorf(codes.Unimplemented, "method Fetch not implemented") +} +func (UnimplementedSeqProxyApiServer) Mapping(context.Context, *MappingRequest) (*MappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mapping not implemented") +} +func (UnimplementedSeqProxyApiServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (UnimplementedSeqProxyApiServer) Export(*ExportRequest, SeqProxyApi_ExportServer) error { + return status.Errorf(codes.Unimplemented, "method Export not implemented") +} +func (UnimplementedSeqProxyApiServer) StartAsyncSearch(context.Context, *StartAsyncSearchRequest) (*StartAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartAsyncSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchAsyncSearchResult not implemented") +} +func (UnimplementedSeqProxyApiServer) CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelAsyncSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAsyncSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") +} +func (UnimplementedSeqProxyApiServer) ExportAsyncSearch(*ExportAsyncSearchRequest, SeqProxyApi_ExportAsyncSearchServer) error { + return status.Errorf(codes.Unimplemented, "method ExportAsyncSearch not implemented") } +func (UnimplementedSeqProxyApiServer) StreamSearch(SeqProxyApi_StreamSearchServer) error { + return status.Errorf(codes.Unimplemented, "method StreamSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} -func (m *Document) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +// UnsafeSeqProxyApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SeqProxyApiServer will +// result in compilation errors. +type UnsafeSeqProxyApiServer interface { + mustEmbedUnimplementedSeqProxyApiServer() } -func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) +func RegisterSeqProxyApiServer(s grpc.ServiceRegistrar, srv SeqProxyApiServer) { + s.RegisterService(&SeqProxyApi_ServiceDesc, srv) +} + +func _SeqProxyApi_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRequest) + if err := dec(in); err != nil { + return nil, err } - if m.Time != nil { - size, err := (*timestamppb1.Timestamp)(m.Time).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a + if interceptor == nil { + return srv.(SeqProxyApiServer).Search(ctx, in) } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/Search", } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).Search(ctx, req.(*SearchRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *Aggregation_Bucket) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { +func _SeqProxyApi_ComplexSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ComplexSearchRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *Aggregation_Bucket) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Aggregation_Bucket) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if interceptor == nil { + return srv.(SeqProxyApiServer).ComplexSearch(ctx, in) } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/ComplexSearch", } - if m.Ts != nil { - size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).ComplexSearch(ctx, req.(*ComplexSearchRequest)) } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) - i-- - dAtA[i] = 0x2a + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_GetAggregation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAggregationRequest) + if err := dec(in); err != nil { + return nil, err } - if m.NotExists != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) - i-- - dAtA[i] = 0x20 + if interceptor == nil { + return srv.(SeqProxyApiServer).GetAggregation(ctx, in) } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x19 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetAggregation", } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).GetAggregation(ctx, req.(*GetAggregationRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *Aggregation) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { +func _SeqProxyApi_GetHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHistogramRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *Aggregation) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Aggregation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if interceptor == nil { + return srv.(SeqProxyApiServer).GetHistogram(ctx, in) } - if m.NotExists != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetHistogram", } - if len(m.Buckets) > 0 { - for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Buckets[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).GetHistogram(ctx, req.(*GetHistogramRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *Histogram_Bucket) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err +func _SeqProxyApi_Fetch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FetchRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return dAtA[:n], nil + return srv.(SeqProxyApiServer).Fetch(m, &seqProxyApiFetchServer{stream}) } -func (m *Histogram_Bucket) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +type SeqProxyApi_FetchServer interface { + Send(*Document) error + grpc.ServerStream } -func (m *Histogram_Bucket) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +type seqProxyApiFetchServer struct { + grpc.ServerStream +} + +func (x *seqProxyApiFetchServer) Send(m *Document) error { + return x.ServerStream.SendMsg(m) +} + +func _SeqProxyApi_Mapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MappingRequest) + if err := dec(in); err != nil { + return nil, err } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if interceptor == nil { + return srv.(SeqProxyApiServer).Mapping(ctx, in) } - if m.Ts != nil { - size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/Mapping", } - if m.DocCount != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DocCount)) - i-- - dAtA[i] = 0x8 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).Mapping(ctx, req.(*MappingRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *Histogram) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { +func _SeqProxyApi_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *Histogram) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Histogram) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if interceptor == nil { + return srv.(SeqProxyApiServer).Status(ctx, in) } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/Status", } - if len(m.Buckets) > 0 { - for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Buckets[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).Status(ctx, req.(*StatusRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *SearchQuery) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err +func _SeqProxyApi_Export_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ExportRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return dAtA[:n], nil + return srv.(SeqProxyApiServer).Export(m, &seqProxyApiExportServer{stream}) } -func (m *SearchQuery) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) +type SeqProxyApi_ExportServer interface { + Send(*ExportResponse) error + grpc.ServerStream } -func (m *SearchQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil +type seqProxyApiExportServer struct { + grpc.ServerStream +} + +func (x *seqProxyApiExportServer) Send(m *ExportResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _SeqProxyApi_StartAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartAsyncSearchRequest) + if err := dec(in); err != nil { + return nil, err } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if interceptor == nil { + return srv.(SeqProxyApiServer).StartAsyncSearch(ctx, in) } - if m.Downsample != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Downsample)) - i-- - dAtA[i] = 0x28 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", } - if m.Explain { - i-- - if m.Explain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).StartAsyncSearch(ctx, req.(*StartAsyncSearchRequest)) } - if m.To != nil { - size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_FetchAsyncSearchResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchAsyncSearchResultRequest) + if err := dec(in); err != nil { + return nil, err } - if m.From != nil { - size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(SeqProxyApiServer).FetchAsyncSearchResult(ctx, in) } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).FetchAsyncSearchResult(ctx, req.(*FetchAsyncSearchResultRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *AggQuery) MarshalVT() (dAtA []byte, err error) { +func _SeqProxyApi_CancelAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelAsyncSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).CancelAsyncSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).CancelAsyncSearch(ctx, req.(*CancelAsyncSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_DeleteAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAsyncSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, req.(*DeleteAsyncSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAsyncSearchesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, req.(*GetAsyncSearchesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_ExportAsyncSearch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ExportAsyncSearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(SeqProxyApiServer).ExportAsyncSearch(m, &seqProxyApiExportAsyncSearchServer{stream}) +} + +type SeqProxyApi_ExportAsyncSearchServer interface { + Send(*ExportResponse) error + grpc.ServerStream +} + +type seqProxyApiExportAsyncSearchServer struct { + grpc.ServerStream +} + +func (x *seqProxyApiExportAsyncSearchServer) Send(m *ExportResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _SeqProxyApi_StreamSearch_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(SeqProxyApiServer).StreamSearch(&seqProxyApiStreamSearchServer{stream}) +} + +type SeqProxyApi_StreamSearchServer interface { + Send(*StreamSearchResponse) error + Recv() (*StreamSearchRequest, error) + grpc.ServerStream +} + +type seqProxyApiStreamSearchServer struct { + grpc.ServerStream +} + +func (x *seqProxyApiStreamSearchServer) Send(m *StreamSearchResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *seqProxyApiStreamSearchServer) Recv() (*StreamSearchRequest, error) { + m := new(StreamSearchRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// SeqProxyApi_ServiceDesc is the grpc.ServiceDesc for SeqProxyApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SeqProxyApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "seqproxyapi.v1.SeqProxyApi", + HandlerType: (*SeqProxyApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Search", + Handler: _SeqProxyApi_Search_Handler, + }, + { + MethodName: "ComplexSearch", + Handler: _SeqProxyApi_ComplexSearch_Handler, + }, + { + MethodName: "GetAggregation", + Handler: _SeqProxyApi_GetAggregation_Handler, + }, + { + MethodName: "GetHistogram", + Handler: _SeqProxyApi_GetHistogram_Handler, + }, + { + MethodName: "Mapping", + Handler: _SeqProxyApi_Mapping_Handler, + }, + { + MethodName: "Status", + Handler: _SeqProxyApi_Status_Handler, + }, + { + MethodName: "StartAsyncSearch", + Handler: _SeqProxyApi_StartAsyncSearch_Handler, + }, + { + MethodName: "FetchAsyncSearchResult", + Handler: _SeqProxyApi_FetchAsyncSearchResult_Handler, + }, + { + MethodName: "CancelAsyncSearch", + Handler: _SeqProxyApi_CancelAsyncSearch_Handler, + }, + { + MethodName: "DeleteAsyncSearch", + Handler: _SeqProxyApi_DeleteAsyncSearch_Handler, + }, + { + MethodName: "GetAsyncSearchesList", + Handler: _SeqProxyApi_GetAsyncSearchesList_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Fetch", + Handler: _SeqProxyApi_Fetch_Handler, + ServerStreams: true, + }, + { + StreamName: "Export", + Handler: _SeqProxyApi_Export_Handler, + ServerStreams: true, + }, + { + StreamName: "ExportAsyncSearch", + Handler: _SeqProxyApi_ExportAsyncSearch_Handler, + ServerStreams: true, + }, + { + StreamName: "StreamSearch", + Handler: _SeqProxyApi_StreamSearch_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "seqproxyapi/v1/seq_proxy_api.proto", +} + +func (m *Error) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3186,12 +3505,12 @@ func (m *AggQuery) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AggQuery) MarshalToVT(dAtA []byte) (int, error) { +func (m *Error) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *AggQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3203,46 +3522,22 @@ func (m *AggQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Interval != nil { - i -= len(*m.Interval) - copy(dAtA[i:], *m.Interval) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Interval))) - i-- - dAtA[i] = 0x32 - } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) - i-- - dAtA[i] = 0x2a - } - if m.Func != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) - i-- - dAtA[i] = 0x20 - } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.Field) > 0 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *HistQuery) MarshalVT() (dAtA []byte, err error) { +func (m *Document) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3255,12 +3550,12 @@ func (m *HistQuery) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HistQuery) MarshalToVT(dAtA []byte) (int, error) { +func (m *Document) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *HistQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3272,17 +3567,34 @@ func (m *HistQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Interval) > 0 { - i -= len(m.Interval) - copy(dAtA[i:], m.Interval) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Interval))) + if m.Time != nil { + size, err := (*timestamppb1.Timestamp)(m.Time).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExplainEntry) MarshalVT() (dAtA []byte, err error) { +func (m *Aggregation_Bucket) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3295,12 +3607,12 @@ func (m *ExplainEntry) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExplainEntry) MarshalToVT(dAtA []byte) (int, error) { +func (m *Aggregation_Bucket) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExplainEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Aggregation_Bucket) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3312,39 +3624,48 @@ func (m *ExplainEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Children) > 0 { - for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Children[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Duration != nil { - size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i]) + if m.Ts != nil { + size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a + } + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) + i-- + dAtA[i] = 0x20 + } + if m.Value != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x19 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func (m *SearchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *Aggregation) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3357,12 +3678,12 @@ func (m *SearchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *Aggregation) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Aggregation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3374,52 +3695,27 @@ func (m *SearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OffsetId) > 0 { - i -= len(m.OffsetId) - copy(dAtA[i:], m.OffsetId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) - i-- - dAtA[i] = 0x32 - } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x28 - } - if m.WithTotal { - i-- - if m.WithTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- dAtA[i] = 0x10 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Buckets) > 0 { + for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Buckets[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ComplexSearchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *Histogram_Bucket) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3432,12 +3728,12 @@ func (m *ComplexSearchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ComplexSearchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *Histogram_Bucket) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ComplexSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Histogram_Bucket) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3449,74 +3745,25 @@ func (m *ComplexSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OffsetId) > 0 { - i -= len(m.OffsetId) - copy(dAtA[i:], m.OffsetId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) - i-- - dAtA[i] = 0x42 - } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x38 - } - if m.WithTotal { - i-- - if m.WithTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x28 - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x20 - } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if m.Ts != nil { + size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } + dAtA[i] = 0x12 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.DocCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DocCount)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SearchResponse) MarshalVT() (dAtA []byte, err error) { +func (m *Histogram) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3529,12 +3776,12 @@ func (m *SearchResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *Histogram) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Histogram) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3546,47 +3793,22 @@ func (m *SearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if len(m.Docs) > 0 { - for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Docs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Buckets) > 0 { + for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Buckets[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x10 - } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ComplexSearchResponse) MarshalVT() (dAtA []byte, err error) { +func (m *SearchQuery) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3599,12 +3821,12 @@ func (m *ComplexSearchResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ComplexSearchResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *SearchQuery) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ComplexSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *SearchQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3616,79 +3838,52 @@ func (m *ComplexSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.Downsample != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Downsample)) + i-- + dAtA[i] = 0x28 + } + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x20 } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x1a } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a - } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Docs) > 0 { - for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Docs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StartAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *AggQuery) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3701,12 +3896,12 @@ func (m *StartAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3718,67 +3913,46 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Interval != nil { + i -= len(*m.Interval) + copy(dAtA[i:], *m.Interval) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Interval))) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x32 } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Func != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) i-- - dAtA[i] = 0x22 - } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } + dAtA[i] = 0x20 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.GroupBy) > 0 { + i -= len(m.GroupBy) + copy(dAtA[i:], m.GroupBy) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } - if m.Retention != nil { - size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { +func (m *HistQuery) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3791,12 +3965,12 @@ func (m *StartAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *HistQuery) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StartAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *HistQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3808,17 +3982,17 @@ func (m *StartAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if len(m.Interval) > 0 { + i -= len(m.Interval) + copy(dAtA[i:], m.Interval) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Interval))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultRequest) MarshalVT() (dAtA []byte, err error) { +func (m *ExplainEntry) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3831,12 +4005,12 @@ func (m *FetchAsyncSearchResultRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchAsyncSearchResultRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3848,32 +4022,39 @@ func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVT(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x20 - } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Children[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Duration != nil { + size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultResponse) MarshalVT() (dAtA []byte, err error) { +func (m *SearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3886,12 +4067,12 @@ func (m *FetchAsyncSearchResultResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchAsyncSearchResultResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3903,86 +4084,52 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - if m.DiskUsage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x32 } - if m.Progress != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- - dAtA[i] = 0x39 + dAtA[i] = 0x28 } - if m.CanceledAt != nil { - size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.WithTotal { i-- - dAtA[i] = 0x32 - } - if m.ExpiresAt != nil { - size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x20 } - if m.StartedAt != nil { - size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x18 } - if m.Response != nil { - size, err := m.Response.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x10 } - if m.Request != nil { - size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 - } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *CancelAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *ComplexSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3995,12 +4142,12 @@ func (m *CancelAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CancelAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *ComplexSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ComplexSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4012,90 +4159,74 @@ func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CancelAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x42 } - return dAtA[:n], nil -} - -func (m *CancelAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x38 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - return len(dAtA) - i, nil -} - -func (m *DeleteAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x20 } - return dAtA[:n], nil -} - -func (m *DeleteAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { +func (m *SearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4108,12 +4239,12 @@ func (m *DeleteAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4125,10 +4256,47 @@ func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Docs) > 0 { + for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Docs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *GetAsyncSearchesListRequest) MarshalVT() (dAtA []byte, err error) { +func (m *ComplexSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4141,12 +4309,12 @@ func (m *GetAsyncSearchesListRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAsyncSearchesListRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *ComplexSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ComplexSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4158,62 +4326,15 @@ func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x10 - } - if m.Status != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetAsyncSearchesListResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetAsyncSearchesListResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + dAtA[i] = 0x3a } if m.Error != nil { size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) @@ -4223,24 +4344,61 @@ func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if len(m.Searches) > 0 { - for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Searches[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x22 + } + } + if len(m.Docs) > 0 { + for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Docs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *AsyncSearchesListItem) MarshalVT() (dAtA []byte, err error) { +func (m *StartAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4253,12 +4411,12 @@ func (m *AsyncSearchesListItem) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AsyncSearchesListItem) MarshalToVT(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *AsyncSearchesListItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4270,80 +4428,67 @@ func (m *AsyncSearchesListItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - i -= len(*m.Error) - copy(dAtA[i:], *m.Error) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x30 } - if m.DiskUsage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + if m.WithDocs { i-- - dAtA[i] = 0x40 - } - if m.Progress != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x39 + dAtA[i] = 0x28 } - if m.CanceledAt != nil { - size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x22 } - if m.ExpiresAt != nil { - size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a } - if m.StartedAt != nil { - size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } - if m.Request != nil { - size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) + if m.Retention != nil { + size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x10 - } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { +func (m *StartAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4356,12 +4501,12 @@ func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4373,32 +4518,17 @@ func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4411,12 +4541,12 @@ func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4428,47 +4558,32 @@ func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- dAtA[i] = 0x10 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4481,12 +4596,12 @@ func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4498,61 +4613,49 @@ func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x4a } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetHistogramResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetHistogramResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + dAtA[i] = 0x32 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4561,8 +4664,8 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if m.Response != nil { + size, err := m.Response.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4571,25 +4674,25 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i-- dAtA[i] = 0x1a } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { +func (m *CancelAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4602,12 +4705,12 @@ func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest_FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4619,29 +4722,17 @@ func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.AllowList { - i-- - if m.AllowList { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- - dAtA[i] = 0x10 - } - if len(m.Fields) > 0 { - for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Fields[iNdEx]) - copy(dAtA[i:], m.Fields[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) - i-- - dAtA[i] = 0xa - } + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *CancelAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4654,12 +4745,12 @@ func (m *FetchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4671,29 +4762,10 @@ func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.FieldsFilter != nil { - size, err := m.FieldsFilter.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *MappingRequest) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4706,12 +4778,12 @@ func (m *MappingRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MappingRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *MappingRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4723,10 +4795,17 @@ func (m *MappingRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *MappingResponse) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4739,12 +4818,12 @@ func (m *MappingResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MappingResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *MappingResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4756,17 +4835,10 @@ func (m *MappingResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4779,12 +4851,12 @@ func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4796,10 +4868,34 @@ func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4812,12 +4908,12 @@ func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4829,20 +4925,8 @@ func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Stores) > 0 { - for iNdEx := len(m.Stores) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Stores[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if m.OldestStorageTime != nil { - size, err := (*timestamppb1.Timestamp)(m.OldestStorageTime).MarshalToSizedBufferVT(dAtA[:i]) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4851,15 +4935,22 @@ func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.NumberOfStores != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumberOfStores)) - i-- - dAtA[i] = 0x8 + if len(m.Searches) > 0 { + for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Searches[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *StoreStatus) MarshalVT() (dAtA []byte, err error) { +func (m *AsyncSearchesListItem) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4872,12 +4963,12 @@ func (m *StoreStatus) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StoreStatus) MarshalToVT(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StoreStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4894,29 +4985,75 @@ func (m *StoreStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], *m.Error) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x4a } - if m.Values != nil { - size, err := m.Values.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StoreStatusValues) MarshalVT() (dAtA []byte, err error) { +func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4929,12 +5066,12 @@ func (m *StoreStatusValues) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StoreStatusValues) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAggregationRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StoreStatusValues) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4946,8 +5083,20 @@ func (m *StoreStatusValues) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.OldestTime != nil { - size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4959,7 +5108,7 @@ func (m *StoreStatusValues) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ExportRequest) MarshalVT() (dAtA []byte, err error) { +func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4972,12 +5121,12 @@ func (m *ExportRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAggregationResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExportRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4989,30 +5138,47 @@ func (m *ExportRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x22 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- dAtA[i] = 0x10 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ExportAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { +func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5025,12 +5191,12 @@ func (m *ExportAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetHistogramRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5042,27 +5208,30 @@ func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExportResponse) MarshalVT() (dAtA []byte, err error) { +func (m *GetHistogramResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5075,12 +5244,12 @@ func (m *ExportResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetHistogramResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExportResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5092,38 +5261,63 @@ func (m *ExportResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Doc != nil { - size, err := m.Doc.MarshalToSizedBufferVT(dAtA[:i]) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x22 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Error) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Error) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest_FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Error) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5135,40 +5329,47 @@ func (m *Error) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + if m.AllowList { i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Fields[iNdEx]) + copy(dAtA[i:], m.Fields[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *Document) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Document) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5180,52 +5381,47 @@ func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Time != nil { - size, err := (*timestamppb1.Timestamp)(m.Time).MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.FieldsFilter != nil { + size, err := m.FieldsFilter.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *Aggregation_Bucket) MarshalVTStrict() (dAtA []byte, err error) { +func (m *MappingRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Aggregation_Bucket) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MappingRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Aggregation_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MappingRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5237,66 +5433,28 @@ func (m *Aggregation_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Ts != nil { - size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) - i-- - dAtA[i] = 0x2a - } - if m.NotExists != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) - i-- - dAtA[i] = 0x20 - } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x19 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } return len(dAtA) - i, nil } -func (m *Aggregation) MarshalVTStrict() (dAtA []byte, err error) { +func (m *MappingResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Aggregation) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *MappingResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Aggregation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *MappingResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5308,45 +5466,35 @@ func (m *Aggregation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.NotExists != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) i-- - dAtA[i] = 0x10 - } - if len(m.Buckets) > 0 { - for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Buckets[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Histogram_Bucket) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Histogram_Bucket) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StatusRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Histogram_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5358,43 +5506,28 @@ func (m *Histogram_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Ts != nil { - size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.DocCount != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DocCount)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *Histogram) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *Histogram) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StatusResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5406,40 +5539,55 @@ func (m *Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Buckets) > 0 { - for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Buckets[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Stores) > 0 { + for iNdEx := len(m.Stores) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Stores[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x22 + } + } + if m.OldestStorageTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestStorageTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.NumberOfStores != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumberOfStores)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SearchQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StoreStatus) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StoreStatus) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StoreStatus) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5451,33 +5599,15 @@ func (m *SearchQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Downsample != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Downsample)) - i-- - dAtA[i] = 0x28 - } - if m.Explain { - i-- - if m.Explain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.To != nil { - size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Error != nil { + i -= len(*m.Error) + copy(dAtA[i:], *m.Error) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) i-- dAtA[i] = 0x1a } - if m.From != nil { - size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Values != nil { + size, err := m.Values.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -5486,35 +5616,35 @@ func (m *SearchQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StoreStatusValues) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StoreStatusValues) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StoreStatusValues) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5526,64 +5656,38 @@ func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Interval != nil { - i -= len(*m.Interval) - copy(dAtA[i:], *m.Interval) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Interval))) - i-- - dAtA[i] = 0x32 - } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + if m.OldestTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) - i-- - dAtA[i] = 0x2a - } - if m.Func != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) - i-- - dAtA[i] = 0x20 - } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) - i-- - dAtA[i] = 0x1a - } - if len(m.Field) > 0 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *HistQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ExportRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *HistQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ExportRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *HistQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ExportRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5595,35 +5699,48 @@ func (m *HistQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Interval) > 0 { - i -= len(m.Interval) - copy(dAtA[i:], m.Interval) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Interval))) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ExportAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ExplainEntry) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ExportAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExplainEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5635,57 +5752,45 @@ func (m *ExplainEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Children) > 0 { - for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Children[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 } - if m.Duration != nil { - size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ExportResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ExportResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ExportResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5697,40 +5802,70 @@ func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OffsetId) > 0 { - i -= len(m.OffsetId) - copy(dAtA[i:], m.OffsetId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + if m.Doc != nil { + size, err := m.Doc.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0xa } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x28 + return len(dAtA) - i, nil +} + +func (m *StreamSearchRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.WithTotal { - i-- - if m.WithTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 + return dAtA[:n], nil +} + +func (m *StreamSearchRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x10 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if vtmsg, ok := m.RequestType.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } + return len(dAtA) - i, nil +} + +func (m *StreamSearchRequest_Query) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamSearchRequest_Query) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -5738,29 +5873,55 @@ func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } +func (m *StreamSearchRequest_Control) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} -func (m *ComplexSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StreamSearchRequest_Control) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Control != nil { + size, err := m.Control.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *StreamSearchQuery) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ComplexSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StreamSearchQuery) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ComplexSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StreamSearchQuery) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5772,18 +5933,6 @@ func (m *ComplexSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OffsetId) > 0 { - i -= len(m.OffsetId) - copy(dAtA[i:], m.OffsetId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) - i-- - dAtA[i] = 0x42 - } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x38 - } if m.WithTotal { i-- if m.WithTotal { @@ -5794,18 +5943,25 @@ func (m *ComplexSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i-- dAtA[i] = 0x30 } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x20 } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -5814,50 +5970,45 @@ func (m *ComplexSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i-- dAtA[i] = 0x1a } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- + dAtA[i] = 0x12 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StreamControl) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StreamControl) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StreamControl) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5869,65 +6020,33 @@ func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Action != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Action)) i-- - dAtA[i] = 0x22 - } - if len(m.Docs) > 0 { - for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Docs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x10 - } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ComplexSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StreamSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *ComplexSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StreamSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ComplexSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StreamSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5939,97 +6058,106 @@ func (m *ComplexSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Explain != nil { - size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if vtmsg, ok := m.ResponseType.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + return len(dAtA) - i, nil +} + +func (m *StreamSearchResponse_Header) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamSearchResponse_Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + return len(dAtA) - i, nil +} +func (m *StreamSearchResponse_Data) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamSearchResponse_Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Data != nil { + size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a - } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Docs) > 0 { - for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Docs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + return len(dAtA) - i, nil +} +func (m *StreamSearchResponse_Summary) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StreamSearchResponse_Summary) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Summary != nil { + size, err := m.Summary.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a } return len(dAtA) - i, nil } - -func (m *StartAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ResponseHeader) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *StartAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ResponseHeader) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ResponseHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6041,85 +6169,40 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x30 - } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Typing) > 0 { + for iNdEx := len(m.Typing) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Typing[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Retention != nil { - size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + dAtA[i] = 0xa } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Typing) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Typing) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Typing) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6131,35 +6214,40 @@ func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Title))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ResponseData) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ResponseData) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ResponseData) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6171,50 +6259,38 @@ func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x20 - } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) - i-- - dAtA[i] = 0x18 - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x10 - } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.Batch != nil { + size, err := m.Batch.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *RecordsBatch) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *RecordsBatch) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *RecordsBatch) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6226,104 +6302,40 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a } - if m.DiskUsage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) - i-- - dAtA[i] = 0x40 + return len(dAtA) - i, nil +} + +func (m *Record) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.Progress != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) - i-- - dAtA[i] = 0x39 - } - if m.CanceledAt != nil { - size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if m.ExpiresAt != nil { - size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.StartedAt != nil { - size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if m.Response != nil { - size, err := m.Response.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Request != nil { - size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } return dAtA[:n], nil } -func (m *CancelAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Record) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Record) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6335,35 +6347,37 @@ func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) - i-- - dAtA[i] = 0xa + if len(m.RawData) > 0 { + for iNdEx := len(m.RawData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RawData[iNdEx]) + copy(dAtA[i:], m.RawData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawData[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ResponseSummary) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *CancelAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ResponseSummary) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ResponseSummary) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6375,10 +6389,35 @@ func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (i i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Error) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6391,12 +6430,12 @@ func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Error) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Error) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6408,17 +6447,22 @@ func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Document) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6431,12 +6475,12 @@ func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Document) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6448,10 +6492,34 @@ func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (i i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Time != nil { + size, err := (*timestamppb1.Timestamp)(m.Time).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Aggregation_Bucket) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6464,12 +6532,12 @@ func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *GetAsyncSearchesListRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Aggregation_Bucket) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Aggregation_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6481,34 +6549,48 @@ func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVTStrict(dAtA []byte) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0x22 + if m.Ts != nil { + size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x2a } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x20 } - if m.Status != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) + if m.Value != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x19 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func (m *GetAsyncSearchesListResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Aggregation) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6521,12 +6603,12 @@ func (m *GetAsyncSearchesListResponse) MarshalVTStrict() (dAtA []byte, err error return dAtA[:n], nil } -func (m *GetAsyncSearchesListResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Aggregation) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Aggregation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6538,19 +6620,14 @@ func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if len(m.Searches) > 0 { - for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Searches[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Buckets) > 0 { + for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Buckets[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -6563,7 +6640,7 @@ func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) return len(dAtA) - i, nil } -func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Histogram_Bucket) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6576,12 +6653,12 @@ func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AsyncSearchesListItem) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Histogram_Bucket) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *AsyncSearchesListItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Histogram_Bucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6593,80 +6670,25 @@ func (m *AsyncSearchesListItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - i -= len(*m.Error) - copy(dAtA[i:], *m.Error) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) + if m.Ts != nil { + size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x12 } - if m.DiskUsage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) - i-- - dAtA[i] = 0x40 - } - if m.Progress != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) - i-- - dAtA[i] = 0x39 - } - if m.CanceledAt != nil { - size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if m.ExpiresAt != nil { - size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.StartedAt != nil { - size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if m.Request != nil { - size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x10 - } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.DocCount != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DocCount)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Histogram) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6679,12 +6701,12 @@ func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Histogram) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6696,32 +6718,22 @@ func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Buckets) > 0 { + for iNdEx := len(m.Buckets) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Buckets[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + dAtA[i] = 0xa } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetAggregationResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchQuery) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6734,12 +6746,12 @@ func (m *GetAggregationResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchQuery) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6751,47 +6763,52 @@ func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Downsample != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Downsample)) + i-- + dAtA[i] = 0x28 + } + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetHistogramRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6804,12 +6821,12 @@ func (m *GetHistogramRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6821,30 +6838,46 @@ func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Interval != nil { + i -= len(*m.Interval) + copy(dAtA[i:], *m.Interval) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Interval))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) + i-- + dAtA[i] = 0x2a + } + if m.Func != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) + i-- + dAtA[i] = 0x20 + } + if len(m.GroupBy) > 0 { + i -= len(m.GroupBy) + copy(dAtA[i:], m.GroupBy) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) + i-- + dAtA[i] = 0x1a + } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetHistogramResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *HistQuery) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6857,12 +6890,12 @@ func (m *GetHistogramResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *HistQuery) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *HistQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6874,45 +6907,17 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x10 - } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Interval) > 0 { + i -= len(m.Interval) + copy(dAtA[i:], m.Interval) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Interval))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6925,12 +6930,12 @@ func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest_FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6942,29 +6947,39 @@ func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (i i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.AllowList { - i-- - if m.AllowList { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Fields) > 0 { - for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Fields[iNdEx]) - copy(dAtA[i:], m.Fields[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Children[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a } } + if m.Duration != nil { + size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6977,12 +6992,12 @@ func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6994,29 +7009,52 @@ func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.FieldsFilter != nil { - size, err := m.FieldsFilter.MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + i-- + dAtA[i] = 0x32 + } + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x28 + } + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 - } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0xa - } + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MappingRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ComplexSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7029,12 +7067,12 @@ func (m *MappingRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MappingRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ComplexSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *MappingRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ComplexSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7046,50 +7084,74 @@ func (m *MappingRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - return len(dAtA) - i, nil -} - -func (m *MappingResponse) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + i-- + dAtA[i] = 0x42 } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x38 } - return dAtA[:n], nil -} - -func (m *MappingResponse) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *MappingResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x20 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7102,12 +7164,12 @@ func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7119,10 +7181,47 @@ func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Docs) > 0 { + for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Docs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ComplexSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7135,12 +7234,12 @@ func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ComplexSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ComplexSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7152,37 +7251,79 @@ func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Stores) > 0 { - for iNdEx := len(m.Stores) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Stores[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - if m.OldestStorageTime != nil { - size, err := (*timestamppb1.Timestamp)(m.OldestStorageTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x32 } - if m.NumberOfStores != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumberOfStores)) + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Docs) > 0 { + for iNdEx := len(m.Docs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Docs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *StoreStatus) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StartAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7195,12 +7336,12 @@ func (m *StoreStatus) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StoreStatus) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StoreStatus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7212,15 +7353,45 @@ func (m *StoreStatus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - i -= len(*m.Error) - copy(dAtA[i:], *m.Error) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x30 } - if m.Values != nil { - size, err := m.Values.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.WithDocs { + i-- + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -7229,17 +7400,20 @@ func (m *StoreStatus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) + if m.Retention != nil { + size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StoreStatusValues) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7252,12 +7426,12 @@ func (m *StoreStatusValues) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StoreStatusValues) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StoreStatusValues) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7269,20 +7443,17 @@ func (m *StoreStatusValues) MarshalToSizedBufferVTStrict(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.OldestTime != nil { - size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExportRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7295,12 +7466,12 @@ func (m *ExportRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ExportRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7312,6 +7483,11 @@ func (m *ExportRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x20 + } if m.Offset != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- @@ -7322,20 +7498,17 @@ func (m *ExportRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExportAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7348,12 +7521,12 @@ func (m *ExportAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7365,27 +7538,86 @@ func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x4a } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x40 } - if len(m.SearchId) > 0 { - i -= len(m.SearchId) - copy(dAtA[i:], m.SearchId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.Response != nil { + size, err := m.Response.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *ExportResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -7398,12 +7630,12 @@ func (m *ExportResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExportResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ExportResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -7415,892 +7647,5439 @@ func (m *ExportResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Doc != nil { - size, err := m.Doc.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Error) SizeVT() (n int) { +func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.Code != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Document) SizeVT() (n int) { +func (m *CancelAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Time != nil { - l = (*timestamppb1.Timestamp)(m.Time).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *Aggregation_Bucket) SizeVT() (n int) { +func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Value != 0 { - n += 9 - } - if m.NotExists != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) - } - if len(m.Quantiles) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + return nil, nil } - if m.Ts != nil { - l = (*timestamppb1.Timestamp)(m.Ts).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Aggregation) SizeVT() (n int) { +func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Buckets) > 0 { - for _, e := range m.Buckets { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.NotExists != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *Histogram_Bucket) SizeVT() (n int) { +func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.DocCount != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.DocCount)) + return nil, nil } - if m.Ts != nil { - l = (*timestamppb1.Timestamp)(m.Ts).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *Histogram) SizeVT() (n int) { +func (m *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Buckets) > 0 { - for _, e := range m.Buckets { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchQuery) SizeVT() (n int) { +func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Query) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.From != nil { - l = (*timestamppb1.Timestamp)(m.From).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.To != nil { - l = (*timestamppb1.Timestamp)(m.To).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Explain { - n += 2 + return nil, nil } - if m.Downsample != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Downsample)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *AggQuery) SizeVT() (n int) { +func (m *GetAsyncSearchesListRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Field) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.GroupBy) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if m.Func != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 } - if len(m.Quantiles) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 } - if m.Interval != nil { - l = len(*m.Interval) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *HistQuery) SizeVT() (n int) { +func (m *GetAsyncSearchesListResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - l = len(m.Interval) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *ExplainEntry) SizeVT() (n int) { +func (m *GetAsyncSearchesListResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Duration != nil { - l = (*durationpb1.Duration)(m.Duration).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Searches) > 0 { + for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Searches[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchRequest) SizeVT() (n int) { +func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) - } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) - } - if m.WithTotal { - n += 2 - } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + return nil, nil } - l = len(m.OffsetId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *ComplexSearchRequest) SizeVT() (n int) { +func (m *AsyncSearchesListItem) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *AsyncSearchesListItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Error != nil { + i -= len(*m.Error) + copy(dAtA[i:], *m.Error) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) + i-- + dAtA[i] = 0x4a + } + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - if m.WithTotal { - n += 2 + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa } - l = len(m.OffsetId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *SearchResponse) SizeVT() (n int) { +func (m *GetAggregationRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.PartialResponse { - n += 2 + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Total != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } } - if len(m.Docs) > 0 { - for _, e := range m.Docs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *GetAggregationResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *ComplexSearchResponse) SizeVT() (n int) { +func (m *GetAggregationResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.PartialResponse { - n += 2 + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Total != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) - } - if len(m.Docs) > 0 { - for _, e := range m.Docs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - if m.Explain != nil { - l = m.Explain.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *GetHistogramRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *StartAsyncSearchRequest) SizeVT() (n int) { +func (m *GetHistogramRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Retention != nil { - l = (*durationpb1.Duration)(m.Retention).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.WithDocs { - n += 2 + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) SizeVT() (n int) { +func (m *GetHistogramResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *FetchAsyncSearchResultRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) - } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) - } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) - } - n += len(m.unknownFields) - return n +func (m *GetHistogramResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchAsyncSearchResultResponse) SizeVT() (n int) { +func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Status != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) - } - if m.Request != nil { - l = m.Request.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Response != nil { - l = m.Response.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.StartedAt != nil { - l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ExpiresAt != nil { - l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.CanceledAt != nil { - l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - if m.Progress != 0 { - n += 9 + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - if m.DiskUsage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *CancelAsyncSearchRequest) SizeVT() (n int) { +func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *CancelAsyncSearchResponse) SizeVT() (n int) { +func (m *FetchRequest_FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - n += len(m.unknownFields) - return n + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AllowList { + i-- + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Fields[iNdEx]) + copy(dAtA[i:], m.Fields[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fields[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchRequest) SizeVT() (n int) { +func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *DeleteAsyncSearchResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n +func (m *FetchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAsyncSearchesListRequest) SizeVT() (n int) { +func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Status != nil { - n += 1 + protohelpers.SizeOfVarint(uint64(*m.Status)) - } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + if m.FieldsFilter != nil { + size, err := m.FieldsFilter.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0xa } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *GetAsyncSearchesListResponse) SizeVT() (n int) { +func (m *MappingRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if len(m.Searches) > 0 { - for _, e := range m.Searches { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + return nil, nil } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *AsyncSearchesListItem) SizeVT() (n int) { +func (m *MappingRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MappingRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Status != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) - } - if m.Request != nil { - l = m.Request.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.StartedAt != nil { - l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ExpiresAt != nil { - l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.CanceledAt != nil { - l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Progress != 0 { - n += 9 - } - if m.DiskUsage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) - } - if m.Error != nil { - l = len(*m.Error) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *GetAggregationRequest) SizeVT() (n int) { +func (m *MappingResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *GetAggregationResponse) SizeVT() (n int) { +func (m *MappingResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *MappingResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.PartialResponse { - n += 2 - } - if m.Total != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) - } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *GetHistogramRequest) SizeVT() (n int) { +func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *GetHistogramResponse) SizeVT() (n int) { +func (m *StatusRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.PartialResponse { - n += 2 - } - if m.Total != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.Error != nil { - l = m.Error.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *FetchRequest_FieldsFilter) SizeVT() (n int) { +func (m *StatusResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Fields) > 0 { - for _, s := range m.Fields { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Stores) > 0 { + for iNdEx := len(m.Stores) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Stores[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } } - if m.AllowList { - n += 2 + if m.OldestStorageTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestStorageTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - n += len(m.unknownFields) - return n + if m.NumberOfStores != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumberOfStores)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *FetchRequest) SizeVT() (n int) { +func (m *StoreStatus) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreStatus) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StoreStatus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + i -= len(*m.Error) + copy(dAtA[i:], *m.Error) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(*m.Error))) + i-- + dAtA[i] = 0x1a + } + if m.Values != nil { + size, err := m.Values.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - if m.FieldsFilter != nil { - l = m.FieldsFilter.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *MappingRequest) SizeVT() (n int) { +func (m *StoreStatusValues) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *MappingResponse) SizeVT() (n int) { +func (m *StoreStatusValues) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StoreStatusValues) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + if m.OldestTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *StatusRequest) SizeVT() (n int) { +func (m *ExportRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *StatusResponse) SizeVT() (n int) { +func (m *ExportRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.NumberOfStores != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NumberOfStores)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.OldestStorageTime != nil { - l = (*timestamppb1.Timestamp)(m.OldestStorageTime).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 } - if len(m.Stores) > 0 { - for _, e := range m.Stores { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExportResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExportResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Doc != nil { + size, err := m.Doc.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StreamSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if msg, ok := m.RequestType.(*StreamSearchRequest_Control); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.RequestType.(*StreamSearchRequest_Query); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *StreamSearchRequest_Query) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchRequest_Query) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *StreamSearchRequest_Control) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchRequest_Control) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Control != nil { + size, err := m.Control.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *StreamSearchQuery) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamSearchQuery) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + i-- + dAtA[i] = 0x2a + } + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StreamControl) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamControl) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamControl) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Action != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StreamSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StreamSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if msg, ok := m.ResponseType.(*StreamSearchResponse_Summary); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.ResponseType.(*StreamSearchResponse_Data); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + if msg, ok := m.ResponseType.(*StreamSearchResponse_Header); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *StreamSearchResponse_Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchResponse_Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *StreamSearchResponse_Data) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchResponse_Data) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Data != nil { + size, err := m.Data.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *StreamSearchResponse_Summary) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StreamSearchResponse_Summary) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Summary != nil { + size, err := m.Summary.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *ResponseHeader) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseHeader) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResponseHeader) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Typing) > 0 { + for iNdEx := len(m.Typing) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Typing[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Typing) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Typing) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Typing) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseData) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseData) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResponseData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Batch != nil { + size, err := m.Batch.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RecordsBatch) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RecordsBatch) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *RecordsBatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Record) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Record) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Record) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RawData) > 0 { + for iNdEx := len(m.RawData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RawData[iNdEx]) + copy(dAtA[i:], m.RawData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawData[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResponseSummary) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseSummary) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ResponseSummary) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Error) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Document) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Time != nil { + l = (*timestamppb1.Timestamp)(m.Time).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Aggregation_Bucket) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Value != 0 { + n += 9 + } + if m.NotExists != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + } + if len(m.Quantiles) > 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + } + if m.Ts != nil { + l = (*timestamppb1.Timestamp)(m.Ts).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Aggregation) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Buckets) > 0 { + for _, e := range m.Buckets { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.NotExists != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + } + n += len(m.unknownFields) + return n +} + +func (m *Histogram_Bucket) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DocCount != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DocCount)) + } + if m.Ts != nil { + l = (*timestamppb1.Timestamp)(m.Ts).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Histogram) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Buckets) > 0 { + for _, e := range m.Buckets { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *SearchQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != nil { + l = (*timestamppb1.Timestamp)(m.From).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.To != nil { + l = (*timestamppb1.Timestamp)(m.To).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Explain { + n += 2 + } + if m.Downsample != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Downsample)) + } + n += len(m.unknownFields) + return n +} + +func (m *AggQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Func != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + } + if len(m.Quantiles) > 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + } + if m.Interval != nil { + l = len(*m.Interval) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *HistQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Interval) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExplainEntry) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Duration != nil { + l = (*durationpb1.Duration)(m.Duration).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *SearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.WithTotal { + n += 2 + } + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + l = len(m.OffsetId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ComplexSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Hist != nil { + l = m.Hist.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.WithTotal { + n += 2 + } + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + l = len(m.OffsetId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PartialResponse { + n += 2 + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if len(m.Docs) > 0 { + for _, e := range m.Docs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ComplexSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PartialResponse { + n += 2 + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if len(m.Docs) > 0 { + for _, e := range m.Docs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Hist != nil { + l = m.Hist.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Explain != nil { + l = m.Explain.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StartAsyncSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Retention != nil { + l = (*durationpb1.Duration)(m.Retention).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Hist != nil { + l = m.Hist.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.WithDocs { + n += 2 + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + n += len(m.unknownFields) + return n +} + +func (m *StartAsyncSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FetchAsyncSearchResultRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + n += len(m.unknownFields) + return n +} + +func (m *FetchAsyncSearchResultResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.Request != nil { + l = m.Request.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Response != nil { + l = m.Response.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StartedAt != nil { + l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExpiresAt != nil { + l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.CanceledAt != nil { + l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Progress != 0 { + n += 9 + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CancelAsyncSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *CancelAsyncSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *DeleteAsyncSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeleteAsyncSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *GetAsyncSearchesListRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Status)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *GetAsyncSearchesListResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Searches) > 0 { + for _, e := range m.Searches { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AsyncSearchesListItem) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.Request != nil { + l = m.Request.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StartedAt != nil { + l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExpiresAt != nil { + l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.CanceledAt != nil { + l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Progress != 0 { + n += 9 + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } + if m.Error != nil { + l = len(*m.Error) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetAggregationRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *GetAggregationResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PartialResponse { + n += 2 + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetHistogramRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Hist != nil { + l = m.Hist.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *GetHistogramResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PartialResponse { + n += 2 + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if m.Hist != nil { + l = m.Hist.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FetchRequest_FieldsFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for _, s := range m.Fields { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.AllowList { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *FetchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.FieldsFilter != nil { + l = m.FieldsFilter.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *MappingRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *MappingResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StatusRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *StatusResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumberOfStores != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NumberOfStores)) + } + if m.OldestStorageTime != nil { + l = (*timestamppb1.Timestamp)(m.OldestStorageTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Stores) > 0 { + for _, e := range m.Stores { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *StoreStatus) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Host) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Values != nil { + l = m.Values.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Error != nil { + l = len(*m.Error) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StoreStatusValues) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OldestTime != nil { + l = (*timestamppb1.Timestamp)(m.OldestTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportAsyncSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + n += len(m.unknownFields) + return n +} + +func (m *ExportResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Doc != nil { + l = m.Doc.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *StreamSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.RequestType.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *StreamSearchRequest_Query) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *StreamSearchRequest_Control) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Control != nil { + l = m.Control.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *StreamSearchQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != nil { + l = (*timestamppb1.Timestamp)(m.From).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.To != nil { + l = (*timestamppb1.Timestamp)(m.To).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Explain { + n += 2 + } + l = len(m.OffsetId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.WithTotal { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *StreamControl) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Action != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Action)) + } + n += len(m.unknownFields) + return n +} + +func (m *StreamSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.ResponseType.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *StreamSearchResponse_Header) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *StreamSearchResponse_Data) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = m.Data.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *StreamSearchResponse_Summary) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Summary != nil { + l = m.Summary.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *ResponseHeader) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Typing) > 0 { + for _, e := range m.Typing { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Typing) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + n += len(m.unknownFields) + return n +} + +func (m *ResponseData) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Batch != nil { + l = m.Batch.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *RecordsBatch) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Record) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RawData) > 0 { + for _, b := range m.RawData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *ResponseSummary) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if m.Error != nil { + l = m.Error.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Explain != nil { + l = m.Explain.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Error) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Error: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Document) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Time == nil { + m.Time = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Aggregation_Bucket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NotExists |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Aggregation) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NotExists |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Histogram_Bucket) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) + } + m.DocCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DocCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Histogram) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Histogram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Buckets = append(m.Buckets, &Histogram_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Explain = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Downsample", wireType) + } + m.Downsample = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Downsample |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggQuery) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupBy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + } + m.Func = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Func |= AggFunc(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Interval = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HistQuery) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Interval = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OffsetId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ComplexSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OffsetId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ComplexSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &Histogram{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithDocs = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - n += len(m.unknownFields) - return n -} - -func (m *StoreStatus) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Values != nil { - l = m.Values.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Error != nil { - l = len(*m.Error) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *StoreStatusValues) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OldestTime != nil { - l = (*timestamppb1.Timestamp)(m.OldestTime).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} -func (m *ExportRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) - } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - n += len(m.unknownFields) - return n + return nil } - -func (m *ExportAsyncSearchRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) - } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) +func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } } - n += len(m.unknownFields) - return n -} -func (m *ExportResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Doc != nil { - l = m.Doc.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - n += len(m.unknownFields) - return n + return nil } - -func (m *Error) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8323,17 +13102,17 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - m.Code = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8343,16 +13122,67 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ErrorCode(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - var stringLen uint64 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8362,24 +13192,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8402,7 +13219,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Document) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8425,17 +13242,36 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8445,29 +13281,33 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} + } + if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8477,29 +13317,31 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} + if m.Response == nil { + m.Response = &ComplexSearchResponse{} + } + if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8526,69 +13368,54 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Time == nil { - m.Time = ×tamppb.Timestamp{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aggregation_Bucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8598,27 +13425,31 @@ func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 7: if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) } var v uint64 if (iNdEx + 8) > l { @@ -8626,83 +13457,29 @@ func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 4: + m.Progress = float64(math.Float64frombits(v)) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - m.NotExists = 0 + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NotExists |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - case 6: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8729,10 +13506,10 @@ func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} + if m.Error == nil { + m.Error = &Error{} } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8758,7 +13535,7 @@ func (m *Aggregation_Bucket) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Aggregation) UnmarshalVT(dAtA []byte) error { +func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8781,17 +13558,17 @@ func (m *Aggregation) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8801,45 +13578,75 @@ func (m *Aggregation) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.NotExists = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NotExists |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8862,7 +13669,7 @@ func (m *Aggregation) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Histogram_Bucket) UnmarshalVT(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8885,36 +13692,17 @@ func (m *Histogram_Bucket) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) - } - m.DocCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DocCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8924,28 +13712,75 @@ func (m *Histogram_Bucket) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8968,7 +13803,7 @@ func (m *Histogram_Bucket) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Histogram) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8978,30 +13813,88 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { if shift >= 64 { return protohelpers.ErrIntOverflow } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v AsyncSearchStatus + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Histogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9011,25 +13904,23 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Buckets = append(m.Buckets, &Histogram_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -9053,7 +13944,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9076,47 +13967,15 @@ func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9143,16 +14002,14 @@ func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9179,52 +14036,13 @@ func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + if m.Error == nil { + m.Error = &Error{} } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Explain = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Downsample", wireType) - } - m.Downsample = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Downsample |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9247,7 +14065,7 @@ func (m *SearchQuery) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVT(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9270,15 +14088,15 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9306,13 +14124,32 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Field = string(dAtA[iNdEx:postIndex]) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9322,29 +14159,33 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupBy = string(dAtA[iNdEx:postIndex]) + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} + } + if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - m.Func = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9354,70 +14195,69 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9427,79 +14267,61 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Interval = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + iNdEx = postIndex + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) } - if (iNdEx + skippy) > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HistQuery) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.DiskUsage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9527,7 +14349,8 @@ func (m *HistQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Interval = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.Error = &s iNdEx = postIndex default: iNdEx = preIndex @@ -9551,7 +14374,7 @@ func (m *HistQuery) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { +func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9574,47 +14397,15 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: GetAggregationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9641,16 +14432,16 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} + if m.Query == nil { + m.Query = &SearchQuery{} } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9677,8 +14468,8 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9704,7 +14495,7 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9727,72 +14518,17 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) } - m.Offset = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9802,16 +14538,17 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: + m.PartialResponse = bool(v != 0) + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - var v int + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9821,17 +14558,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - m.Order = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9841,16 +14577,31 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9860,23 +14611,27 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.OffsetId = string(dAtA[iNdEx:postIndex]) + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9900,7 +14655,7 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9923,10 +14678,10 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetHistogramRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9967,7 +14722,7 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9994,52 +14749,69 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 4: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHistogramResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) } - m.Size = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10049,16 +14821,17 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: + m.PartialResponse = bool(v != 0) + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Offset = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10068,16 +14841,16 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10087,17 +14860,33 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Order = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &Histogram{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10107,14 +14896,82 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10142,8 +14999,28 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OffsetId = string(dAtA[iNdEx:postIndex]) + m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10166,7 +15043,7 @@ func (m *ComplexSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10189,17 +15066,17 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10209,34 +15086,27 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 3: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10263,16 +15133,120 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.FieldsFilter == nil { + m.FieldsFilter = &FetchRequest_FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10282,28 +15256,77 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10326,7 +15349,7 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10349,17 +15372,17 @@ func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) } - var v int + m.NumberOfStores = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10369,138 +15392,14 @@ func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.NumberOfStores |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hist == nil { - m.Hist = &Histogram{} - } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10527,16 +15426,16 @@ func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + if m.OldestStorageTime == nil { + m.OldestStorageTime = ×tamppb.Timestamp{} } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Stores", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10563,10 +15462,8 @@ func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &ExplainEntry{} - } - if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Stores = append(m.Stores, &StoreStatus{}) + if err := m.Stores[len(m.Stores)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10592,7 +15489,7 @@ func (m *ComplexSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10615,17 +15512,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10635,101 +15532,27 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Host = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10756,18 +15579,18 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.Values == nil { + m.Values = &StoreStatusValues{} } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Values.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10777,31 +15600,25 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } + s := string(dAtA[iNdEx:postIndex]) + m.Error = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10824,7 +15641,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10847,17 +15664,17 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10867,23 +15684,27 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -10907,7 +15728,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { +func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10930,17 +15751,17 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10950,23 +15771,27 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 0 { @@ -10982,7 +15807,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int32(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -11001,26 +15826,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -11047,7 +15853,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { +func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11068,146 +15874,19 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } } fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &StartAsyncSearchRequest{} - } - if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &ComplexSearchResponse{} - } - if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11217,33 +15896,29 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11253,44 +15928,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Progress = float64(math.Float64frombits(v)) - case 8: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.DiskUsage = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11300,14 +15947,65 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 9: + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11334,10 +16032,10 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + if m.Doc == nil { + m.Doc = &Document{} } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Doc.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11363,7 +16061,7 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *StreamSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11386,17 +16084,17 @@ func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11406,23 +16104,73 @@ func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + if oneof, ok := m.RequestType.(*StreamSearchRequest_Query); ok { + if err := oneof.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &StreamSearchQuery{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.RequestType = &StreamSearchRequest_Query{Query: v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Control", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.RequestType.(*StreamSearchRequest_Control); ok { + if err := oneof.Control.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &StreamControl{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.RequestType = &StreamSearchRequest_Control{Control: v} + } iNdEx = postIndex default: iNdEx = preIndex @@ -11446,7 +16194,7 @@ func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StreamSearchQuery) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11469,66 +16217,139 @@ func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Explain = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11556,8 +16377,28 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.OffsetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11580,7 +16421,7 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StreamControl) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11603,12 +16444,31 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StreamControl: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamControl: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= ControlAction(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11631,7 +16491,7 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { +func (m *StreamSearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11654,17 +16514,17 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - var v AsyncSearchStatus + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11674,17 +16534,38 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Status = &v + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ResponseHeader{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &StreamSearchResponse_Header{Header: v} + } + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11694,35 +16575,38 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Data); ok { + if err := oneof.Data.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &ResponseData{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.ResponseType = &StreamSearchResponse_Data{Data: v} } - case 4: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11732,23 +16616,32 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Summary); ok { + if err := oneof.Summary.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ResponseSummary{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &StreamSearchResponse_Summary{Summary: v} + } iNdEx = postIndex default: iNdEx = preIndex @@ -11772,7 +16665,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { +func (m *ResponseHeader) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11793,51 +16686,17 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { } } fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Searches = append(m.Searches, &AsyncSearchesListItem{}) - if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11864,10 +16723,8 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11893,7 +16750,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { +func (m *Typing) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11916,15 +16773,15 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") + return fmt.Errorf("proto: Typing: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Typing: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11952,32 +16809,13 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Title = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11987,31 +16825,65 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Type |= DataType(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Request == nil { - m.Request = &StartAsyncSearchRequest{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseData) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 4: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12038,52 +16910,67 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} + if m.Batch == nil { + m.Batch = &RecordsBatch{} } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Batch.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RecordsBatch) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 6: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RecordsBatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecordsBatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12110,48 +16997,67 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - var v uint64 - if (iNdEx + 8) > l { + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Progress = float64(math.Float64frombits(v)) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Record) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - m.DiskUsage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - case 9: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Record: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12161,24 +17067,23 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Error = &s + } + m.RawData = append(m.RawData, make([]byte, postIndex-iNdEx)) + copy(m.RawData[len(m.RawData)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -12202,7 +17107,7 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { +func (m *ResponseSummary) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12225,15 +17130,34 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ResponseSummary: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResponseSummary: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12260,16 +17184,16 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} + if m.Error == nil { + m.Error = &Error{} } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12296,8 +17220,10 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12323,7 +17249,7 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { +func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12346,17 +17272,17 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Error: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - var v int + m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12366,70 +17292,16 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Code |= ErrorCode(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12439,27 +17311,27 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Message = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -12483,7 +17355,7 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { +func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12506,17 +17378,17 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Document: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12526,31 +17398,62 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Id = stringValue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12577,10 +17480,10 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.Time == nil { + m.Time = ×tamppb.Timestamp{} } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12606,7 +17509,7 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { +func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12629,17 +17532,17 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Aggregation_Bucket: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12649,36 +17552,44 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Key = stringValue + iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var msglen int + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12688,31 +17599,68 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hist == nil { - m.Hist = &Histogram{} - } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) } - iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12739,10 +17687,10 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12768,7 +17716,7 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { +func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12791,17 +17739,17 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") + return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12811,29 +17759,31 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) + m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - var v int + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12843,12 +17793,11 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -12871,7 +17820,7 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { +func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12894,17 +17843,17 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) } - var stringLen uint64 + m.DocCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12914,27 +17863,14 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DocCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12961,10 +17897,10 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} } - if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12990,58 +17926,7 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { +func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13064,17 +17949,17 @@ func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Histogram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13084,77 +17969,26 @@ func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if msglen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Buckets = append(m.Buckets, &Histogram_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13177,7 +18011,7 @@ func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { +func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13200,17 +18034,17 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.NumberOfStores = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13220,14 +18054,31 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumberOfStores |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13254,16 +18105,16 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestStorageTime == nil { - m.OldestStorageTime = ×tamppb.Timestamp{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stores", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13290,11 +18141,52 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Stores = append(m.Stores, &StoreStatus{}) - if err := m.Stores[len(m.Stores)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Explain = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Downsample", wireType) + } + m.Downsample = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Downsample |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13317,7 +18209,7 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { +func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13340,15 +18232,15 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") + return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13376,13 +18268,17 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Host = string(dAtA[iNdEx:postIndex]) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Field = stringValue iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13392,33 +18288,33 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Values == nil { - m.Values = &StoreStatusValues{} - } - if err := m.Values.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.GroupBy = stringValue iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) } - var stringLen uint64 + m.Func = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13428,81 +18324,70 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Func |= AggFunc(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Error = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13512,27 +18397,28 @@ func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + s := stringValue + m.Interval = &s iNdEx = postIndex default: iNdEx = preIndex @@ -13556,7 +18442,7 @@ func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { +func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13579,17 +18465,17 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") + return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13599,66 +18485,28 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Interval = stringValue iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13681,7 +18529,7 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13704,15 +18552,15 @@ func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13740,13 +18588,17 @@ func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Message = stringValue iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13756,16 +18608,33 @@ func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } - m.Offset = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13775,11 +18644,26 @@ func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13802,7 +18686,7 @@ func (m *ExportAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { +func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13825,15 +18709,15 @@ func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13860,69 +18744,76 @@ func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Doc == nil { - m.Doc = &Document{} + if m.Query == nil { + m.Query = &SearchQuery{} } - if err := m.Doc.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.WithTotal = bool(v != 0) + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - m.Code = 0 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13932,14 +18823,14 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ErrorCode(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13971,7 +18862,7 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Message = stringValue + m.OffsetId = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -13995,7 +18886,7 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14018,17 +18909,17 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") + return fmt.Errorf("proto: ComplexSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14038,33 +18929,33 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Id = stringValue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14074,26 +18965,29 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = dAtA[iNdEx:postIndex] + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14120,69 +19014,18 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Time == nil { - m.Time = ×tamppb.Timestamp{} + if m.Hist == nil { + m.Hist = &HistQuery{} } - if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Aggregation_Bucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var stringLen uint64 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14192,44 +19035,16 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Key = stringValue - iNdEx = postIndex - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 4: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.NotExists = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14239,70 +19054,55 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.WithTotal = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) } - case 6: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14312,27 +19112,27 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.OffsetId = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -14356,7 +19156,7 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14379,17 +19179,17 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14399,31 +19199,17 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.PartialResponse = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.NotExists = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14433,67 +19219,16 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) } - m.DocCount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14503,14 +19238,29 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DocCount |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14537,10 +19287,10 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} + if m.Error == nil { + m.Error = &Error{} } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -14566,7 +19316,7 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14589,15 +19339,54 @@ func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Histogram: wiretype end group for non-group") + return fmt.Errorf("proto: ComplexSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14624,67 +19413,16 @@ func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Buckets = append(m.Buckets, &Histogram_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14694,31 +19432,29 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Query = stringValue iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14745,16 +19481,16 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} + if m.Hist == nil { + m.Hist = &Histogram{} } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14781,18 +19517,18 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + if m.Error == nil { + m.Error = &Error{} } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { + case 7: + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14802,31 +19538,28 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Explain = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Downsample", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Downsample = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Downsample |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14849,7 +19582,7 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14872,17 +19605,17 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14892,33 +19625,33 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Field = stringValue iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14928,106 +19661,33 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.GroupBy = stringValue - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) - } - m.Func = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift - if b < 0x80 { - break - } + if m.Query == nil { + m.Query = &SearchQuery{} } - case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 6: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15037,85 +19697,31 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - s := stringValue - m.Interval = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if msglen < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15125,28 +19731,67 @@ func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Interval = stringValue iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithDocs = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15169,7 +19814,7 @@ func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15192,15 +19837,15 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15232,77 +19877,7 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Message = stringValue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SearchId = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -15326,7 +19901,7 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15349,17 +19924,17 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15369,27 +19944,27 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.SearchId = stringValue iNdEx = postIndex case 2: if wireType != 0 { @@ -15405,7 +19980,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + m.Size |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -15424,32 +19999,12 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.WithTotal = bool(v != 0) - case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } @@ -15462,48 +20017,12 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } } - m.OffsetId = stringValue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15526,7 +20045,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15549,15 +20068,34 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15584,16 +20122,16 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15620,14 +20158,16 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.Response == nil { + m.Response = &ComplexSearchResponse{} + } + if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15654,18 +20194,18 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15675,16 +20215,33 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Offset = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15694,16 +20251,44 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - var v int + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15713,17 +20298,16 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - m.Order = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15733,14 +20317,82 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15765,15 +20417,66 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - m.OffsetId = stringValue - iNdEx = postIndex + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15796,7 +20499,7 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15819,56 +20522,17 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15878,62 +20542,79 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.SearchId = stringValue iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15956,7 +20637,7 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15979,17 +20660,17 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15999,17 +20680,17 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) + m.Status = &v case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.Total = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16019,16 +20700,16 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + m.Size |= int32(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - var msglen int + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16038,31 +20719,16 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16072,29 +20738,82 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Ids = append(m.Ids, stringValue) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 5: + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16121,14 +20840,12 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &Histogram{} - } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } @@ -16164,42 +20881,6 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explain == nil { - m.Explain = &ExplainEntry{} - } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16222,7 +20903,7 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16245,15 +20926,70 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16280,16 +21016,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16316,16 +21052,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16352,14 +21088,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16386,18 +21124,29 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - var v int + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16407,17 +21156,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - m.Size = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16427,11 +21175,29 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + s := stringValue + m.Error = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16454,7 +21220,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16464,30 +21230,66 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if shift >= 64 { return protohelpers.ErrIntOverflow } - if iNdEx >= l { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAggregationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.Query == nil { + m.Query = &SearchQuery{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16497,27 +21299,25 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.SearchId = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -16541,7 +21341,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16564,17 +21364,17 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16584,33 +21384,17 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex + m.PartialResponse = bool(v != 0) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Size = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16620,16 +21404,16 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int32(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - m.Offset = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16639,16 +21423,31 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - m.Order = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16658,11 +21457,28 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16685,7 +21501,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetHistogramRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16708,34 +21524,15 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetHistogramRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16762,16 +21559,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Request == nil { - m.Request = &StartAsyncSearchRequest{} + if m.Query == nil { + m.Query = &SearchQuery{} } - if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16798,18 +21595,69 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &ComplexSearchResponse{} + if m.Hist == nil { + m.Hist = &HistQuery{} } - if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - var msglen int + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHistogramResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16819,33 +21667,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + } } - var msglen int + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16855,31 +21687,14 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16906,44 +21721,14 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} + if m.Hist == nil { + m.Hist = &Histogram{} } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Progress = float64(math.Float64frombits(v)) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) - } - m.DiskUsage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } @@ -17001,7 +21786,7 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17024,15 +21809,15 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -17064,8 +21849,28 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue + m.Fields = append(m.Fields, stringValue) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17088,7 +21893,7 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17111,12 +21916,84 @@ func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Ids = append(m.Ids, stringValue) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldsFilter == nil { + m.FieldsFilter = &FetchRequest_FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17139,7 +22016,7 @@ func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *MappingRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17162,48 +22039,12 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17226,7 +22067,7 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *MappingResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17245,16 +22086,47 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = dAtA[iNdEx:postIndex] + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17277,7 +22149,7 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17300,106 +22172,12 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var v AsyncSearchStatus - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Status = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Ids = append(m.Ids, stringValue) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17422,7 +22200,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17445,15 +22223,34 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) + } + m.NumberOfStores = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumberOfStores |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17480,14 +22277,16 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Searches = append(m.Searches, &AsyncSearchesListItem{}) - if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.OldestStorageTime == nil { + m.OldestStorageTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Stores", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17514,10 +22313,8 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Stores = append(m.Stores, &StoreStatus{}) + if err := m.Stores[len(m.Stores)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -17543,7 +22340,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17566,108 +22363,17 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") + return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &StartAsyncSearchRequest{} - } - if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17677,31 +22383,31 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Host = stringValue iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17728,18 +22434,18 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + if m.Values == nil { + m.Values = &StoreStatusValues{} } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Values.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17749,63 +22455,85 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + s := stringValue + m.Error = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - var v uint64 - if (iNdEx + 8) > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Progress = float64(math.Float64frombits(v)) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreStatusValues) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - m.DiskUsage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - case 9: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17815,28 +22543,27 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - s := stringValue - m.Error = &s iNdEx = postIndex default: iNdEx = preIndex @@ -17860,7 +22587,7 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExportRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17883,10 +22610,10 @@ func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -17926,10 +22653,10 @@ func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17939,26 +22666,30 @@ func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17981,7 +22712,7 @@ func (m *GetAggregationRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExportAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18004,56 +22735,17 @@ func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ExportAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18063,31 +22755,33 @@ func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.SearchId = stringValue iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18097,28 +22791,30 @@ func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Error == nil { - m.Error = &Error{} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -18141,7 +22837,7 @@ func (m *GetAggregationResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetHistogramRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExportResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18164,51 +22860,15 @@ func (m *GetHistogramRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18235,10 +22895,10 @@ func (m *GetHistogramRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.Doc == nil { + m.Doc = &Document{} } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Doc.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -18264,7 +22924,7 @@ func (m *GetHistogramRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StreamSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18287,54 +22947,15 @@ func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18361,16 +22982,21 @@ func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &Histogram{} - } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.RequestType.(*StreamSearchRequest_Query); ok { + if err := oneof.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &StreamSearchQuery{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.RequestType = &StreamSearchRequest_Query{Query: v} } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Control", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18397,11 +23023,16 @@ func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.RequestType.(*StreamSearchRequest_Control); ok { + if err := oneof.Control.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &StreamControl{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.RequestType = &StreamSearchRequest_Control{Control: v} } iNdEx = postIndex default: @@ -18426,7 +23057,7 @@ func (m *GetHistogramResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StreamSearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18449,15 +23080,15 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -18489,13 +23120,13 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Fields = append(m.Fields, stringValue) + m.Query = stringValue iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18505,66 +23136,87 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return protohelpers.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if iNdEx >= l { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Explain = bool(v != 0) + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -18596,13 +23248,13 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Ids = append(m.Ids, stringValue) + m.OffsetId = stringValue iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18612,28 +23264,12 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} - } - if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.WithTotal = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -18656,7 +23292,7 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *MappingRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StreamControl) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18679,12 +23315,31 @@ func (m *MappingRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StreamControl: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamControl: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= ControlAction(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -18707,7 +23362,7 @@ func (m *MappingRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *MappingResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StreamSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18730,17 +23385,17 @@ func (m *MappingResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StreamSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18750,74 +23405,115 @@ func (m *MappingResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = dAtA[iNdEx:postIndex] + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ResponseHeader{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &StreamSearchResponse_Header{Header: v} + } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Data); ok { + if err := oneof.Data.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ResponseData{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &StreamSearchResponse_Data{Data: v} } - if iNdEx >= l { + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if oneof, ok := m.ResponseType.(*StreamSearchResponse_Summary); ok { + if err := oneof.Summary.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ResponseSummary{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &StreamSearchResponse_Summary{Summary: v} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -18840,7 +23536,7 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ResponseHeader) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18854,79 +23550,24 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) - } - m.NumberOfStores = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumberOfStores |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OldestStorageTime == nil { - m.OldestStorageTime = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 4: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stores", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18953,8 +23594,8 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Stores = append(m.Stores, &StoreStatus{}) - if err := m.Stores[len(m.Stores)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -18980,7 +23621,7 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Typing) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19003,15 +23644,15 @@ func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") + return fmt.Errorf("proto: Typing: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Typing: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -19043,49 +23684,13 @@ func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Host = stringValue + m.Title = stringValue iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Values == nil { - m.Values = &StoreStatusValues{} - } - if err := m.Values.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -19095,29 +23700,11 @@ func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Type |= DataType(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - s := stringValue - m.Error = &s - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -19140,7 +23727,7 @@ func (m *StoreStatus) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StoreStatusValues) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ResponseData) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19163,15 +23750,15 @@ func (m *StoreStatusValues) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") + return fmt.Errorf("proto: ResponseData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResponseData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -19198,10 +23785,10 @@ func (m *StoreStatusValues) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} + if m.Batch == nil { + m.Batch = &RecordsBatch{} } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Batch.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -19227,7 +23814,7 @@ func (m *StoreStatusValues) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExportRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *RecordsBatch) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19250,15 +23837,15 @@ func (m *ExportRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RecordsBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RecordsBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -19285,51 +23872,11 @@ func (m *ExportRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -19352,7 +23899,7 @@ func (m *ExportRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExportAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Record) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19375,17 +23922,17 @@ func (m *ExportAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Record: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -19395,66 +23942,23 @@ func (m *ExportAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue + m.RawData = append(m.RawData, dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -19477,7 +23981,7 @@ func (m *ExportAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExportResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ResponseSummary) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19500,15 +24004,34 @@ func (m *ExportResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ResponseSummary: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResponseSummary: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -19535,10 +24058,46 @@ func (m *ExportResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Doc == nil { - m.Doc = &Document{} + if m.Error == nil { + m.Error = &Error{} } - if err := m.Doc.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/pkg/storeapi/store_api.pb.go b/pkg/storeapi/store_api.pb.go index 199096da..d2e2942b 100644 --- a/pkg/storeapi/store_api.pb.go +++ b/pkg/storeapi/store_api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.5 -// protoc v5.29.3 +// protoc v7.35.1 // source: storeapi/store_api.proto package storeapi diff --git a/proxy/search/async.go b/proxy/search/async.go index 5af342a2..fb9a181d 100644 --- a/proxy/search/async.go +++ b/proxy/search/async.go @@ -78,10 +78,10 @@ func (si *Ingestor) StartAsyncSearch(ctx context.Context, r AsyncRequest) (Async break } if err != nil { - err := si.DeleteAsyncSearch(ctx, requestID) - if err != nil { + delErr := si.DeleteAsyncSearch(ctx, requestID) + if delErr != nil { logger.Error("unable to clear inconsistent async search creation", - zap.String("id", requestID), zap.Error(err)) + zap.String("id", requestID), zap.Error(delErr)) } return AsyncResponse{}, fmt.Errorf("starting search in shard=%d: %s", i, err) } diff --git a/proxyapi/grpc_complex_search.go b/proxyapi/grpc_complex_search.go index 01e6effd..7dbb6fe7 100644 --- a/proxyapi/grpc_complex_search.go +++ b/proxyapi/grpc_complex_search.go @@ -22,7 +22,7 @@ func (g *grpcV1) ComplexSearch( } tr := querytracer.New(req.Query.Explain, "proxy/ComplexSearch") - sResp, err := g.doSearch(ctx, req, true, tr) + sResp, err := g.doSearch(ctx, req, true, true, tr) if err != nil { return nil, err } diff --git a/proxyapi/grpc_export.go b/proxyapi/grpc_export.go index aeb80d92..9582ac3a 100644 --- a/proxyapi/grpc_export.go +++ b/proxyapi/grpc_export.go @@ -47,7 +47,7 @@ func (g *grpcV1) Export(req *seqproxyapi.ExportRequest, stream seqproxyapi.SeqPr Offset: req.Offset, WithTotal: false, } - sResp, err := g.doSearch(ctx, proxyReq, true, nil) + sResp, err := g.doSearch(ctx, proxyReq, true, true, nil) if err != nil { return err } diff --git a/proxyapi/grpc_get_aggregation.go b/proxyapi/grpc_get_aggregation.go index 1a7f28c7..c43c8b39 100644 --- a/proxyapi/grpc_get_aggregation.go +++ b/proxyapi/grpc_get_aggregation.go @@ -24,7 +24,7 @@ func (g *grpcV1) GetAggregation( Aggs: req.Aggs, } - sResp, err := g.doSearch(ctx, proxyReq, false, nil) + sResp, err := g.doSearch(ctx, proxyReq, false, true, nil) if err != nil { return nil, err } diff --git a/proxyapi/grpc_get_histogram.go b/proxyapi/grpc_get_histogram.go index 21d29695..0c80152a 100644 --- a/proxyapi/grpc_get_histogram.go +++ b/proxyapi/grpc_get_histogram.go @@ -23,7 +23,7 @@ func (g *grpcV1) GetHistogram( Query: req.Query, Hist: req.Hist, } - sResp, err := g.doSearch(ctx, proxyReq, false, nil) + sResp, err := g.doSearch(ctx, proxyReq, false, true, nil) if err != nil { return nil, err } diff --git a/proxyapi/grpc_search.go b/proxyapi/grpc_search.go index d5e65807..0c2f4af8 100644 --- a/proxyapi/grpc_search.go +++ b/proxyapi/grpc_search.go @@ -27,7 +27,7 @@ func (g *grpcV1) Search( WithTotal: req.WithTotal, Order: req.Order, } - sResp, err := g.doSearch(ctx, proxyReq, true, nil) + sResp, err := g.doSearch(ctx, proxyReq, true, true, nil) if err != nil { return nil, err } diff --git a/proxyapi/grpc_stream_search.go b/proxyapi/grpc_stream_search.go new file mode 100644 index 00000000..e48ca90e --- /dev/null +++ b/proxyapi/grpc_stream_search.go @@ -0,0 +1,364 @@ +package proxyapi + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "io" + "math" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/ozontech/seq-db/parser" + "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" + "github.com/ozontech/seq-db/proxy/search" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" +) + +// streamSearchBatchSize limits the number of records sent in a single +// StreamSearchResponse data message. +const streamSearchBatchSize = 50 + +// controlOutcome describes how the data streaming phase ended. +type controlOutcome int + +const ( + outcomeNone controlOutcome = iota // data exhausted, no control received yet + outcomeFinalize // client requested a graceful finalization + outcomeCancel // client canceled or disconnected +) + +func (g *grpcV1) StreamSearch(stream seqproxyapi.SeqProxyApi_StreamSearchServer) error { + ctx, cancel := context.WithCancel(stream.Context()) + defer cancel() + + // The first message must carry the search query. + req, err := stream.Recv() + if err == io.EOF { + return nil // Client closed the stream gracefully. + } + if err != nil { + return err + } + q := req.GetQuery() + if q == nil { + return status.Error(codes.InvalidArgument, "first message must be a search query") + } + + proxyReq, err := buildProxyReq(q) + if err != nil { + return status.Error(codes.InvalidArgument, fmt.Sprintf("error parsing query: %s", err.Error())) + } + if proxyReq.Size <= 0 && len(proxyReq.Aggs) == 0 { + return status.Error(codes.InvalidArgument, `one of "limit" or "stats" must be provided`) + } + if len(proxyReq.Aggs) > 1 { + return status.Error(codes.InvalidArgument, `must be only one aggregation`) + } + + tr := querytracer.New(q.Explain, "proxy/StreamSearch") + sResp, err := g.doSearch(ctx, proxyReq, true, false, tr) + if err != nil { + return err + } + if sResp.err != nil && sResp.err.Code == seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE && shouldFailPartialResponse(ctx) { + return status.Error(codes.Internal, "partial response: not all shards returned results") + } + if sResp.err != nil && !shouldHaveResponse(sResp.err.Code) { + return errors.New(sResp.err.Message) + } + + // Read control messages from the client concurrently with sending data. + controlCh := make(chan *seqproxyapi.StreamControl) + recvErrCh := make(chan error, 1) + go func() { + defer close(controlCh) + defer close(recvErrCh) + for { + msg, err := stream.Recv() + if err != nil { + // io.EOF or any read error means the client is done. Signal it + // and stop reading. + select { + case recvErrCh <- err: + case <-ctx.Done(): + } + return + } + if c := msg.GetControl(); c != nil { + select { + case controlCh <- c: + case <-ctx.Done(): + return + } + } + // Any other message type on the input stream is ignored. + } + }() + + var outcome controlOutcome + if len(proxyReq.Aggs) > 0 { + outcome, err = g.streamSearchAggs(stream, proxyReq.Aggs, sResp, tr, controlCh, recvErrCh, ctx) + } else { + outcome, err = g.streamSearchDocs(stream, sResp, controlCh, recvErrCh, ctx) + } + if err != nil { + return err + } + + // CANCEL: terminate immediately, no summary. + if outcome == outcomeCancel { + return nil + } + + // FINALIZE or data exhausted without an explicit control action: send the + // summary. + summary := &seqproxyapi.ResponseSummary{Total: sResp.qpr.Total} + if sResp.err != nil { + summary.Error = sResp.err + } else { + summary.Error = &seqproxyapi.Error{Code: seqproxyapi.ErrorCode_ERROR_CODE_NO} + } + tr.Done() + summary.Explain = tracerSpanToExplainEntry(tr.ToSpan()) + if err := stream.Send(&seqproxyapi.StreamSearchResponse{ + ResponseType: &seqproxyapi.StreamSearchResponse_Summary{Summary: summary}, + }); err != nil { + return status.Errorf(codes.Internal, "failed to send summary: %v", err) + } + + return nil +} + +// checkControl peeks at the control/recv channels without blocking. It returns +// ok=true when the caller should stop streaming (a control action arrived or +// the client disconnected). +func checkControl( + controlCh <-chan *seqproxyapi.StreamControl, + recvErrCh <-chan error, + ctx context.Context, +) (controlOutcome, bool) { + select { + case c := <-controlCh: + if c.GetAction() == seqproxyapi.ControlAction_CANCEL { + return outcomeCancel, true + } + return outcomeFinalize, true + case <-recvErrCh: + return outcomeCancel, true + case <-ctx.Done(): + return outcomeCancel, true + default: + return outcomeNone, false + } +} + +// streamSearchDocs streams matched documents as batches of records. Each record +// carries three columns: id (SEQ_ID), time (UINT64 nanoseconds) and data (RAW_DOCUMENT). +func (g *grpcV1) streamSearchDocs( + stream seqproxyapi.SeqProxyApi_StreamSearchServer, + sResp *proxySearchResponse, + controlCh <-chan *seqproxyapi.StreamControl, + recvErrCh <-chan error, + ctx context.Context, +) (controlOutcome, error) { + header := &seqproxyapi.ResponseHeader{Typing: docsTyping()} + if err := stream.Send(&seqproxyapi.StreamSearchResponse{ + ResponseType: &seqproxyapi.StreamSearchResponse_Header{Header: header}, + }); err != nil { + return outcomeNone, status.Errorf(codes.Internal, "failed to send header: %v", err) + } + + var batch []*seqproxyapi.Record + for doc, err := sResp.docsStream.Next(); err == nil; doc, err = sResp.docsStream.Next() { + batch = append(batch, docToRecord(doc)) + if len(batch) >= streamSearchBatchSize { + if err := sendRecords(stream, batch); err != nil { + return outcomeNone, err + } + batch = batch[:0] + if outcome, stop := checkControl(controlCh, recvErrCh, ctx); stop { + return outcome, nil + } + } + } + if len(batch) > 0 { + if err := sendRecords(stream, batch); err != nil { + return outcomeNone, err + } + } + return outcomeNone, nil +} + +// streamSearchAggs streams aggregation buckets as batches of records. Each +// record carries two columns: key (STRING) and value (FLOAT64). +func (g *grpcV1) streamSearchAggs( + stream seqproxyapi.SeqProxyApi_StreamSearchServer, + aggs []*seqproxyapi.AggQuery, + sResp *proxySearchResponse, + tr *querytracer.Tracer, + controlCh <-chan *seqproxyapi.StreamControl, + recvErrCh <-chan error, + ctx context.Context, +) (controlOutcome, error) { + header := &seqproxyapi.ResponseHeader{Typing: aggsTyping()} + if err := stream.Send(&seqproxyapi.StreamSearchResponse{ + ResponseType: &seqproxyapi.StreamSearchResponse_Header{Header: header}, + }); err != nil { + return outcomeNone, status.Errorf(codes.Internal, "failed to send header: %v", err) + } + + aggTr := tr.NewChild("aggregate") + allAggregations := sResp.qpr.Aggregate(aggregationArgsFromProto(aggs)) + aggTr.Done() + + var batch []*seqproxyapi.Record + for _, agg := range allAggregations { + for _, item := range agg.Buckets { + batch = append(batch, aggBucketToRecord(item)) + if len(batch) >= streamSearchBatchSize { + if err := sendRecords(stream, batch); err != nil { + return outcomeNone, err + } + batch = batch[:0] + if outcome, stop := checkControl(controlCh, recvErrCh, ctx); stop { + return outcome, nil + } + } + } + } + if len(batch) > 0 { + if err := sendRecords(stream, batch); err != nil { + return outcomeNone, err + } + } + return outcomeNone, nil +} + +func sendRecords(stream seqproxyapi.SeqProxyApi_StreamSearchServer, records []*seqproxyapi.Record) error { + resp := &seqproxyapi.StreamSearchResponse{ + ResponseType: &seqproxyapi.StreamSearchResponse_Data{Data: &seqproxyapi.ResponseData{ + Batch: &seqproxyapi.RecordsBatch{Records: records}, + }}, + } + if err := stream.Send(resp); err != nil { + return status.Errorf(codes.Internal, "failed to send data: %v", err) + } + return nil +} + +func docToRecord(doc search.StreamingDoc) *seqproxyapi.Record { + timeBuf := make([]byte, 8) + binary.BigEndian.PutUint64(timeBuf, uint64(doc.ID.MID)) + return &seqproxyapi.Record{ + RawData: [][]byte{ + []byte(doc.ID.String()), + timeBuf, + doc.Data, + }, + } +} + +func aggBucketToRecord(item seq.AggregationBucket) *seqproxyapi.Record { + valueBuf := make([]byte, 8) + binary.BigEndian.PutUint64(valueBuf, math.Float64bits(item.Value)) + return &seqproxyapi.Record{ + RawData: [][]byte{ + []byte(item.Name), + valueBuf, + }, + } +} + +// hardcoded schema +func docsTyping() []*seqproxyapi.Typing { + return []*seqproxyapi.Typing{ + {Title: "id", Type: seqproxyapi.DataType_SEQ_ID}, + {Title: "time", Type: seqproxyapi.DataType_UINT64}, + {Title: "data", Type: seqproxyapi.DataType_RAW_DOCUMENT}, + } +} + +// hardcoded schema +func aggsTyping() []*seqproxyapi.Typing { + return []*seqproxyapi.Typing{ + {Title: "key", Type: seqproxyapi.DataType_STRING}, + {Title: "value", Type: seqproxyapi.DataType_FLOAT64}, + } +} + +func buildProxyReq(q *seqproxyapi.StreamSearchQuery) (*seqproxyapi.ComplexSearchRequest, error) { + seqql, err := parser.ParseSeqQL(q.Query, nil) + if err != nil { + return nil, err + } + + proxyReq := &seqproxyapi.ComplexSearchRequest{ + Query: &seqproxyapi.SearchQuery{ + Query: q.Query, + From: q.From, + To: q.To, + Explain: q.Explain, + }, + WithTotal: q.WithTotal, + OffsetId: q.OffsetId, + } + + for _, pipe := range seqql.Pipes { + switch p := pipe.(type) { + case *parser.PipeLimit: + proxyReq.Size = int64(p.Limit) + case *parser.PipeOffset: + proxyReq.Size = int64(p.Offset) + case *parser.PipeSort: + order := seqproxyapi.Order_ORDER_DESC + if p.Order == "asc" { + order = seqproxyapi.Order_ORDER_ASC + } + proxyReq.Order = order + case *parser.PipeStats: + for _, agg := range p.Aggs { + proxyReqAgg := &seqproxyapi.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: mustConvertStringToAggFunc(agg.Func), + Quantiles: agg.Quantiles, + } + if agg.Interval != "" { + proxyReqAgg.Interval = &agg.Interval + } + proxyReq.Aggs = append(proxyReq.Aggs, proxyReqAgg) + } + default: + continue + } + } + + return proxyReq, nil +} + +func mustConvertStringToAggFunc(funcName string) seqproxyapi.AggFunc { + switch funcName { + case "count": + return seqproxyapi.AggFunc_AGG_FUNC_COUNT + case "sum": + return seqproxyapi.AggFunc_AGG_FUNC_SUM + case "min": + return seqproxyapi.AggFunc_AGG_FUNC_MIN + case "max": + return seqproxyapi.AggFunc_AGG_FUNC_MAX + case "avg": + return seqproxyapi.AggFunc_AGG_FUNC_AVG + case "quantile": + return seqproxyapi.AggFunc_AGG_FUNC_QUANTILE + case "unique": + return seqproxyapi.AggFunc_AGG_FUNC_UNIQUE + case "unique_count": + return seqproxyapi.AggFunc_AGG_FUNC_UNIQUE_COUNT + default: + panic(fmt.Errorf("unknown aggregation function: %s", funcName)) + } +} diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 0d87ed7f..344a46d1 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "strconv" "strings" "sync/atomic" @@ -21,6 +22,7 @@ import ( "github.com/ozontech/seq-db/consts" "github.com/ozontech/seq-db/logger" "github.com/ozontech/seq-db/metric" + "github.com/ozontech/seq-db/parser" "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" "github.com/ozontech/seq-db/proxy/search" "github.com/ozontech/seq-db/querytracer" @@ -186,6 +188,7 @@ func (g *grpcV1) doSearch( ctx context.Context, req *seqproxyapi.ComplexSearchRequest, shouldFetch bool, + shouldValidatePipes bool, tr *querytracer.Tracer, ) (*proxySearchResponse, error) { metric.SearchOverall.Add(1) @@ -208,6 +211,17 @@ func (g *grpcV1) doSearch( if fromTime.After(toTime) { return nil, status.Error(codes.InvalidArgument, `"from" timestamp must not be after "to" timestamp`) } + + if shouldValidatePipes { + ast, err := parser.ParseSeqQL(req.Query.Query, nil) + if err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("search query must be valid: %s", err)) + } + if err := ast.ValidatePipes(); err != nil { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("search query must be valid: %s", err)) + } + } + if span.IsRecordingEvents() { span.AddAttributes( trace.StringAttribute("query", req.Query.Query), diff --git a/proxyapi/mock/grpc_v1.go b/proxyapi/mock/grpc_v1.go index c178291f..dc3edad2 100644 --- a/proxyapi/mock/grpc_v1.go +++ b/proxyapi/mock/grpc_v1.go @@ -10,12 +10,11 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - metadata "google.golang.org/grpc/metadata" - seqproxyapi "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" search "github.com/ozontech/seq-db/proxy/search" querytracer "github.com/ozontech/seq-db/querytracer" seq "github.com/ozontech/seq-db/seq" + metadata "google.golang.org/grpc/metadata" ) // MockSearchIngestor is a mock of SearchIngestor interface. diff --git a/skipmaskmanager/skip_mask_manager.go b/skipmaskmanager/skip_mask_manager.go index 02c1786d..1a9c9fc4 100644 --- a/skipmaskmanager/skip_mask_manager.go +++ b/skipmaskmanager/skip_mask_manager.go @@ -172,6 +172,9 @@ func (smm *SkipMaskManager) Start(fracProvider fractionAcquirer) { if err != nil { panic(fmt.Errorf("BUG: search query must be valid: %s", err)) } + if err := ast.ValidatePipes(); err != nil { + panic(fmt.Errorf("BUG: search query must be valid: %s", err)) + } sm.ast = ast smm.processSkipMask(sm, fracProvider) diff --git a/tests/integration_tests/integration_test.go b/tests/integration_tests/integration_test.go index c5dc49e9..3e38347d 100644 --- a/tests/integration_tests/integration_test.go +++ b/tests/integration_tests/integration_test.go @@ -23,6 +23,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" "github.com/ozontech/seq-db/asyncsearcher" @@ -355,7 +359,7 @@ func (s *IntegrationTestSuite) envWithDummyDocs(n int) (*setup.TestingEnv, []str origDocs := make([]string, 0, allDocsNum) docsBulk := make([]string, 2*n) - getNextTs := getAutoTsGenerator(time.Now(), -time.Nanosecond) + getNextTs := getAutoTsGenerator(time.Now(), -time.Nanosecond) // for i := 0; i < bulksNum; i++ { @@ -1921,3 +1925,224 @@ func (s *IntegrationTestSuite) TestSkipMaskManager() { r.NoError(err) r.Equal(uint64(0), qpr.Total) } + +// newStreamSearchClient connects to a random ingestor's gRPC endpoint and opens +// a StreamSearch stream. +func newStreamSearchClient(t *testing.T, env *setup.TestingEnv) ( + seqproxyapi.SeqProxyApi_StreamSearchClient, + *grpc.ClientConn, + context.Context, + context.CancelFunc, +) { + t.Helper() + addr := env.Ingestor().Config.API.GatewayAddr + conn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + stream, err := seqproxyapi.NewSeqProxyApiClient(conn).StreamSearch(ctx) + require.NoError(t, err) + return stream, conn, ctx, cancel +} + +// sendStreamSearchQuery sends the initial search query on the stream. +func sendStreamSearchQuery(t *testing.T, stream seqproxyapi.SeqProxyApi_StreamSearchClient, query string) { + t.Helper() + now := time.Now() + require.NoError(t, stream.Send(&seqproxyapi.StreamSearchRequest{ + RequestType: &seqproxyapi.StreamSearchRequest_Query{ + Query: &seqproxyapi.StreamSearchQuery{ + Query: query, + From: timestamppb.New(now.Add(-time.Hour)), + To: timestamppb.New(now.Add(time.Hour)), + WithTotal: true, + }, + }, + })) +} + +// collectStreamData reads responses until the summary is received or the stream +// ends. It returns the collected document payloads (the "data" column of each +// record), the record count and the final summary. +func collectStreamData( + t *testing.T, + stream seqproxyapi.SeqProxyApi_StreamSearchClient, +) ([][]byte, *seqproxyapi.ResponseSummary) { + t.Helper() + var docs [][]byte + for { + resp, err := stream.Recv() + if err != nil { + return docs, nil + } + switch v := resp.ResponseType.(type) { + case *seqproxyapi.StreamSearchResponse_Header: + // expected: typing metadata + case *seqproxyapi.StreamSearchResponse_Data: + for _, rec := range v.Data.GetBatch().GetRecords() { + raw := rec.GetRawData() + if len(raw) > 0 { + docs = append(docs, raw[len(raw)-1]) + } + } + case *seqproxyapi.StreamSearchResponse_Summary: + return docs, v.Summary + } + } +} + +func (s *IntegrationTestSuite) TestStreamSearch() { + t := s.T() + r := require.New(t) + + env := setup.NewTestingEnv(s.Config) + defer env.StopAll() + + // A large dataset is required so that the response exceeds the gRPC + // flow-control window: this forces the server to block between batches and + // actually observe the control actions the client sends mid-stream. With a + // tiny dataset the server buffers the whole response and finishes before any + // control message arrives. + const totalDocs = 20020 + getNextTs := getAutoTsGenerator(time.Now(), -time.Nanosecond) + origDocs := make([]string, totalDocs) + for i := range totalDocs { + origDocs[i] = fmt.Sprintf(`{"service":"a", "trace_id":"%d", "ts":%q}`, i, getNextTs()) + } + setup.Bulk(t, env.IngestorBulkAddr(), origDocs) + env.WaitIdle() + + streamQuery := func(limit int) string { + return fmt.Sprintf(`service:a | limit %d`, limit) + } + + t.Run("finalize after full stream", func(t *testing.T) { + stream, conn, _, cancel := newStreamSearchClient(t, env) + defer cancel() + defer conn.Close() + + sendStreamSearchQuery(t, stream, streamQuery(totalDocs)) + // No explicit control action: the server must send the summary once the + // data is exhausted. + docs, summary := collectStreamData(t, stream) + r.Len(docs, totalDocs) + + gotDocs := make([]string, 0, len(docs)) + for _, d := range docs { + gotDocs = append(gotDocs, string(d)) + } + wantDocs := make([]string, 0, len(origDocs)) + for _, d := range origDocs { + wantDocs = append(wantDocs, d) + } + r.Equal(wantDocs, gotDocs, "streamed documents must match the ingested ones") + + r.NotNil(summary) + r.Equal(uint64(totalDocs), summary.GetTotal(), "summary total must match the document count") + r.Equal(seqproxyapi.ErrorCode_ERROR_CODE_NO, summary.GetError().GetCode()) + }) + + t.Run("explicit finalize", func(t *testing.T) { + stream, conn, _, cancel := newStreamSearchClient(t, env) + defer cancel() + defer conn.Close() + + sendStreamSearchQuery(t, stream, streamQuery(totalDocs)) + + // Read until the first data batch arrives, then ask the server to + // finalize before all data is consumed. + var gotRecordsCount int + finalizeSent := false + for { + resp, err := stream.Recv() + r.NoError(err) + + switch v := resp.ResponseType.(type) { + case *seqproxyapi.StreamSearchResponse_Data: + gotRecordsCount += len(v.Data.GetBatch().GetRecords()) + if !finalizeSent { + require.NoError(t, stream.Send(&seqproxyapi.StreamSearchRequest{ + RequestType: &seqproxyapi.StreamSearchRequest_Control{ + Control: &seqproxyapi.StreamControl{Action: seqproxyapi.ControlAction_FINALIZE}, + }, + })) + finalizeSent = true + } + case *seqproxyapi.StreamSearchResponse_Summary: + r.True(finalizeSent, "got summary without finalize") + r.Greater(gotRecordsCount, 0) + r.Less(gotRecordsCount, totalDocs, "finalize should stop the stream before all data is sent") + return + } + } + }) + + t.Run("cancel mid-stream", func(t *testing.T) { + stream, conn, _, cancel := newStreamSearchClient(t, env) + defer cancel() + defer conn.Close() + + sendStreamSearchQuery(t, stream, streamQuery(totalDocs)) + + // Send CANCEL as soon as the first data batch arrives, then keep reading + // until the stream ends. The server must terminate without a summary. + canceled := false + for { + resp, err := stream.Recv() + if err != nil { + r.ErrorIs(err, io.EOF, "cancel must terminate the stream with EOF") + return + } + switch resp.ResponseType.(type) { + case *seqproxyapi.StreamSearchResponse_Data: + if !canceled { + require.NoError(t, stream.Send(&seqproxyapi.StreamSearchRequest{ + RequestType: &seqproxyapi.StreamSearchRequest_Control{ + Control: &seqproxyapi.StreamControl{Action: seqproxyapi.ControlAction_CANCEL}, + }, + })) + canceled = true + } + case *seqproxyapi.StreamSearchResponse_Summary: + r.Fail("cancel must not produce a summary") + } + } + }) + + t.Run("aggregation stream", func(t *testing.T) { + stream, conn, _, cancel := newStreamSearchClient(t, env) + defer cancel() + defer conn.Close() + + sendStreamSearchQuery(t, stream, `service:a | stats count by (trace_id)`) + + var gotBucketsCount int + for { + resp, err := stream.Recv() + if err != nil { + break + } + switch v := resp.ResponseType.(type) { + case *seqproxyapi.StreamSearchResponse_Data: + gotBucketsCount += len(v.Data.GetBatch().GetRecords()) + case *seqproxyapi.StreamSearchResponse_Summary: + return + } + } + r.Equal(totalDocs, gotBucketsCount, "each distinct `trace_id` value should produce one bucket") + }) + + t.Run("missing query is rejected", func(t *testing.T) { + stream, conn, _, cancel := newStreamSearchClient(t, env) + defer cancel() + defer conn.Close() + + require.NoError(t, stream.Send(&seqproxyapi.StreamSearchRequest{ + RequestType: &seqproxyapi.StreamSearchRequest_Control{ + Control: &seqproxyapi.StreamControl{Action: seqproxyapi.ControlAction_FINALIZE}, + }, + })) + _, err := stream.Recv() + r.ErrorIs(err, status.Error(codes.InvalidArgument, "first message must be a search query")) + }) +}