diff --git a/api/seqproxyapi/v1/seq_proxy_api.proto b/api/seqproxyapi/v1/seq_proxy_api.proto index 22ca2f1d..d0226cb7 100644 --- a/api/seqproxyapi/v1/seq_proxy_api.proto +++ b/api/seqproxyapi/v1/seq_proxy_api.proto @@ -111,6 +111,13 @@ service SeqProxyApi { body: "*" }; } + + rpc OnePhaseSearch(SearchRequest) returns (ComplexSearchResponse) { + option (google.api.http) = { + post: "/one-phase-search" + body: "*" + }; + } } // Custom error code, returned by seq-db proxy. diff --git a/api/storeapi/store_api.proto b/api/storeapi/store_api.proto index 8d34fc23..25351de4 100644 --- a/api/storeapi/store_api.proto +++ b/api/storeapi/store_api.proto @@ -26,6 +26,8 @@ service StoreApi { rpc Fetch(FetchRequest) returns (stream BinaryData) {} rpc Status(StatusRequest) returns (StatusResponse) {} + + rpc OnePhaseSearch(OnePhaseSearchRequest) returns (stream OnePhaseSearchResponse) {} } message BulkRequest { @@ -244,12 +246,13 @@ message IdWithHint { string hint = 2; } -message FetchRequest { - message FieldsFilter { +message FieldsFilter { repeated string fields = 1; // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. bool allow_list = 2; } + +message FetchRequest { repeated string ids = 1; bool explain = 3; repeated IdWithHint ids_with_hints = 4; @@ -261,3 +264,60 @@ message StatusRequest {} message StatusResponse { google.protobuf.Timestamp oldest_time = 1; } + +message OnePhaseSearchRequest { + string query = 1; + google.protobuf.Timestamp from = 2; + google.protobuf.Timestamp to = 3; + int64 size = 4; + int64 offset = 5; + bool explain = 6; + bool with_total = 7; + Order order = 8; + string offset_id = 9; + FieldsFilter fields_filter = 10; +} + +message OnePhaseSearchResponse { + oneof ResponseType { + Header header = 1; + RecordsBatch batch = 2; + } +} + +message Header { + Metadata metadata = 1; + repeated Typing typing = 2; +} + +message Metadata { + uint64 total = 1; + SearchErrorCode code = 2; + repeated string errors = 3; + optional ExplainEntry explain = 4; +} + +enum DataType { + BYTES = 0; + RAW_DOCUMENT = 1; + STRING = 2; + UINT32 = 3; + UINT64 = 4; + INT32 = 5; + INT64 = 6; + FLOAT64 = 7; + // TODO: array data types: StringArray, Uin64Array, Float64Array etc. +} + +message Typing { + string title = 1; + DataType type = 2; +} + +message RecordsBatch { + repeated Record records = 1; +} + +message Record { + repeated bytes raw_data = 1; +} diff --git a/parser/seqql_pipes.go b/parser/seqql_pipes.go index 6e005472..81553bec 100644 --- a/parser/seqql_pipes.go +++ b/parser/seqql_pipes.go @@ -29,6 +29,12 @@ func parsePipes(lex *lexer) ([]Pipe, error) { } pipes = append(pipes, p) fieldFilters++ + case lex.IsKeyword("stats"): + p, err := parsePipeStats(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'stats' pipe: %s", err) + } + pipes = append(pipes, p) default: return nil, fmt.Errorf("unknown pipe: %s", lex.Token) } @@ -62,6 +68,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 +135,115 @@ 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 +} + +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 +308,7 @@ var reservedKeywords = uniqueTokens([]string{ "|", // Pipe specific keywords. - "fields", "except", + "fields", "except", "stats", "by", "interval", "unique_count", }) func needQuoteToken(s string) bool { diff --git a/parser/seqql_pipes_test.go b/parser/seqql_pipes_test.go index 2313b20d..41b91891 100644 --- a/parser/seqql_pipes_test.go +++ b/parser/seqql_pipes_test.go @@ -38,3 +38,44 @@ 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)") +} diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go index eac9fd1c..88acb4b7 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go @@ -3042,7 +3042,7 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 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, 0x98, 0x0c, 0x0a, 0x0b, 0x53, 0x65, 0x71, + 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x8e, 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, @@ -3140,11 +3140,18 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 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, 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, + 0x69, 0x73, 0x74, 0x12, 0x74, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 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, 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, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 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 ( @@ -3281,21 +3288,23 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_depIdxs = []int32{ 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 - 14, // 72: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse - 15, // 73: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse - 28, // 74: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse - 30, // 75: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse - 5, // 76: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document - 33, // 77: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse - 35, // 78: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse - 39, // 79: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse - 17, // 80: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse - 19, // 81: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse - 21, // 82: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse - 23, // 83: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse - 25, // 84: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse - 72, // [72:85] is the sub-list for method output_type - 59, // [59:72] is the sub-list for method input_type + 12, // 72: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:input_type -> seqproxyapi.v1.SearchRequest + 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 + 39, // 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 + 15, // 86: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse + 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 diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go index 28010d15..26257727 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go @@ -351,6 +351,30 @@ func local_request_SeqProxyApi_GetAsyncSearchesList_0(ctx context.Context, marsh return msg, metadata, err } +func request_SeqProxyApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq SearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.OnePhaseSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_SeqProxyApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq SearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.OnePhaseSearch(ctx, &protoReq) + return msg, metadata, err +} + // 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. @@ -591,6 +615,26 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_OnePhaseSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", runtime.WithHTTPPathPattern("/one-phase-search")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SeqProxyApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SeqProxyApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -852,6 +896,23 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_OnePhaseSearch_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/OnePhaseSearch", runtime.WithHTTPPathPattern("/one-phase-search")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SeqProxyApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SeqProxyApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -869,6 +930,7 @@ var ( pattern_SeqProxyApi_CancelAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"async-searches", "search_id", "cancel"}, "")) 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_OnePhaseSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"one-phase-search"}, "")) ) var ( @@ -885,4 +947,5 @@ var ( forward_SeqProxyApi_CancelAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_DeleteAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage + forward_SeqProxyApi_OnePhaseSearch_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go index 97f47d65..0eed09c5 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go @@ -2098,6 +2098,7 @@ type SeqProxyApiClient interface { 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) + OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) } type seqProxyApiClient struct { @@ -2271,6 +2272,15 @@ func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsy return out, nil } +func (c *seqProxyApiClient) OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) { + out := new(ComplexSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SeqProxyApiServer is the server API for SeqProxyApi service. // All implementations must embed UnimplementedSeqProxyApiServer // for forward compatibility @@ -2303,6 +2313,7 @@ type SeqProxyApiServer interface { DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) + OnePhaseSearch(context.Context, *SearchRequest) (*ComplexSearchResponse, error) mustEmbedUnimplementedSeqProxyApiServer() } @@ -2349,6 +2360,9 @@ func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *Delete func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") } +func (UnimplementedSeqProxyApiServer) OnePhaseSearch(context.Context, *SearchRequest) (*ComplexSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnePhaseSearch not implemented") +} func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} // UnsafeSeqProxyApiServer may be embedded to opt out of forward compatibility for this service. @@ -2602,6 +2616,24 @@ func _SeqProxyApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _SeqProxyApi_OnePhaseSearch_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 interceptor == nil { + return srv.(SeqProxyApiServer).OnePhaseSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).OnePhaseSearch(ctx, req.(*SearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + // 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) @@ -2653,6 +2685,10 @@ var SeqProxyApi_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAsyncSearchesList", Handler: _SeqProxyApi_GetAsyncSearchesList_Handler, }, + { + MethodName: "OnePhaseSearch", + Handler: _SeqProxyApi_OnePhaseSearch_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/storeapi/store_api.pb.go b/pkg/storeapi/store_api.pb.go index 8fbb52c1..63a2a6e3 100644 --- a/pkg/storeapi/store_api.pb.go +++ b/pkg/storeapi/store_api.pb.go @@ -250,6 +250,70 @@ func (AsyncSearchStatus) EnumDescriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{3} } +type DataType int32 + +const ( + DataType_BYTES DataType = 0 + DataType_RAW_DOCUMENT DataType = 1 + DataType_STRING DataType = 2 + DataType_UINT32 DataType = 3 + DataType_UINT64 DataType = 4 + DataType_INT32 DataType = 5 + DataType_INT64 DataType = 6 + DataType_FLOAT64 DataType = 7 // TODO: array data types: StringArray, Uin64Array, Float64Array etc. +) + +// Enum value maps for DataType. +var ( + DataType_name = map[int32]string{ + 0: "BYTES", + 1: "RAW_DOCUMENT", + 2: "STRING", + 3: "UINT32", + 4: "UINT64", + 5: "INT32", + 6: "INT64", + 7: "FLOAT64", + } + DataType_value = map[string]int32{ + "BYTES": 0, + "RAW_DOCUMENT": 1, + "STRING": 2, + "UINT32": 3, + "UINT64": 4, + "INT32": 5, + "INT64": 6, + "FLOAT64": 7, + } +) + +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_storeapi_store_api_proto_enumTypes[4].Descriptor() +} + +func (DataType) Type() protoreflect.EnumType { + return &file_storeapi_store_api_proto_enumTypes[4] +} + +func (x DataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataType.Descriptor instead. +func (DataType) EnumDescriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{4} +} + type BulkRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` @@ -1592,19 +1656,72 @@ func (x *IdWithHint) GetHint() string { return "" } +type FieldsFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. + AllowList bool `protobuf:"varint,2,opt,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldsFilter) Reset() { + *x = FieldsFilter{} + mi := &file_storeapi_store_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldsFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldsFilter) ProtoMessage() {} + +func (x *FieldsFilter) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[18] + 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 FieldsFilter.ProtoReflect.Descriptor instead. +func (*FieldsFilter) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{18} +} + +func (x *FieldsFilter) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *FieldsFilter) GetAllowList() bool { + if x != nil { + return x.AllowList + } + return false +} + type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` - Explain bool `protobuf:"varint,3,opt,name=explain,proto3" json:"explain,omitempty"` - IdsWithHints []*IdWithHint `protobuf:"bytes,4,rep,name=ids_with_hints,json=idsWithHints,proto3" json:"ids_with_hints,omitempty"` - FieldsFilter *FetchRequest_FieldsFilter `protobuf:"bytes,5,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + Explain bool `protobuf:"varint,3,opt,name=explain,proto3" json:"explain,omitempty"` + IdsWithHints []*IdWithHint `protobuf:"bytes,4,rep,name=ids_with_hints,json=idsWithHints,proto3" json:"ids_with_hints,omitempty"` + FieldsFilter *FieldsFilter `protobuf:"bytes,5,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FetchRequest) Reset() { *x = FetchRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[18] + mi := &file_storeapi_store_api_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1616,7 +1733,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[18] + mi := &file_storeapi_store_api_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1629,7 +1746,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{18} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{19} } func (x *FetchRequest) GetIds() []string { @@ -1653,7 +1770,7 @@ func (x *FetchRequest) GetIdsWithHints() []*IdWithHint { return nil } -func (x *FetchRequest) GetFieldsFilter() *FetchRequest_FieldsFilter { +func (x *FetchRequest) GetFieldsFilter() *FieldsFilter { if x != nil { return x.FieldsFilter } @@ -1668,7 +1785,7 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[19] + mi := &file_storeapi_store_api_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1680,7 +1797,7 @@ func (x *StatusRequest) String() string { func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[19] + mi := &file_storeapi_store_api_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1693,7 +1810,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. func (*StatusRequest) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{19} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{20} } type StatusResponse struct { @@ -1705,7 +1822,7 @@ type StatusResponse struct { func (x *StatusResponse) Reset() { *x = StatusResponse{} - mi := &file_storeapi_store_api_proto_msgTypes[20] + mi := &file_storeapi_store_api_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1717,7 +1834,7 @@ func (x *StatusResponse) String() string { func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[20] + mi := &file_storeapi_store_api_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1730,7 +1847,7 @@ func (x *StatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. func (*StatusResponse) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{20} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{21} } func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { @@ -1740,6 +1857,464 @@ func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { return nil } +type OnePhaseSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // TODO: timestamppb + To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // TODO: timestamppb + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Explain bool `protobuf:"varint,6,opt,name=explain,proto3" json:"explain,omitempty"` + WithTotal bool `protobuf:"varint,7,opt,name=with_total,json=withTotal,proto3" json:"with_total,omitempty"` + Order Order `protobuf:"varint,8,opt,name=order,proto3,enum=api.Order" json:"order,omitempty"` + OffsetId string `protobuf:"bytes,9,opt,name=offset_id,json=offsetId,proto3" json:"offset_id,omitempty"` + FieldsFilter *FieldsFilter `protobuf:"bytes,10,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnePhaseSearchRequest) Reset() { + *x = OnePhaseSearchRequest{} + mi := &file_storeapi_store_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnePhaseSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnePhaseSearchRequest) ProtoMessage() {} + +func (x *OnePhaseSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[22] + 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 OnePhaseSearchRequest.ProtoReflect.Descriptor instead. +func (*OnePhaseSearchRequest) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{22} +} + +func (x *OnePhaseSearchRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *OnePhaseSearchRequest) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *OnePhaseSearchRequest) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +func (x *OnePhaseSearchRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetExplain() bool { + if x != nil { + return x.Explain + } + return false +} + +func (x *OnePhaseSearchRequest) GetWithTotal() bool { + if x != nil { + return x.WithTotal + } + return false +} + +func (x *OnePhaseSearchRequest) GetOrder() Order { + if x != nil { + return x.Order + } + return Order_ORDER_DESC +} + +func (x *OnePhaseSearchRequest) GetOffsetId() string { + if x != nil { + return x.OffsetId + } + return "" +} + +func (x *OnePhaseSearchRequest) GetFieldsFilter() *FieldsFilter { + if x != nil { + return x.FieldsFilter + } + return nil +} + +type OnePhaseSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ResponseType: + // + // *OnePhaseSearchResponse_Header + // *OnePhaseSearchResponse_Batch + ResponseType isOnePhaseSearchResponse_ResponseType `protobuf_oneof:"ResponseType"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnePhaseSearchResponse) Reset() { + *x = OnePhaseSearchResponse{} + mi := &file_storeapi_store_api_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnePhaseSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnePhaseSearchResponse) ProtoMessage() {} + +func (x *OnePhaseSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[23] + 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 OnePhaseSearchResponse.ProtoReflect.Descriptor instead. +func (*OnePhaseSearchResponse) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{23} +} + +func (x *OnePhaseSearchResponse) GetResponseType() isOnePhaseSearchResponse_ResponseType { + if x != nil { + return x.ResponseType + } + return nil +} + +func (x *OnePhaseSearchResponse) GetHeader() *Header { + if x != nil { + if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Header); ok { + return x.Header + } + } + return nil +} + +func (x *OnePhaseSearchResponse) GetBatch() *RecordsBatch { + if x != nil { + if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + return x.Batch + } + } + return nil +} + +type isOnePhaseSearchResponse_ResponseType interface { + isOnePhaseSearchResponse_ResponseType() +} + +type OnePhaseSearchResponse_Header struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type OnePhaseSearchResponse_Batch struct { + Batch *RecordsBatch `protobuf:"bytes,2,opt,name=batch,proto3,oneof"` +} + +func (*OnePhaseSearchResponse_Header) isOnePhaseSearchResponse_ResponseType() {} + +func (*OnePhaseSearchResponse_Batch) isOnePhaseSearchResponse_ResponseType() {} + +type Header struct { + state protoimpl.MessageState `protogen:"open.v1"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Typing []*Typing `protobuf:"bytes,2,rep,name=typing,proto3" json:"typing,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Header) Reset() { + *x = Header{} + mi := &file_storeapi_store_api_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[24] + 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 Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{24} +} + +func (x *Header) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Header) GetTyping() []*Typing { + if x != nil { + return x.Typing + } + return nil +} + +type Metadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Code SearchErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=api.SearchErrorCode" json:"code,omitempty"` + Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` + Explain *ExplainEntry `protobuf:"bytes,4,opt,name=explain,proto3,oneof" json:"explain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_storeapi_store_api_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[25] + 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 Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{25} +} + +func (x *Metadata) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *Metadata) GetCode() SearchErrorCode { + if x != nil { + return x.Code + } + return SearchErrorCode_NO_ERROR +} + +func (x *Metadata) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil +} + +func (x *Metadata) GetExplain() *ExplainEntry { + if x != nil { + return x.Explain + } + 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=api.DataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Typing) Reset() { + *x = Typing{} + mi := &file_storeapi_store_api_proto_msgTypes[26] + 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_storeapi_store_api_proto_msgTypes[26] + 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_storeapi_store_api_proto_rawDescGZIP(), []int{26} +} + +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 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_storeapi_store_api_proto_msgTypes[27] + 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_storeapi_store_api_proto_msgTypes[27] + 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_storeapi_store_api_proto_rawDescGZIP(), []int{27} +} + +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_storeapi_store_api_proto_msgTypes[28] + 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_storeapi_store_api_proto_msgTypes[28] + 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_storeapi_store_api_proto_rawDescGZIP(), []int{28} +} + +func (x *Record) GetRawData() [][]byte { + if x != nil { + return x.RawData + } + return nil +} + type SearchResponse_Id struct { state protoimpl.MessageState `protogen:"open.v1"` Mid uint64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"` @@ -1750,7 +2325,7 @@ type SearchResponse_Id struct { func (x *SearchResponse_Id) Reset() { *x = SearchResponse_Id{} - mi := &file_storeapi_store_api_proto_msgTypes[21] + mi := &file_storeapi_store_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1762,7 +2337,7 @@ func (x *SearchResponse_Id) String() string { func (*SearchResponse_Id) ProtoMessage() {} func (x *SearchResponse_Id) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[21] + mi := &file_storeapi_store_api_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1802,7 +2377,7 @@ type SearchResponse_IdWithHint struct { func (x *SearchResponse_IdWithHint) Reset() { *x = SearchResponse_IdWithHint{} - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1814,7 +2389,7 @@ func (x *SearchResponse_IdWithHint) String() string { func (*SearchResponse_IdWithHint) ProtoMessage() {} func (x *SearchResponse_IdWithHint) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1859,7 +2434,7 @@ type SearchResponse_Histogram struct { func (x *SearchResponse_Histogram) Reset() { *x = SearchResponse_Histogram{} - mi := &file_storeapi_store_api_proto_msgTypes[23] + mi := &file_storeapi_store_api_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1871,7 +2446,7 @@ func (x *SearchResponse_Histogram) String() string { func (*SearchResponse_Histogram) ProtoMessage() {} func (x *SearchResponse_Histogram) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[23] + mi := &file_storeapi_store_api_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1947,7 +2522,7 @@ type SearchResponse_Bin struct { func (x *SearchResponse_Bin) Reset() { *x = SearchResponse_Bin{} - mi := &file_storeapi_store_api_proto_msgTypes[24] + mi := &file_storeapi_store_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1959,7 +2534,7 @@ func (x *SearchResponse_Bin) String() string { func (*SearchResponse_Bin) ProtoMessage() {} func (x *SearchResponse_Bin) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[24] + mi := &file_storeapi_store_api_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,7 +2593,7 @@ type SearchResponse_Agg struct { func (x *SearchResponse_Agg) Reset() { *x = SearchResponse_Agg{} - mi := &file_storeapi_store_api_proto_msgTypes[25] + mi := &file_storeapi_store_api_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2030,7 +2605,7 @@ func (x *SearchResponse_Agg) String() string { func (*SearchResponse_Agg) ProtoMessage() {} func (x *SearchResponse_Agg) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[25] + mi := &file_storeapi_store_api_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2082,59 +2657,6 @@ func (x *SearchResponse_Agg) GetValuesPool() []string { return nil } -type FetchRequest_FieldsFilter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` - // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. - AllowList bool `protobuf:"varint,2,opt,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest_FieldsFilter) Reset() { - *x = FetchRequest_FieldsFilter{} - mi := &file_storeapi_store_api_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest_FieldsFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest_FieldsFilter) ProtoMessage() {} - -func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[29] - 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 FetchRequest_FieldsFilter.ProtoReflect.Descriptor instead. -func (*FetchRequest_FieldsFilter) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *FetchRequest_FieldsFilter) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *FetchRequest_FieldsFilter) GetAllowList() bool { - if x != nil { - return x.AllowList - } - return false -} - var File_storeapi_store_api_proto protoreflect.FileDescriptor var file_storeapi_store_api_proto_rawDesc = string([]byte{ @@ -2421,112 +2943,179 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x30, 0x0a, 0x0a, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x22, 0xfd, 0x01, 0x0a, 0x0c, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x0e, 0x69, 0x64, 0x73, 0x5f, 0x77, - 0x69, 0x74, 0x68, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, - 0x52, 0x0c, 0x69, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x43, - 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x0a, - 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 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, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4e, 0x47, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x5f, - 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x57, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x4f, 0x4c, 0x44, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, - 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x48, 0x49, 0x54, - 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x04, 0x12, 0x19, 0x0a, - 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, - 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x4f, 0x4f, 0x5f, - 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x4f, - 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, - 0x4e, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, - 0x07, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x49, 0x4d, 0x49, - 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 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, 0x9c, 0x05, 0x0a, 0x08, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x12, 0x32, 0x0a, 0x04, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x10, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x51, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 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, 0x1d, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x63, 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, 0x22, 0x2e, 0x61, - 0x70, 0x69, 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, 0x23, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, - 0x70, 0x69, 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, 0x1e, 0x2e, 0x61, 0x70, - 0x69, 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, 0x00, 0x12, 0x54, 0x0a, - 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 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, 0x1e, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x5d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, - 0x69, 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, 0x21, 0x2e, - 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x2f, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x11, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 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, 0x74, 0x6f, 0x72, 0x65, - 0x61, 0x70, 0x69, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x0c, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x35, + 0x0a, 0x0e, 0x69, 0x64, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x64, 0x57, + 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x69, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, + 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x0f, 0x0a, + 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, + 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 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, 0x0a, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe5, 0x02, + 0x0a, 0x15, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, + 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7a, 0x0a, 0x16, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x58, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x79, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xa0, 0x01, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x28, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x12, 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 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, 0x22, 0x41, + 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, 0x21, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x35, 0x0a, 0x0c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 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, 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, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4e, 0x47, 0x45, 0x53, 0x54, + 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x57, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x4f, + 0x4c, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x4f, + 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, + 0x48, 0x49, 0x54, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, + 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x04, + 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x47, 0x52, 0x4f, + 0x55, 0x50, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x54, + 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, + 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x53, 0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x5f, 0x4c, + 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 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, 0x6e, 0x0a, 0x08, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59, 0x54, 0x45, + 0x53, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x41, 0x57, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, + 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, + 0x33, 0x32, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x06, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x07, 0x32, 0xeb, 0x05, 0x0a, + 0x08, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x12, 0x32, 0x0a, 0x04, 0x42, 0x75, 0x6c, + 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, + 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 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, 0x1d, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x63, 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, + 0x22, 0x2e, 0x61, 0x70, 0x69, 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, 0x23, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, + 0x1d, 0x2e, 0x61, 0x70, 0x69, 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, 0x1e, + 0x2e, 0x61, 0x70, 0x69, 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, 0x00, + 0x12, 0x54, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 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, 0x1e, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x5d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, + 0x2e, 0x61, 0x70, 0x69, 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, 0x21, 0x2e, 0x61, 0x70, 0x69, 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, 0x00, 0x12, 0x2f, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x00, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x4f, + 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x32, 0x5a, 0x30, 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, 0x74, 0x6f, + 0x72, 0x65, 0x61, 0x70, 0x69, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2541,113 +3130,135 @@ func file_storeapi_store_api_proto_rawDescGZIP() []byte { return file_storeapi_store_api_proto_rawDescData } -var file_storeapi_store_api_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_storeapi_store_api_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_storeapi_store_api_proto_goTypes = []any{ (AggFunc)(0), // 0: api.AggFunc (Order)(0), // 1: api.Order (SearchErrorCode)(0), // 2: api.SearchErrorCode (AsyncSearchStatus)(0), // 3: api.AsyncSearchStatus - (*BulkRequest)(nil), // 4: api.BulkRequest - (*BinaryData)(nil), // 5: api.BinaryData - (*AggQuery)(nil), // 6: api.AggQuery - (*SearchRequest)(nil), // 7: api.SearchRequest - (*SearchResponse)(nil), // 8: api.SearchResponse - (*ExplainEntry)(nil), // 9: api.ExplainEntry - (*StartAsyncSearchRequest)(nil), // 10: api.StartAsyncSearchRequest - (*StartAsyncSearchResponse)(nil), // 11: api.StartAsyncSearchResponse - (*FetchAsyncSearchResultRequest)(nil), // 12: api.FetchAsyncSearchResultRequest - (*FetchAsyncSearchResultResponse)(nil), // 13: api.FetchAsyncSearchResultResponse - (*CancelAsyncSearchRequest)(nil), // 14: api.CancelAsyncSearchRequest - (*CancelAsyncSearchResponse)(nil), // 15: api.CancelAsyncSearchResponse - (*DeleteAsyncSearchRequest)(nil), // 16: api.DeleteAsyncSearchRequest - (*DeleteAsyncSearchResponse)(nil), // 17: api.DeleteAsyncSearchResponse - (*GetAsyncSearchesListRequest)(nil), // 18: api.GetAsyncSearchesListRequest - (*GetAsyncSearchesListResponse)(nil), // 19: api.GetAsyncSearchesListResponse - (*AsyncSearchesListItem)(nil), // 20: api.AsyncSearchesListItem - (*IdWithHint)(nil), // 21: api.IdWithHint - (*FetchRequest)(nil), // 22: api.FetchRequest - (*StatusRequest)(nil), // 23: api.StatusRequest - (*StatusResponse)(nil), // 24: api.StatusResponse - (*SearchResponse_Id)(nil), // 25: api.SearchResponse.Id - (*SearchResponse_IdWithHint)(nil), // 26: api.SearchResponse.IdWithHint - (*SearchResponse_Histogram)(nil), // 27: api.SearchResponse.Histogram - (*SearchResponse_Bin)(nil), // 28: api.SearchResponse.Bin - (*SearchResponse_Agg)(nil), // 29: api.SearchResponse.Agg - nil, // 30: api.SearchResponse.HistogramEntry - nil, // 31: api.SearchResponse.Agg.AggEntry - nil, // 32: api.SearchResponse.Agg.AggHistogramEntry - (*FetchRequest_FieldsFilter)(nil), // 33: api.FetchRequest.FieldsFilter - (*durationpb.Duration)(nil), // 34: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 36: google.protobuf.Empty + (DataType)(0), // 4: api.DataType + (*BulkRequest)(nil), // 5: api.BulkRequest + (*BinaryData)(nil), // 6: api.BinaryData + (*AggQuery)(nil), // 7: api.AggQuery + (*SearchRequest)(nil), // 8: api.SearchRequest + (*SearchResponse)(nil), // 9: api.SearchResponse + (*ExplainEntry)(nil), // 10: api.ExplainEntry + (*StartAsyncSearchRequest)(nil), // 11: api.StartAsyncSearchRequest + (*StartAsyncSearchResponse)(nil), // 12: api.StartAsyncSearchResponse + (*FetchAsyncSearchResultRequest)(nil), // 13: api.FetchAsyncSearchResultRequest + (*FetchAsyncSearchResultResponse)(nil), // 14: api.FetchAsyncSearchResultResponse + (*CancelAsyncSearchRequest)(nil), // 15: api.CancelAsyncSearchRequest + (*CancelAsyncSearchResponse)(nil), // 16: api.CancelAsyncSearchResponse + (*DeleteAsyncSearchRequest)(nil), // 17: api.DeleteAsyncSearchRequest + (*DeleteAsyncSearchResponse)(nil), // 18: api.DeleteAsyncSearchResponse + (*GetAsyncSearchesListRequest)(nil), // 19: api.GetAsyncSearchesListRequest + (*GetAsyncSearchesListResponse)(nil), // 20: api.GetAsyncSearchesListResponse + (*AsyncSearchesListItem)(nil), // 21: api.AsyncSearchesListItem + (*IdWithHint)(nil), // 22: api.IdWithHint + (*FieldsFilter)(nil), // 23: api.FieldsFilter + (*FetchRequest)(nil), // 24: api.FetchRequest + (*StatusRequest)(nil), // 25: api.StatusRequest + (*StatusResponse)(nil), // 26: api.StatusResponse + (*OnePhaseSearchRequest)(nil), // 27: api.OnePhaseSearchRequest + (*OnePhaseSearchResponse)(nil), // 28: api.OnePhaseSearchResponse + (*Header)(nil), // 29: api.Header + (*Metadata)(nil), // 30: api.Metadata + (*Typing)(nil), // 31: api.Typing + (*RecordsBatch)(nil), // 32: api.RecordsBatch + (*Record)(nil), // 33: api.Record + (*SearchResponse_Id)(nil), // 34: api.SearchResponse.Id + (*SearchResponse_IdWithHint)(nil), // 35: api.SearchResponse.IdWithHint + (*SearchResponse_Histogram)(nil), // 36: api.SearchResponse.Histogram + (*SearchResponse_Bin)(nil), // 37: api.SearchResponse.Bin + (*SearchResponse_Agg)(nil), // 38: api.SearchResponse.Agg + nil, // 39: api.SearchResponse.HistogramEntry + nil, // 40: api.SearchResponse.Agg.AggEntry + nil, // 41: api.SearchResponse.Agg.AggHistogramEntry + (*durationpb.Duration)(nil), // 42: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 44: google.protobuf.Empty } var file_storeapi_store_api_proto_depIdxs = []int32{ 0, // 0: api.AggQuery.func:type_name -> api.AggFunc - 6, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery + 7, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery 1, // 2: api.SearchRequest.order:type_name -> api.Order - 26, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint - 30, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry - 29, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg + 35, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint + 39, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry + 38, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg 2, // 6: api.SearchResponse.code:type_name -> api.SearchErrorCode - 9, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry - 34, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration - 9, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry - 34, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration - 6, // 11: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery + 10, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry + 42, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration + 10, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry + 42, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration + 7, // 11: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery 1, // 12: api.FetchAsyncSearchResultRequest.order:type_name -> api.Order 3, // 13: api.FetchAsyncSearchResultResponse.status:type_name -> api.AsyncSearchStatus - 8, // 14: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse - 35, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp - 35, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp - 35, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp - 6, // 18: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery - 35, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp - 35, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp - 34, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration + 9, // 14: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse + 43, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp + 43, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp + 43, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp + 7, // 18: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery + 43, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp + 43, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp + 42, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration 3, // 22: api.GetAsyncSearchesListRequest.status:type_name -> api.AsyncSearchStatus - 20, // 23: api.GetAsyncSearchesListResponse.searches:type_name -> api.AsyncSearchesListItem + 21, // 23: api.GetAsyncSearchesListResponse.searches:type_name -> api.AsyncSearchesListItem 3, // 24: api.AsyncSearchesListItem.status:type_name -> api.AsyncSearchStatus - 35, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp - 35, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp - 35, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp - 6, // 28: api.AsyncSearchesListItem.aggs:type_name -> api.AggQuery - 35, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp - 35, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp - 34, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration - 21, // 32: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint - 33, // 33: api.FetchRequest.fields_filter:type_name -> api.FetchRequest.FieldsFilter - 35, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp - 25, // 35: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id - 35, // 36: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp - 27, // 37: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram - 31, // 38: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry - 32, // 39: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry - 28, // 40: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin - 27, // 41: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram - 4, // 42: api.StoreApi.Bulk:input_type -> api.BulkRequest - 7, // 43: api.StoreApi.Search:input_type -> api.SearchRequest - 10, // 44: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest - 12, // 45: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest - 14, // 46: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest - 16, // 47: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest - 18, // 48: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest - 22, // 49: api.StoreApi.Fetch:input_type -> api.FetchRequest - 23, // 50: api.StoreApi.Status:input_type -> api.StatusRequest - 36, // 51: api.StoreApi.Bulk:output_type -> google.protobuf.Empty - 8, // 52: api.StoreApi.Search:output_type -> api.SearchResponse - 11, // 53: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse - 13, // 54: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse - 15, // 55: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse - 17, // 56: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse - 19, // 57: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse - 5, // 58: api.StoreApi.Fetch:output_type -> api.BinaryData - 24, // 59: api.StoreApi.Status:output_type -> api.StatusResponse - 51, // [51:60] is the sub-list for method output_type - 42, // [42:51] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 43, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp + 43, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp + 43, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp + 7, // 28: api.AsyncSearchesListItem.aggs:type_name -> api.AggQuery + 43, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp + 43, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp + 42, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration + 22, // 32: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint + 23, // 33: api.FetchRequest.fields_filter:type_name -> api.FieldsFilter + 43, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp + 43, // 35: api.OnePhaseSearchRequest.from:type_name -> google.protobuf.Timestamp + 43, // 36: api.OnePhaseSearchRequest.to:type_name -> google.protobuf.Timestamp + 1, // 37: api.OnePhaseSearchRequest.order:type_name -> api.Order + 23, // 38: api.OnePhaseSearchRequest.fields_filter:type_name -> api.FieldsFilter + 29, // 39: api.OnePhaseSearchResponse.header:type_name -> api.Header + 32, // 40: api.OnePhaseSearchResponse.batch:type_name -> api.RecordsBatch + 30, // 41: api.Header.metadata:type_name -> api.Metadata + 31, // 42: api.Header.typing:type_name -> api.Typing + 2, // 43: api.Metadata.code:type_name -> api.SearchErrorCode + 10, // 44: api.Metadata.explain:type_name -> api.ExplainEntry + 4, // 45: api.Typing.type:type_name -> api.DataType + 33, // 46: api.RecordsBatch.records:type_name -> api.Record + 34, // 47: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id + 43, // 48: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp + 36, // 49: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram + 40, // 50: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry + 41, // 51: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry + 37, // 52: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin + 36, // 53: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram + 5, // 54: api.StoreApi.Bulk:input_type -> api.BulkRequest + 8, // 55: api.StoreApi.Search:input_type -> api.SearchRequest + 11, // 56: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest + 13, // 57: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest + 15, // 58: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest + 17, // 59: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest + 19, // 60: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest + 24, // 61: api.StoreApi.Fetch:input_type -> api.FetchRequest + 25, // 62: api.StoreApi.Status:input_type -> api.StatusRequest + 27, // 63: api.StoreApi.OnePhaseSearch:input_type -> api.OnePhaseSearchRequest + 44, // 64: api.StoreApi.Bulk:output_type -> google.protobuf.Empty + 9, // 65: api.StoreApi.Search:output_type -> api.SearchResponse + 12, // 66: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse + 14, // 67: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse + 16, // 68: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse + 18, // 69: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse + 20, // 70: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse + 6, // 71: api.StoreApi.Fetch:output_type -> api.BinaryData + 26, // 72: api.StoreApi.Status:output_type -> api.StatusResponse + 28, // 73: api.StoreApi.OnePhaseSearch:output_type -> api.OnePhaseSearchResponse + 64, // [64:74] is the sub-list for method output_type + 54, // [54:64] is the sub-list for method input_type + 54, // [54:54] is the sub-list for extension type_name + 54, // [54:54] is the sub-list for extension extendee + 0, // [0:54] is the sub-list for field type_name } func init() { file_storeapi_store_api_proto_init() } @@ -2659,13 +3270,18 @@ func file_storeapi_store_api_proto_init() { file_storeapi_store_api_proto_msgTypes[9].OneofWrappers = []any{} file_storeapi_store_api_proto_msgTypes[14].OneofWrappers = []any{} file_storeapi_store_api_proto_msgTypes[16].OneofWrappers = []any{} + file_storeapi_store_api_proto_msgTypes[23].OneofWrappers = []any{ + (*OnePhaseSearchResponse_Header)(nil), + (*OnePhaseSearchResponse_Batch)(nil), + } + file_storeapi_store_api_proto_msgTypes[25].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_storeapi_store_api_proto_rawDesc), len(file_storeapi_store_api_proto_rawDesc)), - NumEnums: 4, - NumMessages: 30, + NumEnums: 5, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/storeapi/store_api.pb.gw.go b/pkg/storeapi/store_api.pb.gw.go index 385ec993..6d28a8d6 100644 --- a/pkg/storeapi/store_api.pb.gw.go +++ b/pkg/storeapi/store_api.pb.gw.go @@ -247,6 +247,26 @@ func local_request_StoreApi_Status_0(ctx context.Context, marshaler runtime.Mars return msg, metadata, err } +func request_StoreApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (StoreApi_OnePhaseSearchClient, runtime.ServerMetadata, error) { + var ( + protoReq OnePhaseSearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + stream, err := client.OnePhaseSearch(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + // RegisterStoreApiHandlerServer registers the http handlers for service StoreApi to "mux". // UnaryRPC :call StoreApiServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -421,6 +441,13 @@ func RegisterStoreApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, s forward_StoreApi_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_OnePhaseSearch_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 } @@ -613,6 +640,23 @@ func RegisterStoreApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_StoreApi_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_OnePhaseSearch_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, "/api.StoreApi/OnePhaseSearch", runtime.WithHTTPPathPattern("/api.StoreApi/OnePhaseSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StoreApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_StoreApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + }) return nil } @@ -626,6 +670,7 @@ var ( pattern_StoreApi_GetAsyncSearchesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "GetAsyncSearchesList"}, "")) pattern_StoreApi_Fetch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "Fetch"}, "")) pattern_StoreApi_Status_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "Status"}, "")) + pattern_StoreApi_OnePhaseSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "OnePhaseSearch"}, "")) ) var ( @@ -638,4 +683,5 @@ var ( forward_StoreApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage forward_StoreApi_Fetch_0 = runtime.ForwardResponseStream forward_StoreApi_Status_0 = runtime.ForwardResponseMessage + forward_StoreApi_OnePhaseSearch_0 = runtime.ForwardResponseStream ) diff --git a/pkg/storeapi/store_api_vtproto.pb.go b/pkg/storeapi/store_api_vtproto.pb.go index 199f99c9..6df6a19d 100644 --- a/pkg/storeapi/store_api_vtproto.pb.go +++ b/pkg/storeapi/store_api_vtproto.pb.go @@ -619,11 +619,11 @@ func (m *IdWithHint) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *FetchRequest_FieldsFilter) CloneVT() *FetchRequest_FieldsFilter { +func (m *FieldsFilter) CloneVT() *FieldsFilter { if m == nil { - return (*FetchRequest_FieldsFilter)(nil) + return (*FieldsFilter)(nil) } - r := new(FetchRequest_FieldsFilter) + r := new(FieldsFilter) r.AllowList = m.AllowList if rhs := m.Fields; rhs != nil { tmpContainer := make([]string, len(rhs)) @@ -637,7 +637,7 @@ func (m *FetchRequest_FieldsFilter) CloneVT() *FetchRequest_FieldsFilter { return r } -func (m *FetchRequest_FieldsFilter) CloneMessageVT() proto.Message { +func (m *FieldsFilter) CloneMessageVT() proto.Message { return m.CloneVT() } @@ -704,6 +704,185 @@ func (m *StatusResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *OnePhaseSearchRequest) CloneVT() *OnePhaseSearchRequest { + if m == nil { + return (*OnePhaseSearchRequest)(nil) + } + r := new(OnePhaseSearchRequest) + r.Query = m.Query + r.From = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.From).CloneVT()) + r.To = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.To).CloneVT()) + r.Size = m.Size + r.Offset = m.Offset + r.Explain = m.Explain + r.WithTotal = m.WithTotal + r.Order = m.Order + r.OffsetId = m.OffsetId + r.FieldsFilter = m.FieldsFilter.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *OnePhaseSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *OnePhaseSearchResponse) CloneVT() *OnePhaseSearchResponse { + if m == nil { + return (*OnePhaseSearchResponse)(nil) + } + r := new(OnePhaseSearchResponse) + if m.ResponseType != nil { + r.ResponseType = m.ResponseType.(interface { + CloneVT() isOnePhaseSearchResponse_ResponseType + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *OnePhaseSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *OnePhaseSearchResponse_Header) CloneVT() isOnePhaseSearchResponse_ResponseType { + if m == nil { + return (*OnePhaseSearchResponse_Header)(nil) + } + r := new(OnePhaseSearchResponse_Header) + r.Header = m.Header.CloneVT() + return r +} + +func (m *OnePhaseSearchResponse_Batch) CloneVT() isOnePhaseSearchResponse_ResponseType { + if m == nil { + return (*OnePhaseSearchResponse_Batch)(nil) + } + r := new(OnePhaseSearchResponse_Batch) + r.Batch = m.Batch.CloneVT() + return r +} + +func (m *Header) CloneVT() *Header { + if m == nil { + return (*Header)(nil) + } + r := new(Header) + r.Metadata = m.Metadata.CloneVT() + 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 *Header) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Metadata) CloneVT() *Metadata { + if m == nil { + return (*Metadata)(nil) + } + r := new(Metadata) + r.Total = m.Total + r.Code = m.Code + r.Explain = m.Explain.CloneVT() + if rhs := m.Errors; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Errors = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Metadata) 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 *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 (this *BulkRequest) EqualVT(that *BulkRequest) bool { if this == that { return true @@ -1584,7 +1763,7 @@ func (this *IdWithHint) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) bool { +func (this *FieldsFilter) EqualVT(that *FieldsFilter) bool { if this == that { return true } else if this == nil || that == nil { @@ -1605,8 +1784,8 @@ func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) return string(this.unknownFields) == string(that.unknownFields) } -func (this *FetchRequest_FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*FetchRequest_FieldsFilter) +func (this *FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*FieldsFilter) if !ok { return false } @@ -1695,87 +1874,362 @@ func (this *StatusResponse) 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 - -// StoreApiClient is the client API for StoreApi 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 StoreApiClient interface { - Bulk(ctx context.Context, in *BulkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) - StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) - FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) - CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) - DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) - GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) - Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (StoreApi_FetchClient, error) - Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) -} - -type storeApiClient struct { - cc grpc.ClientConnInterface -} - -func NewStoreApiClient(cc grpc.ClientConnInterface) StoreApiClient { - return &storeApiClient{cc} -} - -func (c *storeApiClient) Bulk(ctx context.Context, in *BulkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.StoreApi/Bulk", in, out, opts...) - if err != nil { - return nil, err +func (this *OnePhaseSearchRequest) EqualVT(that *OnePhaseSearchRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false } - return out, nil -} - -func (c *storeApiClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/api.StoreApi/Search", in, out, opts...) - if err != nil { - return nil, err + if this.Query != that.Query { + return false } - return out, nil + if !(*timestamppb1.Timestamp)(this.From).EqualVT((*timestamppb1.Timestamp)(that.From)) { + return false + } + if !(*timestamppb1.Timestamp)(this.To).EqualVT((*timestamppb1.Timestamp)(that.To)) { + return false + } + if this.Size != that.Size { + return false + } + if this.Offset != that.Offset { + return false + } + if this.Explain != that.Explain { + return false + } + if this.WithTotal != that.WithTotal { + return false + } + if this.Order != that.Order { + return false + } + if this.OffsetId != that.OffsetId { + return false + } + if !this.FieldsFilter.EqualVT(that.FieldsFilter) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) } -func (c *storeApiClient) StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) { - out := new(StartAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/api.StoreApi/StartAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *OnePhaseSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*OnePhaseSearchRequest) + if !ok { + return false } - return out, nil + return this.EqualVT(that) } - -func (c *storeApiClient) FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) { - out := new(FetchAsyncSearchResultResponse) - err := c.cc.Invoke(ctx, "/api.StoreApi/FetchAsyncSearchResult", in, out, opts...) - if err != nil { - return nil, err +func (this *OnePhaseSearchResponse) EqualVT(that *OnePhaseSearchResponse) 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(isOnePhaseSearchResponse_ResponseType) bool + }).EqualVT(that.ResponseType) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) } -func (c *storeApiClient) CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) { - out := new(CancelAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/api.StoreApi/CancelAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *OnePhaseSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*OnePhaseSearchResponse) + if !ok { + return false } - return out, nil + return this.EqualVT(that) } - -func (c *storeApiClient) DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) { - out := new(DeleteAsyncSearchResponse) - err := c.cc.Invoke(ctx, "/api.StoreApi/DeleteAsyncSearch", in, out, opts...) - if err != nil { - return nil, err +func (this *OnePhaseSearchResponse_Header) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { + that, ok := thatIface.(*OnePhaseSearchResponse_Header) + 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.Header, that.Header; p != q { + if p == nil { + p = &Header{} + } + if q == nil { + q = &Header{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *OnePhaseSearchResponse_Batch) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { + that, ok := thatIface.(*OnePhaseSearchResponse_Batch) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Batch, that.Batch; p != q { + if p == nil { + p = &RecordsBatch{} + } + if q == nil { + q = &RecordsBatch{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *Header) EqualVT(that *Header) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Metadata.EqualVT(that.Metadata) { + return false + } + 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 (this *Header) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Header) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Metadata) EqualVT(that *Metadata) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Total != that.Total { + return false + } + if this.Code != that.Code { + return false + } + if len(this.Errors) != len(that.Errors) { + return false + } + for i, vx := range this.Errors { + vy := that.Errors[i] + if vx != vy { + return false + } + } + if !this.Explain.EqualVT(that.Explain) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Metadata) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Metadata) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Typing) EqualVT(that *Typing) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Title != that.Title { + return false + } + if this.Type != that.Type { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Typing) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Typing) + if !ok { + return false + } + 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) +} + +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) +} + +// 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 + +// StoreApiClient is the client API for StoreApi 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 StoreApiClient interface { + Bulk(ctx context.Context, in *BulkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) + StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) + FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) + CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) + DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) + GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) + Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (StoreApi_FetchClient, error) + Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) + OnePhaseSearch(ctx context.Context, in *OnePhaseSearchRequest, opts ...grpc.CallOption) (StoreApi_OnePhaseSearchClient, error) +} + +type storeApiClient struct { + cc grpc.ClientConnInterface +} + +func NewStoreApiClient(cc grpc.ClientConnInterface) StoreApiClient { + return &storeApiClient{cc} +} + +func (c *storeApiClient) Bulk(ctx context.Context, in *BulkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.StoreApi/Bulk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeApiClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/Search", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeApiClient) StartAsyncSearch(ctx context.Context, in *StartAsyncSearchRequest, opts ...grpc.CallOption) (*StartAsyncSearchResponse, error) { + out := new(StartAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/StartAsyncSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeApiClient) FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) { + out := new(FetchAsyncSearchResultResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/FetchAsyncSearchResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeApiClient) CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) { + out := new(CancelAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/CancelAsyncSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeApiClient) DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) { + out := new(DeleteAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/DeleteAsyncSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } func (c *storeApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) { @@ -1828,6 +2282,38 @@ func (c *storeApiClient) Status(ctx context.Context, in *StatusRequest, opts ... return out, nil } +func (c *storeApiClient) OnePhaseSearch(ctx context.Context, in *OnePhaseSearchRequest, opts ...grpc.CallOption) (StoreApi_OnePhaseSearchClient, error) { + stream, err := c.cc.NewStream(ctx, &StoreApi_ServiceDesc.Streams[1], "/api.StoreApi/OnePhaseSearch", opts...) + if err != nil { + return nil, err + } + x := &storeApiOnePhaseSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type StoreApi_OnePhaseSearchClient interface { + Recv() (*OnePhaseSearchResponse, error) + grpc.ClientStream +} + +type storeApiOnePhaseSearchClient struct { + grpc.ClientStream +} + +func (x *storeApiOnePhaseSearchClient) Recv() (*OnePhaseSearchResponse, error) { + m := new(OnePhaseSearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // StoreApiServer is the server API for StoreApi service. // All implementations must embed UnimplementedStoreApiServer // for forward compatibility @@ -1841,6 +2327,7 @@ type StoreApiServer interface { GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) Fetch(*FetchRequest, StoreApi_FetchServer) error Status(context.Context, *StatusRequest) (*StatusResponse, error) + OnePhaseSearch(*OnePhaseSearchRequest, StoreApi_OnePhaseSearchServer) error mustEmbedUnimplementedStoreApiServer() } @@ -1875,6 +2362,9 @@ func (UnimplementedStoreApiServer) Fetch(*FetchRequest, StoreApi_FetchServer) er func (UnimplementedStoreApiServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } +func (UnimplementedStoreApiServer) OnePhaseSearch(*OnePhaseSearchRequest, StoreApi_OnePhaseSearchServer) error { + return status.Errorf(codes.Unimplemented, "method OnePhaseSearch not implemented") +} func (UnimplementedStoreApiServer) mustEmbedUnimplementedStoreApiServer() {} // UnsafeStoreApiServer may be embedded to opt out of forward compatibility for this service. @@ -2053,6 +2543,27 @@ func _StoreApi_Status_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _StoreApi_OnePhaseSearch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(OnePhaseSearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StoreApiServer).OnePhaseSearch(m, &storeApiOnePhaseSearchServer{stream}) +} + +type StoreApi_OnePhaseSearchServer interface { + Send(*OnePhaseSearchResponse) error + grpc.ServerStream +} + +type storeApiOnePhaseSearchServer struct { + grpc.ServerStream +} + +func (x *storeApiOnePhaseSearchServer) Send(m *OnePhaseSearchResponse) error { + return x.ServerStream.SendMsg(m) +} + // StoreApi_ServiceDesc is the grpc.ServiceDesc for StoreApi service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2099,7 +2610,12 @@ var StoreApi_ServiceDesc = grpc.ServiceDesc{ Handler: _StoreApi_Fetch_Handler, ServerStreams: true, }, - }, + { + StreamName: "OnePhaseSearch", + Handler: _StoreApi_OnePhaseSearch_Handler, + ServerStreams: true, + }, + }, Metadata: "storeapi/store_api.proto", } @@ -3703,7 +4219,7 @@ func (m *IdWithHint) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { +func (m *FieldsFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3716,12 +4232,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 *FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3905,25 +4421,25 @@ func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchRequest) 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 *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3935,47 +4451,107 @@ func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Metas) > 0 { - i -= len(m.Metas) - copy(dAtA[i:], m.Metas) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) + 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] = 0x52 + } + 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] = 0x4a + } + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x40 + } + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Explain { + i-- + if m.Explain { + 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.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 } - if len(m.Docs) > 0 { - i -= len(m.Docs) - copy(dAtA[i:], m.Docs) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) + 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 m.Count != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + 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 *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchResponse) 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 *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3987,35 +4563,83 @@ func (m *BinaryData) MarshalToSizedBufferVTStrict(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))) + 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 + } + return len(dAtA) - i, nil +} + +func (m *OnePhaseSearchResponse_Header) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse_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] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } +func (m *OnePhaseSearchResponse_Batch) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} -func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchResponse_Batch) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + 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] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *Header) 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 *Header) 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 *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4027,62 +4651,50 @@ func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Interval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x30 - } - 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 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] = 0x12 } - 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))) + if m.Metadata != nil { + size, err := m.Metadata.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 *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Metadata) 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 *Metadata) 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 *Metadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4094,118 +4706,102 @@ 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))) - i-- - dAtA[i] = 0x72 - } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + 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] = 0x68 + 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)) + if len(m.Errors) > 0 { + for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Errors[iNdEx]) + copy(dAtA[i:], m.Errors[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x1a } } - if len(m.AggregationFilter) > 0 { - i -= len(m.AggregationFilter) - copy(dAtA[i:], m.AggregationFilter) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AggregationFilter))) - i-- - dAtA[i] = 0x5a - } - if m.WithTotal { - i-- - if m.WithTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x10 } - if m.Explain { - i-- - if m.Explain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x8 } - if len(m.Aggregation) > 0 { - i -= len(m.Aggregation) - copy(dAtA[i:], m.Aggregation) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Aggregation))) - i-- - dAtA[i] = 0x3a - } - if m.Interval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x30 + return len(dAtA) - i, nil +} + +func (m *Typing) 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 *Typing) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Typing) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.To != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) - i-- - dAtA[i] = 0x18 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.From != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x10 } - 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.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 *SearchResponse_Id) 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 *SearchResponse_Id) 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 *SearchResponse_Id) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *RecordsBatch) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4217,38 +4813,40 @@ func (m *SearchResponse_Id) MarshalToSizedBufferVTStrict(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Rid != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Rid)) - i-- - dAtA[i] = 0x10 - } - if m.Mid != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mid)) - i-- - dAtA[i] = 0x8 + 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 + } } return len(dAtA) - i, nil } -func (m *SearchResponse_IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Record) 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_IdWithHint) 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 *SearchResponse_IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Record) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4260,27 +4858,19 @@ func (m *SearchResponse_IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (i i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Hint) > 0 { - i -= len(m.Hint) - copy(dAtA[i:], m.Hint) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hint))) - i-- - dAtA[i] = 0x1a - } - if m.Id != nil { - size, err := m.Id.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + 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 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchResponse_Histogram) MarshalVTStrict() (dAtA []byte, err error) { +func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4293,12 +4883,12 @@ func (m *SearchResponse_Histogram) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse_Histogram) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *SearchResponse_Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4310,68 +4900,29 @@ func (m *SearchResponse_Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Values) > 0 { - var pksize2 int - for _, num := range m.Values { - pksize2 += protohelpers.SizeOfVarint(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range m.Values { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x3a - } - if len(m.Samples) > 0 { - for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { - f3 := math.Float64bits(float64(m.Samples[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Samples)*8)) - i-- - dAtA[i] = 0x32 - } - if m.NotExists != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) - i-- - dAtA[i] = 0x28 - } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x20 - } - if m.Sum != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) + if len(m.Metas) > 0 { + i -= len(m.Metas) + copy(dAtA[i:], m.Metas) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) i-- - dAtA[i] = 0x19 + dAtA[i] = 0x1a } - if m.Max != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) + if len(m.Docs) > 0 { + i -= len(m.Docs) + copy(dAtA[i:], m.Docs) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) i-- - dAtA[i] = 0x11 + dAtA[i] = 0x12 } - if m.Min != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) + if m.Count != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) i-- - dAtA[i] = 0x9 + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SearchResponse_Bin) MarshalVTStrict() (dAtA []byte, err error) { +func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4384,12 +4935,12 @@ func (m *SearchResponse_Bin) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse_Bin) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *SearchResponse_Bin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4401,37 +4952,17 @@ func (m *SearchResponse_Bin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err 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)) - i-- - dAtA[i] = 0x1a - } - 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 len(m.Label) > 0 { - i -= len(m.Label) - copy(dAtA[i:], m.Label) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Label))) + 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 *SearchResponse_Agg) MarshalVTStrict() (dAtA []byte, err error) { +func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4444,12 +4975,12 @@ func (m *SearchResponse_Agg) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse_Agg) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *SearchResponse_Agg) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4461,75 +4992,44 @@ func (m *SearchResponse_Agg) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ValuesPool) > 0 { - for iNdEx := len(m.ValuesPool) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ValuesPool[iNdEx]) - copy(dAtA[i:], m.ValuesPool[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ValuesPool[iNdEx]))) - i-- - dAtA[i] = 0x2a - } + if m.Interval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x30 } - if len(m.Timeseries) > 0 { - for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Timeseries[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.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)) + if m.Func != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } - if len(m.AggHistogram) > 0 { - for k := range m.AggHistogram { - v := m.AggHistogram[k] - baseI := i - size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } + 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.Agg) > 0 { - for k := range m.Agg { - v := m.Agg[k] - baseI := i - i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } + 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 *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4542,12 +5042,12 @@ func (m *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4559,34 +5059,17 @@ func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) 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] = 0x42 - } - if m.Code != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + 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] = 0x38 - } - if len(m.Errors) > 0 { - for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Errors[iNdEx]) - copy(dAtA[i:], m.Errors[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) - i-- - dAtA[i] = 0x32 - } + dAtA[i] = 0x72 } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x68 } if len(m.Aggs) > 0 { for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { @@ -4597,47 +5080,79 @@ func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x62 } } - if len(m.Histogram) > 0 { - for k := range m.Histogram { - v := m.Histogram[k] - baseI := i - i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) - i-- - dAtA[i] = 0x8 - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a + if len(m.AggregationFilter) > 0 { + i -= len(m.AggregationFilter) + copy(dAtA[i:], m.AggregationFilter) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AggregationFilter))) + i-- + dAtA[i] = 0x5a + } + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x50 } - if len(m.IdSources) > 0 { - for iNdEx := len(m.IdSources) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.IdSources[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.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x40 } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + if len(m.Aggregation) > 0 { + i -= len(m.Aggregation) + copy(dAtA[i:], m.Aggregation) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Aggregation))) + i-- + dAtA[i] = 0x3a + } + if m.Interval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) + 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.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x18 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x10 + } + 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 *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Id) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4650,12 +5165,12 @@ func (m *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExplainEntry) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Id) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *ExplainEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Id) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4667,39 +5182,20 @@ 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.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.Rid != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Rid)) 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 m.Mid != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Mid)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *StartAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4712,12 +5208,12 @@ func (m *StartAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_IdWithHint) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4729,76 +5225,118 @@ 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)) + if len(m.Hint) > 0 { + i -= len(m.Hint) + copy(dAtA[i:], m.Hint) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hint))) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x1a } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.Id != nil { + size, err := m.Id.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x40 - } - if m.HistogramInterval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) - i-- - dAtA[i] = 0x38 + dAtA[i] = 0xa } - 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] = 0x32 - } + return len(dAtA) - i, nil +} + +func (m *SearchResponse_Histogram) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.To != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + 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_Histogram) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SearchResponse_Histogram) 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.Values) > 0 { + var pksize2 int + for _, num := range m.Values { + pksize2 += protohelpers.SizeOfVarint(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num := range m.Values { + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x3a + } + if len(m.Samples) > 0 { + for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { + f3 := math.Float64bits(float64(m.Samples[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Samples)*8)) + i-- + dAtA[i] = 0x32 + } + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- dAtA[i] = 0x28 } - if m.From != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- dAtA[i] = 0x20 } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + if m.Sum != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x19 } - 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)) + if m.Max != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x11 } - 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.Min != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x9 } return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Bin) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4811,12 +5349,12 @@ func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Bin) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Bin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4828,10 +5366,37 @@ func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (in 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)) + i-- + dAtA[i] = 0x1a + } + 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 len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Label))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Agg) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4844,12 +5409,12 @@ func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Agg) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Agg) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4861,32 +5426,75 @@ 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 len(m.ValuesPool) > 0 { + for iNdEx := len(m.ValuesPool) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ValuesPool[iNdEx]) + copy(dAtA[i:], m.ValuesPool[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ValuesPool[iNdEx]))) + i-- + dAtA[i] = 0x2a + } } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if len(m.Timeseries) > 0 { + for iNdEx := len(m.Timeseries) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Timeseries[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.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- dAtA[i] = 0x18 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x10 + if len(m.AggHistogram) > 0 { + for k := range m.AggHistogram { + v := m.AggHistogram[k] + baseI := i + size, err := v.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + 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))) - i-- - dAtA[i] = 0xa + if len(m.Agg) > 0 { + for k := range m.Agg { + v := m.Agg[k] + baseI := i + i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4899,12 +5507,12 @@ func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err err return dAtA[:n], nil } -func (m *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4916,64 +5524,34 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if m.Retention != nil { - size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVTStrict(dAtA[:i]) + 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] = 0x72 + dAtA[i] = 0x42 } - 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.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x38 } - 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] = 0x62 - } - 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] = 0x5a + if len(m.Errors) > 0 { + for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Errors[iNdEx]) + copy(dAtA[i:], m.Errors[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) + i-- + dAtA[i] = 0x32 + } } - if m.HistogramInterval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- - dAtA[i] = 0x50 + dAtA[i] = 0x28 } if len(m.Aggs) > 0 { for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { @@ -4984,56 +5562,90 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x22 } } - if m.DiskUsage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) - i-- - dAtA[i] = 0x40 + if len(m.Histogram) > 0 { + for k := range m.Histogram { + v := m.Histogram[k] + baseI := i + i = protohelpers.EncodeVarint(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i = protohelpers.EncodeVarint(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } } - if m.FracsQueue != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) - i-- - dAtA[i] = 0x38 + if len(m.IdSources) > 0 { + for iNdEx := len(m.IdSources) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.IdSources[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.FracsDone != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + 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] = 0x30 + dAtA[i] = 0xa } - 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] = 0x2a + return len(dAtA) - i, nil +} + +func (m *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - 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] = 0x22 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.StartedAt != nil { - size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + return dAtA[:n], nil +} + +func (m *ExplainEntry) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *ExplainEntry) 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.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 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a } - if m.Response != nil { - size, err := m.Response.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Duration != nil { + size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -5042,15 +5654,17 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i-- dAtA[i] = 0x12 } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + 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] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StartAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5063,12 +5677,12 @@ func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CancelAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5080,6 +5694,65 @@ func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x48 + } + if m.WithDocs { + i-- + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.HistogramInterval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + i-- + dAtA[i] = 0x38 + } + 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] = 0x32 + } + } + if m.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x28 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x20 + } + 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] = 0x1a + } + 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] = 0x12 + } if len(m.SearchId) > 0 { i -= len(m.SearchId) copy(dAtA[i:], m.SearchId) @@ -5090,7 +5763,7 @@ func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5103,12 +5776,12 @@ func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CancelAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5123,7 +5796,7 @@ func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5136,12 +5809,12 @@ func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5153,6 +5826,21 @@ func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in 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) @@ -5163,7 +5851,7 @@ func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5176,12 +5864,12 @@ func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5193,146 +5881,12 @@ func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (i i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - return len(dAtA) - i, nil -} - -func (m *GetAsyncSearchesListRequest) 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 *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, 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.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] = 0x12 - } - } - if m.Status != nil { - i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetAsyncSearchesListResponse) 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 *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, 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.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 - } - } - return len(dAtA) - i, nil -} - -func (m *AsyncSearchesListItem) 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 *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, 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.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Error))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 } if m.WithDocs { i-- @@ -5443,22 +5997,25 @@ func (m *AsyncSearchesListItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i-- dAtA[i] = 0x1a } - if m.Status != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + 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] = 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.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5471,12 +6028,12 @@ func (m *IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IdWithHint) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5488,24 +6045,17 @@ func (m *IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Hint) > 0 { - i -= len(m.Hint) - copy(dAtA[i:], m.Hint) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hint))) - 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))) + 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 *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5518,12 +6068,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 *CancelAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5535,29 +6085,10 @@ 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]))) - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5570,12 +6101,12 @@ func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5587,51 +6118,17 @@ 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 err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if len(m.IdsWithHints) > 0 { - for iNdEx := len(m.IdsWithHints) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.IdsWithHints[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 { - i-- - if m.Explain { - 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] = 0x18 - } - 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 *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5644,12 +6141,12 @@ func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5664,7 +6161,7 @@ func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5677,12 +6174,12 @@ func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5694,660 +6191,969 @@ func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) 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 + 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] = 0x12 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + } + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *BulkRequest) SizeVT() (n int) { +func (m *GetAsyncSearchesListResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Count != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) - } - l = len(m.Docs) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - l = len(m.Metas) - 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 *BinaryData) 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 *GetAsyncSearchesListResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *AggQuery) SizeVT() (n int) { +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.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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Func != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + 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 + } } - if len(m.Quantiles) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + return len(dAtA) - i, nil +} + +func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.Interval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + 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 *SearchRequest) 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 - l = len(m.Query) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.From != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.To != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a } if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + if m.WithDocs { + i-- + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 } - if m.Interval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + 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] = 0x72 } - l = len(m.Aggregation) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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] = 0x6a } - if m.Explain { - n += 2 + 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] = 0x62 } - if m.WithTotal { - n += 2 + 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] = 0x5a } - l = len(m.AggregationFilter) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.HistogramInterval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + i-- + dAtA[i] = 0x50 } 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] = 0x4a } } - 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)) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 } - n += len(m.unknownFields) - return n -} - -func (m *SearchResponse_Id) SizeVT() (n int) { - if m == nil { - return 0 + if m.FracsQueue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) + i-- + dAtA[i] = 0x38 } - var l int - _ = l - if m.Mid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Mid)) + if m.FracsDone != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + i-- + dAtA[i] = 0x30 } - if m.Rid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Rid)) + 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] = 0x2a } - n += len(m.unknownFields) - return n -} - -func (m *SearchResponse_IdWithHint) SizeVT() (n int) { - if m == nil { - return 0 + 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] = 0x22 } - var l int - _ = l - if m.Id != nil { - l = m.Id.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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] = 0x1a } - l = len(m.Hint) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 } - n += len(m.unknownFields) - return n + 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 *SearchResponse_Histogram) SizeVT() (n int) { +func (m *IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.Min != 0 { - n += 9 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.Max != 0 { - n += 9 + return dAtA[:n], nil +} + +func (m *IdWithHint) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.Sum != 0 { - n += 9 + i := len(dAtA) + _ = i + var l int + _ = l + 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.Hint) > 0 { + i -= len(m.Hint) + copy(dAtA[i:], m.Hint) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hint))) + i-- + dAtA[i] = 0x12 } - if m.NotExists != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + 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.Samples) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Samples)*8)) + len(m.Samples)*8 + return len(dAtA) - i, nil +} + +func (m *FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.Values) > 0 { - l = 0 - for _, e := range m.Values { - l += protohelpers.SizeOfVarint(uint64(e)) - } - n += 1 + protohelpers.SizeOfVarint(uint64(l)) + 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 *SearchResponse_Bin) SizeVT() (n int) { +func (m *FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Label) - 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.Ts != nil { - l = (*timestamppb1.Timestamp)(m.Ts).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.AllowList { + i-- + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 + } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchResponse_Agg) SizeVT() (n int) { +func (m *FetchRequest) 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 *FetchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Agg) > 0 { - for k, v := range m.Agg { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + 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] = 0x2a } - if len(m.AggHistogram) > 0 { - for k, v := range m.AggHistogram { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() + if len(m.IdsWithHints) > 0 { + for iNdEx := len(m.IdsWithHints) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.IdsWithHints[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } - l += 1 + protohelpers.SizeOfVarint(uint64(l)) - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } } - if m.NotExists != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) - } - if len(m.Timeseries) > 0 { - for _, e := range m.Timeseries { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x18 } - if len(m.ValuesPool) > 0 { - for _, s := range m.ValuesPool { - l = len(s) - 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] = 0xa } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchResponse) SizeVT() (n int) { +func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - if len(m.IdSources) > 0 { - for _, e := range m.IdSources { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Histogram) > 0 { - for k, v := range m.Histogram { - _ = k - _ = v - mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - 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 } - if m.Total != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + return dAtA[:n], nil +} + +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, nil } - if len(m.Errors) > 0 { - for _, s := range m.Errors { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Code != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + return len(dAtA) - i, nil +} + +func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.Explain != nil { - l = m.Explain.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 *ExplainEntry) 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 - 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 m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *StartAsyncSearchRequest) SizeVT() (n int) { +func (m *OnePhaseSearchRequest) 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 *OnePhaseSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + 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.Retention != nil { - l = (*durationpb1.Duration)(m.Retention).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Query) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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] = 0x52 } - if m.From != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + 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] = 0x4a } - if m.To != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x40 } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x38 } - if m.HistogramInterval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - if m.WithDocs { - n += 2 + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 } if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x20 } - n += len(m.unknownFields) - return n + 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 *StartAsyncSearchResponse) SizeVT() (n int) { +func (m *OnePhaseSearchResponse) 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 *FetchAsyncSearchResultRequest) SizeVT() (n int) { +func (m *OnePhaseSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse) 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.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 msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -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.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.FracsDone != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsDone)) - } - if m.FracsQueue != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsQueue)) - } - if m.DiskUsage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) - } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) +func (m *OnePhaseSearchResponse_Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse_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 } - if m.HistogramInterval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) - } - 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.Retention != nil { - l = (*durationpb1.Duration)(m.Retention).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.WithDocs { - n += 2 - } - if m.Size != 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(m.Size)) - } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil +} +func (m *OnePhaseSearchResponse_Batch) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *CancelAsyncSearchRequest) SizeVT() (n int) { +func (m *OnePhaseSearchResponse_Batch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + 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] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *Header) 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) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n +func (m *Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *DeleteAsyncSearchRequest) SizeVT() (n int) { +func (m *Header) 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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n + 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] = 0x12 + } + } + if m.Metadata != nil { + size, err := m.Metadata.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 *DeleteAsyncSearchResponse) SizeVT() (n int) { +func (m *Metadata) 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 *GetAsyncSearchesListRequest) SizeVT() (n int) { +func (m *Metadata) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Metadata) 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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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] = 0x22 } - n += len(m.unknownFields) - return n + if len(m.Errors) > 0 { + for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Errors[iNdEx]) + copy(dAtA[i:], m.Errors[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x10 + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *GetAsyncSearchesListResponse) SizeVT() (n int) { +func (m *Typing) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if len(m.Searches) > 0 { - for _, e := range m.Searches { - 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 *AsyncSearchesListItem) SizeVT() (n int) { +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 + 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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.StartedAt != nil { - l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 } - if m.ExpiresAt != nil { - l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - if m.CanceledAt != nil { - l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *RecordsBatch) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.FracsDone != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsDone)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.FracsQueue != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsQueue)) + 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 } - if m.DiskUsage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + 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 _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } } - if m.HistogramInterval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + return len(dAtA) - i, nil +} + +func (m *Record) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - l = len(m.Query) - 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 } - if m.From != nil { - l = (*timestamppb1.Timestamp)(m.From).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - if m.To != nil { - l = (*timestamppb1.Timestamp)(m.To).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Retention != nil { - l = (*durationpb1.Duration)(m.Retention).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 + } } - if m.WithDocs { - n += 2 + return len(dAtA) - i, nil +} + +func (m *BulkRequest) SizeVT() (n int) { + if m == nil { + return 0 } - if m.Size != 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(m.Size)) + var l int + _ = l + if m.Count != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } - l = len(m.Error) + l = len(m.Docs) if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Metas) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func (m *IdWithHint) SizeVT() (n int) { +func (m *BinaryData) 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.Hint) + l = len(m.Data) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } @@ -6355,79 +7161,2663 @@ func (m *IdWithHint) SizeVT() (n int) { return n } -func (m *FetchRequest_FieldsFilter) SizeVT() (n int) { +func (m *AggQuery) 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)) - } + l = len(m.Field) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.AllowList { - n += 2 + 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 != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) } n += len(m.unknownFields) return n } -func (m *FetchRequest) SizeVT() (n int) { +func (m *SearchRequest) 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)) - } + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + } + if m.To != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.Interval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + } + l = len(m.Aggregation) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Explain { n += 2 } - if len(m.IdsWithHints) > 0 { - for _, e := range m.IdsWithHints { + if m.WithTotal { + n += 2 + } + l = len(m.AggregationFilter) + if l > 0 { + 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.FieldsFilter != nil { - l = m.FieldsFilter.SizeVT() + 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 *StatusRequest) SizeVT() (n int) { +func (m *SearchResponse_Id) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l + if m.Mid != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Mid)) + } + if m.Rid != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Rid)) + } n += len(m.unknownFields) return n } -func (m *StatusResponse) SizeVT() (n int) { +func (m *SearchResponse_IdWithHint) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Hint) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse_Histogram) 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)) + var l int + _ = l + if m.Min != 0 { + n += 9 + } + if m.Max != 0 { + n += 9 + } + if m.Sum != 0 { + n += 9 + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if m.NotExists != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + } + if len(m.Samples) > 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Samples)*8)) + len(m.Samples)*8 + } + if len(m.Values) > 0 { + l = 0 + for _, e := range m.Values { + l += protohelpers.SizeOfVarint(uint64(e)) + } + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse_Bin) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Label) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Ts != nil { + l = (*timestamppb1.Timestamp)(m.Ts).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 *SearchResponse_Agg) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Agg) > 0 { + for k, v := range m.Agg { + _ = k + _ = v + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + protohelpers.SizeOfVarint(uint64(v)) + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + } + } + if len(m.AggHistogram) > 0 { + for k, v := range m.AggHistogram { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + } + } + if m.NotExists != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.NotExists)) + } + if len(m.Timeseries) > 0 { + for _, e := range m.Timeseries { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.ValuesPool) > 0 { + for _, s := range m.ValuesPool { + l = len(s) + 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 + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.IdSources) > 0 { + for _, e := range m.IdSources { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if len(m.Histogram) > 0 { + for k, v := range m.Histogram { + _ = k + _ = v + mapEntrySize := 1 + protohelpers.SizeOfVarint(uint64(k)) + 1 + protohelpers.SizeOfVarint(uint64(v)) + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) + } + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if len(m.Errors) > 0 { + for _, s := range m.Errors { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } + if m.Explain != nil { + l = m.Explain.SizeVT() + 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 *StartAsyncSearchRequest) 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.Retention != nil { + l = (*durationpb1.Duration)(m.Retention).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + } + if m.To != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.HistogramInterval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + } + 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 + 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.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.FracsDone != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsDone)) + } + if m.FracsQueue != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsQueue)) + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.HistogramInterval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + } + 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.Retention != nil { + l = (*durationpb1.Duration)(m.Retention).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.WithDocs { + n += 2 + } + if m.Size != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + 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 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)) + } + } + 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.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.FracsDone != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsDone)) + } + if m.FracsQueue != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.FracsQueue)) + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.HistogramInterval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + } + 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.Retention != nil { + l = (*durationpb1.Duration)(m.Retention).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.WithDocs { + n += 2 + } + if m.Size != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + l = len(m.Error) + if l > 0 { + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *IdWithHint) 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.Hint) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *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.Explain { + n += 2 + } + if len(m.IdsWithHints) > 0 { + for _, e := range m.IdsWithHints { + l = e.SizeVT() + 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 *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.OldestTime != nil { + l = (*timestamppb1.Timestamp)(m.OldestTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *OnePhaseSearchRequest) 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.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.Explain { + n += 2 + } + 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)) + } + if m.FieldsFilter != nil { + l = m.FieldsFilter.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *OnePhaseSearchResponse) 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 *OnePhaseSearchResponse_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 *OnePhaseSearchResponse_Batch) 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)) + } else { + n += 3 + } + return n +} +func (m *Header) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(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 *Metadata) 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.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } + if len(m.Errors) > 0 { + for _, s := range m.Errors { + l = len(s) + 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 *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 *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 *BulkRequest) 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: BulkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BulkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", 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.Docs = append(m.Docs[:0], dAtA[iNdEx:postIndex]...) + if m.Docs == nil { + m.Docs = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metas", 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.Metas = append(m.Metas[:0], dAtA[iNdEx:postIndex]...) + if m.Metas == nil { + m.Metas = []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 *BinaryData) 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: BinaryData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryData: 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 = 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 *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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= 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 *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 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", 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.Aggregation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + 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 10: + 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 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", 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.AggregationFilter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + 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 13: + 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 14: + 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_Id) 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_Id: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + } + m.Mid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + } + m.Rid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rid |= uint64(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 *SearchResponse_IdWithHint) 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_IdWithHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_IdWithHint: 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 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.Id == nil { + m.Id = &SearchResponse_Id{} + } + if err := m.Id.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hint", 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.Hint = 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_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: SearchResponse_Histogram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Histogram: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Min = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Max = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Sum = float64(math.Float64frombits(v)) + case 4: + 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 5: + 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 6: + 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.Samples = append(m.Samples, 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.Samples) == 0 { + m.Samples = 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.Samples = append(m.Samples, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + } + case 7: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } 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 + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + 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_Bin) 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_Bin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Bin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", 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.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 + 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 = &SearchResponse_Histogram{} + } + if err := m.Hist.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 *SearchResponse_Agg) 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_Agg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Agg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Agg", 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.Agg == nil { + m.Agg = make(map[string]uint64) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Agg[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", 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.AggHistogram == nil { + m.AggHistogram = make(map[string]*SearchResponse_Histogram) + } + var mapkey string + var mapvalue *SearchResponse_Histogram + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protohelpers.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &SearchResponse_Histogram{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.AggHistogram[mapkey] = mapvalue + iNdEx = postIndex + case 3: + 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 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", 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.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) + if err := m.Timeseries[len(m.Timeseries)-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 ValuesPool", 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.ValuesPool = append(m.ValuesPool, 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 } - n += len(m.unknownFields) - return n + return nil } - -func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { +func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6450,17 +9840,17 @@ func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BulkRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BulkRequest: 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - m.Count = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6470,16 +9860,31 @@ func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= int64(b&0x7F) << shift + 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 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6489,31 +9894,31 @@ func (m *BulkRequest) 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.Docs = append(m.Docs[:0], dAtA[iNdEx:postIndex]...) - if m.Docs == nil { - m.Docs = []byte{} + m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) + if err := m.IdSources[len(m.IdSources)-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 Metas", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6523,82 +9928,200 @@ func (m *BulkRequest) 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.Metas = append(m.Metas[:0], dAtA[iNdEx:postIndex]...) - if m.Metas == nil { - m.Metas = []byte{} + if m.Histogram == nil { + m.Histogram = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Histogram[mapkey] = mapvalue iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", 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 *BinaryData) 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.Aggs = append(m.Aggs, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - if iNdEx >= l { + iNdEx = postIndex + case 5: + 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 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", 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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + 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 |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BinaryData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BinaryData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6608,24 +10131,26 @@ func (m *BinaryData) 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.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -6650,7 +10175,7 @@ func (m *BinaryData) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVT(dAtA []byte) error { +func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6673,15 +10198,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: ExplainEntry: 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: 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 Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6709,13 +10234,13 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Field = string(dAtA[iNdEx:postIndex]) + m.Message = string(dAtA[iNdEx:postIndex]) 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 Duration", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6725,29 +10250,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.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).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) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } - m.Func = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6757,84 +10286,26 @@ 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 } } - 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 msglen < 0 { + return protohelpers.ErrInvalidLength } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + 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:]) @@ -6857,7 +10328,7 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6880,15 +10351,15 @@ 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: StartAsyncSearchRequest: 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: 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 Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6916,13 +10387,13 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = 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 From", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - m.From = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6932,16 +10403,33 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= 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.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.To = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6951,16 +10439,29 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= 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 + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.Size = 0 + m.From = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6970,16 +10471,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + m.From |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - m.Offset = 0 + m.To = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6989,16 +10490,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + m.To |= int64(b&0x7F) << shift if b < 0x80 { break } } case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - m.Interval = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7008,16 +10509,31 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= 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.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var stringLen uint64 + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7027,27 +10543,14 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.HistogramInterval |= 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 - } - m.Aggregation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -7064,12 +10567,12 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { break } } - m.Explain = bool(v != 0) - case 10: + m.WithDocs = bool(v != 0) + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var v int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7079,15 +10582,116 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 11: + 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 *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 { + 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 *FetchAsyncSearchResultRequest) 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: FetchAsyncSearchResultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 AggregationFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7115,13 +10719,13 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AggregationFilter = string(dAtA[iNdEx:postIndex]) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", 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 @@ -7131,31 +10735,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= 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.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.Order = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7165,16 +10754,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + 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 @@ -7184,24 +10773,11 @@ func (m *SearchRequest) 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.OffsetId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7224,7 +10800,7 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7247,17 +10823,72 @@ func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Id: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Id: 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 Mid", wireType) + 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 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 = &SearchResponse{} + } + if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - m.Mid = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7267,16 +10898,33 @@ func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Mid |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Rid = 0 + 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 4: + 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 @@ -7286,65 +10934,31 @@ func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Rid |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - 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 *SearchResponse_IdWithHint) 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 + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7371,18 +10985,18 @@ func (m *SearchResponse_IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Id == nil { - m.Id = &SearchResponse_Id{} + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - if err := m.Id.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) } - var stringLen uint64 + m.FracsDone = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7392,113 +11006,88 @@ func (m *SearchResponse_IdWithHint) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.FracsDone |= 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.Hint = 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 + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + m.FracsQueue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsQueue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchResponse_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 + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + 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 + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Histogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Histogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", 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 + } } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - var v uint64 - if (iNdEx + 8) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > 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 } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 4: + iNdEx = postIndex + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - m.Total = 0 + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7508,16 +11097,16 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + m.HistogramInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.NotExists = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7527,140 +11116,170 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + 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 12: + 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 } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Samples = append(m.Samples, 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 13: + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Samples) == 0 { - m.Samples = 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.Samples = append(m.Samples, v2) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) } - case 7: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(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 14: + 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 } - m.Values = append(m.Values, v) - } 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + 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 15: + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]uint32, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) + } + m.WithDocs = bool(v != 0) + case 16: + 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 } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } default: iNdEx = preIndex @@ -7684,7 +11303,7 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { +func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7707,15 +11326,15 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Bin: 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 Label", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7743,80 +11362,59 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Label = string(dAtA[iNdEx:postIndex]) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - 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 + 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.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).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 + 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 postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} - } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - 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:]) @@ -7839,7 +11437,7 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7862,17 +11460,17 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Agg: 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_Agg: 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Agg", 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 @@ -7882,239 +11480,131 @@ func (m *SearchResponse_Agg) 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.Agg == nil { - m.Agg = make(map[string]uint64) + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - var mapkey string - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + 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 } - m.Agg[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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 - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - if msglen < 0 { - return protohelpers.ErrInvalidLength + } + 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:]) + 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.AggHistogram == nil { - m.AggHistogram = make(map[string]*SearchResponse_Histogram) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListRequest) 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 } - var mapkey string - var mapvalue *SearchResponse_Histogram - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &SearchResponse_Histogram{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.AggHistogram[mapkey] = mapvalue - iNdEx = postIndex - case 3: + 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 NotExists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.NotExists = 0 + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8124,16 +11614,17 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + v |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - case 4: + m.Status = &v + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", 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 @@ -8143,31 +11634,80 @@ func (m *SearchResponse_Agg) 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.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) - if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + 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) 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: 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 ValuesPool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8177,23 +11717,25 @@ func (m *SearchResponse_Agg) 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.ValuesPool = append(m.ValuesPool, string(dAtA[iNdEx:postIndex])) + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8217,7 +11759,7 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8240,17 +11782,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: AsyncSearchesListItem: 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: 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 Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8260,31 +11802,29 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen 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{} - } + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8294,29 +11834,14 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(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.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) - if err := m.IdSources[len(m.IdSources)-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 Histogram", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8343,79 +11868,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Histogram == nil { - m.Histogram = make(map[uint64]uint64) + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Histogram[mapkey] = mapvalue 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 ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8442,35 +11904,18 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 5: - 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 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", 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 @@ -8480,29 +11925,33 @@ func (m *SearchResponse) 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.Errors = append(m.Errors, 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 7: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) } - m.Code = 0 + m.FracsDone = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8512,16 +11961,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + m.FracsDone |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) } - var msglen int + m.FracsQueue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8531,84 +11980,35 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.FracsQueue |= uint64(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 *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 + 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: 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: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", 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 @@ -8618,29 +12018,50 @@ func (m *ExplainEntry) 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.Message = string(dAtA[iNdEx:postIndex]) + 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 2: + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + } + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: 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 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8650,31 +12071,27 @@ func (m *ExplainEntry) 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.Duration == nil { - m.Duration = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8701,67 +12118,18 @@ 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 { - return err + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); 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: + iNdEx = postIndex + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8771,25 +12139,29 @@ func (m *StartAsyncSearchRequest) 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.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } @@ -8825,11 +12197,11 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8839,29 +12211,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(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 - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + m.WithDocs = bool(v != 0) + case 16: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.From = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8871,16 +12231,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - m.To = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8890,16 +12250,80 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: + 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.Error = 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 *IdWithHint) 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: IdWithHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", 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 @@ -8909,31 +12333,29 @@ 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 } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } - m.HistogramInterval = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8943,50 +12365,24 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: - 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 - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.WithDocs = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 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 postIndex > l { + return io.ErrUnexpectedEOF } + m.Hint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9009,7 +12405,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *FieldsFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9032,12 +12428,64 @@ 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: FieldsFilter: 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: 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 Fields", 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.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:]) @@ -9060,7 +12508,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9083,15 +12531,15 @@ 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: FetchRequest: 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: 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 SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9119,13 +12567,13 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.Size = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9135,16 +12583,17 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + m.Explain = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } - m.Offset = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9154,16 +12603,31 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - 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 + } + m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) + if err := m.IdsWithHints[len(m.IdsWithHints)-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 FieldsFilter", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9173,11 +12637,79 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(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.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} + } + if err := m.FieldsFilter.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 *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:]) @@ -9200,7 +12732,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9223,34 +12755,15 @@ 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") + return fmt.Errorf("proto: StatusResponse: 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: 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 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 Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9277,18 +12790,69 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &SearchResponse{} + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} } - if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + 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 *OnePhaseSearchRequest) 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: OnePhaseSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OnePhaseSearchRequest: 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 Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9298,31 +12862,27 @@ 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.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + 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 From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9349,16 +12909,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + 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 To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9385,18 +12945,18 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.FracsDone = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9406,16 +12966,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.FracsQueue = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9425,16 +12985,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.DiskUsage = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9444,16 +13004,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + m.Explain = bool(v != 0) + case 7: + 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 @@ -9463,31 +13024,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(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.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: + m.WithTotal = bool(v != 0) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - m.HistogramInterval = 0 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9497,14 +13044,14 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - case 11: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9532,11 +13079,11 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.OffsetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9563,16 +13110,67 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: + 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 *OnePhaseSearchResponse) 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: OnePhaseSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OnePhaseSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9599,16 +13197,21 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { 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 + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Header{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} } iNdEx = postIndex - case 14: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9635,52 +13238,18 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { 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 15: - 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 16: - 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 + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + if err := oneof.Batch.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &RecordsBatch{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.ResponseType = &OnePhaseSearchResponse_Batch{Batch: v} } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9703,7 +13272,7 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *Header) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9726,17 +13295,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: Header: 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: Header: 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 Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9746,75 +13315,62 @@ 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]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + 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 + } } - 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 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.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - 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 { + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9837,7 +13393,7 @@ func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *Metadata) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9860,15 +13416,53 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(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: Metadata: 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: Metadata: 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 != 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 |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9896,59 +13490,44 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", 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 *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 + 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.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - 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 { + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9971,7 +13550,7 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { +func (m *Typing) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9994,35 +13573,15 @@ 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: Typing: 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: Typing: 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10050,8 +13609,27 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, 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 Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= DataType(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10074,7 +13652,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { +func (m *RecordsBatch) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10097,15 +13675,15 @@ 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") + return fmt.Errorf("proto: RecordsBatch: 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: 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 Searches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10132,8 +13710,8 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { 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 { + m.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10159,7 +13737,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { +func (m *Record) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10182,17 +13760,17 @@ 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: Record: 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: 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 @@ -10202,194 +13780,80 @@ 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 } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.RawData = append(m.RawData, make([]byte, postIndex-iNdEx)) + copy(m.RawData[len(m.RawData)-1], 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 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 { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 4: - 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 - } - 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{} - } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - 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 - } - 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 + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BulkRequest) 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 postIndex > l { + if iNdEx >= 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 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) - } - m.FracsDone = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) - } - m.FracsQueue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 8: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BulkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BulkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - m.DiskUsage = 0 + m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10399,16 +13863,16 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 9: + 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 Docs", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10418,50 +13882,28 @@ func (m *AsyncSearchesListItem) 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 } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Docs = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) - } - m.HistogramInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metas", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10471,29 +13913,79 @@ 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 } - m.Query = string(dAtA[iNdEx:postIndex]) + m.Metas = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 12: + 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 *BinaryData) 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: BinaryData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", 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 @@ -10503,33 +13995,79 @@ func (m *AsyncSearchesListItem) 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.From == nil { - m.From = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Data = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 13: + 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) 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: 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 To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10539,33 +14077,33 @@ func (m *AsyncSearchesListItem) 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.To == nil { - m.To = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Field = stringValue iNdEx = postIndex - case 14: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", 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 @@ -10575,53 +14113,33 @@ func (m *AsyncSearchesListItem) 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 - } - iNdEx = postIndex - case 15: - 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 16: + 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 Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) } - m.Size = 0 + m.Func = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10631,16 +14149,70 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + m.Func |= AggFunc(b&0x7F) << shift if b < 0x80 { break } } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + 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) } - var stringLen uint64 + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10650,24 +14222,11 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Interval |= 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 - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10690,7 +14249,7 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { +func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10713,15 +14272,15 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IdWithHint: 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 Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10749,11 +14308,110 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10781,64 +14439,17 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hint = 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 *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 + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - } - 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 Fields", wireType) + m.Aggregation = stringValue + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10848,27 +14459,15 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(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 - } - m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: + m.Explain = bool(v != 0) + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -10885,61 +14484,10 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { break } } - m.AllowList = bool(v != 0) - 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) 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: 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.WithTotal = bool(v != 0) + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10967,31 +14515,15 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - 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 - } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Explain = bool(v != 0) - case 4: + m.AggregationFilter = stringValue + iNdEx = postIndex + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11018,16 +14550,35 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 5: + case 13: + 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 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", 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 @@ -11037,27 +14588,27 @@ func (m *FetchRequest) 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.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} - } - if err := m.FieldsFilter.UnmarshalVT(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 @@ -11081,58 +14632,7 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } 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:]) - 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 *StatusResponse) UnmarshalVT(dAtA []byte) error { +func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11155,17 +14655,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: SearchResponse_Id: 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: SearchResponse_Id: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) } - var msglen int + m.Mid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11175,28 +14675,30 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Mid |= uint64(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.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Rid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11219,7 +14721,7 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11242,36 +14744,17 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BulkRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BulkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 Id", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11281,28 +14764,33 @@ func (m *BulkRequest) 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.Docs = dAtA[iNdEx:postIndex] + if m.Id == nil { + m.Id = &SearchResponse_Id{} + } + if err := m.Id.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metas", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11312,22 +14800,27 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Metas = dAtA[iNdEx:postIndex] + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -11351,7 +14844,7 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11374,17 +14867,50 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BinaryData: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse_Histogram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BinaryData: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse_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) + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) } - var byteLen int + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Min = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Max = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Sum = float64(math.Float64frombits(v)) + case 4: + 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 @@ -11394,23 +14920,160 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protohelpers.ErrInvalidLength + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - postIndex := iNdEx + byteLen - if postIndex < 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 postIndex > l { - return io.ErrUnexpectedEOF + case 6: + 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.Samples = append(m.Samples, 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.Samples) == 0 { + m.Samples = 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.Samples = append(m.Samples, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + } + case 7: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } 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 + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - m.Data = dAtA[iNdEx:postIndex] - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11433,7 +15096,7 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11456,15 +15119,15 @@ 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: SearchResponse_Bin: 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: SearchResponse_Bin: 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 Label", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11496,13 +15159,13 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Field = stringValue + m.Label = 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 Ts", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11512,33 +15175,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.Ts == nil { + m.Ts = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.GroupBy = stringValue iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } - m.Func = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11548,84 +15211,28 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift + msglen |= int(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 msglen < 0 { + return protohelpers.ErrInvalidLength } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } + if m.Hist == nil { + m.Hist = &SearchResponse_Histogram{} + } + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11648,7 +15255,7 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11671,17 +15278,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: SearchResponse_Agg: 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: SearchResponse_Agg: 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 Agg", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11691,52 +15298,114 @@ func (m *SearchRequest) 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.Query = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + if m.Agg == nil { + m.Agg = make(map[string]uint64) } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := 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 + } } - b := dAtA[iNdEx] - iNdEx++ - m.From |= int64(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + if intStringLenmapkey == 0 { + mapkey = "" + } else { + mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + } + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + m.Agg[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) } - m.To = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11746,35 +15415,130 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if msglen < 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AggHistogram == nil { + m.AggHistogram = make(map[string]*SearchResponse_Histogram) + } + var mapkey string + var mapvalue *SearchResponse_Histogram + for iNdEx < postIndex { + entryPreIndex := 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 + } } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + if intStringLenmapkey == 0 { + mapkey = "" + } else { + mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + } + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protohelpers.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &SearchResponse_Histogram{} + if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - case 5: + m.AggHistogram[mapkey] = mapvalue + iNdEx = postIndex + 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 NotExists", wireType) } - m.Offset = 0 + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11784,16 +15548,16 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) } - m.Interval = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11803,14 +15567,29 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 7: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) + if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11842,53 +15621,64 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Aggregation = stringValue + m.ValuesPool = append(m.ValuesPool, stringValue) iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - 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 - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.Explain = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - 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.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse) 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.WithTotal = bool(v != 0) - case 11: + 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11898,31 +15688,26 @@ func (m *SearchRequest) 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.AggregationFilter = stringValue + m.Data = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 12: + 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 IdSources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11949,16 +15734,16 @@ func (m *SearchRequest) 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 { + m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) + if err := m.IdSources[len(m.IdSources)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: - 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 Histogram", wireType) } - m.Order = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11968,16 +15753,96 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 14: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Histogram == nil { + m.Histogram = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Histogram[mapkey] = mapvalue + 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 Aggs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11987,84 +15852,31 @@ func (m *SearchRequest) 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.OffsetId = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); 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_Id) 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: SearchResponse_Id: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Mid = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12074,16 +15886,16 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Mid |= uint64(b&0x7F) << shift + m.Total |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - m.Rid = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12093,67 +15905,33 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Rid |= uint64(b&0x7F) << shift + stringLen |= uint64(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 { + intStringLen := int(stringLen) + if intStringLen < 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_IdWithHint) 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 + postIndex := iNdEx + intStringLen + 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 - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: 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 stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - var msglen int + m.Errors = append(m.Errors, stringValue) + iNdEx = postIndex + case 7: + 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 @@ -12163,33 +15941,16 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Code |= SearchErrorCode(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.Id == nil { - m.Id = &SearchResponse_Id{} - } - if err := m.Id.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12199,27 +15960,27 @@ func (m *SearchResponse_IdWithHint) 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.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -12243,7 +16004,7 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12266,50 +16027,17 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Histogram: wiretype end group for non-group") + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Histogram: 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 != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - m.Total = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12319,16 +16047,33 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.NotExists = 0 + 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.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 @@ -12338,141 +16083,62 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: - 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.Samples = append(m.Samples, 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.Samples) == 0 { - m.Samples = 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.Samples = append(m.Samples, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - case 7: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) - } 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 - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } + 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 } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]uint32, 0, elementCount) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } + 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:]) @@ -12495,7 +16161,7 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12518,15 +16184,15 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Bin: 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 Label", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12558,11 +16224,11 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Label = stringValue + m.SearchId = stringValue iNdEx = postIndex 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 Retention", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12589,16 +16255,90 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} + if m.Retention == nil { + m.Retention = &durationpb.Duration{} } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(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) + 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 + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12625,13 +16365,69 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} - } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + 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 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + } + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + 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 9: + 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:]) @@ -12654,7 +16450,7 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12677,134 +16473,68 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Agg: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Agg: 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 Agg", 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 - } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchAsyncSearchResultRequest) 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 } - if m.Agg == nil { - m.Agg = make(map[string]uint64) - } - var mapkey string - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) - } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - m.Agg[mapkey] = mapvalue - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 AggHistogram", 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 @@ -12814,130 +16544,33 @@ func (m *SearchResponse_Agg) 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.AggHistogram == nil { - m.AggHistogram = make(map[string]*SearchResponse_Histogram) - } - var mapkey string - var mapvalue *SearchResponse_Histogram - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) - } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &SearchResponse_Histogram{} - if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.AggHistogram[mapkey] = mapvalue + m.SearchId = stringValue iNdEx = postIndex - case 3: + 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 Size", wireType) } - m.NotExists = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12947,16 +16580,16 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + m.Size |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) + case 3: + 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 @@ -12965,32 +16598,17 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { 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.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) - if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + iNdEx++ + m.Offset |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) + 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 @@ -13000,28 +16618,11 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(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 - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.ValuesPool = append(m.ValuesPool, stringValue) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13044,7 +16645,7 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13067,17 +16668,36 @@ 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: FetchAsyncSearchResultResponse: 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: 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 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 @@ -13087,26 +16707,31 @@ func (m *SearchResponse) 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 m.Response == nil { + m.Response = &SearchResponse{} + } + if err := m.Response.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 IdSources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13133,14 +16758,16 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) - if err := m.IdSources[len(m.IdSources)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + 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 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13167,77 +16794,107 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Histogram == nil { - m.Histogram = make(map[uint64]uint64) + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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 - } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + 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 } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.Histogram[mapkey] = mapvalue + 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 4: + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + } + m.FracsDone = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsDone |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + } + m.FracsQueue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsQueue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } @@ -13266,16 +16923,16 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) + 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 5: + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - m.Total = 0 + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13285,14 +16942,14 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= uint64(b&0x7F) << shift + m.HistogramInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 6: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13324,30 +16981,11 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Errors = append(m.Errors, stringValue) + m.Query = stringValue iNdEx = postIndex - case 7: - 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 |= SearchErrorCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13374,69 +17012,18 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &ExplainEntry{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).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 *ExplainEntry) 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: 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: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13446,31 +17033,31 @@ func (m *ExplainEntry) 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.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Message = stringValue iNdEx = postIndex - case 2: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13497,18 +17084,18 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} + if m.Retention == nil { + m.Retention = &durationpb.Duration{} } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*durationpb1.Duration)(m.Retention).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) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13518,26 +17105,31 @@ func (m *ExplainEntry) 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.WithDocs = bool(v != 0) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13560,7 +17152,7 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13583,10 +17175,10 @@ 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: CancelAsyncSearchRequest: 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: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -13625,45 +17217,111 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } m.SearchId = stringValue iNdEx = postIndex - case 2: - 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 - } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { + 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 + } + 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:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + 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 *DeleteAsyncSearchRequest) 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 } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 3: + } + 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: 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 stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13695,138 +17353,8 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Query = stringValue - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.From |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - m.To = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.To |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - 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].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SearchId = stringValue iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) - } - m.HistogramInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - 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 9: - 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:]) @@ -13849,7 +17377,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13872,10 +17400,10 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(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: DeleteAsyncSearchResponse: 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: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -13900,7 +17428,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13923,15 +17451,35 @@ 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: GetAsyncSearchesListRequest: 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: 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 != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13963,13 +17511,64 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + 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 *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 Searches", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13979,49 +17578,26 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(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 - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - 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 - } + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14044,7 +17620,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14067,17 +17643,17 @@ 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: AsyncSearchesListItem: 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: AsyncSearchesListItem: 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 SearchId", wireType) } - m.Status = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14087,16 +17663,33 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= AsyncSearchStatus(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.SearchId = stringValue + iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14106,28 +17699,11 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(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 = &SearchResponse{} - } - if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) @@ -14529,6 +18105,42 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { break } } + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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.Error = stringValue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14551,7 +18163,7 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14574,15 +18186,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: IdWithHint: 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: IdWithHint: 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 Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14614,59 +18226,44 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue + m.Id = stringValue 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 Hint", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 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 *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 + postIndex := iNdEx + intStringLen + 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 + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - } - 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 { + m.Hint = stringValue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14689,7 +18286,7 @@ func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14712,15 +18309,15 @@ 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: FieldsFilter: 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: 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 { @@ -14752,8 +18349,28 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue - iNdEx = postIndex + 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:]) @@ -14776,7 +18393,7 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14799,68 +18416,53 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(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: FetchRequest: 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: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + 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 + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 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 *GetAsyncSearchesListRequest) 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 + postIndex := iNdEx + intStringLen + 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 + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - } - 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: + m.Ids = append(m.Ids, stringValue) + iNdEx = postIndex + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - var v AsyncSearchStatus + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14870,17 +18472,17 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Status = &v - case 2: + m.Explain = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14890,27 +18492,61 @@ func (m *GetAsyncSearchesListRequest) 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.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) + if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + 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 = &FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Ids = append(m.Ids, stringValue) iNdEx = postIndex default: iNdEx = preIndex @@ -14934,7 +18570,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14957,46 +18593,12 @@ 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: StatusRequest: 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: StatusRequest: 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].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15019,7 +18621,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15042,17 +18644,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: StatusResponse: 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: StatusResponse: 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 @@ -15062,52 +18664,84 @@ 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 } - m.SearchId = stringValue iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - 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 - } + 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 *OnePhaseSearchRequest) 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 } - case 3: + 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: OnePhaseSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OnePhaseSearchRequest: 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 Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15117,31 +18751,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.Query = stringValue iNdEx = postIndex - case 4: + 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 From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15168,16 +18802,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + 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 To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15204,18 +18838,18 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.FracsDone = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15225,16 +18859,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.FracsQueue = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15244,16 +18878,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.DiskUsage = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15263,16 +18897,17 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + m.Explain = bool(v != 0) + case 7: + 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 @@ -15282,31 +18917,17 @@ func (m *AsyncSearchesListItem) 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.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: + m.WithTotal = bool(v != 0) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - m.HistogramInterval = 0 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15316,14 +18937,14 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - case 11: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15355,11 +18976,11 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Query = stringValue + m.OffsetId = stringValue iNdEx = postIndex - case 12: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15386,52 +19007,67 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: - 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 + 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.To == nil { - m.To = ×tamppb.Timestamp{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OnePhaseSearchResponse) 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 := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 14: + 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: OnePhaseSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OnePhaseSearchResponse: 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 Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15458,57 +19094,23 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - 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 16: - 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 + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break + } else { + v := &Header{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } + m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} } - case 17: + iNdEx = postIndex + 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 Batch", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15518,27 +19120,32 @@ 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 oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + if err := oneof.Batch.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &RecordsBatch{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Batch{Batch: v} } - m.Error = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -15562,7 +19169,7 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15585,17 +19192,17 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: 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 Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15605,33 +19212,33 @@ func (m *IdWithHint) 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.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.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 Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15641,27 +19248,25 @@ func (m *IdWithHint) 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.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -15685,7 +19290,7 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Metadata) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15708,15 +19313,53 @@ 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: Metadata: 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: Metadata: 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 != 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 |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15748,13 +19391,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.Errors = append(m.Errors, stringValue) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + case 4: + 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 @@ -15764,12 +19407,28 @@ 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) + 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:]) @@ -15792,7 +19451,7 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Typing) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15815,15 +19474,15 @@ func (m *FetchRequest) UnmarshalVTUnsafe(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: Typing: 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: 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 Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15855,67 +19514,13 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Ids = append(m.Ids, stringValue) + m.Title = stringValue iNdEx = postIndex - case 3: + case 2: 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 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", 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.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", 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 @@ -15925,28 +19530,11 @@ func (m *FetchRequest) UnmarshalVTUnsafe(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 - } - 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:]) @@ -15969,7 +19557,7 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *RecordsBatch) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15992,12 +19580,46 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RecordsBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: 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 Records", 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.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16020,7 +19642,7 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Record) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16043,17 +19665,17 @@ func (m *StatusResponse) UnmarshalVTUnsafe(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: Record: 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: 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 OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawData", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16063,27 +19685,22 @@ func (m *StatusResponse) UnmarshalVTUnsafe(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.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RawData = append(m.RawData, dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/proxy/search/ingestor.go b/proxy/search/ingestor.go index 8d8c2ce4..02d1a685 100644 --- a/proxy/search/ingestor.go +++ b/proxy/search/ingestor.go @@ -375,7 +375,7 @@ func (si *Ingestor) makeFetchReq(ids []seq.IDSource, explain bool, ff FetchField Ids: idsStr, Explain: explain, IdsWithHints: idsWithHints, - FieldsFilter: &storeapi.FetchRequest_FieldsFilter{ + FieldsFilter: &storeapi.FieldsFilter{ Fields: ff.Fields, AllowList: ff.AllowList, }, diff --git a/proxy/search/mock/store_api_client_mock.go b/proxy/search/mock/store_api_client_mock.go index 3f593d18..069975b2 100644 --- a/proxy/search/mock/store_api_client_mock.go +++ b/proxy/search/mock/store_api_client_mock.go @@ -157,6 +157,26 @@ func (mr *MockStoreApiClientMockRecorder) GetAsyncSearchesList(arg0, arg1 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAsyncSearchesList", reflect.TypeOf((*MockStoreApiClient)(nil).GetAsyncSearchesList), varargs...) } +// OnePhaseSearch mocks base method. +func (m *MockStoreApiClient) OnePhaseSearch(arg0 context.Context, arg1 *storeapi.OnePhaseSearchRequest, arg2 ...grpc.CallOption) (storeapi.StoreApi_OnePhaseSearchClient, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "OnePhaseSearch", varargs...) + ret0, _ := ret[0].(storeapi.StoreApi_OnePhaseSearchClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// OnePhaseSearch indicates an expected call of OnePhaseSearch. +func (mr *MockStoreApiClientMockRecorder) OnePhaseSearch(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnePhaseSearch", reflect.TypeOf((*MockStoreApiClient)(nil).OnePhaseSearch), varargs...) +} + // Search mocks base method. func (m *MockStoreApiClient) Search(arg0 context.Context, arg1 *storeapi.SearchRequest, arg2 ...grpc.CallOption) (*storeapi.SearchResponse, error) { m.ctrl.T.Helper() diff --git a/proxy/search/one_phase_search.go b/proxy/search/one_phase_search.go new file mode 100644 index 00000000..8d319f15 --- /dev/null +++ b/proxy/search/one_phase_search.go @@ -0,0 +1,180 @@ +package search + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "io" + "math" + + "github.com/alecthomas/units" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ozontech/seq-db/pkg/storeapi" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" +) + +func (si *Ingestor) OnePhaseSearch( + ctx context.Context, + sr *SearchRequest, + tr *querytracer.Tracer, +) (*seq.QPR, DocsIterator, AggsIterator, error) { + searchStores := si.config.HotStores + if si.config.HotReadStores != nil && len(si.config.HotReadStores.Shards) > 0 { + searchStores = si.config.HotReadStores + } + + host := searchStores.Shards[0][0] // TODO: handle multiple stores and shards + + client, has := si.clients[host] + if !has { + return nil, nil, nil, fmt.Errorf("can't fetch: no client for host %s", host) + } + + fieldsFilter := tryParseFieldsFilter(string(sr.Q)) + req := &storeapi.OnePhaseSearchRequest{ + Query: string(sr.Q), + From: timestamppb.New(sr.From.Time()), + To: timestamppb.New(sr.To.Time()), + Size: int64(sr.Size), + Offset: int64(sr.Offset), + Explain: sr.Explain, + WithTotal: sr.WithTotal, + Order: storeapi.Order(sr.Order), + OffsetId: sr.OffsetId, + FieldsFilter: &storeapi.FieldsFilter{ + Fields: fieldsFilter.Fields, + AllowList: fieldsFilter.AllowList, + }, + } + + stream, err := client.OnePhaseSearch(ctx, req, + grpc.MaxCallRecvMsgSize(256*int(units.MiB)), + grpc.MaxCallSendMsgSize(256*int(units.MiB)), + ) + if err != nil { + return nil, nil, nil, fmt.Errorf("can't fetch docs: %s", err.Error()) + } + + msg, err := stream.Recv() + if err != nil { + return nil, nil, nil, nil + } + + header := msg.GetHeader() + + errs := make([]seq.ErrorSource, 0, len(header.Metadata.Errors)) + for _, err := range header.Metadata.Errors { + errs = append(errs, seq.ErrorSource{ErrStr: err}) + } + + qpr := &seq.QPR{ + Total: header.Metadata.Total, + Errors: errs, + } + + return qpr, &OnePhaseSearchDocsIterator{stream: stream, limit: sr.Size}, &OnePhaseSearchAggsIterator{stream: stream, limit: sr.Size}, nil +} + +type OnePhaseSearchDocsIterator struct { + stream storeapi.StoreApi_OnePhaseSearchClient + + curBatch []*storeapi.Record + + fetched int + limit int +} + +func (it *OnePhaseSearchDocsIterator) Next() (StreamingDoc, error) { + if it.fetched >= it.limit { + return StreamingDoc{}, io.EOF + } + + if len(it.curBatch) == 0 { + data, err := it.stream.Recv() + if errors.Is(err, io.EOF) { + return StreamingDoc{}, io.EOF + } + if err != nil { + return StreamingDoc{}, err + } + it.curBatch = data.GetBatch().Records + } + + // TODO: get fields values from columns info + + record := it.curBatch[0] + it.curBatch = it.curBatch[1:] + + it.fetched++ + + return StreamingDoc{ + ID: seq.ID{ + MID: seq.MID(binary.LittleEndian.Uint64(record.RawData[0])), + RID: seq.RID(binary.LittleEndian.Uint64(record.RawData[1])), + }, + Data: record.RawData[2], + }, nil +} + +type StreamingAgg struct { + Label string + Min float64 + Max float64 + Sum float64 + Total uint64 + NotExists uint64 +} + +type AggsIterator interface { + Next() (StreamingAgg, error) +} + +type OnePhaseSearchAggsIterator struct { + stream storeapi.StoreApi_OnePhaseSearchClient + + curBatch []*storeapi.Record + + fetched int + limit int +} + +func (it *OnePhaseSearchAggsIterator) Next() (StreamingAgg, error) { + if it.fetched >= it.limit { + return StreamingAgg{}, io.EOF + } + + if len(it.curBatch) == 0 { + data, err := it.stream.Recv() + if errors.Is(err, io.EOF) { + return StreamingAgg{}, io.EOF + } + if err != nil { + return StreamingAgg{}, err + } + it.curBatch = data.GetBatch().Records + } + + // TODO: get fields values from columns info + + record := it.curBatch[0] + it.curBatch = it.curBatch[1:] + + it.fetched++ + + return StreamingAgg{ + Label: string(record.RawData[0]), + Min: Float64FromBytes(record.RawData[1]), + Max: Float64FromBytes(record.RawData[2]), + Sum: Float64FromBytes(record.RawData[3]), + Total: binary.LittleEndian.Uint64(record.RawData[4]), + NotExists: binary.LittleEndian.Uint64(record.RawData[5]), + }, nil +} + +func Float64FromBytes(in []byte) float64 { + return math.Float64frombits(binary.LittleEndian.Uint64(in)) +} diff --git a/proxyapi/grpc_async_search.go b/proxyapi/grpc_async_search.go index cd58d09f..6e32dbc0 100644 --- a/proxyapi/grpc_async_search.go +++ b/proxyapi/grpc_async_search.go @@ -33,9 +33,30 @@ func (g *grpcV1) StartAsyncSearch( return nil, status.Error(codes.InvalidArgument, "can't serve empty request: fill aggs, hist or withDocs") } - aggs, err := convertAggsQuery(r.Aggs) + statsAggs, err := ExtractStatsPipes(r.GetQuery().GetQuery()) if err != nil { - return nil, err + return nil, status.Errorf(codes.InvalidArgument, "failed to parse stats pipe: %v", err) + } + + hasAggsParam := len(r.Aggs) > 0 + hasStatsPipe := len(statsAggs) > 0 + + if hasAggsParam && hasStatsPipe { + return nil, status.Error(codes.InvalidArgument, + "aggregation can be specified either via 'aggs' parameter or 'stats' pipe, not both") + } + + var aggs []search.AggQuery + if hasStatsPipe { + aggs, err = ConvertStatsPipesToAggs(statsAggs) + if err != nil { + return nil, err + } + } else if hasAggsParam { + aggs, err = convertAggsQuery(r.Aggs) + if err != nil { + return nil, err + } } var histInterval time.Duration diff --git a/proxyapi/grpc_one_phase_search.go b/proxyapi/grpc_one_phase_search.go new file mode 100644 index 00000000..05d309ab --- /dev/null +++ b/proxyapi/grpc_one_phase_search.go @@ -0,0 +1,261 @@ +package proxyapi + +import ( + "context" + "errors" + "fmt" + "time" + + "go.opencensus.io/trace" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ozontech/seq-db/consts" + "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" + "github.com/ozontech/seq-db/seq" +) + +func (g *grpcV1) OnePhaseSearch(ctx context.Context, req *seqproxyapi.SearchRequest) (*seqproxyapi.ComplexSearchResponse, error) { + ctx, cancel := context.WithTimeout(ctx, g.config.SearchTimeout) + defer cancel() + + if req.Size <= 0 { + return nil, status.Error(codes.InvalidArgument, `"size" must be greater than 0`) + } + + proxyReq := &seqproxyapi.ComplexSearchRequest{ + Query: req.Query, + Size: req.Size, + Offset: req.Offset, + OffsetId: req.OffsetId, + WithTotal: req.WithTotal, + Order: req.Order, + } + sResp, aggsStream, err := g.doOnePhaseSearch(ctx, proxyReq, true) + if err != nil { + return nil, err + } + + resp := &seqproxyapi.ComplexSearchResponse{ + Total: int64(sResp.qpr.Total), + Error: &seqproxyapi.Error{ + Code: seqproxyapi.ErrorCode_ERROR_CODE_NO, + }, + } + + if sResp.err != nil { + if shouldHaveResponse(sResp.err.Code) { + resp.Error = sResp.err + } else { + return &seqproxyapi.ComplexSearchResponse{Error: sResp.err}, nil + } + } + + statsAggs := extractStatsPipesFromQuery(req.Query.Query) + hasAggs := len(statsAggs) > 0 + + if hasAggs { + sResp.qpr.Aggs = convertAggsStreamToAggregationResults(aggsStream) + kek := aggregationArgsFromStatsAggs(statsAggs) + allAggs := sResp.qpr.Aggregate(kek) + resp.Aggs = makeProtoAggregation(allAggs) + } else { + resp.Docs = makeProtoDocsKek(sResp.docsStream) + } + + return resp, nil +} + +func convertAggsStreamToAggregationResults(aggs search.AggsIterator) []seq.AggregatableSamples { + result := make([]seq.AggregatableSamples, 0) + to := make(map[seq.AggBin]*seq.SamplesContainer) + for agg, err := aggs.Next(); err == nil; agg, err = aggs.Next() { + + tbin := seq.AggBin{ + MID: consts.DummyMID, + Token: agg.Label, + } + + to[tbin] = &seq.SamplesContainer{ + Min: agg.Min, + Max: agg.Max, + Sum: agg.Sum, + Total: int64(agg.Total), + NotExists: int64(agg.NotExists), + } + } + result = append(result, seq.AggregatableSamples{ + SamplesByBin: to, + // NotExists: int64(agg.NotExists), + }) + return result +} + +func makeProtoDocsKek(docs search.DocsIterator) []*seqproxyapi.Document { + // TODO: paginate (???) + respDocs := make([]*seqproxyapi.Document, 0) + for doc, err := docs.Next(); err == nil; doc, err = docs.Next() { + respDocs = append(respDocs, &seqproxyapi.Document{ + Id: doc.ID.String(), + Data: doc.Data, + Time: timestamppb.New(doc.ID.MID.Time()), + }) + } + return respDocs +} + +func (g *grpcV1) doOnePhaseSearch( + ctx context.Context, + req *seqproxyapi.ComplexSearchRequest, + shouldFetch bool, +) (*proxySearchResponse, search.AggsIterator, error) { + metric.SearchOverall.Add(1) + + span := trace.FromContext(ctx) + defer span.End() + + if req.Query == nil { + return nil, nil, status.Error(codes.InvalidArgument, "search query must be provided") + } + if req.Query.From == nil || req.Query.To == nil { + return nil, nil, status.Error(codes.InvalidArgument, `search query "from" and "to" fields must be provided`) + } + if req.Offset != 0 && req.OffsetId != "" { + return nil, nil, status.Error(codes.InvalidArgument, `only one of "offset" and "offset_id" must be provided`) + } + + fromTime := req.Query.From.AsTime() + toTime := req.Query.To.AsTime() + if span.IsRecordingEvents() { + span.AddAttributes( + trace.StringAttribute("query", req.Query.Query), + trace.StringAttribute("from", fromTime.UTC().Format(time.RFC3339Nano)), + trace.StringAttribute("to", toTime.UTC().Format(time.RFC3339Nano)), + trace.BoolAttribute("explain", req.Query.Explain), + trace.Int64Attribute("size", req.Size), + trace.Int64Attribute("offset", req.Offset), + trace.StringAttribute("offset_id", req.OffsetId), + trace.BoolAttribute("with_total", req.WithTotal), + trace.StringAttribute("order", req.Order.String()), + ) + } + + rlQuery := getSearchQueryFromGRPCReqForRateLimiter(req) + if !g.rateLimiter.Account(rlQuery) { + return nil, nil, status.Error(codes.ResourceExhausted, consts.ErrRequestWasRateLimited.Error()) + } + + proxyReq := &search.SearchRequest{ + Q: []byte(req.Query.Query), + From: seq.MID(fromTime.UnixNano()), + To: seq.MID(toTime.UnixNano()), + Explain: req.Query.Explain, + Size: int(req.Size), + Offset: int(req.Offset), + OffsetId: req.OffsetId, + WithTotal: req.WithTotal, + ShouldFetch: shouldFetch, + Order: req.Order.MustDocsOrder(), + } + + tr := querytracer.New(req.Query.Explain, "proxy/OnePhaseSearch") + qpr, docsStream, aggsStream, err := g.searchIngestor.OnePhaseSearch(ctx, proxyReq, tr) + psr := &proxySearchResponse{ + qpr: qpr, + docsStream: docsStream, + } + + if e, ok := parseProxyError(err); ok { + psr.err = e + return psr, nil, nil + } + + if errors.Is(err, consts.ErrInvalidArgument) { + return nil, nil, status.Error(codes.InvalidArgument, err.Error()) + } + + if st, ok := status.FromError(err); ok { + // could not parse a query + if st.Code() == codes.InvalidArgument { + return nil, nil, err + } + } + + if errors.Is(err, consts.ErrPartialResponse) { + metric.SearchPartial.Inc() + psr.err = &seqproxyapi.Error{ + Code: seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE, + Message: err.Error(), + } + return psr, aggsStream, nil + } + if err = processSearchErrors(qpr, err); err != nil { + metric.SearchErrors.Inc() + return nil, nil, err + } + + g.tryMirrorRequest(req) + + return psr, aggsStream, nil +} + +func extractStatsPipesFromQuery(query string) []parser.StatsAgg { + if query == "" { + return nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result +} + +func aggregationArgsFromStatsAggs(aggs []parser.StatsAgg) []seq.AggregateArgs { + args := make([]seq.AggregateArgs, len(aggs)) + for i, agg := range aggs { + args[i] = seq.AggregateArgs{ + Func: mustConvertStringToAggFunc(agg.Func), + Quantiles: agg.Quantiles, + SkipWithoutTimestamp: agg.Interval != "", + } + } + return args +} + +func mustConvertStringToAggFunc(funcName string) seq.AggFunc { + switch funcName { + case "count": + return seq.AggFuncCount + case "sum": + return seq.AggFuncSum + case "min": + return seq.AggFuncMin + case "max": + return seq.AggFuncMax + case "avg": + return seq.AggFuncAvg + case "quantile": + return seq.AggFuncQuantile + case "unique": + return seq.AggFuncUnique + case "unique_count": + return seq.AggFuncUniqueCount + default: + panic(fmt.Errorf("unknown aggregation function: %s", funcName)) + } +} diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 90611a29..2299ba06 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -21,6 +21,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" @@ -37,6 +38,7 @@ type SearchIngestor interface { CancelAsyncSearch(ctx context.Context, id string) error DeleteAsyncSearch(ctx context.Context, id string) error GetAsyncSearchesList(context.Context, search.GetAsyncSearchesListRequest) ([]*search.AsyncSearchesListItem, error) + OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, search.AggsIterator, error) } type MappingProvider interface { @@ -244,7 +246,26 @@ func (g *grpcV1) doSearch( Order: req.Order.MustDocsOrder(), } - if len(req.Aggs) > 0 { + statsAggs, err := ExtractStatsPipes(req.Query.Query) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to parse stats pipe: %v", err) + } + + hasAggsParam := len(req.Aggs) > 0 + hasStatsPipe := len(statsAggs) > 0 + + if hasAggsParam && hasStatsPipe { + return nil, status.Error(codes.InvalidArgument, + "aggregation can be specified either via 'aggs' parameter or 'stats' pipe, not both") + } + + if hasStatsPipe { + aggs, err := ConvertStatsPipesToAggs(statsAggs) + if err != nil { + return nil, err + } + proxyReq.AggQ = aggs + } else if hasAggsParam { aggs, err := convertAggsQuery(req.Aggs) if err != nil { return nil, err @@ -452,3 +473,119 @@ func shouldFailPartialResponse(ctx context.Context) bool { func shouldHaveResponse(code seqproxyapi.ErrorCode) bool { return code == seqproxyapi.ErrorCode_ERROR_CODE_NO || code == seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE } + +func ExtractStatsPipes(query string) ([]parser.StatsAgg, error) { + if query == "" { + return nil, nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil, err + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result, nil +} + +func ConvertStatsPipesToAggs(statsAggs []parser.StatsAgg) ([]search.AggQuery, error) { + var result []search.AggQuery + for _, agg := range statsAggs { + aggFunc, err := convertFuncToSeqAggFunc(agg.Func) + if err != nil { + return nil, err + } + + searchAgg := search.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: aggFunc, + Quantiles: agg.Quantiles, + } + + if agg.Interval != "" { + interval, err := util.ParseDuration(agg.Interval) + if err != nil { + return nil, status.Errorf( + codes.InvalidArgument, + "failed to parse 'interval': %v", + err, + ) + } + searchAgg.Interval = seq.MID(interval.Nanoseconds()) + } + + if err := validateSearchAgg(&searchAgg); err != nil { + return nil, err + } + + result = append(result, searchAgg) + } + return result, nil +} + +func convertFuncToSeqAggFunc(funcName string) (seq.AggFunc, error) { + switch funcName { + case "count": + return seq.AggFuncCount, nil + case "sum": + return seq.AggFuncSum, nil + case "min": + return seq.AggFuncMin, nil + case "max": + return seq.AggFuncMax, nil + case "avg": + return seq.AggFuncAvg, nil + case "quantile": + return seq.AggFuncQuantile, nil + case "unique": + return seq.AggFuncUnique, nil + case "unique_count": + return seq.AggFuncUniqueCount, nil + default: + return 0, status.Errorf(codes.InvalidArgument, "unknown aggregation function: %s", funcName) + } +} + +func validateSearchAgg(agg *search.AggQuery) error { + switch agg.Func { + case seq.AggFuncUnique, seq.AggFuncUniqueCount: + if agg.GroupBy == "" { + return status.Error(codes.InvalidArgument, "'groupBy' must be set for unique/unique_count") + } + if agg.Interval != 0 { + return status.Error( + codes.InvalidArgument, + "'unique' and 'unique_count' aggregations do not support timeseries", + ) + } + case seq.AggFuncQuantile: + if agg.Field == "" { + return status.Error(codes.InvalidArgument, "'field' must be set for quantile") + } + if len(agg.Quantiles) == 0 { + return status.Error(codes.InvalidArgument, "quantile aggregation must contain at least one quantile") + } + for _, q := range agg.Quantiles { + if q < 0 || q > 1 { + return status.Error(codes.InvalidArgument, "quantile must be between 0 and 1") + } + } + case seq.AggFuncCount: + if agg.GroupBy == "" && agg.Field == "" { + return status.Error(codes.InvalidArgument, "'groupBy' or 'field' must be set for count") + } + case seq.AggFuncSum, seq.AggFuncMin, seq.AggFuncMax, seq.AggFuncAvg: + if agg.Field == "" { + return status.Errorf(codes.InvalidArgument, "'field' must be set for %s", agg.Func.String()) + } + } + return nil +} diff --git a/proxyapi/mock/grpc_v1.go b/proxyapi/mock/grpc_v1.go index 40f1e694..30c83fcc 100644 --- a/proxyapi/mock/grpc_v1.go +++ b/proxyapi/mock/grpc_v1.go @@ -115,6 +115,23 @@ func (mr *MockSearchIngestorMockRecorder) GetAsyncSearchesList(arg0, arg1 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAsyncSearchesList", reflect.TypeOf((*MockSearchIngestor)(nil).GetAsyncSearchesList), arg0, arg1) } +// OnePhaseSearch mocks base method. +func (m *MockSearchIngestor) OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, search.AggsIterator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "OnePhaseSearch", ctx, sr, tr) + ret0, _ := ret[0].(*seq.QPR) + ret1, _ := ret[1].(search.DocsIterator) + ret2, _ := ret[2].(search.AggsIterator) + ret3, _ := ret[3].(error) + return ret0, ret1, ret2, ret3 +} + +// OnePhaseSearch indicates an expected call of OnePhaseSearch. +func (mr *MockSearchIngestorMockRecorder) OnePhaseSearch(ctx, sr, tr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnePhaseSearch", reflect.TypeOf((*MockSearchIngestor)(nil).OnePhaseSearch), ctx, sr, tr) +} + // Search mocks base method. func (m *MockSearchIngestor) Search(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, time.Duration, error) { m.ctrl.T.Helper() diff --git a/storeapi/client.go b/storeapi/client.go index 3da87929..665b85bf 100644 --- a/storeapi/client.go +++ b/storeapi/client.go @@ -129,3 +129,58 @@ func (i inMemoryAPIClient) Fetch(ctx context.Context, in *storeapi.FetchRequest, func (i inMemoryAPIClient) Status(ctx context.Context, in *storeapi.StatusRequest, _ ...grpc.CallOption) (*storeapi.StatusResponse, error) { return i.store.GrpcV1().Status(ctx, in) } + +type storeAPIOnePhaseSearchServer struct { + grpc.ServerStream + ctx context.Context + buf []*storeapi.OnePhaseSearchResponse +} + +func newStoreAPIOnePhaseSearchServer(ctx context.Context) *storeAPIOnePhaseSearchServer { + return &storeAPIOnePhaseSearchServer{ctx: ctx} +} + +func (x *storeAPIOnePhaseSearchServer) Send(m *storeapi.OnePhaseSearchResponse) error { + x.buf = append(x.buf, m.CloneVT()) + return nil +} + +func (x *storeAPIOnePhaseSearchServer) Context() context.Context { + return x.ctx +} + +type storeAPIOnePhaseSearchClient struct { + grpc.ClientStream + buf []*storeapi.OnePhaseSearchResponse + readPos int +} + +func newStoreAPIOnePhaseSearchClient(b []*storeapi.OnePhaseSearchResponse) *storeAPIOnePhaseSearchClient { + return &storeAPIOnePhaseSearchClient{buf: b} +} + +func (x *storeAPIOnePhaseSearchClient) Header() (metadata.MD, error) { + md := make(metadata.MD) + md[consts.StoreProtocolVersionHeader] = []string{config.StoreProtocolVersion2.String()} + return md, nil +} + +func (x *storeAPIOnePhaseSearchClient) Recv() (*storeapi.OnePhaseSearchResponse, error) { + if x.readPos >= len(x.buf) { + return nil, io.EOF + } + + res := x.buf[x.readPos] + x.readPos++ + + return res, nil +} + +func (i inMemoryAPIClient) OnePhaseSearch(ctx context.Context, in *storeapi.OnePhaseSearchRequest, opts ...grpc.CallOption) (storeapi.StoreApi_OnePhaseSearchClient, error) { + s := newStoreAPIOnePhaseSearchServer(ctx) + setProtocolVersionHeader(opts...) + if err := i.store.GrpcV1().OnePhaseSearch(in, s); err != nil { + return nil, err + } + return newStoreAPIOnePhaseSearchClient(s.buf), nil +} diff --git a/storeapi/grpc_fetch.go b/storeapi/grpc_fetch.go index d640618c..a1337be4 100644 --- a/storeapi/grpc_fetch.go +++ b/storeapi/grpc_fetch.go @@ -31,7 +31,17 @@ func (g *GrpcV1) Fetch(req *storeapi.FetchRequest, stream storeapi.StoreApi_Fetc span.AddAttributes(trace.BoolAttribute("explain", req.Explain)) } - err := g.doFetch(ctx, req, stream) + ids, err := extractIDs(req) + if err != nil { + span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) + logger.Error("fetch error", zap.Error(err)) + return fmt.Errorf("ids extract errors: %s", err.Error()) + } + + send := func(block []byte) error { + return stream.Send(&storeapi.BinaryData{Data: block}) + } + err = g.doFetch(ctx, ids, req.FieldsFilter, req.Explain, send) if err != nil { span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) logger.Error("fetch error", zap.Error(err)) @@ -39,7 +49,13 @@ func (g *GrpcV1) Fetch(req *storeapi.FetchRequest, stream storeapi.StoreApi_Fetc return err } -func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream storeapi.StoreApi_FetchServer) error { +func (g *GrpcV1) doFetch( + ctx context.Context, + ids seq.IDSources, + fieldsFilter *storeapi.FieldsFilter, + explain bool, + send func(block []byte) error, +) error { metric.FetchInFlightQueriesTotal.Inc() defer metric.FetchInFlightQueriesTotal.Dec() @@ -48,11 +64,6 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream start := time.Now() - ids, err := extractIDs(req) - if err != nil { - return fmt.Errorf("ids extract errors: %s", err.Error()) - } - notFound := 0 docsFetched := 0 bytesFetched := int64(0) @@ -65,7 +76,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream buf []byte ) - dp := acquireDocFieldsFilter(req.FieldsFilter) + dp := acquireDocFieldsFilter(fieldsFilter) defer releaseDocFieldsFilter(dp) docsStream := newDocsStream(ctx, ids, g.fetchData.docFetcher, g.fracManager.Fractions()) @@ -93,7 +104,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream block.SetExt1(uint64(id.ID.MID)) block.SetExt2(uint64(id.ID.RID)) - if err := stream.Send(&storeapi.BinaryData{Data: block}); err != nil { + if err := send(block); err != nil { if util.IsCancelled(ctx) { logger.Info("fetch request is canceled", zap.Int("requested", len(ids)), @@ -124,7 +135,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream ) } - if req.Explain { + if explain { logger.Info("fetch result", zap.Int("requested", len(ids)), zap.Int("fetched", docsFetched), @@ -139,7 +150,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream } type docFieldsFilter struct { - filter *storeapi.FetchRequest_FieldsFilter + filter *storeapi.FieldsFilter decoder *insaneJSON.Root decoderBuf []byte @@ -151,7 +162,7 @@ var docFieldsFilterPool = sync.Pool{ }, } -func acquireDocFieldsFilter(filter *storeapi.FetchRequest_FieldsFilter) *docFieldsFilter { +func acquireDocFieldsFilter(filter *storeapi.FieldsFilter) *docFieldsFilter { dp := docFieldsFilterPool.Get().(*docFieldsFilter) if dp.decoder == nil { dp.decoder = insaneJSON.Spawn() diff --git a/storeapi/grpc_one_phase_search.go b/storeapi/grpc_one_phase_search.go new file mode 100644 index 00000000..ca7d6229 --- /dev/null +++ b/storeapi/grpc_one_phase_search.go @@ -0,0 +1,330 @@ +package storeapi + +import ( + "context" + "encoding/binary" + "fmt" + "math" + "time" + + "go.opencensus.io/trace" + "go.uber.org/zap" + + "github.com/ozontech/seq-db/logger" + "github.com/ozontech/seq-db/parser" + "github.com/ozontech/seq-db/pkg/storeapi" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/storage" + "github.com/ozontech/seq-db/tracing" + "github.com/ozontech/seq-db/util" +) + +func (g *GrpcV1) OnePhaseSearch( + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + ctx, span := tracing.StartSpan(stream.Context(), "store-server/OnePhaseSearch") + defer span.End() + + if span.IsRecordingEvents() { + span.AddAttributes(trace.StringAttribute("request", req.Query)) + span.AddAttributes(trace.StringAttribute("from", req.From.AsTime().Format(time.RFC3339Nano))) + span.AddAttributes(trace.StringAttribute("to", req.To.AsTime().Format(time.RFC3339Nano))) + span.AddAttributes(trace.Int64Attribute("size", req.Size)) + span.AddAttributes(trace.Int64Attribute("offset", req.Offset)) + span.AddAttributes(trace.StringAttribute("offset_id", req.OffsetId)) + span.AddAttributes(trace.BoolAttribute("explain", req.Explain)) + span.AddAttributes(trace.BoolAttribute("with_total", req.WithTotal)) + } + + err := g.doOnePhaseSearch(ctx, req, stream) + if err != nil { + span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) + logger.Error("one phase search error", zap.Error(err)) + } + return err +} + +func (g *GrpcV1) doOnePhaseSearch( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + statsAggs := extractStatsPipesFromQuery(req.Query) + hasAggs := len(statsAggs) > 0 + + if hasAggs { + return g.doOnePhaseSearchWithAggs(ctx, req, stream, statsAggs) + } + + return g.doOnePhaseSearchDocs(ctx, req, stream) +} + +func (g *GrpcV1) doOnePhaseSearchDocs( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + tr := querytracer.New(req.Explain, "store/OnePhaseSearchDocs") + data, err := g.doSearch(ctx, &storeapi.SearchRequest{ + Query: req.Query, + From: int64(seq.TimeToMID(req.From.AsTime())), + To: int64(seq.TimeToMID(req.To.AsTime())), + Size: req.Size, + Offset: req.Offset, + Explain: req.Explain, + WithTotal: req.WithTotal, + Order: req.Order, + OffsetId: req.OffsetId, + }, tr) + if err != nil { + return fmt.Errorf("search error: %w", err) + } + + tr.Done() + if req.Explain && data != nil { + data.Explain = tracerSpanToExplainEntry(tr.ToSpan()) + } + + err = stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Header{ + Header: &storeapi.Header{ + Metadata: &storeapi.Metadata{ + Total: data.Total, + Code: data.Code, + Errors: data.Errors, + Explain: data.Explain, + }, + Typing: []*storeapi.Typing{ + // TODO: conditional typing + {Title: "mid", Type: storeapi.DataType_UINT64}, + {Title: "rid", Type: storeapi.DataType_UINT64}, + {Title: "data", Type: storeapi.DataType_RAW_DOCUMENT}, + }, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending fetched docs: %w", err) + } + + ids := make(seq.IDSources, 0, len(data.IdSources)) + for _, id := range data.IdSources { + ids = append(ids, seq.IDSource{ + ID: seq.ID{MID: seq.MID(id.Id.Mid), RID: seq.RID(id.Id.Rid)}, + Hint: id.Hint, + }) + } + + send := func(block []byte) error { + // TODO: get rid of hardcode + docBlock := storage.DocBlock(block) + return stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Batch{ + Batch: &storeapi.RecordsBatch{ + // TODO: batch + Records: []*storeapi.Record{ + { + RawData: [][]byte{ + Uint64ToBytes(docBlock.GetExt1()), + Uint64ToBytes(docBlock.GetExt2()), + docBlock.Payload(), + }, + }, + }, + }, + }, + }) + } + err = g.doFetch(ctx, ids, req.FieldsFilter, req.Explain, send) + if err != nil { + return fmt.Errorf("fetch error: %w", err) + } + + return nil +} + +// TODO: bytes pool (???), varint (???) +func Uint64ToBytes(val uint64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, val) + return b +} + +func Float64ToBytes(val float64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, math.Float64bits(val)) + return b +} + +func (g *GrpcV1) doOnePhaseSearchWithAggs( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, + statsAggs []parser.StatsAgg, +) error { + tr := querytracer.New(req.Explain, "store/OnePhaseSearchWithAggs") + + aggQ, err := convertStatsAggsToStoreApiAgg(statsAggs) + if err != nil { + return fmt.Errorf("failed to convert stats aggs: %w", err) + } + + data, err := g.doSearch(ctx, &storeapi.SearchRequest{ + Query: req.Query, + From: int64(seq.TimeToMID(req.From.AsTime())), + To: int64(seq.TimeToMID(req.To.AsTime())), + Size: req.Size, + Offset: req.Offset, + Explain: req.Explain, + WithTotal: req.WithTotal, + Order: req.Order, + OffsetId: req.OffsetId, + Aggs: aggQ, + }, tr) + if err != nil { + return fmt.Errorf("search error: %w", err) + } + tr.Done() + + err = stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Header{ + Header: &storeapi.Header{ + Metadata: &storeapi.Metadata{ + Total: data.Total, + Code: data.Code, + Errors: data.Errors, + Explain: data.Explain, + }, + Typing: []*storeapi.Typing{ + // TODO: conditional typing + {Title: "token", Type: storeapi.DataType_STRING}, + {Title: "min", Type: storeapi.DataType_FLOAT64}, + {Title: "max", Type: storeapi.DataType_FLOAT64}, + {Title: "sum", Type: storeapi.DataType_FLOAT64}, + {Title: "total", Type: storeapi.DataType_UINT64}, + {Title: "not_exists", Type: storeapi.DataType_UINT64}, + }, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending aggs: %w", err) + } + + for _, agg := range data.Aggs { + for _, bin := range agg.Timeseries { + err := stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Batch{ + Batch: &storeapi.RecordsBatch{ + // TODO: batch + Records: []*storeapi.Record{ + { + RawData: [][]byte{ + []byte(bin.Label), + Float64ToBytes(bin.Hist.Min), + Float64ToBytes(bin.Hist.Max), + Float64ToBytes(bin.Hist.Sum), + Uint64ToBytes(uint64(bin.Hist.Total)), + Uint64ToBytes(uint64(bin.Hist.NotExists)), + }, + }, + }, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending aggs: %w", err) + } + } + } + + return nil +} + +func extractStatsPipesFromQuery(query string) []parser.StatsAgg { + if query == "" { + return nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result +} + +func convertStatsAggsToStoreApiAgg(statsAggs []parser.StatsAgg) ([]*storeapi.AggQuery, error) { + result := make([]*storeapi.AggQuery, 0, len(statsAggs)) + + for _, agg := range statsAggs { + aggFunc, err := convertStringToAggFunc(agg.Func) + if err != nil { + return nil, err + } + + procAgg := &storeapi.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: aggFunc, + Quantiles: agg.Quantiles, + } + + if agg.Interval != "" { + interval, err := util.ParseDuration(agg.Interval) + if err != nil { + return nil, fmt.Errorf("failed to parse interval: %w", err) + } + procAgg.Interval = interval.Nanoseconds() + } + + result = append(result, procAgg) + } + + return result, nil +} + +func convertStringToAggFunc(funcName string) (storeapi.AggFunc, error) { + switch funcName { + case "count": + return storeapi.AggFunc_AGG_FUNC_COUNT, nil + case "sum": + return storeapi.AggFunc_AGG_FUNC_SUM, nil + case "min": + return storeapi.AggFunc_AGG_FUNC_MIN, nil + case "max": + return storeapi.AggFunc_AGG_FUNC_MAX, nil + case "avg": + return storeapi.AggFunc_AGG_FUNC_AVG, nil + case "quantile": + return storeapi.AggFunc_AGG_FUNC_QUANTILE, nil + case "unique": + return storeapi.AggFunc_AGG_FUNC_UNIQUE, nil + case "unique_count": + return storeapi.AggFunc_AGG_FUNC_UNIQUE_COUNT, nil + default: + return 0, fmt.Errorf("unknown aggregation function: %s", funcName) + } +}