diff --git a/api/seqproxyapi/v1/seq_proxy_api.proto b/api/seqproxyapi/v1/seq_proxy_api.proto index dd9e1398..c272213a 100644 --- a/api/seqproxyapi/v1/seq_proxy_api.proto +++ b/api/seqproxyapi/v1/seq_proxy_api.proto @@ -76,7 +76,7 @@ service SeqProxyApi { // The server processes the request in the background and returns a search ID. rpc StartAsyncSearch(StartAsyncSearchRequest) returns (StartAsyncSearchResponse) { option (google.api.http) = { - post: "/async-search" + post: "/async-searches" body: "*" }; } @@ -85,15 +85,30 @@ service SeqProxyApi { // Clients should use the search ID returned by StartAsyncSearch. rpc FetchAsyncSearchResult(FetchAsyncSearchResultRequest) returns (FetchAsyncSearchResultResponse) { option (google.api.http) = { - get: "/async-search/{search_id}" + post: "/async-searches/fetch" + body: "*" }; } // Cancels an ongoing asynchronous search operation if it hasn't completed yet. - // Useful for freeing up resources if the result is no longer needed. rpc CancelAsyncSearch(CancelAsyncSearchRequest) returns (CancelAsyncSearchResponse) { option (google.api.http) = { - delete: "/async-search/{search_id}" + post: "/async-searches/{search_id}/cancel" + }; + } + + // Frees up resources if the result is no longer needed. + rpc DeleteAsyncSearch(DeleteAsyncSearchRequest) returns (DeleteAsyncSearchResponse) { + option (google.api.http) = { + delete: "/async-searches/{search_id}" + }; + } + + // Fetch list of async searches. + rpc GetAsyncSearchesList(GetAsyncSearchesListRequest) returns (GetAsyncSearchesListResponse) { + option (google.api.http) = { + post: "/async-searches/list" + body: "*" }; } } @@ -229,28 +244,61 @@ message ComplexSearchResponse { } message StartAsyncSearchRequest { + // Duration to retain the result of an asynchronous query. + // After this period, the result will be deleted. google.protobuf.Duration retention = 1; - SearchQuery query = 2; // Search query. - repeated AggQuery aggs = 3; // List of aggregation queries. - optional HistQuery hist = 4; // Histogram query. - Order order = 5; // Document order ORDER_DESC/ORDER_ASC. + // Search query to execute. + SearchQuery query = 2; + // List of aggregation queries. + repeated AggQuery aggs = 3; + // Optional histogram query. + optional HistQuery hist = 4; + // Set this to true to enable document retrieval via FetchAsyncSearch. + // Note: enabling this may significantly increase disk space usage. + bool with_docs = 5; } message StartAsyncSearchResponse { + // Unique ID used to retrieve search results with FetchAsyncSearchResult. string search_id = 1; } message FetchAsyncSearchResultRequest { string search_id = 1; - bool with_docs = 2; - int32 size = 3; - int32 offset = 4; + // Maximum number of documents to fetch (pagination). + // Ignored if with_docs was set to false, since documents are not stored in that case. + int32 size = 2; + // Document offset (pagination). + // Ignored if with_docs was set to false, since documents are not stored in that case. + int32 offset = 3; + // Documents sort order. + Order order = 4; +} + +enum AsyncSearchStatus { + // The asynchronous search is still in progress. + // See the 'progress' field for completion percentage. + AsyncSearchStatusInProgress = 0; + // The asynchronous search completed successfully. + AsyncSearchStatusDone = 1; + // The asynchronous search was canceled, possibly via the CancelAsyncSearch handler. + AsyncSearchStatusCanceled = 2; + // The asynchronous search encountered errors in some shards. + // See ComplexSearchResponse.Error for details. + AsyncSearchStatusError = 3; } message FetchAsyncSearchResultResponse { - bool done = 1; - google.protobuf.Timestamp expiration = 2; + AsyncSearchStatus status = 1; + StartAsyncSearchRequest request = 2; ComplexSearchResponse response = 3; + google.protobuf.Timestamp started_at = 4; + google.protobuf.Timestamp expires_at = 5; + optional google.protobuf.Timestamp canceled_at = 6; + // Search progress in range [0, 1]. + double progress = 7; + // The size of data stored on disk, in bytes. + uint64 disk_usage = 8; } message CancelAsyncSearchRequest{ @@ -259,6 +307,39 @@ message CancelAsyncSearchRequest{ message CancelAsyncSearchResponse{} +message DeleteAsyncSearchRequest { + string search_id = 1; +} + +message DeleteAsyncSearchResponse {} + +message GetAsyncSearchesListRequest { + optional AsyncSearchStatus status = 1; + // Maximum number of searches to fetch (pagination). + int32 size = 2; + // Searches offset (pagination). + int32 offset = 3; + // list of async search ids to filter out result + repeated string ids = 4; +} + +message GetAsyncSearchesListResponse { + repeated AsyncSearchesListItem searches = 1; +} + +message AsyncSearchesListItem { + string search_id = 1; + AsyncSearchStatus status = 2; + StartAsyncSearchRequest request = 3; + google.protobuf.Timestamp started_at = 4; + google.protobuf.Timestamp expires_at = 5; + optional google.protobuf.Timestamp canceled_at = 6; + // Search progress in range [0, 1]. + double progress = 7; + // The size of data stored on disk, in bytes. + uint64 disk_usage = 8; +} + message GetAggregationRequest { SearchQuery query = 1; // Search query. repeated AggQuery aggs = 2; // List of aggregation queries. diff --git a/api/storeapi/store_api.proto b/api/storeapi/store_api.proto index 6451fe1a..aa8ba530 100644 --- a/api/storeapi/store_api.proto +++ b/api/storeapi/store_api.proto @@ -17,6 +17,12 @@ service StoreApi { rpc FetchAsyncSearchResult(FetchAsyncSearchResultRequest) returns (FetchAsyncSearchResultResponse) {} + rpc CancelAsyncSearch(CancelAsyncSearchRequest) returns (CancelAsyncSearchResponse) {} + + rpc DeleteAsyncSearch(DeleteAsyncSearchRequest) returns (DeleteAsyncSearchResponse) {} + + rpc GetAsyncSearchesList(GetAsyncSearchesListRequest) returns (GetAsyncSearchesListResponse) {} + rpc Fetch(FetchRequest) returns (stream BinaryData) {} rpc Status(StatusRequest) returns (StatusResponse) {} @@ -135,33 +141,90 @@ enum SearchErrorCode { message StartAsyncSearchRequest { string search_id = 1; - - string query = 2; - int64 from = 3; - int64 to = 4; - repeated AggQuery aggs = 5; - int64 histogram_interval = 6; - Order order = 7; + google.protobuf.Duration retention = 2; + string query = 3; + int64 from = 4; + int64 to = 5; + repeated AggQuery aggs = 6; + int64 histogram_interval = 7; + bool with_docs = 8; } message StartAsyncSearchResponse {} message FetchAsyncSearchResultRequest { string search_id = 1; - bool with_docs = 2; - int32 size = 3; - int32 offset = 4; + int32 size = 2; + int32 offset = 3; + Order order = 4; } -message FetchAsyncSearchResultResponse { - bool done = 1; +enum AsyncSearchStatus { + AsyncSearchStatusInProgress = 0; + AsyncSearchStatusDone = 1; + AsyncSearchStatusCanceled = 2; + AsyncSearchStatusError = 3; +} +message FetchAsyncSearchResultResponse { + AsyncSearchStatus status = 1; SearchResponse response = 2; - google.protobuf.Timestamp expiration = 3; + google.protobuf.Timestamp started_at = 3; + google.protobuf.Timestamp expires_at = 4; + optional google.protobuf.Timestamp canceled_at = 5; + uint64 fracs_done = 6; + uint64 fracs_queue = 7; + uint64 disk_usage = 8; + + repeated AggQuery aggs = 9; + int64 histogram_interval = 10; + + string query = 11; + google.protobuf.Timestamp from = 12; + google.protobuf.Timestamp to = 13; + google.protobuf.Duration retention = 14; + bool with_docs = 15; +} + +message CancelAsyncSearchRequest{ + string search_id = 1; +} + +message CancelAsyncSearchResponse{} - repeated AggQuery aggs = 5; - int64 histogram_interval = 6; - Order order = 7; +message DeleteAsyncSearchRequest { + string search_id = 1; +} + +message DeleteAsyncSearchResponse {} + +message GetAsyncSearchesListRequest { + optional AsyncSearchStatus status = 1; + repeated string ids = 2; +} + +message GetAsyncSearchesListResponse { + repeated AsyncSearchesListItem searches = 1; +} + +message AsyncSearchesListItem { + string search_id = 1; + AsyncSearchStatus status = 2; + google.protobuf.Timestamp started_at = 3; + google.protobuf.Timestamp expires_at = 4; + optional google.protobuf.Timestamp canceled_at = 5; + uint64 fracs_done = 6; + uint64 fracs_queue = 7; + uint64 disk_usage = 8; + + repeated AggQuery aggs = 9; + int64 histogram_interval = 10; + + string query = 11; + google.protobuf.Timestamp from = 12; + google.protobuf.Timestamp to = 13; + google.protobuf.Duration retention = 14; + bool with_docs = 15; } message IdWithHint { diff --git a/cmd/seq-db/seq-db.go b/cmd/seq-db/seq-db.go index 8a1ba6d5..abfa7b35 100644 --- a/cmd/seq-db/seq-db.go +++ b/cmd/seq-db/seq-db.go @@ -287,8 +287,10 @@ func startStore( RequestsLimit: uint64(cfg.Limits.SearchRequests), LogThreshold: cfg.SlowLogs.SearchThreshold, Async: fracmanager.AsyncSearcherConfig{ - DataDir: cfg.AsyncSearch.DataDir, - Parallelism: cfg.AsyncSearch.Concurrency, + DataDir: cfg.AsyncSearch.DataDir, + Workers: cfg.AsyncSearch.Concurrency, + MaxSize: int(cfg.AsyncSearch.MaxTotalSize), + MaxSizePerRequest: int(cfg.AsyncSearch.MaxSizePerRequest), }, }, Fetch: storeapi.FetchConfig{ diff --git a/config/config.go b/config/config.go index 914f8fb2..d95506b0 100644 --- a/config/config.go +++ b/config/config.go @@ -215,8 +215,10 @@ type Config struct { AsyncSearch struct { // DataDir specifies directory that contains data for asynchronous searches. // By default will be subdirectory in [Config.Storage.DataDir]. - DataDir string `config:"data_dir"` - Concurrency int `config:"concurrency"` + DataDir string `config:"data_dir"` + Concurrency int `config:"concurrency"` + MaxTotalSize Bytes `config:"max_total_size" default:"1GiB"` + MaxSizePerRequest Bytes `config:"max_size_per_request" default:"100MiB"` } `config:"async_search"` API struct { diff --git a/frac/meta_data_collector.go b/frac/meta_data_collector.go index a1e0ef16..26e16e3d 100644 --- a/frac/meta_data_collector.go +++ b/frac/meta_data_collector.go @@ -43,7 +43,7 @@ func (m *MetaData) MarshalBinaryTo(b []byte) []byte { b = binary.LittleEndian.AppendUint64(b, uint64(m.ID.MID)) b = binary.LittleEndian.AppendUint64(b, uint64(m.ID.RID)) - // Encode Size. + // Encode BlockLength. b = binary.LittleEndian.AppendUint32(b, m.Size) // Encode tokens. diff --git a/frac/processor/search_params.go b/frac/processor/search_params.go index 05d5358c..11b9bca2 100644 --- a/frac/processor/search_params.go +++ b/frac/processor/search_params.go @@ -14,7 +14,7 @@ type AggQuery struct { } type SearchParams struct { - AST *parser.ASTNode + AST *parser.ASTNode `json:"-"` AggQ []AggQuery HistInterval uint64 diff --git a/fracmanager/async_searcher.go b/fracmanager/async_searcher.go index bf5b63d5..9d0043e1 100644 --- a/fracmanager/async_searcher.go +++ b/fracmanager/async_searcher.go @@ -3,6 +3,7 @@ package fracmanager import ( "context" "encoding/json" + "errors" "fmt" "math" "os" @@ -10,10 +11,15 @@ import ( "path/filepath" "runtime" "slices" + "sort" "strings" "sync" + "sync/atomic" "time" + "github.com/google/uuid" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "go.uber.org/zap" "github.com/ozontech/seq-db/bytespool" @@ -22,68 +28,109 @@ import ( "github.com/ozontech/seq-db/logger" "github.com/ozontech/seq-db/parser" "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/util" "github.com/ozontech/seq-db/zstd" ) +const ( + asyncSearchExtInfo = ".info" + asyncSearchExtQPR = ".qpr" + asyncSearchExtMergedQPR = ".mqpr" + asyncSearchTmpFile = ".tmp" + + minRetention = 5 * time.Minute + maxRetention = 30 * 24 * time.Hour // 30 days +) + +var ( + asyncSearchActiveSearches = promauto.NewGauge(prometheus.GaugeOpts{ + Namespace: "seq_db_store", + Subsystem: "async_search", + Name: "in_progress", + Help: "Amount of active async searches in progress", + }) + asyncSearchDiskUsage = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: "seq_db_store", + Subsystem: "async_search", + Name: "disk_usage_bytes_total", + }, []string{"file_type"}) + asyncSearchStoredRequests = promauto.NewGauge(prometheus.GaugeOpts{ + Namespace: "seq_db_store", + Subsystem: "async_search", + Name: "stored_requests", + }) + asyncSearchReadOnly = promauto.NewGauge(prometheus.GaugeOpts{ + Namespace: "seq_db_store", + Subsystem: "async_search", + Name: "read_only", + }) +) + type MappingProvider interface { GetMapping() seq.Mapping } type AsyncSearcher struct { - config AsyncSearcherConfig + config AsyncSearcherConfig + createDirOnce *sync.Once mp MappingProvider - fracManager *FracManager - - requestsMu sync.RWMutex + requestsMu *sync.RWMutex requests map[string]asyncSearchInfo + rateLimit chan struct{} + readOnly atomic.Bool - rateLimit chan struct{} - - createDirOnce *sync.Once + processWg *sync.WaitGroup } type AsyncSearcherConfig struct { - DataDir string - Parallelism int + DataDir string + Workers int + + MaxSize int + MaxSizePerRequest int } -func MustStartAsync(config AsyncSearcherConfig, mp MappingProvider, fm *FracManager) *AsyncSearcher { +func MustStartAsync(config AsyncSearcherConfig, mp MappingProvider, fracs List) *AsyncSearcher { if config.DataDir == "" { logger.Fatal("can't start async searcher: DataDir is empty") } - asyncSearches, err := loadAsyncSearches(config.DataDir) + asyncSearches, err := loadAsyncRequests(config.DataDir) if err != nil { logger.Fatal("failed to load previous async searches", zap.Error(err)) } - parallelism := config.Parallelism - if parallelism <= 0 { - parallelism = runtime.GOMAXPROCS(0) + workers := config.Workers + if workers <= 0 { + workers = runtime.GOMAXPROCS(0) } as := &AsyncSearcher{ config: config, mp: mp, - fracManager: fm, - requestsMu: sync.RWMutex{}, + requestsMu: &sync.RWMutex{}, requests: asyncSearches, - rateLimit: make(chan struct{}, parallelism), + rateLimit: make(chan struct{}, workers), createDirOnce: &sync.Once{}, + processWg: &sync.WaitGroup{}, } notProcessedIDs := notProcessedTasks(asyncSearches) for _, id := range notProcessedIDs { - go as.processRequest(id) + asyncSearchActiveSearches.Add(1) + as.processWg.Add(1) + go as.processRequest(id, fracs) } + go as.startMaintenance() + return as } type AsyncSearchRequest struct { - ID string + ID string `json:"-"` Params processor.SearchParams Query string Retention time.Duration @@ -94,14 +141,84 @@ type fracSearchState struct { } type asyncSearchInfo struct { - Done bool - Request AsyncSearchRequest - Fractions []fracSearchState - Expiration time.Time - StartTime time.Time + // Finished is true if there are no fracs waiting to be processed. + // + // An async search request is considered complete only when all fracs are processed, + // or an error occurs during processing, + // or the request is cancelled and processing has stopped. + Finished bool + // Error can be non-empty only if Finished is true + Error string `json:",omitempty"` + + CanceledAt time.Time `json:",omitzero"` + ctx context.Context + cancel func() + + Request AsyncSearchRequest + Fractions []fracSearchState `json:",omitempty"` + StartedAt time.Time + + // merged is true if QPRs have been merged into a single one. + merged *atomic.Bool + // qprsSize is the total size of mqpr or qpr files on disk. + qprsSize *atomic.Int64 + // infoSize is the total size of the info file on disk. + infoSize *atomic.Int64 } -func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest) error { +func newAsyncSearchInfo(r AsyncSearchRequest, list List) asyncSearchInfo { + fracsToSearch := make([]fracSearchState, 0, len(list)) + for _, f := range list { + fracsToSearch = append(fracsToSearch, fracSearchState{Name: f.Info().Name()}) + } + ctx, cancel := context.WithCancel(context.Background()) + return asyncSearchInfo{ + Finished: false, + Error: "", + CanceledAt: time.Time{}, + ctx: ctx, + cancel: cancel, + Request: r, + Fractions: fracsToSearch, + StartedAt: time.Now(), + merged: &atomic.Bool{}, + qprsSize: &atomic.Int64{}, + infoSize: &atomic.Int64{}, + } +} + +func (i *asyncSearchInfo) Canceled() bool { + return !i.CanceledAt.IsZero() +} + +func (i *asyncSearchInfo) Expired() bool { + expiration := i.Expiration() + return expiration.Before(time.Now()) +} + +func (i *asyncSearchInfo) Expiration() time.Time { + return i.StartedAt.Add(i.Request.Retention) +} + +func (i *asyncSearchInfo) Status() AsyncSearchStatus { + status := AsyncSearchStatusInProgress + if i.Finished { + if i.Canceled() { + status = AsyncSearchStatusCanceled + } else if i.Error != "" { + status = AsyncSearchStatusError + } else { + status = AsyncSearchStatusDone + } + } + + return status +} + +func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest, fracs List) error { + if as.readOnly.Load() { + return fmt.Errorf("cannot start search on read-only mode") + } as.requestsMu.RLock() _, ok := as.requests[r.ID] as.requestsMu.RUnlock() @@ -109,6 +226,9 @@ func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest) error { logger.Warn("async search already started", zap.String("id", r.ID)) return nil } + if err := uuid.Validate(r.ID); err != nil { + return fmt.Errorf("invalid id %q: %s", r.ID, err) + } ast, err := parser.ParseSeqQL(r.Query, as.mp.GetMapping()) if err != nil { @@ -116,154 +236,210 @@ func (as *AsyncSearcher) StartSearch(r AsyncSearchRequest) error { } r.Params.AST = ast.Root - fracs := as.fracManager.GetAllFracs().FilterInRange(r.Params.From, r.Params.To) - fracsToSearch := make([]fracSearchState, 0, len(fracs)) - for _, f := range fracs { - fracsToSearch = append(fracsToSearch, fracSearchState{Name: f.Info().Name()}) + now := timeNow() + if r.Retention < minRetention { + return fmt.Errorf("retention time should be at least %s, got %s", minRetention, r.Retention) } - - // It can be empty if the replica does not contain the required data. - // In this case, it is necessary to consider that the asynchronous request is completed. - requestDone := len(fracs) == 0 - - now := time.Now() - info := asyncSearchInfo{ - Done: requestDone, - Request: r, - Fractions: fracsToSearch, - Expiration: now.Add(r.Retention), - StartTime: now, + if now.Add(r.Retention).After(now.Add(maxRetention)) { + // Just check Retention is correct. Retention more than 90 days is not expected. + // More fine-grained validation by specific user/tenant/environment shouldn't be implemented in seq-db. + return fmt.Errorf("retention time should be less than %s, got %s", maxRetention, r.Retention) } - as.updateSearchInfo(r.ID, info) - if !requestDone { - go as.processRequest(r.ID) + if ok := as.saveSearchInfo(r, fracs); !ok { + // Request was saved previously, skip it + return nil } - + asyncSearchActiveSearches.Add(1) + as.processWg.Add(1) + go as.processRequest(r.ID, fracs) return nil } -func (as *AsyncSearcher) updateSearchInfo(id string, info asyncSearchInfo) { +func (as *AsyncSearcher) saveSearchInfo(r AsyncSearchRequest, fracs List) bool { as.requestsMu.Lock() defer as.requestsMu.Unlock() + if _, ok := as.requests[r.ID]; ok { + return false + } + info := newAsyncSearchInfo(r, fracs) + as.storeSearchInfoLocked(r.ID, info) + return true +} - as.mustWriteSearchInfo(id, info) - as.requests[id] = info +func (as *AsyncSearcher) updateSearchInfo(id string, update func(info *asyncSearchInfo)) { + as.requestsMu.Lock() + defer as.requestsMu.Unlock() + info, ok := as.requests[id] + if !ok { + return + } + update(&info) + as.storeSearchInfoLocked(id, info) } -const asyncSearchFileExtension = ".info" +func (as *AsyncSearcher) getSearchInfo(id string) (asyncSearchInfo, bool) { + as.requestsMu.RLock() + defer as.requestsMu.RUnlock() + v, ok := as.requests[id] + return v, ok +} -func (as *AsyncSearcher) mustWriteSearchInfo(id string, info asyncSearchInfo) { +func (as *AsyncSearcher) storeSearchInfoLocked(id string, info asyncSearchInfo) { as.createDataDir() - - infoRaw, err := json.Marshal(info) + b, err := json.Marshal(info) if err != nil { - logger.Fatal("can't encode async request", zap.Error(err)) + panic(err) } + fpath := path.Join(as.config.DataDir, id+asyncSearchExtInfo) + mustWriteFileAtomic(fpath, b) + info.infoSize.Store(int64(len(b))) + as.requests[id] = info +} - fpath := path.Join(as.config.DataDir, id+asyncSearchFileExtension) - mustWriteFileAtomic(fpath, infoRaw) +// createDataDir creates dir data lazily to avoid creating extra folders. +func (as *AsyncSearcher) createDataDir() { + as.createDirOnce.Do(func() { + if err := os.MkdirAll(as.config.DataDir, 0o777); err != nil { + panic(err) + } + }) } -func (as *AsyncSearcher) processRequest(asyncSearchID string) { +func (as *AsyncSearcher) processRequest(asyncSearchID string, fracs List) { + defer as.processWg.Done() + as.rateLimit <- struct{}{} defer func() { <-as.rateLimit }() - logger.Info("start to process async search request", zap.String("id", asyncSearchID)) - if err := as.doSearch(asyncSearchID); err != nil { - logger.Fatal("async search failed", zap.Error(err)) - } + as.doSearch(asyncSearchID, fracs) + asyncSearchActiveSearches.Add(-1) } -func (as *AsyncSearcher) doSearch(id string) error { - qprPaths, err := as.loadQPRPaths(id) +func (as *AsyncSearcher) doSearch(id string, fracs List) { + qprPaths, err := as.findQPRs(id) if err != nil { - return fmt.Errorf("loading processed fracs: %s", err) + panic(fmt.Errorf("can't find QPRs for id %q: %s", id, err)) } processedFracs := make(map[string]struct{}) for _, qprPath := range qprPaths { fracName, err := fracNameFromQPRPath(qprPath) if err != nil { - return err + logger.Fatal("cannot find previous QPRs", zap.Error(err)) } processedFracs[fracName] = struct{}{} } - as.requestsMu.RLock() - state, ok := as.requests[id] - astParsed := state.Request.Params.AST != nil - as.requestsMu.RUnlock() + info, ok := as.getSearchInfo(id) if !ok { panic(fmt.Errorf("BUG: can't find async search request for id %s", id)) } + logger.Info("starting async search request", + zap.String("id", id), + zap.Any("query", info.Request.Query), + zap.Duration("interval", time.Duration(info.Request.Params.To-info.Request.Params.From)*time.Millisecond), + ) + // AST can be nil in case of restarts. - if !astParsed { - as.requestsMu.Lock() - // Check if another worker has parsed the AST. - if state.Request.Params.AST == nil { - ast, err := parser.ParseSeqQL(state.Request.Query, as.mp.GetMapping()) - if err != nil { - panic(fmt.Errorf("BUG: search query must be valid: %s", err)) - } - state.Request.Params.AST = ast.Root + if info.Request.Params.AST == nil { + ast, err := parser.ParseSeqQL(info.Request.Query, as.mp.GetMapping()) + if err != nil { + panic(fmt.Errorf("BUG: search query must be valid: %s", err)) } - as.requestsMu.Unlock() + info.Request.Params.AST = ast.Root } - r := state.Request - fracsInRange := as.fracManager.GetAllFracs().FilterInRange(r.Params.From, r.Params.To) fracsByName := make(map[string]frac.Fraction) - for _, f := range fracsInRange { + for _, f := range fracs { fracsByName[f.Info().Name()] = f } - for _, fracInfo := range state.Fractions { + for _, fracInfo := range info.Fractions { if _, ok := processedFracs[fracInfo.Name]; ok { continue } - f := fracsByName[fracInfo.Name] + if as.shouldStopSearch(id) { + break + } - if err := as.processFrac(f, state.Request); err != nil { - return fmt.Errorf("processing fraction %s: %s", fracInfo.Name, err) + f := fracsByName[fracInfo.Name] + if err := as.processFrac(f, info); err != nil { + as.updateSearchInfo(id, func(info *asyncSearchInfo) { + info.Error = err.Error() + }) + break } } + as.updateSearchInfo(id, func(info *asyncSearchInfo) { + info.Finished = true + }) +} + +func (as *AsyncSearcher) shouldStopSearch(id string) bool { + info, ok := as.getSearchInfo(id) + if !ok { + return true + } + if info.Canceled() || info.Expired() { + return true + } + return false +} - state.Done = true +var qprMarshalBufPool util.BufferPool - as.updateSearchInfo(id, state) +func compressQPR(qpr *seq.QPR, cb func(compressed []byte) error) error { + rawQPR := qprMarshalBufPool.Get() + defer qprMarshalBufPool.Put(rawQPR) - return nil -} + rawQPR.B = marshalQPR(qpr, rawQPR.B) -func (as *AsyncSearcher) processFrac(f frac.Fraction, r AsyncSearchRequest) error { - dp, release := f.DataProvider(context.Background()) - qpr, err := dp.Search(r.Params) - release() + compressed := bytespool.Acquire(len(rawQPR.B)) + defer bytespool.Release(compressed) - if err != nil { + level := getCompressLevel(len(rawQPR.B)) + compressed.B = zstd.CompressLevel(rawQPR.B, compressed.B, level) + if err := cb(compressed.B); err != nil { return err } + return nil +} - qprRaw, err := json.Marshal(qpr) +func (as *AsyncSearcher) processFrac(f frac.Fraction, info asyncSearchInfo) error { + ctx := info.ctx + dp, release := f.DataProvider(ctx) + qpr, err := dp.Search(info.Request.Params) + release() if err != nil { - panic(fmt.Errorf("BUG: can't encode async search request: %s", err)) + return err } - buf := bytespool.Acquire(len(qprRaw)) - defer bytespool.Release(buf) - - // zstd uses level 3 as the default value, which has optimal compression ratio and speed. - const compressionLevel = 3 - buf.B = zstd.CompressLevel(qprRaw, buf.B, compressionLevel) + storeQPR := func(rawQPR []byte) error { + du := int(info.qprsSize.Load() + info.infoSize.Load()) + if as.config.MaxSizePerRequest != 0 && du+len(rawQPR) > as.config.MaxSizePerRequest { + return fmt.Errorf("cannot complete async search request since it requires more than %dMiB of memory", as.config.MaxSizePerRequest) + } - fpath := path.Join(as.config.DataDir, r.ID+"."+f.Info().Name()+qprExtension) // /..qpr - mustWriteFileAtomic(fpath, buf.B) + name := getQPRFilename(info.Request.ID, f.Info().Name()) + fpath := path.Join(as.config.DataDir, name) + mustWriteFileAtomic(fpath, rawQPR) + info.qprsSize.Add(int64(len(rawQPR))) + return nil + } + if err := compressQPR(qpr, storeQPR); err != nil { + return err + } return nil } +func getQPRFilename(id, fracName string) string { + // ..qpr + return id + "." + fracName + asyncSearchExtQPR +} + func fracNameFromQPRPath(qprPath string) (string, error) { filename := path.Base(qprPath) parts := strings.Split(filename, ".") @@ -277,66 +453,159 @@ func fracNameFromQPRPath(qprPath string) (string, error) { return parts[1], nil } -const qprExtension = ".qpr" - -func (as *AsyncSearcher) loadQPRPaths(id string) ([]string, error) { - pattern := path.Join(as.config.DataDir, id+"*"+qprExtension) - files, err := filepath.Glob(pattern) +func (as *AsyncSearcher) findQPRs(id string) ([]string, error) { + des, err := os.ReadDir(as.config.DataDir) if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil, nil + } + return nil, fmt.Errorf("reading directory: %s", err) + } + var files []string + appendQPRInfoFile := func(name string) error { + if !strings.HasPrefix(name, id) { + return nil + } + files = append(files, path.Join(as.config.DataDir, name)) + return nil + } + if err := visitFilesWithExt(des, asyncSearchExtQPR, appendQPRInfoFile); err != nil { return nil, err } return files, nil } -func loadAsyncSearches(dataDir string) (map[string]asyncSearchInfo, error) { - requests := make(map[string]asyncSearchInfo) - - pattern := path.Join(dataDir, "*"+asyncSearchFileExtension) - files, err := filepath.Glob(pattern) +func loadAsyncRequests(dataDir string) (map[string]asyncSearchInfo, error) { + des, err := os.ReadDir(dataDir) if err != nil { + if errors.Is(err, os.ErrNotExist) { + return map[string]asyncSearchInfo{}, nil + } return nil, err } - for _, fpath := range files { - filename := path.Base(fpath) + areQPRsMerged := make(map[string]bool) + loadMergedQPRsInfo := func(name string) error { + parts := strings.Split(name, ".") + if len(parts) != 2 { + return fmt.Errorf("unknown mqpr filename format: %s", name) + } + requestID := parts[0] + areQPRsMerged[requestID] = true + return nil + } + if err := visitFilesWithExt(des, asyncSearchExtMergedQPR, loadMergedQPRsInfo); err != nil { + return nil, err + } - ext := path.Ext(filename) - if ext != asyncSearchFileExtension { - logger.Fatal("unknown file", zap.String("filename", filename)) + anyRemove := false + removeMergedQPRs := func(name string) error { + parts := strings.Split(name, ".") + if len(parts) != 3 { + return fmt.Errorf("unknown qpr filename format: %s", name) } + requestID := parts[0] + _, merged := areQPRsMerged[requestID] + if !merged { + return nil + } + fpath := path.Join(dataDir, name) + removeFile(fpath) + anyRemove = true + return nil + } + if err := visitFilesWithExt(des, asyncSearchExtQPR, removeMergedQPRs); err != nil { + return nil, err + } - requestID := filename[:len(filename)-len(ext)] - b, err := os.ReadFile(fpath) - if err != nil { - return nil, err + removeTmpFiles := func(name string) error { + p := filepath.Join(dataDir, name) + if err := os.Remove(p); err != nil { + return fmt.Errorf("error removing temporary file: %s", err) + } + anyRemove = true + return nil + } + if err := visitFilesWithExt(des, asyncSearchTmpFile, removeTmpFiles); err != nil { + return nil, err + } + if anyRemove { + mustFsyncFile(dataDir) + } + + qprsDuByID := make(map[string]int) + infoDuByID := make(map[string]int) + for _, de := range des { + if de.IsDir() { + continue } - var req asyncSearchInfo - if err := json.Unmarshal(b, &req); err != nil { - logger.Error("can't load async search request", zap.String("filename", filename), zap.Error(err)) + name := de.Name() + ext := path.Ext(name) + if ext != asyncSearchExtQPR && ext != asyncSearchExtMergedQPR && ext != asyncSearchExtInfo { continue } - // It is difficult to marshal/unmarshal AST, so set it to nil and parse it later. - req.Request.Params.AST = nil - requests[requestID] = req + n := strings.IndexByte(name, '.') + if n <= 0 { + continue + } + id := name[:n] + info, err := de.Info() + if err != nil { + return nil, fmt.Errorf("cannot get disk usage: %s", err) + } + size := int(info.Size()) + switch ext { + case asyncSearchExtQPR, asyncSearchExtMergedQPR: + qprsDuByID[id] += size + case asyncSearchExtInfo: + infoDuByID[id] = size + default: + panic("unreachable") + } } + requests := make(map[string]asyncSearchInfo) + loadInfos := func(name string) error { + parts := strings.Split(name, ".") + if len(parts) != 2 { + return fmt.Errorf("unknown info filename format: %s", name) + } + requestID := parts[0] + b, err := os.ReadFile(path.Join(dataDir, name)) + if err != nil { + return err + } + info := newAsyncSearchInfo(AsyncSearchRequest{}, nil) + if err := json.Unmarshal(b, &info); err != nil { + return fmt.Errorf("malformed async search info %q: %s", name, err) + } + + info.merged.Store(areQPRsMerged[requestID]) + info.qprsSize.Store(int64(qprsDuByID[requestID])) + info.infoSize.Store(int64(infoDuByID[requestID])) + info.Request.ID = requestID + requests[requestID] = info + return nil + } + if err := visitFilesWithExt(des, asyncSearchExtInfo, loadInfos); err != nil { + return nil, err + } return requests, nil } func notProcessedTasks(tasks map[string]asyncSearchInfo) []string { var toProcess []string - - // nolint:gocritic // rangeValCopy (each iteration copies 216 bytes) – it's ok here - for id, task := range tasks { - if !task.Done { + for id := range tasks { + task := tasks[id] + if !task.Finished { toProcess = append(toProcess, id) } } // Sort tasks by start time. slices.SortFunc(toProcess, func(a, b string) int { - left := tasks[a].StartTime - right := tasks[b].StartTime + left := tasks[a].StartedAt + right := tasks[b].StartedAt if left.After(right) { return -1 } @@ -350,73 +619,405 @@ func notProcessedTasks(tasks map[string]asyncSearchInfo) []string { } type FetchSearchResultRequest struct { - ID string + ID string + Limit int + Order seq.DocsOrder } +type AsyncSearchStatus byte + +const ( + AsyncSearchStatusDone AsyncSearchStatus = iota + AsyncSearchStatusInProgress + AsyncSearchStatusError + AsyncSearchStatusCanceled +) + type FetchSearchResultResponse struct { + Status AsyncSearchStatus QPR seq.QPR - Expiration time.Time - Done bool + CanceledAt time.Time + Error string + + StartedAt time.Time + ExpiresAt time.Time + + FracsDone int + FracsInQueue int + DiskUsage int // Stuff that needed seq-db proxy to complete async search response. AggQueries []processor.AggQuery HistInterval uint64 - Order seq.DocsOrder + + Query string + From seq.MID + To seq.MID + Retention time.Duration + WithDocs bool } func (as *AsyncSearcher) FetchSearchResult(r FetchSearchResultRequest) (FetchSearchResultResponse, bool) { - as.requestsMu.RLock() - info, ok := as.requests[r.ID] - as.requestsMu.RUnlock() + info, ok := as.getSearchInfo(r.ID) if !ok { return FetchSearchResultResponse{}, false } - qprPaths, err := as.loadQPRPaths(r.ID) - if err != nil { - logger.Error("can't load async search result", zap.String("id", r.ID), zap.Error(err)) + var qpr seq.QPR + var fracsDone, fracsInQueue int + if info.merged.Load() { + p := path.Join(as.config.DataDir, r.ID+asyncSearchExtMergedQPR) + qpr, _ = as.loadSearchResult([]string{p}, r.Limit, r.Order) + fracsDone = len(info.Fractions) + fracsInQueue = 0 + } else { + p, err := as.findQPRs(r.ID) + if err != nil { + logger.Fatal("can't load async search result", zap.String("id", r.ID), zap.Error(err)) + } + qpr, _ = as.loadSearchResult(p, r.Limit, r.Order) + fracsDone = len(p) + fracsInQueue = len(info.Fractions) - fracsDone } + if info.Error != "" { + qpr.Errors = append(qpr.Errors, seq.ErrorSource{ + ErrStr: info.Error, + }) + } + + return FetchSearchResultResponse{ + Status: info.Status(), + QPR: qpr, + StartedAt: info.StartedAt, + ExpiresAt: info.Expiration(), + CanceledAt: info.CanceledAt, + FracsDone: fracsDone, + FracsInQueue: fracsInQueue, + DiskUsage: int(info.infoSize.Load() + info.qprsSize.Load()), + Error: info.Error, + AggQueries: info.Request.Params.AggQ, + HistInterval: info.Request.Params.HistInterval, + Query: info.Request.Query, + From: info.Request.Params.From, + To: info.Request.Params.To, + Retention: info.Request.Retention, + WithDocs: info.Request.Params.Limit == math.MaxInt, + }, true +} + +func (as *AsyncSearcher) loadSearchResult(qprsPaths []string, limit int, order seq.DocsOrder) (seq.QPR, int) { qpr := seq.QPR{} - for _, qprPath := range qprPaths { + size := 0 + for _, qprPath := range qprsPaths { compressedQPR, err := os.ReadFile(qprPath) + size += len(compressedQPR) if err != nil { - logger.Error("can't load async search result", zap.String("id", r.ID), zap.Error(err)) + logger.Error("can't read async search result from file", zap.String("path", qprPath), zap.Error(err)) + return seq.QPR{}, 0 } qprRaw, err := zstd.Decompress(compressedQPR, nil) if err != nil { - logger.Error("can't load decompress search result", zap.String("id", r.ID), zap.Error(err)) + logger.Fatal("can't decompress async search result", zap.String("path", qprPath), zap.Error(err)) } var tmp seq.QPR - if err := json.Unmarshal(qprRaw, &tmp); err != nil { - logger.Error("can't unmarshal search result", zap.String("id", r.ID), zap.Error(err)) + tail, err := unmarshalQPR(&tmp, qprRaw, limit) + if err != nil { + logger.Fatal("can't unmarshal async search result", zap.String("path", qprPath), zap.Error(err)) + } + if len(tail) > 0 { + logger.Fatal("unexpected tail when unmarshaling binary QPR", zap.String("path", qprPath)) } + seq.MergeQPRs(&qpr, []*seq.QPR{&tmp}, limit, 1, order) + } + return qpr, size +} - seq.MergeQPRs(&qpr, []*seq.QPR{&tmp}, math.MaxInt, 1, info.Request.Params.Order) +var timeNow = time.Now + +func (as *AsyncSearcher) startMaintenance() { + for { + logger.Info("async search maintenance iteration") + now := timeNow() + as.removeExpiredResults(now) + as.merge() + as.checkDiskUsage() + const maintenanceInterval = 5 * time.Second + time.Sleep(maintenanceInterval) } +} - return FetchSearchResultResponse{ - QPR: qpr, - Expiration: info.Expiration, - Done: info.Done, - AggQueries: info.Request.Params.AggQ, - HistInterval: info.Request.Params.HistInterval, - Order: info.Request.Params.Order, - }, true +func (as *AsyncSearcher) merge() { + now := timeNow() + var mergeJobs []mergeJob + as.requestsMu.RLock() + for id := range as.requests { + info := as.requests[id] + if !info.Finished || info.merged.Load() { + continue + } + if len(info.Fractions) < 2 { + // Nothing to merge + continue + } + if info.Expiration().Sub(now) < time.Minute*10 { + // Do not merge QPRs that will be expired soon + continue + } + mergeJobs = append(mergeJobs, mergeJob{ + ID: id, + Fracs: info.Fractions, + Info: info, + }) + } + as.requestsMu.RUnlock() + + for id := range mergeJobs { + job := mergeJobs[id] + as.mergeQPRs(job) + } } -// createDataDir creates dir data lazily to avoid creating extra folders. -func (as *AsyncSearcher) createDataDir() { - as.createDirOnce.Do(func() { - if err := os.MkdirAll(as.config.DataDir, 0o777); err != nil { - panic(err) +type mergeJob struct { + ID string + Fracs []fracSearchState + + Info asyncSearchInfo +} + +func (as *AsyncSearcher) mergeQPRs(job mergeJob) { + start := time.Now() + var qprs []string + for _, f := range job.Fracs { + qprFilename := getQPRFilename(job.ID, f.Name) + qprPath := path.Join(as.config.DataDir, qprFilename) + qprs = append(qprs, qprPath) + } + qpr, sizeBefore := as.loadSearchResult(qprs, math.MaxInt, seq.DocsOrderDesc) + + var sizeAfter int + storeMQPR := func(compressed []byte) error { + sizeAfter = len(compressed) + mqprPath := path.Join(as.config.DataDir, job.ID+asyncSearchExtMergedQPR) + mustWriteFileAtomic(mqprPath, compressed) + return nil + } + if err := compressQPR(&qpr, storeMQPR); err != nil { + panic(fmt.Errorf("can't compress async search result: %s", err)) + } + + job.Info.merged.Store(true) + job.Info.qprsSize.Store(int64(sizeAfter)) + + for _, qprPath := range qprs { + // Remove unnecessary QPRs since we have merged QPR result + if err := os.Remove(qprPath); err != nil && !errors.Is(err, os.ErrNotExist) { + logger.Fatal("can't remove async search result", zap.Error(err)) + } + } + + logger.Info("QPRs have been merged", + zap.String("id", job.ID), + zap.Float64("ratio", float64(sizeBefore)/float64(sizeAfter)), + zap.Int("fracs", len(job.Fracs)), + zap.Duration("took", time.Since(start)), + ) +} + +func (as *AsyncSearcher) removeExpiredResults(now time.Time) { + var toRemove []string + as.requestsMu.RLock() + for id := range as.requests { + r := as.requests[id] + expired := r.Expiration().Before(now) + if !expired { + continue + } + if r.Finished { + // Request processing has been finished and the result should expire + toRemove = append(toRemove, id) + continue + } + // Edge case: we can't remove the request while the search is running, + // so cancel this request and remove it later + as.requestsMu.RUnlock() + as.updateSearchInfo(id, func(info *asyncSearchInfo) { + info.CanceledAt = now + info.cancel() + }) + as.requestsMu.RLock() + } + as.requestsMu.RUnlock() + if len(toRemove) == 0 { + return + } + + as.requestsMu.Lock() + // Exclude expired requests from Fetch + for _, id := range toRemove { + delete(as.requests, id) + } + as.requestsMu.Unlock() + + for _, id := range toRemove { + qprPaths, err := as.findQPRs(id) + if err != nil { + logger.Fatal("can't load async search results", zap.String("id", id), zap.Error(err)) + } + for _, qprPath := range qprPaths { + removeFile(qprPath) + } + removeFile(path.Join(as.config.DataDir, id+asyncSearchExtMergedQPR)) + removeFile(path.Join(as.config.DataDir, id+asyncSearchExtInfo)) + } + logger.Info("async search results have been removed", zap.Int("count", len(toRemove)), zap.Duration("took", time.Since(now))) +} + +func (as *AsyncSearcher) checkDiskUsage() { + as.requestsMu.RLock() + defer as.requestsMu.RUnlock() + + infoDu := 0 + qprsDu := 0 + for id := range as.requests { + r := as.requests[id] + infoDu += int(r.infoSize.Load()) + qprsDu += int(r.qprsSize.Load()) + } + asyncSearchDiskUsage.WithLabelValues("info").Set(float64(infoDu)) + asyncSearchDiskUsage.WithLabelValues("qpr").Set(float64(qprsDu)) + asyncSearchStoredRequests.Set(float64(len(as.requests))) + + du := infoDu + qprsDu + if as.config.MaxSize != 0 && du >= as.config.MaxSize { + as.readOnly.Store(true) + logger.Error("disk usage limit exceeded, read-only mode enabled", zap.Int("current", du), zap.Int("limit", as.config.MaxSize)) + asyncSearchReadOnly.Set(1) + } else { + as.readOnly.Store(false) + asyncSearchReadOnly.Set(0) + } +} + +func (as *AsyncSearcher) CancelSearch(id string) { + as.updateSearchInfo(id, func(info *asyncSearchInfo) { + if info.CanceledAt.IsZero() { + // can't cancel finished request + if info.Status() == AsyncSearchStatusDone { + return + } + + info.CanceledAt = time.Now() + info.cancel() } }) } +func (as *AsyncSearcher) DeleteSearch(id string) { + as.updateSearchInfo(id, func(info *asyncSearchInfo) { + if info.CanceledAt.IsZero() { + info.CanceledAt = time.Now() + info.cancel() + } + info.Request.Retention = 0 + }) +} + +type GetAsyncSearchesListRequest struct { + Status *AsyncSearchStatus + IDs []string +} + +type AsyncSearchesListItem struct { + ID string + Status AsyncSearchStatus + + StartedAt time.Time + ExpiresAt time.Time + CanceledAt time.Time + + FracsDone int + FracsInQueue int + DiskUsage int + + // Search request info + AggQueries []processor.AggQuery + HistInterval uint64 + Query string + From seq.MID + To seq.MID + Retention time.Duration + WithDocs bool +} + +func (as *AsyncSearcher) GetAsyncSearchesList(r GetAsyncSearchesListRequest) []*AsyncSearchesListItem { + idsMap := make(map[string]struct{}) + for _, id := range r.IDs { + idsMap[id] = struct{}{} + } + + as.requestsMu.RLock() + defer as.requestsMu.RUnlock() + + var items []*AsyncSearchesListItem + + for id := range as.requests { + info := as.requests[id] + status := info.Status() + + // Filter by id + if _, ok := idsMap[id]; !ok && len(idsMap) > 0 { + continue + } + + // Filter by status + if r.Status != nil && status != *r.Status { + continue + } + + var fracsDone, fracsInQueue int + if info.merged.Load() { + fracsDone = len(info.Fractions) + fracsInQueue = 0 + } else { + p, err := as.findQPRs(id) + if err != nil { + logger.Fatal("can't load async search result", zap.String("id", id), zap.Error(err)) + } + fracsDone = len(p) + fracsInQueue = len(info.Fractions) - fracsDone + } + + items = append(items, &AsyncSearchesListItem{ + ID: id, + Status: status, + StartedAt: info.StartedAt, + ExpiresAt: info.Expiration(), + CanceledAt: info.CanceledAt, + FracsDone: fracsDone, + FracsInQueue: fracsInQueue, + DiskUsage: int(info.infoSize.Load() + info.qprsSize.Load()), + AggQueries: info.Request.Params.AggQ, + HistInterval: info.Request.Params.HistInterval, + Query: info.Request.Query, + From: info.Request.Params.From, + To: info.Request.Params.To, + Retention: info.Request.Retention, + WithDocs: info.Request.Params.Limit == math.MaxInt, + }) + } + + // order by StartedAt DESC + sort.Slice(items, func(i, j int) bool { + return items[i].StartedAt.After(items[j].StartedAt) + }) + + return items +} + func mustWriteFileAtomic(fpath string, data []byte) { - fpathTmp := fpath + ".tmp" + fpathTmp := fpath + asyncSearchTmpFile f, err := os.Create(fpathTmp) if err != nil { @@ -460,3 +1061,19 @@ func mustFsyncFile(fpath string) { logger.Fatal("can't close dir", zap.Error(err)) } } + +func visitFilesWithExt(des []os.DirEntry, ext string, cb func(name string) error) error { + for _, de := range des { + if de.IsDir() { + continue + } + name := de.Name() + if path.Ext(name) != ext { + continue + } + if err := cb(name); err != nil { + return err + } + } + return nil +} diff --git a/fracmanager/async_searcher_test.go b/fracmanager/async_searcher_test.go new file mode 100644 index 00000000..5ff94092 --- /dev/null +++ b/fracmanager/async_searcher_test.go @@ -0,0 +1,63 @@ +package fracmanager + +import ( + "context" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/require" + + "github.com/ozontech/seq-db/frac" + "github.com/ozontech/seq-db/frac/processor" + "github.com/ozontech/seq-db/mappingprovider" + "github.com/ozontech/seq-db/seq" +) + +type fakeFrac struct { + frac.Fraction + info frac.Info + dp fakeDP +} + +func (f *fakeFrac) Info() *frac.Info { + return &f.info +} + +func (f *fakeFrac) DataProvider(_ context.Context) (frac.DataProvider, func()) { + return &f.dp, func() {} +} + +type fakeDP struct { + frac.DataProvider + qpr seq.QPR +} + +func (f *fakeDP) Search(processor.SearchParams) (*seq.QPR, error) { + return &f.qpr, nil +} + +func TestAsyncSearcherMaintain(t *testing.T) { + r := require.New(t) + + cfg := AsyncSearcherConfig{ + DataDir: t.TempDir(), + } + mp, err := mappingprovider.New("", mappingprovider.WithMapping(seq.Mapping{})) + r.NoError(err) + + as := MustStartAsync(cfg, mp, nil) + + req := AsyncSearchRequest{ + ID: uuid.New().String(), + Params: processor.SearchParams{}, + Query: "*", + Retention: time.Hour, + } + fracs := []frac.Fraction{ + &fakeFrac{info: frac.Info{Path: "1"}}, + } + r.NoError(as.StartSearch(req, fracs)) + + as.processWg.Wait() +} diff --git a/fracmanager/encoding.go b/fracmanager/encoding.go new file mode 100644 index 00000000..e8daf5f9 --- /dev/null +++ b/fracmanager/encoding.go @@ -0,0 +1,551 @@ +package fracmanager + +import ( + "encoding/binary" + "errors" + "fmt" + "math" + "slices" + + "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/util" + "github.com/ozontech/seq-db/zstd" +) + +var be = binary.BigEndian + +const qprBinVersion = uint8(1) + +func marshalQPR(q *seq.QPR, dst []byte) []byte { + dst = append(dst, qprBinVersion) + + blocksLenPos := len(dst) + dst = append(dst, make([]byte, 8)...) + n := len(dst) + dst = marshalIDsBlocks(dst, q.IDs) + blocksLen := len(dst) - n + binary.BigEndian.PutUint64(dst[blocksLenPos:], uint64(blocksLen)) + + dst = marshalHistogram(dst, q.Histogram) + dst = marshalAggs(dst, q.Aggs) + dst = be.AppendUint64(dst, q.Total) + dst = marshalErrorSource(dst, q.Errors) + return dst +} + +func unmarshalQPR(dst *seq.QPR, src []byte, idsLimit int) (_ []byte, err error) { + if len(src) < 19 { + return nil, fmt.Errorf("invalid QPR format; want %d bytes, got %d", 19, len(src)) + } + + version := src[0] + src = src[1:] + if version != qprBinVersion { + return nil, fmt.Errorf("invalid QPR version %d; want %d", version, qprBinVersion) + } + + idsBlocksLen := int(be.Uint64(src)) + src = src[8:] + if idsBlocksLen > len(src) { + return nil, fmt.Errorf("invalid ids block length %d; want %d", len(src), idsBlocksLen) + } + idsBlocks := src[:idsBlocksLen] + for i := 0; len(idsBlocks) > 0; i++ { + if len(dst.IDs) >= idsLimit { + break + } + idsBlocks, err = unmarshalIDsBlock(dst, idsBlocks) + if err != nil { + return nil, fmt.Errorf("can't unmarshal ids block at pos %d: %s", i, err) + } + } + if len(dst.IDs) > idsLimit { + dst.IDs = dst.IDs[:idsLimit] + } + src = src[idsBlocksLen:] + + dst.Histogram, src, err = unmarshalHistogram(src) + if err != nil { + return nil, fmt.Errorf("can't unmarshal histogram: %s", err) + } + + dst.Aggs, src, err = unmarshalAggs(dst.Aggs, src) + if err != nil { + return nil, fmt.Errorf("can't unmarshal aggs: %s", err) + } + + dst.Total = be.Uint64(src) + src = src[8:] + + src, dst.Errors, err = unmarshalErrorSources(dst.Errors, src) + if err != nil { + return nil, fmt.Errorf("can't unmarshal error sources: %s", err) + } + + return src, nil +} + +type idsCodec byte + +const ( + idsCodecDelta = 1 + idsCodecDeltaZstd = 2 +) + +type idsBlockHeader struct { + Codec idsCodec + // Length of ids block in bytes. + Length uint32 +} + +func (h *idsBlockHeader) MarshalBinary(dst []byte) []byte { + dst = append(dst, byte(h.Codec)) + dst = be.AppendUint32(dst, h.Length) + return dst +} + +func (h *idsBlockHeader) UnmarshalBinary(src []byte) ([]byte, error) { + if len(src) < 2 { + return src, errors.New("too few bytes") + } + h.Codec = idsCodec(src[0]) + src = src[1:] + h.Length = be.Uint32(src) + src = src[4:] + return src, nil +} + +func marshalIDsBlocks(dst []byte, ids seq.IDSources) []byte { + b := idsBlockBufPool.Get() + defer idsBlockBufPool.Put(b) + const maxBlockIDsLen = 4 * 1024 + for i := 0; i < len(ids); i += maxBlockIDsLen { + j := i + maxBlockIDsLen + if j > len(ids) { + j = len(ids) + } + blockIDs := ids[i:j] + + var codec idsCodec + b.B, codec = marshalIDsBlock(b.B[:0], blockIDs) + if len(b.B) > math.MaxUint32 { + panic(fmt.Errorf("unexpected block length %d; want up to %d", len(b.B), math.MaxUint32)) + } + header := idsBlockHeader{ + Codec: codec, + Length: uint32(len(b.B)), + } + dst = header.MarshalBinary(dst) + dst = append(dst, b.B...) + } + return dst +} + +var idsBlockBufPool util.BufferPool + +func marshalIDsBlock(dst []byte, ids []seq.IDSource) ([]byte, idsCodec) { + b := idsBlockBufPool.Get() + defer idsBlockBufPool.Put(b) + prev := seq.MID(0) + for i := 0; i < len(ids); i++ { + id := &ids[i] + deltaMID := id.ID.MID - prev + prev = id.ID.MID + b.B = binary.AppendVarint(b.B, int64(deltaMID)) + b.B = be.AppendUint64(b.B, uint64(id.ID.RID)) + b.B = binary.AppendUvarint(b.B, id.Source) + b.B = binary.AppendUvarint(b.B, uint64(len(id.Hint))) + b.B = append(b.B, id.Hint...) + } + + level := getCompressLevel(len(b.B)) + orig := dst + dst = zstd.CompressLevel(b.B, dst, level) + compressRatio := float64(len(dst)-len(orig)) / float64(len(b.B)) + if compressRatio < 1.05 { + orig = append(orig, b.B...) + return orig, idsCodecDelta + } + return dst, idsCodecDeltaZstd +} + +func unmarshalIDsBlock(dst *seq.QPR, src []byte) (_ []byte, err error) { + if len(src) == 0 { + return src, fmt.Errorf("empty IDs block") + } + header := idsBlockHeader{} + src, err = header.UnmarshalBinary(src) + if err != nil { + return nil, fmt.Errorf("can't unmarshal ids header: %s", err) + } + + if header.Length == 0 || len(src) < int(header.Length) { + return nil, fmt.Errorf("unexpected IDs block length; want: %d, got: %d", header.Length, len(src)) + } + block := src[:header.Length] + src = src[header.Length:] + switch header.Codec { + case idsCodecDeltaZstd: + b := idsBlockBufPool.Get() + defer idsBlockBufPool.Put(b) + b.B, err = zstd.Decompress(block, b.B) + if err != nil { + return src, fmt.Errorf("can't decompress ids block: %s", err) + } + dst.IDs, err = unmarshalIDsDelta(dst.IDs, b.B) + if err != nil { + return src, err + } + return src, nil + case idsCodecDelta: + dst.IDs, err = unmarshalIDsDelta(dst.IDs, block) + if err != nil { + return src, err + } + return src, nil + default: + return src, fmt.Errorf("unknown ids codec: %d", header.Codec) + } +} + +func unmarshalIDsDelta(dst seq.IDSources, block []byte) (seq.IDSources, error) { + prevMID := int64(0) + for len(block) > 0 { + v, n := binary.Varint(block) + block = block[n:] + mid := prevMID + v + prevMID = mid + + rid := seq.RID(be.Uint64(block)) + block = block[8:] + + source, n := binary.Uvarint(block) + block = block[n:] + + hintSize, n := binary.Uvarint(block) + block = block[n:] + hint := string(block[:hintSize]) + block = block[hintSize:] + + dst = append(dst, seq.IDSource{ + ID: seq.ID{ + MID: seq.MID(mid), + RID: rid, + }, + Source: source, + Hint: hint, + }) + } + if len(block) > 0 { + return dst, fmt.Errorf("unexpected tail when unmarshaling IDs delta") + } + return dst, nil +} + +func marshalHistogram(dst []byte, histogram map[seq.MID]uint64) []byte { + dst = binary.AppendUvarint(dst, uint64(len(histogram))) + prev := seq.MID(0) + for mid, hist := range histogram { + delta := int64(mid) - int64(prev) + prev = mid + dst = binary.AppendVarint(dst, delta) + dst = binary.AppendUvarint(dst, hist) + } + return dst +} + +func unmarshalHistogram(src []byte) (map[seq.MID]uint64, []byte, error) { + length, n := binary.Uvarint(src) + src = src[n:] + if n <= 0 { + return nil, nil, fmt.Errorf("malformed length") + } + dst := make(map[seq.MID]uint64, length) + + prev := int64(0) + for i := 0; i < int(length); i++ { + delta, n := binary.Varint(src) + src = src[n:] + if n <= 0 { + return dst, src, fmt.Errorf("malformed delta mid: %d", n) + } + mid := delta + prev + prev = mid + + cnt, n := binary.Uvarint(src) + src = src[n:] + if n <= 0 { + return dst, src, fmt.Errorf("malformed histogram MID: %d", n) + } + + dst[seq.MID(mid)] = cnt + } + return dst, src, nil +} + +type aggsCodec byte + +const ( + aggsCodecNone aggsCodec = 1 + aggsCodecZstd aggsCodec = 2 +) + +type aggsBlockHeader struct { + Codec aggsCodec + // Length if block in bytes. + Length uint64 +} + +func (h *aggsBlockHeader) Marshal(dst []byte) []byte { + dst = append(dst, byte(h.Codec)) + dst = be.AppendUint64(dst, h.Length) + return dst +} + +func (h *aggsBlockHeader) Unmarshal(src []byte) ([]byte, error) { + if len(src) < 9 { + return nil, fmt.Errorf("malformed aggs header") + } + h.Codec = aggsCodec(src[0]) + src = src[1:] + h.Length = be.Uint64(src) + src = src[8:] + return src, nil +} + +var aggsCompressBufferPool util.BufferPool + +func marshalAggs(dst []byte, aggs []seq.AggregatableSamples) []byte { + if len(aggs) == 0 { + header := aggsBlockHeader{ + Codec: aggsCodecNone, + Length: 0, + } + dst = header.Marshal(dst) + return dst + } + + headerPos := len(dst) + header := aggsBlockHeader{} + dst = header.Marshal(dst) + + bb := aggsCompressBufferPool.Get() + defer aggsCompressBufferPool.Put(bb) + for _, agg := range aggs { + bb.B = marshalAggregatableSamples(agg, bb.B) + } + + level := getCompressLevel(len(bb.B)) + n := len(dst) + dst = zstd.CompressLevel(bb.B, dst, level) + length := len(dst) - n + + header = aggsBlockHeader{ + Codec: aggsCodecZstd, + Length: uint64(length), + } + _ = header.Marshal(dst[:headerPos]) + + return dst +} + +func unmarshalAggs(dst []seq.AggregatableSamples, src []byte) (_ []seq.AggregatableSamples, _ []byte, err error) { + var header aggsBlockHeader + src, err = header.Unmarshal(src) + if err != nil { + return nil, nil, err + } + + var block []byte + switch header.Codec { + case aggsCodecNone: + block = src[:header.Length] + case aggsCodecZstd: + bb := aggsCompressBufferPool.Get() + defer aggsCompressBufferPool.Put(bb) + compressedBlock := src[:header.Length] + bb.B, err = zstd.Decompress(compressedBlock, bb.B) + if err != nil { + return nil, nil, err + } + block = bb.B + default: + panic(fmt.Errorf("unknown aggregation codec: %d", header.Codec)) + } + src = src[header.Length:] + + for i := 0; len(block) > 0; i++ { + agg := seq.AggregatableSamples{} + block, err = unmarshalAggregatableSamples(&agg, block) + if err != nil { + return nil, nil, fmt.Errorf("invalid QPRHistogram at pos %d: %v", i, err) + } + dst = append(dst, agg) + } + return dst, src, nil +} + +func marshalAggregatableSamples(s seq.AggregatableSamples, dst []byte) []byte { + dst = be.AppendUint64(dst, uint64(len(s.SamplesByBin))) + prevMID := seq.MID(0) + for sample, hist := range s.SamplesByBin { + delta := int64(sample.MID) - int64(prevMID) + prevMID = sample.MID + dst = binary.AppendVarint(dst, delta) + dst = binary.AppendUvarint(dst, uint64(len(sample.Token))) + dst = append(dst, []byte(sample.Token)...) + dst = marshalSamplesContainer(hist, dst) + } + dst = be.AppendUint64(dst, uint64(s.NotExists)) + return dst +} + +func unmarshalAggregatableSamples(q *seq.AggregatableSamples, src []byte) ([]byte, error) { + if len(src) < 16 { + return nil, fmt.Errorf("src too short to unmarshal QPRHistogram, want at least 16 bytes, got %d", len(src)) + } + + aggs := be.Uint64(src) + src = src[8:] + q.SamplesByBin = make(map[seq.AggBin]*seq.SamplesContainer, aggs) + samples := make([]seq.SamplesContainer, aggs) + prev := int64(0) + for i := 0; i < int(aggs); i++ { + delta, n := binary.Varint(src) + src = src[n:] + if n <= 0 { + return nil, fmt.Errorf("malformed delta mid: %d", n) + } + mid := delta + prev + prev = mid + + v, n := binary.Uvarint(src) + if n <= 0 { + return nil, fmt.Errorf("invalid token size") + } + src = src[n:] + + token := string(src[:v]) + src = src[v:] + + sample := &samples[i] + tail, err := unmarshalSamplesContainer(sample, src) + if err != nil { + return nil, err + } + src = tail + + ab := seq.AggBin{ + MID: seq.MID(mid), + Token: token, + } + q.SamplesByBin[ab] = sample + } + + q.NotExists = int64(be.Uint64(src)) + src = src[8:] + + return src, nil +} + +func marshalSamplesContainer(h *seq.SamplesContainer, dst []byte) []byte { + dst = be.AppendUint64(dst, math.Float64bits(h.Min)) + dst = be.AppendUint64(dst, math.Float64bits(h.Max)) + dst = be.AppendUint64(dst, math.Float64bits(h.Sum)) + dst = binary.AppendUvarint(dst, uint64(h.Total)) + dst = binary.AppendUvarint(dst, uint64(h.NotExists)) + + dst = binary.AppendUvarint(dst, uint64(len(h.Samples))) + for _, v := range h.Samples { + dst = be.AppendUint64(dst, math.Float64bits(v)) + } + return dst +} + +func unmarshalSamplesContainer(s *seq.SamplesContainer, src []byte) ([]byte, error) { + if len(src) < 27 { + return src, fmt.Errorf("histogram size too low") + } + s.Min = math.Float64frombits(be.Uint64(src)) + src = src[8:] + s.Max = math.Float64frombits(be.Uint64(src)) + src = src[8:] + s.Sum = math.Float64frombits(be.Uint64(src)) + src = src[8:] + + v, n := binary.Uvarint(src) + src = src[n:] + if n <= 0 { + return src, fmt.Errorf("malformed total: %d", n) + } + s.Total = int64(v) + + v, n = binary.Uvarint(src) + src = src[n:] + if n <= 0 { + return src, fmt.Errorf("malformed not_exists: %d", n) + } + s.NotExists = int64(v) + + samples, n := binary.Uvarint(src) + if n <= 0 { + return src, fmt.Errorf("malformed samples length: %d", n) + } + src = src[n:] + s.Samples = slices.Grow(s.Samples[:0], int(samples)) + for i := 0; i < int(samples); i++ { + v := math.Float64frombits(be.Uint64(src)) + s.Samples = append(s.Samples, v) + src = src[8:] + } + return src, nil +} + +func marshalErrorSource(dst []byte, errSrcs []seq.ErrorSource) []byte { + dst = be.AppendUint32(dst, uint32(len(errSrcs))) + for _, e := range errSrcs { + dst = binary.AppendUvarint(dst, uint64(len(e.ErrStr))) + dst = append(dst, e.ErrStr...) + dst = binary.AppendUvarint(dst, e.Source) + } + return dst +} + +func unmarshalErrorSources(dst []seq.ErrorSource, src []byte) ([]byte, []seq.ErrorSource, error) { + n := be.Uint32(src) + src = src[4:] + if len(src) < int(n) { + return nil, nil, fmt.Errorf("src too short to unmarshal ErrorSource") + } + for i := 0; i < int(n); i++ { + length, n := binary.Uvarint(src) + if n <= 0 { + return nil, nil, fmt.Errorf("malformed length of error") + } + src = src[n:] + errStr := string(src[:length]) + src = src[length:] + + source, n := binary.Uvarint(src) + if n <= 0 { + return nil, nil, fmt.Errorf("malformed source") + } + src = src[n:] + + dst = append(dst, seq.ErrorSource{ + ErrStr: errStr, + Source: source, + }) + } + return src, dst, nil +} + +func getCompressLevel(size int) int { + level := 3 + if size <= 512 { + level = 1 + } else if size <= 4*1024 { + level = 2 + } + return level +} diff --git a/fracmanager/encoding_test.go b/fracmanager/encoding_test.go new file mode 100644 index 00000000..a0bf2ef4 --- /dev/null +++ b/fracmanager/encoding_test.go @@ -0,0 +1,147 @@ +package fracmanager + +import ( + "math" + "math/rand/v2" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/ozontech/seq-db/seq" +) + +func TestQPRMarshalUnmarshal(t *testing.T) { + test := func(qpr seq.QPR) { + t.Helper() + + rawQPR := marshalQPR(&qpr, nil) + var out seq.QPR + tail, err := unmarshalQPR(&out, rawQPR, math.MaxInt) + require.NoError(t, err) + require.Equal(t, 0, len(tail)) + require.EqualExportedValues(t, qpr, out) + } + + test(seq.QPR{Histogram: map[seq.MID]uint64{}}) + test(seq.QPR{ + Histogram: map[seq.MID]uint64{}, + Errors: []seq.ErrorSource{{ErrStr: "error", Source: 1}}, + }) + test(seq.QPR{ + IDs: seq.IDSources{ + { + ID: seq.ID{MID: 42, RID: 13}, + }, + }, + Histogram: map[seq.MID]uint64{42: 1}, + Total: 1, + }) + + test(seq.QPR{ + Histogram: map[seq.MID]uint64{}, + Aggs: []seq.AggregatableSamples{ + { + SamplesByBin: map[seq.AggBin]*seq.SamplesContainer{ + {Token: "_not_exists"}: { + Total: 1, + }, + {Token: "seq-db proxy"}: { + Min: 0, + Max: 100, + Sum: 100, + Total: 1, + NotExists: 0, + Samples: []float64{100}, + }, + {Token: "seq-db store", MID: seq.MID(1)}: { + Min: 3, + Max: 5, + Sum: 794, + Total: 1, + NotExists: 7, + Samples: []float64{324}, + }, + {Token: "seq-db store", MID: seq.MID(2)}: { + Min: 2, + Max: 6, + Sum: 544, + Total: 2, + NotExists: 3, + Samples: []float64{324}, + }, + }, + NotExists: 5412, + }, + }, + }) + + test(seq.QPR{ + Histogram: map[seq.MID]uint64{}, + IDs: seq.IDSources{ + seq.IDSource{ID: seq.ID{MID: 42, RID: 13}}, + }, + Total: 545454, + Errors: []seq.ErrorSource{{ErrStr: "context canceled", Source: 8956}}, + }) + + for i := 0; i < 100; i++ { + r := rand.N(8) + qpr := getRandomQPR(r * 1024) + test(qpr) + } +} + +func getRandomQPR(size int) seq.QPR { + curTime := time.Now() + getTime := func() time.Time { + curTime = curTime.Add(500 * time.Microsecond) + return curTime + } + + var ids seq.IDSources + for i := 0; i < size; i++ { + mid := getTime() + rid := rand.N[uint64](math.MaxUint64) + src := rand.N[uint64](math.MaxUint64) + ids = append(ids, seq.IDSource{ID: seq.NewID(mid, rid), Source: src}) + } + + var aggs []seq.AggregatableSamples + for i := 0; i < size; i++ { + hist := aggSamplesFromMap(map[string]uint64{"_not_exists": 1}) + aggs = append(aggs, hist) + } + + hists := make(map[seq.MID]uint64) + for i := 0; i < size; i++ { + hists[seq.NewID(getTime(), uint64(i%10)).MID]++ + } + + var errs []seq.ErrorSource + for i := 0; i < rand.N(100); i++ { + src := rand.N[uint64](math.MaxUint64) + errs = append(errs, seq.ErrorSource{ErrStr: "error", Source: src}) + } + + return seq.QPR{ + IDs: ids, + Histogram: hists, + Aggs: aggs, + Total: uint64(size), + Errors: errs, + } +} + +func aggSamplesFromMap(other map[string]uint64) seq.AggregatableSamples { + samplesByBin := make(map[seq.AggBin]*seq.SamplesContainer, len(other)) + for k, cnt := range other { + hist := seq.NewSamplesContainers() + hist.Total = int64(cnt) + samplesByBin[seq.AggBin{Token: k}] = hist + } + return seq.AggregatableSamples{ + SamplesByBin: samplesByBin, + NotExists: int64(other["_not_exists"]), + } +} diff --git a/pkg/seqproxyapi/v1/mappings.go b/pkg/seqproxyapi/v1/mappings.go index bfc12a5f..cdf2acb0 100644 --- a/pkg/seqproxyapi/v1/mappings.go +++ b/pkg/seqproxyapi/v1/mappings.go @@ -3,6 +3,7 @@ package seqproxyapi import ( "fmt" + "github.com/ozontech/seq-db/fracmanager" "github.com/ozontech/seq-db/seq" ) @@ -66,3 +67,63 @@ func (o Order) MustDocsOrder() seq.DocsOrder { } return order } + +var statusMappings = []AsyncSearchStatus{ + fracmanager.AsyncSearchStatusDone: AsyncSearchStatus_AsyncSearchStatusDone, + fracmanager.AsyncSearchStatusInProgress: AsyncSearchStatus_AsyncSearchStatusInProgress, + fracmanager.AsyncSearchStatusError: AsyncSearchStatus_AsyncSearchStatusError, + fracmanager.AsyncSearchStatusCanceled: AsyncSearchStatus_AsyncSearchStatusCanceled, +} + +var statusMappingsPb = func() []fracmanager.AsyncSearchStatus { + mappings := make([]fracmanager.AsyncSearchStatus, len(statusMappings)) + for from, to := range statusMappings { + mappings[to] = fracmanager.AsyncSearchStatus(from) + } + return mappings +}() + +func (s AsyncSearchStatus) ToAsyncSearchStatus() (fracmanager.AsyncSearchStatus, error) { + if int(s) >= len(statusMappingsPb) { + return 0, fmt.Errorf("unknown status") + } + return statusMappingsPb[s], nil +} + +func (s AsyncSearchStatus) MustAsyncSearchStatus() fracmanager.AsyncSearchStatus { + v, err := s.ToAsyncSearchStatus() + if err != nil { + panic(err) + } + return v +} + +func ToProtoAsyncSearchStatus(s fracmanager.AsyncSearchStatus) (AsyncSearchStatus, error) { + if int(s) >= len(statusMappings) { + return 0, fmt.Errorf("unknown status") + } + return statusMappings[s], nil +} + +func MustProtoAsyncSearchStatus(s fracmanager.AsyncSearchStatus) AsyncSearchStatus { + v, err := ToProtoAsyncSearchStatus(s) + if err != nil { + panic(err) + } + return v +} + +var asyncSearchStatusFromString = map[string]AsyncSearchStatus{ + "AsyncSearchStatusDone": AsyncSearchStatus_AsyncSearchStatusDone, + "AsyncSearchStatusInProgress": AsyncSearchStatus_AsyncSearchStatusInProgress, + "AsyncSearchStatusError": AsyncSearchStatus_AsyncSearchStatusError, + "AsyncSearchStatusCanceled": AsyncSearchStatus_AsyncSearchStatusCanceled, +} + +func AsyncSearchStatusFromString(s string) (AsyncSearchStatus, error) { + if res, ok := asyncSearchStatusFromString[s]; ok { + return res, nil + } + + return 0, fmt.Errorf("unknown status") +} diff --git a/pkg/seqproxyapi/v1/marshaler.go b/pkg/seqproxyapi/v1/marshaler.go index 069aad5f..ebb34c9c 100644 --- a/pkg/seqproxyapi/v1/marshaler.go +++ b/pkg/seqproxyapi/v1/marshaler.go @@ -219,3 +219,42 @@ func (e *Error) MarshalJSON() ([]byte, error) { func (e *Error) UnmarshalJSON(data []byte) error { return pbUnmarshaler.Unmarshal(data, e) } + +func (r *StartAsyncSearchRequest) MarshalJSON() ([]byte, error) { + return pbMarshaller.Marshal(r) +} + +// TestFetchAsyncSearchResultResponse is FetchAsyncSearchResultResponse wrapper that is used to omit methods like MarshalJSON. +// Need this marshaler to not conflict with Document's custom marshaler +type TestFetchAsyncSearchResultResponse FetchAsyncSearchResultResponse + +type formattedFetchAsyncSearchResultResponse struct { + Status json.RawMessage `json:"status"` + *TestFetchAsyncSearchResultResponse + DiskUsage json.RawMessage `json:"disk_usage"` + StartedAt json.RawMessage `json:"started_at"` + ExpiresAt json.RawMessage `json:"expires_at"` + CanceledAt *json.RawMessage `json:"canceled_at,omitempty"` +} + +// MarshalJSON overrides timestamp fields and other fields with custom formatting for FetchAsyncSearchResultResponse. +func (r *FetchAsyncSearchResultResponse) MarshalJSON() ([]byte, error) { + fetchResponse := &formattedFetchAsyncSearchResultResponse{ + Status: json.RawMessage(strconv.Quote(r.Status.String())), + TestFetchAsyncSearchResultResponse: (*TestFetchAsyncSearchResultResponse)(r), + DiskUsage: json.RawMessage(strconv.Quote(strconv.FormatUint(r.DiskUsage, 10))), + StartedAt: marshalTime(r.StartedAt), + ExpiresAt: marshalTime(r.ExpiresAt), + } + + if r.CanceledAt != nil { + marshaledTime := marshalTime(r.CanceledAt) + fetchResponse.CanceledAt = &marshaledTime + } + + return json.Marshal(fetchResponse) +} + +func (i *AsyncSearchesListItem) MarshalJSON() ([]byte, error) { + return pbMarshaller.Marshal(i) +} diff --git a/pkg/seqproxyapi/v1/marshaler_test.go b/pkg/seqproxyapi/v1/marshaler_test.go index 239c5cab..41136510 100644 --- a/pkg/seqproxyapi/v1/marshaler_test.go +++ b/pkg/seqproxyapi/v1/marshaler_test.go @@ -99,3 +99,48 @@ func TestExplainEntryMarshalJSON(t *testing.T) { test(&ExplainEntry{Duration: durationpb.New(1*time.Second + 12*time.Millisecond)}, `{"duration":"1.012s"}`) test(&ExplainEntry{Duration: durationpb.New(2*time.Minute + 28*time.Second + 12*time.Millisecond)}, `{"duration":"2m28.012s"}`) } + +func TestFetchAsyncSearchResultResponseMarshalJSON(t *testing.T) { + r := require.New(t) + + test := func(resp *FetchAsyncSearchResultResponse, expected string) { + t.Helper() + + raw, err := json.Marshal(resp) + r.NoError(err) + r.Equal(expected, string(raw)) + } + + test( + &FetchAsyncSearchResultResponse{ + Status: AsyncSearchStatus_AsyncSearchStatusCanceled, + Request: &StartAsyncSearchRequest{ + Retention: durationpb.New(time.Duration(3600 * time.Second)), + Query: &SearchQuery{ + Query: "message:some_message", + From: timestamppb.New(time.Date(2025, 7, 1, 5, 20, 0, 0, time.UTC)), + To: timestamppb.New(time.Date(2025, 8, 1, 5, 20, 0, 0, time.UTC)), + }, + Aggs: []*AggQuery{}, + Hist: nil, + WithDocs: true, + }, + Response: &ComplexSearchResponse{ + Docs: []*Document{ + { + Id: "46e48be997010000-e70163d0fa7582e4", + Data: []byte(`{"message":"some_message","level":3}`), + Time: timestamppb.New(time.Date(2025, 7, 8, 10, 19, 8, 742000000, time.UTC)), + }, + }, + Hist: &Histogram{}, + }, + StartedAt: timestamppb.New(time.Date(2025, 7, 25, 12, 25, 57, 672000000, time.UTC)), + ExpiresAt: timestamppb.New(time.Date(2025, 7, 25, 13, 25, 57, 672000000, time.UTC)), + CanceledAt: timestamppb.New(time.Date(2025, 7, 25, 12, 34, 26, 577000000, time.UTC)), + Progress: 1, + DiskUsage: 488, + }, + `{"status":"AsyncSearchStatusCanceled","request":{"retention":"3600s","query":{"query":"message:some_message","from":"2025-07-01T05:20:00Z","to":"2025-08-01T05:20:00Z","explain":false},"aggs":[],"withDocs":true},"response":{"docs":[{"id":"46e48be997010000-e70163d0fa7582e4","data":{"message":"some_message","level":3},"time":"2025-07-08T10:19:08.742Z"}],"hist":{}},"progress":1,"disk_usage":"488","started_at":"2025-07-25T12:25:57.672Z","expires_at":"2025-07-25T13:25:57.672Z","canceled_at":"2025-07-25T12:34:26.577Z"}`, + ) +} diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go index 1bced96a..e07ff4d6 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.5 -// protoc v5.28.0 +// protoc v5.29.3 // source: seqproxyapi/v1/seq_proxy_api.proto package seqproxyapi @@ -186,6 +186,64 @@ func (Order) EnumDescriptor() ([]byte, []int) { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{2} } +type AsyncSearchStatus int32 + +const ( + // The asynchronous search is still in progress. + // See the 'progress' field for completion percentage. + AsyncSearchStatus_AsyncSearchStatusInProgress AsyncSearchStatus = 0 + // The asynchronous search completed successfully. + AsyncSearchStatus_AsyncSearchStatusDone AsyncSearchStatus = 1 + // The asynchronous search was canceled, possibly via the CancelAsyncSearch handler. + AsyncSearchStatus_AsyncSearchStatusCanceled AsyncSearchStatus = 2 + // The asynchronous search encountered errors in some shards. + // See ComplexSearchResponse.Error for details. + AsyncSearchStatus_AsyncSearchStatusError AsyncSearchStatus = 3 +) + +// Enum value maps for AsyncSearchStatus. +var ( + AsyncSearchStatus_name = map[int32]string{ + 0: "AsyncSearchStatusInProgress", + 1: "AsyncSearchStatusDone", + 2: "AsyncSearchStatusCanceled", + 3: "AsyncSearchStatusError", + } + AsyncSearchStatus_value = map[string]int32{ + "AsyncSearchStatusInProgress": 0, + "AsyncSearchStatusDone": 1, + "AsyncSearchStatusCanceled": 2, + "AsyncSearchStatusError": 3, + } +) + +func (x AsyncSearchStatus) Enum() *AsyncSearchStatus { + p := new(AsyncSearchStatus) + *p = x + return p +} + +func (x AsyncSearchStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AsyncSearchStatus) Descriptor() protoreflect.EnumDescriptor { + return file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[3].Descriptor() +} + +func (AsyncSearchStatus) Type() protoreflect.EnumType { + return &file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes[3] +} + +func (x AsyncSearchStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AsyncSearchStatus.Descriptor instead. +func (AsyncSearchStatus) EnumDescriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{3} +} + // Additional details provided if an error during request handling occurred. type Error struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -983,12 +1041,19 @@ func (x *ComplexSearchResponse) GetExplain() *ExplainEntry { } type StartAsyncSearchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Retention *durationpb.Duration `protobuf:"bytes,1,opt,name=retention,proto3" json:"retention,omitempty"` - Query *SearchQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` // Search query. - Aggs []*AggQuery `protobuf:"bytes,3,rep,name=aggs,proto3" json:"aggs,omitempty"` // List of aggregation queries. - Hist *HistQuery `protobuf:"bytes,4,opt,name=hist,proto3,oneof" json:"hist,omitempty"` // Histogram query. - Order Order `protobuf:"varint,5,opt,name=order,proto3,enum=seqproxyapi.v1.Order" json:"order,omitempty"` // Document order ORDER_DESC/ORDER_ASC. + state protoimpl.MessageState `protogen:"open.v1"` + // Duration to retain the result of an asynchronous query. + // After this period, the result will be deleted. + Retention *durationpb.Duration `protobuf:"bytes,1,opt,name=retention,proto3" json:"retention,omitempty"` + // Search query to execute. + Query *SearchQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + // List of aggregation queries. + Aggs []*AggQuery `protobuf:"bytes,3,rep,name=aggs,proto3" json:"aggs,omitempty"` + // Optional histogram query. + Hist *HistQuery `protobuf:"bytes,4,opt,name=hist,proto3,oneof" json:"hist,omitempty"` + // Set this to true to enable document retrieval via FetchAsyncSearch. + // Note: enabling this may significantly increase disk space usage. + WithDocs bool `protobuf:"varint,5,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1051,16 +1116,17 @@ func (x *StartAsyncSearchRequest) GetHist() *HistQuery { return nil } -func (x *StartAsyncSearchRequest) GetOrder() Order { +func (x *StartAsyncSearchRequest) GetWithDocs() bool { if x != nil { - return x.Order + return x.WithDocs } - return Order_ORDER_DESC + return false } type StartAsyncSearchResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + // Unique ID used to retrieve search results with FetchAsyncSearchResult. + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1103,11 +1169,16 @@ func (x *StartAsyncSearchResponse) GetSearchId() string { } type FetchAsyncSearchResultRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` - WithDocs bool `protobuf:"varint,2,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` - Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` - Offset int32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + // Maximum number of documents to fetch (pagination). + // Ignored if with_docs was set to false, since documents are not stored in that case. + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + // Document offset (pagination). + // Ignored if with_docs was set to false, since documents are not stored in that case. + Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + // Documents sort order. + Order Order `protobuf:"varint,4,opt,name=order,proto3,enum=seqproxyapi.v1.Order" json:"order,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1149,13 +1220,6 @@ func (x *FetchAsyncSearchResultRequest) GetSearchId() string { return "" } -func (x *FetchAsyncSearchResultRequest) GetWithDocs() bool { - if x != nil { - return x.WithDocs - } - return false -} - func (x *FetchAsyncSearchResultRequest) GetSize() int32 { if x != nil { return x.Size @@ -1170,11 +1234,25 @@ func (x *FetchAsyncSearchResultRequest) GetOffset() int32 { return 0 } +func (x *FetchAsyncSearchResultRequest) GetOrder() Order { + if x != nil { + return x.Order + } + return Order_ORDER_DESC +} + type FetchAsyncSearchResultResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Done bool `protobuf:"varint,1,opt,name=done,proto3" json:"done,omitempty"` - Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` - Response *ComplexSearchResponse `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Status AsyncSearchStatus `protobuf:"varint,1,opt,name=status,proto3,enum=seqproxyapi.v1.AsyncSearchStatus" json:"status,omitempty"` + Request *StartAsyncSearchRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` + Response *ComplexSearchResponse `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + CanceledAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=canceled_at,json=canceledAt,proto3,oneof" json:"canceled_at,omitempty"` + // Search progress in range [0, 1]. + Progress float64 `protobuf:"fixed64,7,opt,name=progress,proto3" json:"progress,omitempty"` + // The size of data stored on disk, in bytes. + DiskUsage uint64 `protobuf:"varint,8,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1209,16 +1287,16 @@ func (*FetchAsyncSearchResultResponse) Descriptor() ([]byte, []int) { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{15} } -func (x *FetchAsyncSearchResultResponse) GetDone() bool { +func (x *FetchAsyncSearchResultResponse) GetStatus() AsyncSearchStatus { if x != nil { - return x.Done + return x.Status } - return false + return AsyncSearchStatus_AsyncSearchStatusInProgress } -func (x *FetchAsyncSearchResultResponse) GetExpiration() *timestamppb.Timestamp { +func (x *FetchAsyncSearchResultResponse) GetRequest() *StartAsyncSearchRequest { if x != nil { - return x.Expiration + return x.Request } return nil } @@ -1230,6 +1308,41 @@ func (x *FetchAsyncSearchResultResponse) GetResponse() *ComplexSearchResponse { return nil } +func (x *FetchAsyncSearchResultResponse) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetCanceledAt() *timestamppb.Timestamp { + if x != nil { + return x.CanceledAt + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetProgress() float64 { + if x != nil { + return x.Progress + } + return 0 +} + +func (x *FetchAsyncSearchResultResponse) GetDiskUsage() uint64 { + if x != nil { + return x.DiskUsage + } + return 0 +} + type CancelAsyncSearchRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` @@ -1310,6 +1423,303 @@ func (*CancelAsyncSearchResponse) Descriptor() ([]byte, []int) { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{17} } +type DeleteAsyncSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAsyncSearchRequest) Reset() { + *x = DeleteAsyncSearchRequest{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAsyncSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAsyncSearchRequest) ProtoMessage() {} + +func (x *DeleteAsyncSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_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 DeleteAsyncSearchRequest.ProtoReflect.Descriptor instead. +func (*DeleteAsyncSearchRequest) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{18} +} + +func (x *DeleteAsyncSearchRequest) GetSearchId() string { + if x != nil { + return x.SearchId + } + return "" +} + +type DeleteAsyncSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAsyncSearchResponse) Reset() { + *x = DeleteAsyncSearchResponse{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAsyncSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAsyncSearchResponse) ProtoMessage() {} + +func (x *DeleteAsyncSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[19] + 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 DeleteAsyncSearchResponse.ProtoReflect.Descriptor instead. +func (*DeleteAsyncSearchResponse) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{19} +} + +type GetAsyncSearchesListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *AsyncSearchStatus `protobuf:"varint,1,opt,name=status,proto3,enum=seqproxyapi.v1.AsyncSearchStatus,oneof" json:"status,omitempty"` + // Maximum number of searches to fetch (pagination). + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + // Searches offset (pagination). + Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + // list of async search ids to filter out result + Ids []string `protobuf:"bytes,4,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAsyncSearchesListRequest) Reset() { + *x = GetAsyncSearchesListRequest{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAsyncSearchesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAsyncSearchesListRequest) ProtoMessage() {} + +func (x *GetAsyncSearchesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[20] + 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 GetAsyncSearchesListRequest.ProtoReflect.Descriptor instead. +func (*GetAsyncSearchesListRequest) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{20} +} + +func (x *GetAsyncSearchesListRequest) GetStatus() AsyncSearchStatus { + if x != nil && x.Status != nil { + return *x.Status + } + return AsyncSearchStatus_AsyncSearchStatusInProgress +} + +func (x *GetAsyncSearchesListRequest) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *GetAsyncSearchesListRequest) GetOffset() int32 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *GetAsyncSearchesListRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type GetAsyncSearchesListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Searches []*AsyncSearchesListItem `protobuf:"bytes,1,rep,name=searches,proto3" json:"searches,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAsyncSearchesListResponse) Reset() { + *x = GetAsyncSearchesListResponse{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAsyncSearchesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAsyncSearchesListResponse) ProtoMessage() {} + +func (x *GetAsyncSearchesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[21] + 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 GetAsyncSearchesListResponse.ProtoReflect.Descriptor instead. +func (*GetAsyncSearchesListResponse) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{21} +} + +func (x *GetAsyncSearchesListResponse) GetSearches() []*AsyncSearchesListItem { + if x != nil { + return x.Searches + } + return nil +} + +type AsyncSearchesListItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + Status AsyncSearchStatus `protobuf:"varint,2,opt,name=status,proto3,enum=seqproxyapi.v1.AsyncSearchStatus" json:"status,omitempty"` + Request *StartAsyncSearchRequest `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + CanceledAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=canceled_at,json=canceledAt,proto3,oneof" json:"canceled_at,omitempty"` + // Search progress in range [0, 1]. + Progress float64 `protobuf:"fixed64,7,opt,name=progress,proto3" json:"progress,omitempty"` + // The size of data stored on disk, in bytes. + DiskUsage uint64 `protobuf:"varint,8,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AsyncSearchesListItem) Reset() { + *x = AsyncSearchesListItem{} + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AsyncSearchesListItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncSearchesListItem) ProtoMessage() {} + +func (x *AsyncSearchesListItem) ProtoReflect() protoreflect.Message { + mi := &file_seqproxyapi_v1_seq_proxy_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 AsyncSearchesListItem.ProtoReflect.Descriptor instead. +func (*AsyncSearchesListItem) Descriptor() ([]byte, []int) { + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{22} +} + +func (x *AsyncSearchesListItem) GetSearchId() string { + if x != nil { + return x.SearchId + } + return "" +} + +func (x *AsyncSearchesListItem) GetStatus() AsyncSearchStatus { + if x != nil { + return x.Status + } + return AsyncSearchStatus_AsyncSearchStatusInProgress +} + +func (x *AsyncSearchesListItem) GetRequest() *StartAsyncSearchRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *AsyncSearchesListItem) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetCanceledAt() *timestamppb.Timestamp { + if x != nil { + return x.CanceledAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetProgress() float64 { + if x != nil { + return x.Progress + } + return 0 +} + +func (x *AsyncSearchesListItem) GetDiskUsage() uint64 { + if x != nil { + return x.DiskUsage + } + return 0 +} + type GetAggregationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Query *SearchQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // Search query. @@ -1320,7 +1730,7 @@ type GetAggregationRequest struct { func (x *GetAggregationRequest) Reset() { *x = GetAggregationRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[18] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1332,7 +1742,7 @@ func (x *GetAggregationRequest) String() string { func (*GetAggregationRequest) ProtoMessage() {} func (x *GetAggregationRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[18] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1345,7 +1755,7 @@ func (x *GetAggregationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAggregationRequest.ProtoReflect.Descriptor instead. func (*GetAggregationRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{18} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{23} } func (x *GetAggregationRequest) GetQuery() *SearchQuery { @@ -1375,7 +1785,7 @@ type GetAggregationResponse struct { func (x *GetAggregationResponse) Reset() { *x = GetAggregationResponse{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[19] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1387,7 +1797,7 @@ func (x *GetAggregationResponse) String() string { func (*GetAggregationResponse) ProtoMessage() {} func (x *GetAggregationResponse) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[19] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1400,7 +1810,7 @@ func (x *GetAggregationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAggregationResponse.ProtoReflect.Descriptor instead. func (*GetAggregationResponse) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{19} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{24} } // Deprecated: Marked as deprecated in seqproxyapi/v1/seq_proxy_api.proto. @@ -1442,7 +1852,7 @@ type GetHistogramRequest struct { func (x *GetHistogramRequest) Reset() { *x = GetHistogramRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[20] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1454,7 +1864,7 @@ func (x *GetHistogramRequest) String() string { func (*GetHistogramRequest) ProtoMessage() {} func (x *GetHistogramRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[20] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1467,7 +1877,7 @@ func (x *GetHistogramRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetHistogramRequest.ProtoReflect.Descriptor instead. func (*GetHistogramRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{20} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{25} } func (x *GetHistogramRequest) GetQuery() *SearchQuery { @@ -1497,7 +1907,7 @@ type GetHistogramResponse struct { func (x *GetHistogramResponse) Reset() { *x = GetHistogramResponse{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[21] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1509,7 +1919,7 @@ func (x *GetHistogramResponse) String() string { func (*GetHistogramResponse) ProtoMessage() {} func (x *GetHistogramResponse) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[21] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1522,7 +1932,7 @@ func (x *GetHistogramResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetHistogramResponse.ProtoReflect.Descriptor instead. func (*GetHistogramResponse) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{21} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{26} } // Deprecated: Marked as deprecated in seqproxyapi/v1/seq_proxy_api.proto. @@ -1564,7 +1974,7 @@ type FetchRequest struct { func (x *FetchRequest) Reset() { *x = FetchRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[22] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1576,7 +1986,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[22] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1589,7 +1999,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{22} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{27} } func (x *FetchRequest) GetIds() []string { @@ -1614,7 +2024,7 @@ type MappingRequest struct { func (x *MappingRequest) Reset() { *x = MappingRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[23] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1626,7 +2036,7 @@ func (x *MappingRequest) String() string { func (*MappingRequest) ProtoMessage() {} func (x *MappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[23] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1639,7 +2049,7 @@ func (x *MappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MappingRequest.ProtoReflect.Descriptor instead. func (*MappingRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{23} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{28} } type MappingResponse struct { @@ -1651,7 +2061,7 @@ type MappingResponse struct { func (x *MappingResponse) Reset() { *x = MappingResponse{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[24] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1663,7 +2073,7 @@ func (x *MappingResponse) String() string { func (*MappingResponse) ProtoMessage() {} func (x *MappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[24] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1676,7 +2086,7 @@ func (x *MappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MappingResponse.ProtoReflect.Descriptor instead. func (*MappingResponse) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{24} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{29} } func (x *MappingResponse) GetData() []byte { @@ -1694,7 +2104,7 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[25] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1706,7 +2116,7 @@ func (x *StatusRequest) String() string { func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[25] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1719,7 +2129,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. func (*StatusRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{25} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{30} } type StatusResponse struct { @@ -1733,7 +2143,7 @@ type StatusResponse struct { func (x *StatusResponse) Reset() { *x = StatusResponse{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[26] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1745,7 +2155,7 @@ func (x *StatusResponse) String() string { func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[26] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1758,7 +2168,7 @@ func (x *StatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. func (*StatusResponse) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{26} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{31} } func (x *StatusResponse) GetNumberOfStores() int32 { @@ -1793,7 +2203,7 @@ type StoreStatus struct { func (x *StoreStatus) Reset() { *x = StoreStatus{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[27] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1805,7 +2215,7 @@ func (x *StoreStatus) String() string { func (*StoreStatus) ProtoMessage() {} func (x *StoreStatus) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[27] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1818,7 +2228,7 @@ func (x *StoreStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreStatus.ProtoReflect.Descriptor instead. func (*StoreStatus) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{27} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{32} } func (x *StoreStatus) GetHost() string { @@ -1851,7 +2261,7 @@ type StoreStatusValues struct { func (x *StoreStatusValues) Reset() { *x = StoreStatusValues{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[28] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1863,7 +2273,7 @@ func (x *StoreStatusValues) String() string { func (*StoreStatusValues) ProtoMessage() {} func (x *StoreStatusValues) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[28] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1876,7 +2286,7 @@ func (x *StoreStatusValues) ProtoReflect() protoreflect.Message { // Deprecated: Use StoreStatusValues.ProtoReflect.Descriptor instead. func (*StoreStatusValues) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{28} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{33} } func (x *StoreStatusValues) GetOldestTime() *timestamppb.Timestamp { @@ -1897,7 +2307,7 @@ type ExportRequest struct { func (x *ExportRequest) Reset() { *x = ExportRequest{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[29] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1909,7 +2319,7 @@ func (x *ExportRequest) String() string { func (*ExportRequest) ProtoMessage() {} func (x *ExportRequest) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[29] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1922,7 +2332,7 @@ func (x *ExportRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead. func (*ExportRequest) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{29} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{34} } func (x *ExportRequest) GetQuery() *SearchQuery { @@ -1955,7 +2365,7 @@ type ExportResponse struct { func (x *ExportResponse) Reset() { *x = ExportResponse{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[30] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1967,7 +2377,7 @@ func (x *ExportResponse) String() string { func (*ExportResponse) ProtoMessage() {} func (x *ExportResponse) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[30] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1980,7 +2390,7 @@ func (x *ExportResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportResponse.ProtoReflect.Descriptor instead. func (*ExportResponse) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{30} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{35} } func (x *ExportResponse) GetDoc() *Document { @@ -2004,7 +2414,7 @@ type Aggregation_Bucket struct { func (x *Aggregation_Bucket) Reset() { *x = Aggregation_Bucket{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2016,7 +2426,7 @@ func (x *Aggregation_Bucket) String() string { func (*Aggregation_Bucket) ProtoMessage() {} func (x *Aggregation_Bucket) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2078,7 +2488,7 @@ type Histogram_Bucket struct { func (x *Histogram_Bucket) Reset() { *x = Histogram_Bucket{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2090,7 +2500,7 @@ func (x *Histogram_Bucket) String() string { func (*Histogram_Bucket) ProtoMessage() {} func (x *Histogram_Bucket) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2135,7 +2545,7 @@ type FetchRequest_FieldsFilter struct { func (x *FetchRequest_FieldsFilter) Reset() { *x = FetchRequest_FieldsFilter{} - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[33] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2147,7 +2557,7 @@ func (x *FetchRequest_FieldsFilter) String() string { func (*FetchRequest_FieldsFilter) ProtoMessage() {} func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { - mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[33] + mi := &file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2160,7 +2570,7 @@ func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest_FieldsFilter.ProtoReflect.Descriptor instead. func (*FetchRequest_FieldsFilter) Descriptor() ([]byte, []int) { - return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{22, 0} + return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP(), []int{27, 0} } func (x *FetchRequest_FieldsFilter) GetFields() []string { @@ -2326,7 +2736,7 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x01, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x9d, 0x02, 0x0a, 0x17, + 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x8d, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, @@ -2341,236 +2751,332 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x73, 0x12, 0x32, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x04, 0x68, 0x69, - 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x18, 0x53, + 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x6f, + 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x44, 0x6f, + 0x63, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x49, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x1d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, + 0x63, 0x68, 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x1d, 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, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x63, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x44, 0x6f, 0x63, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, + 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, + 0x2b, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xe4, 0x03, 0x0a, 0x1e, 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, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, - 0x6f, 0x6e, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 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, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 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, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x37, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, - 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 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, 0x78, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, - 0x67, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, + 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 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, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, + 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, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x22, 0x37, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, + 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, 0x37, 0x0a, 0x18, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 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, + 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, + 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x61, 0x0a, 0x1c, 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, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x71, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x15, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x49, 0x64, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, + 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, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x22, 0x78, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x2c, 0x0a, 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x67, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, 0x22, 0xbb, 0x01, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2f, 0x0a, + 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, 0x12, 0x2b, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x77, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x04, + 0x68, 0x69, 0x73, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x04, 0x68, 0x69, 0x73, + 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xb7, + 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, 0x4e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x10, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x25, 0x0a, 0x0f, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, + 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, + 0x4f, 0x0a, 0x13, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x00, 0x52, 0x11, 0x6f, 0x6c, 0x64, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x61, - 0x67, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x77, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x69, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x04, 0x68, 0x69, 0x73, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x14, 0x47, 0x65, - 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x69, 0x73, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x52, 0x04, 0x68, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0xb7, 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, 0x4e, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x10, 0x0a, - 0x0e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x25, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x13, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x48, 0x00, 0x52, - 0x11, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6f, - 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, - 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x50, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 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, 0x6e, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x91, 0x01, + 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x50, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 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, 0x6e, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x22, 0x3c, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x64, 0x6f, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x64, 0x6f, + 0x63, 0x2a, 0x82, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x10, 0x01, 0x12, 0x1f, + 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x50, 0x41, 0x52, + 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12, + 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x4f, + 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, + 0x5f, 0x48, 0x49, 0x54, 0x10, 0x03, 0x2a, 0x91, 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, 0x2a, 0x26, 0x0a, 0x05, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x53, + 0x43, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x43, + 0x10, 0x01, 0x2a, 0x8a, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x50, + 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x6f, + 0x6e, 0x65, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, + 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, + 0x98, 0x0c, 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, + 0x5b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x3c, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x64, 0x6f, - 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, + 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0d, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x2e, + 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2d, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x76, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, + 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x70, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x23, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x12, 0x54, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x73, 0x65, 0x71, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x2a, 0x82, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, - 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, - 0x4f, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, - 0x53, 0x45, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, - 0x44, 0x45, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x48, 0x49, 0x54, 0x10, 0x03, 0x2a, 0x91, 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, 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, 0x32, 0xe8, 0x09, 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, 0x5b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x78, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, - 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x76, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x65, - 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x54, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x12, 0x1c, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0x5d, - 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x71, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x30, 0x01, 0x12, 0x7f, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x71, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, + 0x74, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x5d, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, + 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x30, 0x01, 0x12, 0x81, + 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, - 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x9a, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x2d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x73, 0x79, 0x6e, - 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8b, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x71, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, + 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, + 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x2e, + 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x73, + 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x94, + 0x01, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, - 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, - 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, - 0x64, 0x7d, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x6f, 0x7a, 0x6f, - 0x6e, 0x2e, 0x72, 0x75, 0x2f, 0x73, 0x72, 0x65, 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, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x22, 0x22, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x8d, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x28, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x2a, 0x1b, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, + 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x65, + 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 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 ( @@ -2585,123 +3091,144 @@ func file_seqproxyapi_v1_seq_proxy_api_proto_rawDescGZIP() []byte { return file_seqproxyapi_v1_seq_proxy_api_proto_rawDescData } -var file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_seqproxyapi_v1_seq_proxy_api_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes = make([]protoimpl.MessageInfo, 39) var file_seqproxyapi_v1_seq_proxy_api_proto_goTypes = []any{ (ErrorCode)(0), // 0: seqproxyapi.v1.ErrorCode (AggFunc)(0), // 1: seqproxyapi.v1.AggFunc (Order)(0), // 2: seqproxyapi.v1.Order - (*Error)(nil), // 3: seqproxyapi.v1.Error - (*Document)(nil), // 4: seqproxyapi.v1.Document - (*Aggregation)(nil), // 5: seqproxyapi.v1.Aggregation - (*Histogram)(nil), // 6: seqproxyapi.v1.Histogram - (*SearchQuery)(nil), // 7: seqproxyapi.v1.SearchQuery - (*AggQuery)(nil), // 8: seqproxyapi.v1.AggQuery - (*HistQuery)(nil), // 9: seqproxyapi.v1.HistQuery - (*ExplainEntry)(nil), // 10: seqproxyapi.v1.ExplainEntry - (*SearchRequest)(nil), // 11: seqproxyapi.v1.SearchRequest - (*ComplexSearchRequest)(nil), // 12: seqproxyapi.v1.ComplexSearchRequest - (*SearchResponse)(nil), // 13: seqproxyapi.v1.SearchResponse - (*ComplexSearchResponse)(nil), // 14: seqproxyapi.v1.ComplexSearchResponse - (*StartAsyncSearchRequest)(nil), // 15: seqproxyapi.v1.StartAsyncSearchRequest - (*StartAsyncSearchResponse)(nil), // 16: seqproxyapi.v1.StartAsyncSearchResponse - (*FetchAsyncSearchResultRequest)(nil), // 17: seqproxyapi.v1.FetchAsyncSearchResultRequest - (*FetchAsyncSearchResultResponse)(nil), // 18: seqproxyapi.v1.FetchAsyncSearchResultResponse - (*CancelAsyncSearchRequest)(nil), // 19: seqproxyapi.v1.CancelAsyncSearchRequest - (*CancelAsyncSearchResponse)(nil), // 20: seqproxyapi.v1.CancelAsyncSearchResponse - (*GetAggregationRequest)(nil), // 21: seqproxyapi.v1.GetAggregationRequest - (*GetAggregationResponse)(nil), // 22: seqproxyapi.v1.GetAggregationResponse - (*GetHistogramRequest)(nil), // 23: seqproxyapi.v1.GetHistogramRequest - (*GetHistogramResponse)(nil), // 24: seqproxyapi.v1.GetHistogramResponse - (*FetchRequest)(nil), // 25: seqproxyapi.v1.FetchRequest - (*MappingRequest)(nil), // 26: seqproxyapi.v1.MappingRequest - (*MappingResponse)(nil), // 27: seqproxyapi.v1.MappingResponse - (*StatusRequest)(nil), // 28: seqproxyapi.v1.StatusRequest - (*StatusResponse)(nil), // 29: seqproxyapi.v1.StatusResponse - (*StoreStatus)(nil), // 30: seqproxyapi.v1.StoreStatus - (*StoreStatusValues)(nil), // 31: seqproxyapi.v1.StoreStatusValues - (*ExportRequest)(nil), // 32: seqproxyapi.v1.ExportRequest - (*ExportResponse)(nil), // 33: seqproxyapi.v1.ExportResponse - (*Aggregation_Bucket)(nil), // 34: seqproxyapi.v1.Aggregation.Bucket - (*Histogram_Bucket)(nil), // 35: seqproxyapi.v1.Histogram.Bucket - (*FetchRequest_FieldsFilter)(nil), // 36: seqproxyapi.v1.FetchRequest.FieldsFilter - (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 38: google.protobuf.Duration + (AsyncSearchStatus)(0), // 3: seqproxyapi.v1.AsyncSearchStatus + (*Error)(nil), // 4: seqproxyapi.v1.Error + (*Document)(nil), // 5: seqproxyapi.v1.Document + (*Aggregation)(nil), // 6: seqproxyapi.v1.Aggregation + (*Histogram)(nil), // 7: seqproxyapi.v1.Histogram + (*SearchQuery)(nil), // 8: seqproxyapi.v1.SearchQuery + (*AggQuery)(nil), // 9: seqproxyapi.v1.AggQuery + (*HistQuery)(nil), // 10: seqproxyapi.v1.HistQuery + (*ExplainEntry)(nil), // 11: seqproxyapi.v1.ExplainEntry + (*SearchRequest)(nil), // 12: seqproxyapi.v1.SearchRequest + (*ComplexSearchRequest)(nil), // 13: seqproxyapi.v1.ComplexSearchRequest + (*SearchResponse)(nil), // 14: seqproxyapi.v1.SearchResponse + (*ComplexSearchResponse)(nil), // 15: seqproxyapi.v1.ComplexSearchResponse + (*StartAsyncSearchRequest)(nil), // 16: seqproxyapi.v1.StartAsyncSearchRequest + (*StartAsyncSearchResponse)(nil), // 17: seqproxyapi.v1.StartAsyncSearchResponse + (*FetchAsyncSearchResultRequest)(nil), // 18: seqproxyapi.v1.FetchAsyncSearchResultRequest + (*FetchAsyncSearchResultResponse)(nil), // 19: seqproxyapi.v1.FetchAsyncSearchResultResponse + (*CancelAsyncSearchRequest)(nil), // 20: seqproxyapi.v1.CancelAsyncSearchRequest + (*CancelAsyncSearchResponse)(nil), // 21: seqproxyapi.v1.CancelAsyncSearchResponse + (*DeleteAsyncSearchRequest)(nil), // 22: seqproxyapi.v1.DeleteAsyncSearchRequest + (*DeleteAsyncSearchResponse)(nil), // 23: seqproxyapi.v1.DeleteAsyncSearchResponse + (*GetAsyncSearchesListRequest)(nil), // 24: seqproxyapi.v1.GetAsyncSearchesListRequest + (*GetAsyncSearchesListResponse)(nil), // 25: seqproxyapi.v1.GetAsyncSearchesListResponse + (*AsyncSearchesListItem)(nil), // 26: seqproxyapi.v1.AsyncSearchesListItem + (*GetAggregationRequest)(nil), // 27: seqproxyapi.v1.GetAggregationRequest + (*GetAggregationResponse)(nil), // 28: seqproxyapi.v1.GetAggregationResponse + (*GetHistogramRequest)(nil), // 29: seqproxyapi.v1.GetHistogramRequest + (*GetHistogramResponse)(nil), // 30: seqproxyapi.v1.GetHistogramResponse + (*FetchRequest)(nil), // 31: seqproxyapi.v1.FetchRequest + (*MappingRequest)(nil), // 32: seqproxyapi.v1.MappingRequest + (*MappingResponse)(nil), // 33: seqproxyapi.v1.MappingResponse + (*StatusRequest)(nil), // 34: seqproxyapi.v1.StatusRequest + (*StatusResponse)(nil), // 35: seqproxyapi.v1.StatusResponse + (*StoreStatus)(nil), // 36: seqproxyapi.v1.StoreStatus + (*StoreStatusValues)(nil), // 37: seqproxyapi.v1.StoreStatusValues + (*ExportRequest)(nil), // 38: seqproxyapi.v1.ExportRequest + (*ExportResponse)(nil), // 39: seqproxyapi.v1.ExportResponse + (*Aggregation_Bucket)(nil), // 40: seqproxyapi.v1.Aggregation.Bucket + (*Histogram_Bucket)(nil), // 41: seqproxyapi.v1.Histogram.Bucket + (*FetchRequest_FieldsFilter)(nil), // 42: seqproxyapi.v1.FetchRequest.FieldsFilter + (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 44: google.protobuf.Duration } var file_seqproxyapi_v1_seq_proxy_api_proto_depIdxs = []int32{ 0, // 0: seqproxyapi.v1.Error.code:type_name -> seqproxyapi.v1.ErrorCode - 37, // 1: seqproxyapi.v1.Document.time:type_name -> google.protobuf.Timestamp - 34, // 2: seqproxyapi.v1.Aggregation.buckets:type_name -> seqproxyapi.v1.Aggregation.Bucket - 35, // 3: seqproxyapi.v1.Histogram.buckets:type_name -> seqproxyapi.v1.Histogram.Bucket - 37, // 4: seqproxyapi.v1.SearchQuery.from:type_name -> google.protobuf.Timestamp - 37, // 5: seqproxyapi.v1.SearchQuery.to:type_name -> google.protobuf.Timestamp + 43, // 1: seqproxyapi.v1.Document.time:type_name -> google.protobuf.Timestamp + 40, // 2: seqproxyapi.v1.Aggregation.buckets:type_name -> seqproxyapi.v1.Aggregation.Bucket + 41, // 3: seqproxyapi.v1.Histogram.buckets:type_name -> seqproxyapi.v1.Histogram.Bucket + 43, // 4: seqproxyapi.v1.SearchQuery.from:type_name -> google.protobuf.Timestamp + 43, // 5: seqproxyapi.v1.SearchQuery.to:type_name -> google.protobuf.Timestamp 1, // 6: seqproxyapi.v1.AggQuery.func:type_name -> seqproxyapi.v1.AggFunc - 38, // 7: seqproxyapi.v1.ExplainEntry.duration:type_name -> google.protobuf.Duration - 10, // 8: seqproxyapi.v1.ExplainEntry.children:type_name -> seqproxyapi.v1.ExplainEntry - 7, // 9: seqproxyapi.v1.SearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 44, // 7: seqproxyapi.v1.ExplainEntry.duration:type_name -> google.protobuf.Duration + 11, // 8: seqproxyapi.v1.ExplainEntry.children:type_name -> seqproxyapi.v1.ExplainEntry + 8, // 9: seqproxyapi.v1.SearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery 2, // 10: seqproxyapi.v1.SearchRequest.order:type_name -> seqproxyapi.v1.Order - 7, // 11: seqproxyapi.v1.ComplexSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 8, // 12: seqproxyapi.v1.ComplexSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 9, // 13: seqproxyapi.v1.ComplexSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 8, // 11: seqproxyapi.v1.ComplexSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 9, // 12: seqproxyapi.v1.ComplexSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 10, // 13: seqproxyapi.v1.ComplexSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery 2, // 14: seqproxyapi.v1.ComplexSearchRequest.order:type_name -> seqproxyapi.v1.Order - 4, // 15: seqproxyapi.v1.SearchResponse.docs:type_name -> seqproxyapi.v1.Document - 3, // 16: seqproxyapi.v1.SearchResponse.error:type_name -> seqproxyapi.v1.Error - 4, // 17: seqproxyapi.v1.ComplexSearchResponse.docs:type_name -> seqproxyapi.v1.Document - 5, // 18: seqproxyapi.v1.ComplexSearchResponse.aggs:type_name -> seqproxyapi.v1.Aggregation - 6, // 19: seqproxyapi.v1.ComplexSearchResponse.hist:type_name -> seqproxyapi.v1.Histogram - 3, // 20: seqproxyapi.v1.ComplexSearchResponse.error:type_name -> seqproxyapi.v1.Error - 10, // 21: seqproxyapi.v1.ComplexSearchResponse.explain:type_name -> seqproxyapi.v1.ExplainEntry - 38, // 22: seqproxyapi.v1.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration - 7, // 23: seqproxyapi.v1.StartAsyncSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 8, // 24: seqproxyapi.v1.StartAsyncSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 9, // 25: seqproxyapi.v1.StartAsyncSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery - 2, // 26: seqproxyapi.v1.StartAsyncSearchRequest.order:type_name -> seqproxyapi.v1.Order - 37, // 27: seqproxyapi.v1.FetchAsyncSearchResultResponse.expiration:type_name -> google.protobuf.Timestamp - 14, // 28: seqproxyapi.v1.FetchAsyncSearchResultResponse.response:type_name -> seqproxyapi.v1.ComplexSearchResponse - 7, // 29: seqproxyapi.v1.GetAggregationRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 8, // 30: seqproxyapi.v1.GetAggregationRequest.aggs:type_name -> seqproxyapi.v1.AggQuery - 5, // 31: seqproxyapi.v1.GetAggregationResponse.aggs:type_name -> seqproxyapi.v1.Aggregation - 3, // 32: seqproxyapi.v1.GetAggregationResponse.error:type_name -> seqproxyapi.v1.Error - 7, // 33: seqproxyapi.v1.GetHistogramRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 9, // 34: seqproxyapi.v1.GetHistogramRequest.hist:type_name -> seqproxyapi.v1.HistQuery - 6, // 35: seqproxyapi.v1.GetHistogramResponse.hist:type_name -> seqproxyapi.v1.Histogram - 3, // 36: seqproxyapi.v1.GetHistogramResponse.error:type_name -> seqproxyapi.v1.Error - 36, // 37: seqproxyapi.v1.FetchRequest.fields_filter:type_name -> seqproxyapi.v1.FetchRequest.FieldsFilter - 37, // 38: seqproxyapi.v1.StatusResponse.oldest_storage_time:type_name -> google.protobuf.Timestamp - 30, // 39: seqproxyapi.v1.StatusResponse.stores:type_name -> seqproxyapi.v1.StoreStatus - 31, // 40: seqproxyapi.v1.StoreStatus.values:type_name -> seqproxyapi.v1.StoreStatusValues - 37, // 41: seqproxyapi.v1.StoreStatusValues.oldest_time:type_name -> google.protobuf.Timestamp - 7, // 42: seqproxyapi.v1.ExportRequest.query:type_name -> seqproxyapi.v1.SearchQuery - 4, // 43: seqproxyapi.v1.ExportResponse.doc:type_name -> seqproxyapi.v1.Document - 37, // 44: seqproxyapi.v1.Aggregation.Bucket.ts:type_name -> google.protobuf.Timestamp - 37, // 45: seqproxyapi.v1.Histogram.Bucket.ts:type_name -> google.protobuf.Timestamp - 11, // 46: seqproxyapi.v1.SeqProxyApi.Search:input_type -> seqproxyapi.v1.SearchRequest - 12, // 47: seqproxyapi.v1.SeqProxyApi.ComplexSearch:input_type -> seqproxyapi.v1.ComplexSearchRequest - 21, // 48: seqproxyapi.v1.SeqProxyApi.GetAggregation:input_type -> seqproxyapi.v1.GetAggregationRequest - 23, // 49: seqproxyapi.v1.SeqProxyApi.GetHistogram:input_type -> seqproxyapi.v1.GetHistogramRequest - 25, // 50: seqproxyapi.v1.SeqProxyApi.Fetch:input_type -> seqproxyapi.v1.FetchRequest - 26, // 51: seqproxyapi.v1.SeqProxyApi.Mapping:input_type -> seqproxyapi.v1.MappingRequest - 28, // 52: seqproxyapi.v1.SeqProxyApi.Status:input_type -> seqproxyapi.v1.StatusRequest - 32, // 53: seqproxyapi.v1.SeqProxyApi.Export:input_type -> seqproxyapi.v1.ExportRequest - 15, // 54: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:input_type -> seqproxyapi.v1.StartAsyncSearchRequest - 17, // 55: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:input_type -> seqproxyapi.v1.FetchAsyncSearchResultRequest - 19, // 56: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:input_type -> seqproxyapi.v1.CancelAsyncSearchRequest - 13, // 57: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse - 14, // 58: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse - 22, // 59: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse - 24, // 60: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse - 4, // 61: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document - 27, // 62: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse - 29, // 63: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse - 33, // 64: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse - 16, // 65: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse - 18, // 66: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse - 20, // 67: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse - 57, // [57:68] is the sub-list for method output_type - 46, // [46:57] is the sub-list for method input_type - 46, // [46:46] is the sub-list for extension type_name - 46, // [46:46] is the sub-list for extension extendee - 0, // [0:46] is the sub-list for field type_name + 5, // 15: seqproxyapi.v1.SearchResponse.docs:type_name -> seqproxyapi.v1.Document + 4, // 16: seqproxyapi.v1.SearchResponse.error:type_name -> seqproxyapi.v1.Error + 5, // 17: seqproxyapi.v1.ComplexSearchResponse.docs:type_name -> seqproxyapi.v1.Document + 6, // 18: seqproxyapi.v1.ComplexSearchResponse.aggs:type_name -> seqproxyapi.v1.Aggregation + 7, // 19: seqproxyapi.v1.ComplexSearchResponse.hist:type_name -> seqproxyapi.v1.Histogram + 4, // 20: seqproxyapi.v1.ComplexSearchResponse.error:type_name -> seqproxyapi.v1.Error + 11, // 21: seqproxyapi.v1.ComplexSearchResponse.explain:type_name -> seqproxyapi.v1.ExplainEntry + 44, // 22: seqproxyapi.v1.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration + 8, // 23: seqproxyapi.v1.StartAsyncSearchRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 9, // 24: seqproxyapi.v1.StartAsyncSearchRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 10, // 25: seqproxyapi.v1.StartAsyncSearchRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 2, // 26: seqproxyapi.v1.FetchAsyncSearchResultRequest.order:type_name -> seqproxyapi.v1.Order + 3, // 27: seqproxyapi.v1.FetchAsyncSearchResultResponse.status:type_name -> seqproxyapi.v1.AsyncSearchStatus + 16, // 28: seqproxyapi.v1.FetchAsyncSearchResultResponse.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest + 15, // 29: seqproxyapi.v1.FetchAsyncSearchResultResponse.response:type_name -> seqproxyapi.v1.ComplexSearchResponse + 43, // 30: seqproxyapi.v1.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp + 43, // 31: seqproxyapi.v1.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp + 43, // 32: seqproxyapi.v1.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp + 3, // 33: seqproxyapi.v1.GetAsyncSearchesListRequest.status:type_name -> seqproxyapi.v1.AsyncSearchStatus + 26, // 34: seqproxyapi.v1.GetAsyncSearchesListResponse.searches:type_name -> seqproxyapi.v1.AsyncSearchesListItem + 3, // 35: seqproxyapi.v1.AsyncSearchesListItem.status:type_name -> seqproxyapi.v1.AsyncSearchStatus + 16, // 36: seqproxyapi.v1.AsyncSearchesListItem.request:type_name -> seqproxyapi.v1.StartAsyncSearchRequest + 43, // 37: seqproxyapi.v1.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp + 43, // 38: seqproxyapi.v1.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp + 43, // 39: seqproxyapi.v1.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp + 8, // 40: seqproxyapi.v1.GetAggregationRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 9, // 41: seqproxyapi.v1.GetAggregationRequest.aggs:type_name -> seqproxyapi.v1.AggQuery + 6, // 42: seqproxyapi.v1.GetAggregationResponse.aggs:type_name -> seqproxyapi.v1.Aggregation + 4, // 43: seqproxyapi.v1.GetAggregationResponse.error:type_name -> seqproxyapi.v1.Error + 8, // 44: seqproxyapi.v1.GetHistogramRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 10, // 45: seqproxyapi.v1.GetHistogramRequest.hist:type_name -> seqproxyapi.v1.HistQuery + 7, // 46: seqproxyapi.v1.GetHistogramResponse.hist:type_name -> seqproxyapi.v1.Histogram + 4, // 47: seqproxyapi.v1.GetHistogramResponse.error:type_name -> seqproxyapi.v1.Error + 42, // 48: seqproxyapi.v1.FetchRequest.fields_filter:type_name -> seqproxyapi.v1.FetchRequest.FieldsFilter + 43, // 49: seqproxyapi.v1.StatusResponse.oldest_storage_time:type_name -> google.protobuf.Timestamp + 36, // 50: seqproxyapi.v1.StatusResponse.stores:type_name -> seqproxyapi.v1.StoreStatus + 37, // 51: seqproxyapi.v1.StoreStatus.values:type_name -> seqproxyapi.v1.StoreStatusValues + 43, // 52: seqproxyapi.v1.StoreStatusValues.oldest_time:type_name -> google.protobuf.Timestamp + 8, // 53: seqproxyapi.v1.ExportRequest.query:type_name -> seqproxyapi.v1.SearchQuery + 5, // 54: seqproxyapi.v1.ExportResponse.doc:type_name -> seqproxyapi.v1.Document + 43, // 55: seqproxyapi.v1.Aggregation.Bucket.ts:type_name -> google.protobuf.Timestamp + 43, // 56: seqproxyapi.v1.Histogram.Bucket.ts:type_name -> google.protobuf.Timestamp + 12, // 57: seqproxyapi.v1.SeqProxyApi.Search:input_type -> seqproxyapi.v1.SearchRequest + 13, // 58: seqproxyapi.v1.SeqProxyApi.ComplexSearch:input_type -> seqproxyapi.v1.ComplexSearchRequest + 27, // 59: seqproxyapi.v1.SeqProxyApi.GetAggregation:input_type -> seqproxyapi.v1.GetAggregationRequest + 29, // 60: seqproxyapi.v1.SeqProxyApi.GetHistogram:input_type -> seqproxyapi.v1.GetHistogramRequest + 31, // 61: seqproxyapi.v1.SeqProxyApi.Fetch:input_type -> seqproxyapi.v1.FetchRequest + 32, // 62: seqproxyapi.v1.SeqProxyApi.Mapping:input_type -> seqproxyapi.v1.MappingRequest + 34, // 63: seqproxyapi.v1.SeqProxyApi.Status:input_type -> seqproxyapi.v1.StatusRequest + 38, // 64: seqproxyapi.v1.SeqProxyApi.Export:input_type -> seqproxyapi.v1.ExportRequest + 16, // 65: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:input_type -> seqproxyapi.v1.StartAsyncSearchRequest + 18, // 66: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:input_type -> seqproxyapi.v1.FetchAsyncSearchResultRequest + 20, // 67: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:input_type -> seqproxyapi.v1.CancelAsyncSearchRequest + 22, // 68: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:input_type -> seqproxyapi.v1.DeleteAsyncSearchRequest + 24, // 69: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:input_type -> seqproxyapi.v1.GetAsyncSearchesListRequest + 14, // 70: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse + 15, // 71: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse + 28, // 72: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse + 30, // 73: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse + 5, // 74: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document + 33, // 75: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse + 35, // 76: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse + 39, // 77: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse + 17, // 78: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse + 19, // 79: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse + 21, // 80: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse + 23, // 81: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse + 25, // 82: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse + 70, // [70:83] is the sub-list for method output_type + 57, // [57:70] is the sub-list for method input_type + 57, // [57:57] is the sub-list for extension type_name + 57, // [57:57] is the sub-list for extension extendee + 0, // [0:57] is the sub-list for field type_name } func init() { file_seqproxyapi_v1_seq_proxy_api_proto_init() } @@ -2713,16 +3240,19 @@ func file_seqproxyapi_v1_seq_proxy_api_proto_init() { file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[9].OneofWrappers = []any{} file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[11].OneofWrappers = []any{} file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[12].OneofWrappers = []any{} - file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[26].OneofWrappers = []any{} - file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[27].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[15].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[20].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[22].OneofWrappers = []any{} file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[31].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[32].OneofWrappers = []any{} + file_seqproxyapi_v1_seq_proxy_api_proto_msgTypes[36].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc), len(file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc)), - NumEnums: 3, - NumMessages: 34, + NumEnums: 4, + NumMessages: 39, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go index 209bd32a..28010d15 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go @@ -231,12 +231,34 @@ func local_request_SeqProxyApi_StartAsyncSearch_0(ctx context.Context, marshaler return msg, metadata, err } -var filter_SeqProxyApi_FetchAsyncSearchResult_0 = &utilities.DoubleArray{Encoding: map[string]int{"search_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} - func request_SeqProxyApi_FetchAsyncSearchResult_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( protoReq FetchAsyncSearchResultRequest 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.FetchAsyncSearchResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_SeqProxyApi_FetchAsyncSearchResult_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq FetchAsyncSearchResultRequest + 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.FetchAsyncSearchResult(ctx, &protoReq) + return msg, metadata, err +} + +func request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CancelAsyncSearchRequest + metadata runtime.ServerMetadata err error ) val, ok := pathParams["search_id"] @@ -247,19 +269,13 @@ func request_SeqProxyApi_FetchAsyncSearchResult_0(ctx context.Context, marshaler if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "search_id", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SeqProxyApi_FetchAsyncSearchResult_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.FetchAsyncSearchResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CancelAsyncSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SeqProxyApi_FetchAsyncSearchResult_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq FetchAsyncSearchResultRequest + protoReq CancelAsyncSearchRequest metadata runtime.ServerMetadata err error ) @@ -271,19 +287,13 @@ func local_request_SeqProxyApi_FetchAsyncSearchResult_0(ctx context.Context, mar if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "search_id", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SeqProxyApi_FetchAsyncSearchResult_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.FetchAsyncSearchResult(ctx, &protoReq) + msg, err := server.CancelAsyncSearch(ctx, &protoReq) return msg, metadata, err } -func request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SeqProxyApi_DeleteAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq CancelAsyncSearchRequest + protoReq DeleteAsyncSearchRequest metadata runtime.ServerMetadata err error ) @@ -295,13 +305,13 @@ func request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshaler runt if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "search_id", err) } - msg, err := client.CancelAsyncSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteAsyncSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SeqProxyApi_DeleteAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( - protoReq CancelAsyncSearchRequest + protoReq DeleteAsyncSearchRequest metadata runtime.ServerMetadata err error ) @@ -313,7 +323,31 @@ func local_request_SeqProxyApi_CancelAsyncSearch_0(ctx context.Context, marshale if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "search_id", err) } - msg, err := server.CancelAsyncSearch(ctx, &protoReq) + msg, err := server.DeleteAsyncSearch(ctx, &protoReq) + return msg, metadata, err +} + +func request_SeqProxyApi_GetAsyncSearchesList_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAsyncSearchesListRequest + 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.GetAsyncSearchesList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_SeqProxyApi_GetAsyncSearchesList_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAsyncSearchesListRequest + 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.GetAsyncSearchesList(ctx, &protoReq) return msg, metadata, err } @@ -463,7 +497,7 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux 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/StartAsyncSearch", runtime.WithHTTPPathPattern("/async-search")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", runtime.WithHTTPPathPattern("/async-searches")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -477,13 +511,13 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_StartAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_SeqProxyApi_FetchAsyncSearchResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SeqProxyApi_FetchAsyncSearchResult_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/FetchAsyncSearchResult", runtime.WithHTTPPathPattern("/async-search/{search_id}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", runtime.WithHTTPPathPattern("/async-searches/fetch")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -497,13 +531,13 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_FetchAsyncSearchResult_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodDelete, pattern_SeqProxyApi_CancelAsyncSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SeqProxyApi_CancelAsyncSearch_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/CancelAsyncSearch", runtime.WithHTTPPathPattern("/async-search/{search_id}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", runtime.WithHTTPPathPattern("/async-searches/{search_id}/cancel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -517,6 +551,46 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_CancelAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodDelete, pattern_SeqProxyApi_DeleteAsyncSearch_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/DeleteAsyncSearch", runtime.WithHTTPPathPattern("/async-searches/{search_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SeqProxyApi_DeleteAsyncSearch_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_DeleteAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_GetAsyncSearchesList_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/GetAsyncSearchesList", runtime.WithHTTPPathPattern("/async-searches/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SeqProxyApi_GetAsyncSearchesList_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_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -697,7 +771,7 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", runtime.WithHTTPPathPattern("/async-search")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/StartAsyncSearch", runtime.WithHTTPPathPattern("/async-searches")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -710,11 +784,11 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_StartAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_SeqProxyApi_FetchAsyncSearchResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SeqProxyApi_FetchAsyncSearchResult_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/FetchAsyncSearchResult", runtime.WithHTTPPathPattern("/async-search/{search_id}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/FetchAsyncSearchResult", runtime.WithHTTPPathPattern("/async-searches/fetch")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -727,11 +801,11 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_FetchAsyncSearchResult_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodDelete, pattern_SeqProxyApi_CancelAsyncSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SeqProxyApi_CancelAsyncSearch_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/CancelAsyncSearch", runtime.WithHTTPPathPattern("/async-search/{search_id}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/CancelAsyncSearch", runtime.WithHTTPPathPattern("/async-searches/{search_id}/cancel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -744,6 +818,40 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_CancelAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodDelete, pattern_SeqProxyApi_DeleteAsyncSearch_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/DeleteAsyncSearch", runtime.WithHTTPPathPattern("/async-searches/{search_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SeqProxyApi_DeleteAsyncSearch_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_DeleteAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_GetAsyncSearchesList_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/GetAsyncSearchesList", runtime.WithHTTPPathPattern("/async-searches/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SeqProxyApi_GetAsyncSearchesList_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_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -756,9 +864,11 @@ var ( pattern_SeqProxyApi_Mapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"mappings"}, "")) pattern_SeqProxyApi_Status_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"status"}, "")) pattern_SeqProxyApi_Export_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"export"}, "")) - pattern_SeqProxyApi_StartAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"async-search"}, "")) - pattern_SeqProxyApi_FetchAsyncSearchResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"async-search", "search_id"}, "")) - pattern_SeqProxyApi_CancelAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"async-search", "search_id"}, "")) + pattern_SeqProxyApi_StartAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"async-searches"}, "")) + pattern_SeqProxyApi_FetchAsyncSearchResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"async-searches", "fetch"}, "")) + 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"}, "")) ) var ( @@ -773,4 +883,6 @@ var ( forward_SeqProxyApi_StartAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_FetchAsyncSearchResult_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_CancelAsyncSearch_0 = runtime.ForwardResponseMessage + forward_SeqProxyApi_DeleteAsyncSearch_0 = runtime.ForwardResponseMessage + forward_SeqProxyApi_GetAsyncSearchesList_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 75dcbbe1..d69b5827 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go @@ -370,7 +370,7 @@ func (m *StartAsyncSearchRequest) CloneVT() *StartAsyncSearchRequest { r.Retention = (*durationpb.Duration)((*durationpb1.Duration)(m.Retention).CloneVT()) r.Query = m.Query.CloneVT() r.Hist = m.Hist.CloneVT() - r.Order = m.Order + r.WithDocs = m.WithDocs if rhs := m.Aggs; rhs != nil { tmpContainer := make([]*AggQuery, len(rhs)) for k, v := range rhs { @@ -412,9 +412,9 @@ func (m *FetchAsyncSearchResultRequest) CloneVT() *FetchAsyncSearchResultRequest } r := new(FetchAsyncSearchResultRequest) r.SearchId = m.SearchId - r.WithDocs = m.WithDocs r.Size = m.Size r.Offset = m.Offset + r.Order = m.Order if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -431,9 +431,14 @@ func (m *FetchAsyncSearchResultResponse) CloneVT() *FetchAsyncSearchResultRespon return (*FetchAsyncSearchResultResponse)(nil) } r := new(FetchAsyncSearchResultResponse) - r.Done = m.Done - r.Expiration = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Expiration).CloneVT()) + r.Status = m.Status + r.Request = m.Request.CloneVT() r.Response = m.Response.CloneVT() + r.StartedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartedAt).CloneVT()) + r.ExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.ExpiresAt).CloneVT()) + r.CanceledAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CanceledAt).CloneVT()) + r.Progress = m.Progress + r.DiskUsage = m.DiskUsage if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -478,6 +483,113 @@ func (m *CancelAsyncSearchResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *DeleteAsyncSearchRequest) CloneVT() *DeleteAsyncSearchRequest { + if m == nil { + return (*DeleteAsyncSearchRequest)(nil) + } + r := new(DeleteAsyncSearchRequest) + r.SearchId = m.SearchId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeleteAsyncSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeleteAsyncSearchResponse) CloneVT() *DeleteAsyncSearchResponse { + if m == nil { + return (*DeleteAsyncSearchResponse)(nil) + } + r := new(DeleteAsyncSearchResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeleteAsyncSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetAsyncSearchesListRequest) CloneVT() *GetAsyncSearchesListRequest { + if m == nil { + return (*GetAsyncSearchesListRequest)(nil) + } + r := new(GetAsyncSearchesListRequest) + r.Size = m.Size + r.Offset = m.Offset + if rhs := m.Status; rhs != nil { + tmpVal := *rhs + r.Status = &tmpVal + } + if rhs := m.Ids; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Ids = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetAsyncSearchesListRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetAsyncSearchesListResponse) CloneVT() *GetAsyncSearchesListResponse { + if m == nil { + return (*GetAsyncSearchesListResponse)(nil) + } + r := new(GetAsyncSearchesListResponse) + if rhs := m.Searches; rhs != nil { + tmpContainer := make([]*AsyncSearchesListItem, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Searches = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetAsyncSearchesListResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *AsyncSearchesListItem) CloneVT() *AsyncSearchesListItem { + if m == nil { + return (*AsyncSearchesListItem)(nil) + } + r := new(AsyncSearchesListItem) + r.SearchId = m.SearchId + r.Status = m.Status + r.Request = m.Request.CloneVT() + r.StartedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartedAt).CloneVT()) + r.ExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.ExpiresAt).CloneVT()) + r.CanceledAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CanceledAt).CloneVT()) + r.Progress = m.Progress + r.DiskUsage = m.DiskUsage + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *AsyncSearchesListItem) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *GetAggregationRequest) CloneVT() *GetAggregationRequest { if m == nil { return (*GetAggregationRequest)(nil) @@ -1282,7 +1394,7 @@ func (this *StartAsyncSearchRequest) EqualVT(that *StartAsyncSearchRequest) bool if !this.Hist.EqualVT(that.Hist) { return false } - if this.Order != that.Order { + if this.WithDocs != that.WithDocs { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1323,15 +1435,15 @@ func (this *FetchAsyncSearchResultRequest) EqualVT(that *FetchAsyncSearchResultR if this.SearchId != that.SearchId { return false } - if this.WithDocs != that.WithDocs { - return false - } if this.Size != that.Size { return false } if this.Offset != that.Offset { return false } + if this.Order != that.Order { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1348,15 +1460,30 @@ func (this *FetchAsyncSearchResultResponse) EqualVT(that *FetchAsyncSearchResult } else if this == nil || that == nil { return false } - if this.Done != that.Done { + if this.Status != that.Status { return false } - if !(*timestamppb1.Timestamp)(this.Expiration).EqualVT((*timestamppb1.Timestamp)(that.Expiration)) { + if !this.Request.EqualVT(that.Request) { return false } if !this.Response.EqualVT(that.Response) { return false } + if !(*timestamppb1.Timestamp)(this.StartedAt).EqualVT((*timestamppb1.Timestamp)(that.StartedAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.ExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.ExpiresAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.CanceledAt).EqualVT((*timestamppb1.Timestamp)(that.CanceledAt)) { + return false + } + if this.Progress != that.Progress { + return false + } + if this.DiskUsage != that.DiskUsage { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1402,6 +1529,148 @@ func (this *CancelAsyncSearchResponse) EqualMessageVT(thatMsg proto.Message) boo } return this.EqualVT(that) } +func (this *DeleteAsyncSearchRequest) EqualVT(that *DeleteAsyncSearchRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SearchId != that.SearchId { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeleteAsyncSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeleteAsyncSearchRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *DeleteAsyncSearchResponse) EqualVT(that *DeleteAsyncSearchResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeleteAsyncSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeleteAsyncSearchResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *GetAsyncSearchesListRequest) EqualVT(that *GetAsyncSearchesListRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if p, q := this.Status, that.Status; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if this.Size != that.Size { + return false + } + if this.Offset != that.Offset { + return false + } + if len(this.Ids) != len(that.Ids) { + return false + } + for i, vx := range this.Ids { + vy := that.Ids[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetAsyncSearchesListRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetAsyncSearchesListRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *GetAsyncSearchesListResponse) EqualVT(that *GetAsyncSearchesListResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Searches) != len(that.Searches) { + return false + } + for i, vx := range this.Searches { + vy := that.Searches[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &AsyncSearchesListItem{} + } + if q == nil { + q = &AsyncSearchesListItem{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetAsyncSearchesListResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetAsyncSearchesListResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *AsyncSearchesListItem) EqualVT(that *AsyncSearchesListItem) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.SearchId != that.SearchId { + return false + } + if this.Status != that.Status { + return false + } + if !this.Request.EqualVT(that.Request) { + return false + } + if !(*timestamppb1.Timestamp)(this.StartedAt).EqualVT((*timestamppb1.Timestamp)(that.StartedAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.ExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.ExpiresAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.CanceledAt).EqualVT((*timestamppb1.Timestamp)(that.CanceledAt)) { + return false + } + if this.Progress != that.Progress { + return false + } + if this.DiskUsage != that.DiskUsage { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *AsyncSearchesListItem) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*AsyncSearchesListItem) + if !ok { + return false + } + return this.EqualVT(that) +} func (this *GetAggregationRequest) EqualVT(that *GetAggregationRequest) bool { if this == that { return true @@ -1797,8 +2066,11 @@ type SeqProxyApiClient interface { // Clients should use the search ID returned by StartAsyncSearch. FetchAsyncSearchResult(ctx context.Context, in *FetchAsyncSearchResultRequest, opts ...grpc.CallOption) (*FetchAsyncSearchResultResponse, error) // Cancels an ongoing asynchronous search operation if it hasn't completed yet. - // Useful for freeing up resources if the result is no longer needed. CancelAsyncSearch(ctx context.Context, in *CancelAsyncSearchRequest, opts ...grpc.CallOption) (*CancelAsyncSearchResponse, error) + // Frees up resources if the result is no longer needed. + DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) + // Fetch list of async searches. + GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) } type seqProxyApiClient struct { @@ -1954,6 +2226,24 @@ func (c *seqProxyApiClient) CancelAsyncSearch(ctx context.Context, in *CancelAsy return out, nil } +func (c *seqProxyApiClient) DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) { + out := new(DeleteAsyncSearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) { + out := new(GetAsyncSearchesListResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SeqProxyApiServer is the server API for SeqProxyApi service. // All implementations must embed UnimplementedSeqProxyApiServer // for forward compatibility @@ -1981,8 +2271,11 @@ type SeqProxyApiServer interface { // Clients should use the search ID returned by StartAsyncSearch. FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) // Cancels an ongoing asynchronous search operation if it hasn't completed yet. - // Useful for freeing up resources if the result is no longer needed. CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) + // Frees up resources if the result is no longer needed. + DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) + // Fetch list of async searches. + GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) mustEmbedUnimplementedSeqProxyApiServer() } @@ -2023,6 +2316,12 @@ func (UnimplementedSeqProxyApiServer) FetchAsyncSearchResult(context.Context, *F func (UnimplementedSeqProxyApiServer) CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelAsyncSearch not implemented") } +func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAsyncSearch not implemented") +} +func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") +} func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} // UnsafeSeqProxyApiServer may be embedded to opt out of forward compatibility for this service. @@ -2240,6 +2539,42 @@ func _SeqProxyApi_CancelAsyncSearch_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _SeqProxyApi_DeleteAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAsyncSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/DeleteAsyncSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).DeleteAsyncSearch(ctx, req.(*DeleteAsyncSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SeqProxyApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAsyncSearchesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/GetAsyncSearchesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).GetAsyncSearchesList(ctx, req.(*GetAsyncSearchesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + // 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) @@ -2283,6 +2618,14 @@ var SeqProxyApi_ServiceDesc = grpc.ServiceDesc{ MethodName: "CancelAsyncSearch", Handler: _SeqProxyApi_CancelAsyncSearch_Handler, }, + { + MethodName: "DeleteAsyncSearch", + Handler: _SeqProxyApi_DeleteAsyncSearch_Handler, + }, + { + MethodName: "GetAsyncSearchesList", + Handler: _SeqProxyApi_GetAsyncSearchesList_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -3216,8 +3559,13 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if m.WithDocs { + i-- + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x28 } @@ -3336,23 +3684,18 @@ func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVT(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- dAtA[i] = 0x20 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- dAtA[i] = 0x18 } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- dAtA[i] = 0x10 } @@ -3396,6 +3739,47 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } if m.Response != nil { size, err := m.Response.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -3406,8 +3790,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i-- dAtA[i] = 0x1a } - if m.Expiration != nil { - size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVT(dAtA[:i]) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -3416,13 +3800,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i-- dAtA[i] = 0x12 } - if m.Done { - i-- - if m.Done { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } @@ -3502,7 +3881,7 @@ func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3515,12 +3894,12 @@ func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3532,32 +3911,17 @@ func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3570,12 +3934,12 @@ func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3587,47 +3951,67 @@ func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 + return len(dAtA) - i, nil +} + +func (m *GetAsyncSearchesListRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAsyncSearchesListRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.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] = 0x1a + dAtA[i] = 0x22 } } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } - if m.PartialResponse { + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x10 + } + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3640,12 +4024,12 @@ func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3657,30 +4041,22 @@ func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Searches) > 0 { + for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Searches[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetHistogramResponse) MarshalVT() (dAtA []byte, err error) { +func (m *AsyncSearchesListItem) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3693,12 +4069,12 @@ func (m *GetHistogramResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3710,8 +4086,39 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -3720,8 +4127,8 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -3730,25 +4137,22 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i-- dAtA[i] = 0x1a } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x10 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { +func (m *GetAggregationRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3761,12 +4165,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 *GetAggregationRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAggregationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3778,20 +4182,266 @@ func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.AllowList { - i-- - if m.AllowList { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - 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]) + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAggregationResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetAggregationResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetAggregationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetHistogramRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetHistogramRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetHistogramRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetHistogramResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetHistogramResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetHistogramResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FetchRequest_FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if 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 @@ -5131,14 +5781,19 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if m.WithDocs { i-- - dAtA[i] = 0x28 - } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { return 0, err } i -= size @@ -5251,23 +5906,18 @@ func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- dAtA[i] = 0x20 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- dAtA[i] = 0x18 } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- dAtA[i] = 0x10 } @@ -5311,6 +5961,47 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } if m.Response != nil { size, err := m.Response.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { @@ -5321,8 +6012,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i-- dAtA[i] = 0x1a } - if m.Expiration != nil { - size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -5331,13 +6022,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i-- dAtA[i] = 0x12 } - if m.Done { - i-- - if m.Done { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } @@ -5417,7 +6103,7 @@ func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5430,12 +6116,12 @@ func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5447,32 +6133,17 @@ func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetAggregationResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5485,12 +6156,12 @@ func (m *GetAggregationResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetAggregationResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5502,47 +6173,67 @@ func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 + return len(dAtA) - i, nil +} + +func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - 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)) + 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] = 0x1a + dAtA[i] = 0x22 } } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } - if m.PartialResponse { + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x10 + } + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *GetHistogramRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5555,12 +6246,12 @@ func (m *GetHistogramRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5572,30 +6263,22 @@ func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if m.Query != nil { - size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err + 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 } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetHistogramResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5608,12 +6291,12 @@ func (m *GetHistogramResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetHistogramResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *AsyncSearchesListItem) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5625,8 +6308,39 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Error != nil { - size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.Progress != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Progress)))) + i-- + dAtA[i] = 0x39 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -5635,8 +6349,8 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i-- dAtA[i] = 0x22 } - if m.Hist != nil { - size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Request != nil { + size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -5645,25 +6359,22 @@ func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, e i-- dAtA[i] = 0x1a } - if m.Total != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x10 } - if m.PartialResponse { - i-- - if m.PartialResponse { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *GetAggregationRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5676,12 +6387,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 *GetAggregationRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *GetAggregationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5693,17 +6404,263 @@ 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 + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x10 } - if len(m.Fields) > 0 { + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetAggregationResponse) 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 *GetAggregationResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAggregationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetHistogramRequest) 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 *GetHistogramRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetHistogramRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + 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] = 0x12 + } + if m.Query != nil { + size, err := m.Query.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetHistogramResponse) 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 *GetHistogramResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetHistogramResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Error != nil { + size, err := m.Error.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x10 + } + if m.PartialResponse { + i-- + if m.PartialResponse { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *FetchRequest_FieldsFilter) 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 *FetchRequest_FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AllowList { + i-- + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Fields) > 0 { for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Fields[iNdEx]) copy(dAtA[i:], m.Fields[iNdEx]) @@ -6490,8 +7447,8 @@ func (m *StartAsyncSearchRequest) SizeVT() (n int) { l = m.Hist.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if m.WithDocs { + n += 2 } n += len(m.unknownFields) return n @@ -6521,15 +7478,15 @@ func (m *FetchAsyncSearchResultRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.WithDocs { - n += 2 - } 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 } @@ -6540,17 +7497,35 @@ func (m *FetchAsyncSearchResultResponse) SizeVT() (n int) { } var l int _ = l - if m.Done { - n += 2 + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) } - if m.Expiration != nil { - l = (*timestamppb1.Timestamp)(m.Expiration).SizeVT() + if m.Request != nil { + l = m.Request.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Response != nil { l = m.Response.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if m.StartedAt != nil { + l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExpiresAt != nil { + l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.CanceledAt != nil { + l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Progress != 0 { + n += 9 + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } n += len(m.unknownFields) return n } @@ -6579,6 +7554,110 @@ func (m *CancelAsyncSearchResponse) SizeVT() (n int) { return n } +func (m *DeleteAsyncSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DeleteAsyncSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += len(m.unknownFields) + return n +} + +func (m *GetAsyncSearchesListRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != nil { + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Status)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *GetAsyncSearchesListResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Searches) > 0 { + for _, e := range m.Searches { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AsyncSearchesListItem) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SearchId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Status != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Status)) + } + if m.Request != nil { + l = m.Request.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.StartedAt != nil { + l = (*timestamppb1.Timestamp)(m.StartedAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.ExpiresAt != nil { + l = (*timestamppb1.Timestamp)(m.ExpiresAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.CanceledAt != nil { + l = (*timestamppb1.Timestamp)(m.CanceledAt).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Progress != 0 { + n += 9 + } + if m.DiskUsage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.DiskUsage)) + } + n += len(m.unknownFields) + return n +} + func (m *GetAggregationRequest) SizeVT() (n int) { if m == nil { return 0 @@ -9215,9 +10294,9 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.Order = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9227,11 +10306,12 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.WithDocs = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9400,9 +10480,9 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", 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 @@ -9412,17 +10492,16 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Size |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) 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 Offset", wireType) } - m.Size = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9432,16 +10511,16 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int32(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - m.Offset = 0 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9451,7 +10530,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } @@ -9509,9 +10588,9 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Done", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9521,15 +10600,14 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.Done = bool(v != 0) case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9556,10 +10634,10 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Expiration == nil { - m.Expiration = ×tamppb.Timestamp{} + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} } - if err := (*timestamppb1.Timestamp)(m.Expiration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9599,6 +10677,144 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + 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 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: + 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 + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9755,7 +10971,7 @@ func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9778,17 +10994,17 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9798,62 +11014,75 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + 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 *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].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: 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:]) @@ -9876,7 +11105,7 @@ func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9899,17 +11128,17 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9919,17 +11148,17 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + v |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) + m.Status = &v case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.Total = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9939,16 +11168,16 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + m.Size |= int32(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - var msglen int + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9958,31 +11187,16 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9992,27 +11206,23 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -10036,7 +11246,7 @@ func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10059,51 +11269,15 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10130,10 +11304,8 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} - } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10159,7 +11331,7 @@ func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10182,17 +11354,17 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetHistogramResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 PartialResponse", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10202,17 +11374,29 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.Total = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10222,14 +11406,14 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10256,16 +11440,16 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &Histogram{} + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10292,69 +11476,54 @@ func (m *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + 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 *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 m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - 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).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - 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: + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", 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 @@ -10364,29 +11533,44 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) + 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 2: + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - var v int + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10396,12 +11580,11 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10424,7 +11607,7 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetAggregationRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10447,17 +11630,17 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAggregationRequest: 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: GetAggregationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10467,27 +11650,31 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10514,10 +11701,8 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} - } - if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10543,7 +11728,7 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetAggregationResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10566,12 +11751,121 @@ func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAggregationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAggregationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10594,7 +11888,7 @@ func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { +func (m *GetHistogramRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10617,17 +11911,17 @@ func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetHistogramRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetHistogramRequest: 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 Query", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10637,24 +11931,62 @@ func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + 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.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -10679,58 +12011,7 @@ func (m *MappingResponse) 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 *GetHistogramResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10753,17 +12034,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: GetHistogramResponse: 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: GetHistogramResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) } - m.NumberOfStores = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10773,14 +12054,34 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumberOfStores |= int32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.PartialResponse = bool(v != 0) case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10807,16 +12108,16 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestStorageTime == nil { - m.OldestStorageTime = ×tamppb.Timestamp{} + if m.Hist == nil { + m.Hist = &Histogram{} } - if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stores", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10843,8 +12144,10 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Stores = append(m.Stores, &StoreStatus{}) - if err := m.Stores[len(m.Stores)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10870,7 +12173,7 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10893,15 +12196,15 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 Host", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10929,49 +12232,13 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Host = string(dAtA[iNdEx:postIndex]) + m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Values == nil { - m.Values = &StoreStatusValues{} - } - if err := m.Values.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10981,25 +12248,12 @@ func (m *StoreStatus) 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 - } - s := string(dAtA[iNdEx:postIndex]) - m.Error = &s - iNdEx = postIndex + m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11022,7 +12276,7 @@ func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11045,15 +12299,47 @@ func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11080,10 +12366,10 @@ func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} + if m.FieldsFilter == nil { + m.FieldsFilter = &FetchRequest_FieldsFilter{} } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11109,7 +12395,7 @@ func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { +func (m *MappingRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11132,72 +12418,68 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") + return fmt.Errorf("proto: MappingRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MappingRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + 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.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MappingResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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 - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MappingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MappingResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - m.Offset = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11207,11 +12489,26 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= 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 default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11234,7 +12531,7 @@ func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { +func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11257,48 +12554,12 @@ func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 Doc", 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.Doc == nil { - m.Doc = &Document{} - } - if err := m.Doc.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -11321,7 +12582,7 @@ func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11344,17 +12605,17 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NumberOfStores", wireType) } - m.Code = 0 + m.NumberOfStores = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11364,16 +12625,16 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= ErrorCode(b&0x7F) << shift + m.NumberOfStores |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestStorageTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11383,27 +12644,61 @@ func (m *Error) 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.OldestStorageTime == nil { + m.OldestStorageTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OldestStorageTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stores", 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.Stores = append(m.Stores, &StoreStatus{}) + if err := m.Stores[len(m.Stores)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Message = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -11427,7 +12722,7 @@ func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StoreStatus) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11450,15 +12745,15 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") + return fmt.Errorf("proto: StoreStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StoreStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11486,17 +12781,13 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Id = stringValue + m.Host = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11506,28 +12797,33 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = dAtA[iNdEx:postIndex] + if m.Values == nil { + m.Values = &StoreStatusValues{} + } + if err := m.Values.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -11537,27 +12833,24 @@ func (m *Document) 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.Time == nil { - m.Time = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.Error = &s iNdEx = postIndex default: iNdEx = preIndex @@ -11581,7 +12874,7 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StoreStatusValues) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11604,17 +12897,17 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Aggregation_Bucket: wiretype end group for non-group") + return fmt.Errorf("proto: StoreStatusValues: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StoreStatusValues: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", 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 @@ -11624,145 +12917,25 @@ func (m *Aggregation_Bucket) 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.Key = stringValue - iNdEx = postIndex - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) - } - m.NotExists = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NotExists |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11788,7 +12961,7 @@ func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExportRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11811,15 +12984,15 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") + return fmt.Errorf("proto: ExportRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11846,16 +13019,18 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field 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 @@ -11865,7 +13040,26 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -11892,7 +13086,7 @@ func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExportResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11915,34 +13109,15 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") + return fmt.Errorf("proto: ExportResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExportResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) - } - m.DocCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DocCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Doc", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11969,10 +13144,10 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} + if m.Doc == nil { + m.Doc = &Document{} } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Doc.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11998,7 +13173,7 @@ func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Error) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12021,17 +13196,36 @@ func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Histogram: wiretype end group for non-group") + return fmt.Errorf("proto: Error: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12041,25 +13235,27 @@ func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Buckets = append(m.Buckets, &Histogram_Bucket{}) - if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Message = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -12083,7 +13279,7 @@ func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12106,15 +13302,15 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") + return fmt.Errorf("proto: Document: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12146,13 +13342,13 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Query = stringValue + m.Id = stringValue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12162,31 +13358,26 @@ func (m *SearchQuery) 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.From == nil { - m.From = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Data = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12213,33 +13404,13 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + if m.Time == nil { + m.Time = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Time).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Explain = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -12262,7 +13433,7 @@ func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Aggregation_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12285,15 +13456,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: Aggregation_Bucket: 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: Aggregation_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12325,49 +13496,24 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Field = stringValue + m.Key = stringValue 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 wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.GroupBy = stringValue - iNdEx = postIndex + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - m.Func = 0 + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12377,7 +13523,7 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -12438,9 +13584,9 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12450,28 +13596,27 @@ 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 } - s := stringValue - m.Interval = &s iNdEx = postIndex default: iNdEx = preIndex @@ -12495,7 +13640,7 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Aggregation) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12518,17 +13663,17 @@ func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") + return fmt.Errorf("proto: Aggregation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Aggregation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12538,28 +13683,45 @@ func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Buckets = append(m.Buckets, &Aggregation_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Interval = stringValue iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NotExists |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -12582,7 +13744,7 @@ func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Histogram_Bucket) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12605,17 +13767,17 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: Histogram_Bucket: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Histogram_Bucket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DocCount", wireType) } - var stringLen uint64 + m.DocCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12625,31 +13787,14 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DocCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12676,44 +13821,10 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12739,7 +13850,7 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Histogram) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12762,15 +13873,15 @@ 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: Histogram: 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: 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 Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Buckets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12797,95 +13908,16 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Buckets = append(m.Buckets, &Histogram_Bucket{}) + if err := m.Buckets[len(m.Buckets)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.WithTotal = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength @@ -12903,7 +13935,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12926,17 +13958,17 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchQuery: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12946,31 +13978,31 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Query = stringValue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12997,14 +14029,16 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13031,54 +14065,16 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &HistQuery{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -13095,26 +14091,7 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.WithTotal = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } + m.Explain = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13137,7 +14114,7 @@ func (m *ComplexSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13160,17 +14137,17 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AggQuery: 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: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13180,36 +14157,33 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Field = stringValue + iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13219,31 +14193,33 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.GroupBy = stringValue iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) } - var msglen int + m.Func = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13253,28 +14229,1614 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Func |= AggFunc(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + s := stringValue + m.Interval = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HistQuery) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HistQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HistQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Interval = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *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: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + 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 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchRequest) 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: SearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ComplexSearchRequest) 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: ComplexSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComplexSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].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) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &HistQuery{} + } + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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) 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: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.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 *ComplexSearchResponse) 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: ComplexSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialResponse", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PartialResponse = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = append(m.Docs, &Document{}) + if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &Aggregation{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &Histogram{} + } + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &Error{} + } + if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.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 *StartAsyncSearchRequest) 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: StartAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &SearchQuery{} + } + if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} + if m.Hist == nil { + m.Hist = &HistQuery{} } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithDocs = bool(v != 0) + 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) 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: StartAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *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 + } + 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 SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + 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 + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13297,7 +15859,7 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13320,17 +15882,17 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComplexSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComplexSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 PartialResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13340,17 +15902,16 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.PartialResponse = bool(v != 0) case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } - m.Total = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13360,14 +15921,31 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= 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.Request == nil { + m.Request = &StartAsyncSearchRequest{} + } + if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13394,14 +15972,16 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Docs = append(m.Docs, &Document{}) - if err := m.Docs[len(m.Docs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.Response == nil { + m.Response = &ComplexSearchResponse{} + } + if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13428,14 +16008,52 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &Aggregation{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + 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 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13455,25 +16073,244 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field 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 + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + 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 } - if m.Hist == nil { - m.Hist = &Histogram{} + 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 err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 6: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: 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 Error", 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 @@ -13483,64 +16320,79 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Error == nil { - m.Error = &Error{} - } - if err := m.Error.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.SearchId = stringValue iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + 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.Explain == nil { - m.Explain = &ExplainEntry{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13563,7 +16415,7 @@ func (m *ComplexSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13586,17 +16438,17 @@ 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: GetAsyncSearchesListRequest: 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: GetAsyncSearchesListRequest: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13606,33 +16458,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= 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.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.Status = &v case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13642,33 +16478,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(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 - } - if m.Query == nil { - m.Query = &SearchQuery{} - } - if err := m.Query.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + 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 @@ -13678,31 +16497,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", 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 @@ -13712,47 +16516,28 @@ func (m *StartAsyncSearchRequest) 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.Hist == nil { - m.Hist = &HistQuery{} - } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13775,7 +16560,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13798,17 +16583,17 @@ 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: GetAsyncSearchesListResponse: 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: 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 SearchId", 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 @@ -13818,27 +16603,25 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.SearchId = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -13862,7 +16645,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13885,10 +16668,10 @@ 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: AsyncSearchesListItem: 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: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -13929,9 +16712,9 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13941,17 +16724,16 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13961,16 +16743,33 @@ 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 } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Request == nil { + m.Request = &StartAsyncSearchRequest{} + } + if err := m.Request.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - m.Offset = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13980,85 +16779,31 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 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 *FetchAsyncSearchResultResponse) 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 + 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 - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Done", wireType) + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - 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 err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Done = bool(v != 0) - case 2: + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14085,16 +16830,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Expiration == nil { - m.Expiration = ×tamppb.Timestamp{} + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.Expiration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14121,69 +16866,29 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &ComplexSearchResponse{} + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) } - if iNdEx >= l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Progress = float64(math.Float64frombits(v)) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - var stringLen uint64 + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14193,79 +16898,11 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - 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:]) diff --git a/pkg/storeapi/mappings.go b/pkg/storeapi/mappings.go index 58310b52..e3dddde8 100644 --- a/pkg/storeapi/mappings.go +++ b/pkg/storeapi/mappings.go @@ -3,6 +3,7 @@ package storeapi import ( "fmt" + "github.com/ozontech/seq-db/fracmanager" "github.com/ozontech/seq-db/seq" ) @@ -95,3 +96,48 @@ func MustProtoOrder(o seq.DocsOrder) Order { } return order } + +var statusMappings = []AsyncSearchStatus{ + fracmanager.AsyncSearchStatusDone: AsyncSearchStatus_AsyncSearchStatusDone, + fracmanager.AsyncSearchStatusInProgress: AsyncSearchStatus_AsyncSearchStatusInProgress, + fracmanager.AsyncSearchStatusError: AsyncSearchStatus_AsyncSearchStatusError, + fracmanager.AsyncSearchStatusCanceled: AsyncSearchStatus_AsyncSearchStatusCanceled, +} + +var statusMappingsPb = func() []fracmanager.AsyncSearchStatus { + mappings := make([]fracmanager.AsyncSearchStatus, len(statusMappings)) + for from, to := range statusMappings { + mappings[to] = fracmanager.AsyncSearchStatus(from) + } + return mappings +}() + +func (s AsyncSearchStatus) ToAsyncSearchStatus() (fracmanager.AsyncSearchStatus, error) { + if int(s) >= len(statusMappingsPb) { + return 0, fmt.Errorf("unknown status: %d", s) + } + return statusMappingsPb[s], nil +} + +func (s AsyncSearchStatus) MustAsyncSearchStatus() fracmanager.AsyncSearchStatus { + v, err := s.ToAsyncSearchStatus() + if err != nil { + panic(err) + } + return v +} + +func ToProtoAsyncSearchStatus(s fracmanager.AsyncSearchStatus) (AsyncSearchStatus, error) { + if int(s) >= len(statusMappings) { + return 0, fmt.Errorf("unknown status") + } + return statusMappings[s], nil +} + +func MustProtoAsyncSearchStatus(s fracmanager.AsyncSearchStatus) AsyncSearchStatus { + v, err := ToProtoAsyncSearchStatus(s) + if err != nil { + panic(err) + } + return v +} diff --git a/pkg/storeapi/store_api.pb.go b/pkg/storeapi/store_api.pb.go index 8f4f4cb2..7a7ce94d 100644 --- a/pkg/storeapi/store_api.pb.go +++ b/pkg/storeapi/store_api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.5 -// protoc v5.28.0 +// protoc v5.29.3 // source: storeapi/store_api.proto package storeapi @@ -183,6 +183,58 @@ func (SearchErrorCode) EnumDescriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{2} } +type AsyncSearchStatus int32 + +const ( + AsyncSearchStatus_AsyncSearchStatusInProgress AsyncSearchStatus = 0 + AsyncSearchStatus_AsyncSearchStatusDone AsyncSearchStatus = 1 + AsyncSearchStatus_AsyncSearchStatusCanceled AsyncSearchStatus = 2 + AsyncSearchStatus_AsyncSearchStatusError AsyncSearchStatus = 3 +) + +// Enum value maps for AsyncSearchStatus. +var ( + AsyncSearchStatus_name = map[int32]string{ + 0: "AsyncSearchStatusInProgress", + 1: "AsyncSearchStatusDone", + 2: "AsyncSearchStatusCanceled", + 3: "AsyncSearchStatusError", + } + AsyncSearchStatus_value = map[string]int32{ + "AsyncSearchStatusInProgress": 0, + "AsyncSearchStatusDone": 1, + "AsyncSearchStatusCanceled": 2, + "AsyncSearchStatusError": 3, + } +) + +func (x AsyncSearchStatus) Enum() *AsyncSearchStatus { + p := new(AsyncSearchStatus) + *p = x + return p +} + +func (x AsyncSearchStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AsyncSearchStatus) Descriptor() protoreflect.EnumDescriptor { + return file_storeapi_store_api_proto_enumTypes[3].Descriptor() +} + +func (AsyncSearchStatus) Type() protoreflect.EnumType { + return &file_storeapi_store_api_proto_enumTypes[3] +} + +func (x AsyncSearchStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AsyncSearchStatus.Descriptor instead. +func (AsyncSearchStatus) EnumDescriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{3} +} + type BulkRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` @@ -664,12 +716,13 @@ func (x *ExplainEntry) GetChildren() []*ExplainEntry { type StartAsyncSearchRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` - Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` - From int64 `protobuf:"varint,3,opt,name=from,proto3" json:"from,omitempty"` - To int64 `protobuf:"varint,4,opt,name=to,proto3" json:"to,omitempty"` - Aggs []*AggQuery `protobuf:"bytes,5,rep,name=aggs,proto3" json:"aggs,omitempty"` - HistogramInterval int64 `protobuf:"varint,6,opt,name=histogram_interval,json=histogramInterval,proto3" json:"histogram_interval,omitempty"` - Order Order `protobuf:"varint,7,opt,name=order,proto3,enum=api.Order" json:"order,omitempty"` + Retention *durationpb.Duration `protobuf:"bytes,2,opt,name=retention,proto3" json:"retention,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + From int64 `protobuf:"varint,4,opt,name=from,proto3" json:"from,omitempty"` + To int64 `protobuf:"varint,5,opt,name=to,proto3" json:"to,omitempty"` + Aggs []*AggQuery `protobuf:"bytes,6,rep,name=aggs,proto3" json:"aggs,omitempty"` + HistogramInterval int64 `protobuf:"varint,7,opt,name=histogram_interval,json=histogramInterval,proto3" json:"histogram_interval,omitempty"` + WithDocs bool `protobuf:"varint,8,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -711,6 +764,13 @@ func (x *StartAsyncSearchRequest) GetSearchId() string { return "" } +func (x *StartAsyncSearchRequest) GetRetention() *durationpb.Duration { + if x != nil { + return x.Retention + } + return nil +} + func (x *StartAsyncSearchRequest) GetQuery() string { if x != nil { return x.Query @@ -746,11 +806,11 @@ func (x *StartAsyncSearchRequest) GetHistogramInterval() int64 { return 0 } -func (x *StartAsyncSearchRequest) GetOrder() Order { +func (x *StartAsyncSearchRequest) GetWithDocs() bool { if x != nil { - return x.Order + return x.WithDocs } - return Order_ORDER_DESC + return false } type StartAsyncSearchResponse struct { @@ -792,9 +852,9 @@ func (*StartAsyncSearchResponse) Descriptor() ([]byte, []int) { type FetchAsyncSearchResultRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` - WithDocs bool `protobuf:"varint,2,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` - Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` - Offset int32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + Order Order `protobuf:"varint,4,opt,name=order,proto3,enum=api.Order" json:"order,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -836,13 +896,6 @@ func (x *FetchAsyncSearchResultRequest) GetSearchId() string { return "" } -func (x *FetchAsyncSearchResultRequest) GetWithDocs() bool { - if x != nil { - return x.WithDocs - } - return false -} - func (x *FetchAsyncSearchResultRequest) GetSize() int32 { if x != nil { return x.Size @@ -857,14 +910,30 @@ func (x *FetchAsyncSearchResultRequest) GetOffset() int32 { return 0 } +func (x *FetchAsyncSearchResultRequest) GetOrder() Order { + if x != nil { + return x.Order + } + return Order_ORDER_DESC +} + type FetchAsyncSearchResultResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Done bool `protobuf:"varint,1,opt,name=done,proto3" json:"done,omitempty"` + Status AsyncSearchStatus `protobuf:"varint,1,opt,name=status,proto3,enum=api.AsyncSearchStatus" json:"status,omitempty"` Response *SearchResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` - Expiration *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - Aggs []*AggQuery `protobuf:"bytes,5,rep,name=aggs,proto3" json:"aggs,omitempty"` - HistogramInterval int64 `protobuf:"varint,6,opt,name=histogram_interval,json=histogramInterval,proto3" json:"histogram_interval,omitempty"` - Order Order `protobuf:"varint,7,opt,name=order,proto3,enum=api.Order" json:"order,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + CanceledAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=canceled_at,json=canceledAt,proto3,oneof" json:"canceled_at,omitempty"` + FracsDone uint64 `protobuf:"varint,6,opt,name=fracs_done,json=fracsDone,proto3" json:"fracs_done,omitempty"` + FracsQueue uint64 `protobuf:"varint,7,opt,name=fracs_queue,json=fracsQueue,proto3" json:"fracs_queue,omitempty"` + DiskUsage uint64 `protobuf:"varint,8,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"` + Aggs []*AggQuery `protobuf:"bytes,9,rep,name=aggs,proto3" json:"aggs,omitempty"` + HistogramInterval int64 `protobuf:"varint,10,opt,name=histogram_interval,json=histogramInterval,proto3" json:"histogram_interval,omitempty"` + Query string `protobuf:"bytes,11,opt,name=query,proto3" json:"query,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=from,proto3" json:"from,omitempty"` + To *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=to,proto3" json:"to,omitempty"` + Retention *durationpb.Duration `protobuf:"bytes,14,opt,name=retention,proto3" json:"retention,omitempty"` + WithDocs bool `protobuf:"varint,15,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -899,11 +968,11 @@ func (*FetchAsyncSearchResultResponse) Descriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{9} } -func (x *FetchAsyncSearchResultResponse) GetDone() bool { +func (x *FetchAsyncSearchResultResponse) GetStatus() AsyncSearchStatus { if x != nil { - return x.Done + return x.Status } - return false + return AsyncSearchStatus_AsyncSearchStatusInProgress } func (x *FetchAsyncSearchResultResponse) GetResponse() *SearchResponse { @@ -913,13 +982,48 @@ func (x *FetchAsyncSearchResultResponse) GetResponse() *SearchResponse { return nil } -func (x *FetchAsyncSearchResultResponse) GetExpiration() *timestamppb.Timestamp { +func (x *FetchAsyncSearchResultResponse) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetCanceledAt() *timestamppb.Timestamp { if x != nil { - return x.Expiration + return x.CanceledAt } return nil } +func (x *FetchAsyncSearchResultResponse) GetFracsDone() uint64 { + if x != nil { + return x.FracsDone + } + return 0 +} + +func (x *FetchAsyncSearchResultResponse) GetFracsQueue() uint64 { + if x != nil { + return x.FracsQueue + } + return 0 +} + +func (x *FetchAsyncSearchResultResponse) GetDiskUsage() uint64 { + if x != nil { + return x.DiskUsage + } + return 0 +} + func (x *FetchAsyncSearchResultResponse) GetAggs() []*AggQuery { if x != nil { return x.Aggs @@ -934,11 +1038,451 @@ func (x *FetchAsyncSearchResultResponse) GetHistogramInterval() int64 { return 0 } -func (x *FetchAsyncSearchResultResponse) GetOrder() Order { +func (x *FetchAsyncSearchResultResponse) GetQuery() string { if x != nil { - return x.Order + return x.Query } - return Order_ORDER_DESC + return "" +} + +func (x *FetchAsyncSearchResultResponse) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetRetention() *durationpb.Duration { + if x != nil { + return x.Retention + } + return nil +} + +func (x *FetchAsyncSearchResultResponse) GetWithDocs() bool { + if x != nil { + return x.WithDocs + } + return false +} + +type CancelAsyncSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelAsyncSearchRequest) Reset() { + *x = CancelAsyncSearchRequest{} + mi := &file_storeapi_store_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelAsyncSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelAsyncSearchRequest) ProtoMessage() {} + +func (x *CancelAsyncSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[10] + 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 CancelAsyncSearchRequest.ProtoReflect.Descriptor instead. +func (*CancelAsyncSearchRequest) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{10} +} + +func (x *CancelAsyncSearchRequest) GetSearchId() string { + if x != nil { + return x.SearchId + } + return "" +} + +type CancelAsyncSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelAsyncSearchResponse) Reset() { + *x = CancelAsyncSearchResponse{} + mi := &file_storeapi_store_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelAsyncSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelAsyncSearchResponse) ProtoMessage() {} + +func (x *CancelAsyncSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[11] + 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 CancelAsyncSearchResponse.ProtoReflect.Descriptor instead. +func (*CancelAsyncSearchResponse) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{11} +} + +type DeleteAsyncSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAsyncSearchRequest) Reset() { + *x = DeleteAsyncSearchRequest{} + mi := &file_storeapi_store_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAsyncSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAsyncSearchRequest) ProtoMessage() {} + +func (x *DeleteAsyncSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[12] + 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 DeleteAsyncSearchRequest.ProtoReflect.Descriptor instead. +func (*DeleteAsyncSearchRequest) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteAsyncSearchRequest) GetSearchId() string { + if x != nil { + return x.SearchId + } + return "" +} + +type DeleteAsyncSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAsyncSearchResponse) Reset() { + *x = DeleteAsyncSearchResponse{} + mi := &file_storeapi_store_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAsyncSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAsyncSearchResponse) ProtoMessage() {} + +func (x *DeleteAsyncSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[13] + 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 DeleteAsyncSearchResponse.ProtoReflect.Descriptor instead. +func (*DeleteAsyncSearchResponse) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{13} +} + +type GetAsyncSearchesListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *AsyncSearchStatus `protobuf:"varint,1,opt,name=status,proto3,enum=api.AsyncSearchStatus,oneof" json:"status,omitempty"` + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAsyncSearchesListRequest) Reset() { + *x = GetAsyncSearchesListRequest{} + mi := &file_storeapi_store_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAsyncSearchesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAsyncSearchesListRequest) ProtoMessage() {} + +func (x *GetAsyncSearchesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[14] + 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 GetAsyncSearchesListRequest.ProtoReflect.Descriptor instead. +func (*GetAsyncSearchesListRequest) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetAsyncSearchesListRequest) GetStatus() AsyncSearchStatus { + if x != nil && x.Status != nil { + return *x.Status + } + return AsyncSearchStatus_AsyncSearchStatusInProgress +} + +func (x *GetAsyncSearchesListRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type GetAsyncSearchesListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Searches []*AsyncSearchesListItem `protobuf:"bytes,1,rep,name=searches,proto3" json:"searches,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAsyncSearchesListResponse) Reset() { + *x = GetAsyncSearchesListResponse{} + mi := &file_storeapi_store_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAsyncSearchesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAsyncSearchesListResponse) ProtoMessage() {} + +func (x *GetAsyncSearchesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[15] + 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 GetAsyncSearchesListResponse.ProtoReflect.Descriptor instead. +func (*GetAsyncSearchesListResponse) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetAsyncSearchesListResponse) GetSearches() []*AsyncSearchesListItem { + if x != nil { + return x.Searches + } + return nil +} + +type AsyncSearchesListItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + SearchId string `protobuf:"bytes,1,opt,name=search_id,json=searchId,proto3" json:"search_id,omitempty"` + Status AsyncSearchStatus `protobuf:"varint,2,opt,name=status,proto3,enum=api.AsyncSearchStatus" json:"status,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + CanceledAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=canceled_at,json=canceledAt,proto3,oneof" json:"canceled_at,omitempty"` + FracsDone uint64 `protobuf:"varint,6,opt,name=fracs_done,json=fracsDone,proto3" json:"fracs_done,omitempty"` + FracsQueue uint64 `protobuf:"varint,7,opt,name=fracs_queue,json=fracsQueue,proto3" json:"fracs_queue,omitempty"` + DiskUsage uint64 `protobuf:"varint,8,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"` + Aggs []*AggQuery `protobuf:"bytes,9,rep,name=aggs,proto3" json:"aggs,omitempty"` + HistogramInterval int64 `protobuf:"varint,10,opt,name=histogram_interval,json=histogramInterval,proto3" json:"histogram_interval,omitempty"` + Query string `protobuf:"bytes,11,opt,name=query,proto3" json:"query,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=from,proto3" json:"from,omitempty"` + To *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=to,proto3" json:"to,omitempty"` + Retention *durationpb.Duration `protobuf:"bytes,14,opt,name=retention,proto3" json:"retention,omitempty"` + WithDocs bool `protobuf:"varint,15,opt,name=with_docs,json=withDocs,proto3" json:"with_docs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AsyncSearchesListItem) Reset() { + *x = AsyncSearchesListItem{} + mi := &file_storeapi_store_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AsyncSearchesListItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncSearchesListItem) ProtoMessage() {} + +func (x *AsyncSearchesListItem) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[16] + 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 AsyncSearchesListItem.ProtoReflect.Descriptor instead. +func (*AsyncSearchesListItem) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{16} +} + +func (x *AsyncSearchesListItem) GetSearchId() string { + if x != nil { + return x.SearchId + } + return "" +} + +func (x *AsyncSearchesListItem) GetStatus() AsyncSearchStatus { + if x != nil { + return x.Status + } + return AsyncSearchStatus_AsyncSearchStatusInProgress +} + +func (x *AsyncSearchesListItem) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetCanceledAt() *timestamppb.Timestamp { + if x != nil { + return x.CanceledAt + } + return nil +} + +func (x *AsyncSearchesListItem) GetFracsDone() uint64 { + if x != nil { + return x.FracsDone + } + return 0 +} + +func (x *AsyncSearchesListItem) GetFracsQueue() uint64 { + if x != nil { + return x.FracsQueue + } + return 0 +} + +func (x *AsyncSearchesListItem) GetDiskUsage() uint64 { + if x != nil { + return x.DiskUsage + } + return 0 +} + +func (x *AsyncSearchesListItem) GetAggs() []*AggQuery { + if x != nil { + return x.Aggs + } + return nil +} + +func (x *AsyncSearchesListItem) GetHistogramInterval() int64 { + if x != nil { + return x.HistogramInterval + } + return 0 +} + +func (x *AsyncSearchesListItem) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *AsyncSearchesListItem) GetFrom() *timestamppb.Timestamp { + if x != nil { + return x.From + } + return nil +} + +func (x *AsyncSearchesListItem) GetTo() *timestamppb.Timestamp { + if x != nil { + return x.To + } + return nil +} + +func (x *AsyncSearchesListItem) GetRetention() *durationpb.Duration { + if x != nil { + return x.Retention + } + return nil +} + +func (x *AsyncSearchesListItem) GetWithDocs() bool { + if x != nil { + return x.WithDocs + } + return false } type IdWithHint struct { @@ -951,7 +1495,7 @@ type IdWithHint struct { func (x *IdWithHint) Reset() { *x = IdWithHint{} - mi := &file_storeapi_store_api_proto_msgTypes[10] + mi := &file_storeapi_store_api_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -963,7 +1507,7 @@ func (x *IdWithHint) String() string { func (*IdWithHint) ProtoMessage() {} func (x *IdWithHint) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[10] + mi := &file_storeapi_store_api_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -976,7 +1520,7 @@ func (x *IdWithHint) ProtoReflect() protoreflect.Message { // Deprecated: Use IdWithHint.ProtoReflect.Descriptor instead. func (*IdWithHint) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{10} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{17} } func (x *IdWithHint) GetId() string { @@ -1005,7 +1549,7 @@ type FetchRequest struct { func (x *FetchRequest) Reset() { *x = FetchRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[11] + mi := &file_storeapi_store_api_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1017,7 +1561,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[11] + mi := &file_storeapi_store_api_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1030,7 +1574,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{11} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{18} } func (x *FetchRequest) GetIds() []string { @@ -1069,7 +1613,7 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[12] + mi := &file_storeapi_store_api_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1081,7 +1625,7 @@ func (x *StatusRequest) String() string { func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[12] + mi := &file_storeapi_store_api_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1094,7 +1638,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{12} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{19} } type StatusResponse struct { @@ -1106,7 +1650,7 @@ type StatusResponse struct { func (x *StatusResponse) Reset() { *x = StatusResponse{} - mi := &file_storeapi_store_api_proto_msgTypes[13] + mi := &file_storeapi_store_api_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1118,7 +1662,7 @@ func (x *StatusResponse) String() string { func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[13] + mi := &file_storeapi_store_api_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1131,7 +1675,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{13} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{20} } func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { @@ -1151,7 +1695,7 @@ type SearchResponse_Id struct { func (x *SearchResponse_Id) Reset() { *x = SearchResponse_Id{} - mi := &file_storeapi_store_api_proto_msgTypes[14] + mi := &file_storeapi_store_api_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1163,7 +1707,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[14] + mi := &file_storeapi_store_api_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1203,7 +1747,7 @@ type SearchResponse_IdWithHint struct { func (x *SearchResponse_IdWithHint) Reset() { *x = SearchResponse_IdWithHint{} - mi := &file_storeapi_store_api_proto_msgTypes[15] + mi := &file_storeapi_store_api_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1215,7 +1759,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[15] + mi := &file_storeapi_store_api_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1259,7 +1803,7 @@ type SearchResponse_Histogram struct { func (x *SearchResponse_Histogram) Reset() { *x = SearchResponse_Histogram{} - mi := &file_storeapi_store_api_proto_msgTypes[16] + mi := &file_storeapi_store_api_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1271,7 +1815,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[16] + mi := &file_storeapi_store_api_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1340,7 +1884,7 @@ type SearchResponse_Bin struct { func (x *SearchResponse_Bin) Reset() { *x = SearchResponse_Bin{} - mi := &file_storeapi_store_api_proto_msgTypes[17] + mi := &file_storeapi_store_api_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1352,7 +1896,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[17] + mi := &file_storeapi_store_api_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1410,7 +1954,7 @@ type SearchResponse_Agg struct { func (x *SearchResponse_Agg) Reset() { *x = SearchResponse_Agg{} - mi := &file_storeapi_store_api_proto_msgTypes[18] + mi := &file_storeapi_store_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1422,7 +1966,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[18] + mi := &file_storeapi_store_api_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1478,7 +2022,7 @@ type FetchRequest_FieldsFilter struct { func (x *FetchRequest_FieldsFilter) Reset() { *x = FetchRequest_FieldsFilter{} - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1490,7 +2034,7 @@ func (x *FetchRequest_FieldsFilter) String() string { func (*FetchRequest_FieldsFilter) ProtoMessage() {} func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1503,7 +2047,7 @@ func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest_FieldsFilter.ProtoReflect.Descriptor instead. func (*FetchRequest_FieldsFilter) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{11, 0} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{18, 0} } func (x *FetchRequest_FieldsFilter) GetFields() []string { @@ -1654,94 +2198,199 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xe4, 0x01, 0x0a, 0x17, 0x53, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x98, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, - 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x21, 0x0a, - 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x41, 0x67, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, - 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x69, - 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x20, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x22, 0x1a, 0x0a, 0x18, 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, 0x85, 0x01, - 0x0a, 0x1d, 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, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x77, 0x69, 0x74, 0x68, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x95, 0x02, 0x0a, 0x1e, 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, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x2f, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x68, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x67, 0x67, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, + 0x68, 0x44, 0x6f, 0x63, 0x73, 0x22, 0x1a, 0x0a, 0x18, 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, 0x8a, 0x01, 0x0a, 0x1d, 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, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0xc2, + 0x05, 0x0a, 0x1e, 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, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x2f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 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, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x67, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x67, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, + 0x61, 0x63, 0x73, 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x66, 0x72, 0x61, 0x63, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x61, + 0x63, 0x73, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x66, 0x72, 0x61, 0x63, 0x73, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, + 0x73, 0x6b, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x64, 0x69, 0x73, 0x6b, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x67, 0x67, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x67, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, - 0x72, 0x61, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 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, - 0x91, 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, 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, 0x78, 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, - 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x55, 0x4e, 0x49, 0x51, - 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, 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, 0x32, 0x91, 0x03, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, + 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x0c, 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, 0x0d, 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, 0x37, 0x0a, + 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, + 0x6f, 0x63, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x44, + 0x6f, 0x63, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x22, 0x37, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, + 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, 0x37, 0x0a, 0x18, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 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, + 0x6f, 0x0a, 0x1b, 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, 0x12, 0x33, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x03, 0x69, 0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x56, 0x0a, 0x1c, 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, + 0x12, 0x36, 0x0a, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x22, 0xa5, 0x05, 0x0a, 0x15, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, + 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x12, + 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x09, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x63, 0x73, + 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x72, 0x61, + 0x63, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x61, 0x63, 0x73, 0x5f, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x66, 0x72, 0x61, + 0x63, 0x73, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x64, 0x69, 0x73, + 0x6b, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x67, 0x67, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x67, 0x67, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x04, 0x61, 0x67, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2e, + 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x0c, 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, 0x0d, 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, 0x37, 0x0a, 0x09, 0x72, 0x65, + 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x6f, 0x63, 0x73, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x44, 0x6f, 0x63, 0x73, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x61, 0x6e, 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, 0x91, 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, 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, 0x78, + 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, 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x55, + 0x4e, 0x49, 0x51, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, 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, 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, @@ -1760,17 +2409,33 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 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, 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, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, - 0x6c, 0x61, 0x62, 0x2e, 0x6f, 0x7a, 0x6f, 0x6e, 0x2e, 0x72, 0x75, 0x2f, 0x73, 0x72, 0x65, 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, + 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, }) var ( @@ -1785,83 +2450,113 @@ 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, 3) -var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +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_goTypes = []any{ (AggFunc)(0), // 0: api.AggFunc (Order)(0), // 1: api.Order (SearchErrorCode)(0), // 2: api.SearchErrorCode - (*BulkRequest)(nil), // 3: api.BulkRequest - (*BinaryData)(nil), // 4: api.BinaryData - (*AggQuery)(nil), // 5: api.AggQuery - (*SearchRequest)(nil), // 6: api.SearchRequest - (*SearchResponse)(nil), // 7: api.SearchResponse - (*ExplainEntry)(nil), // 8: api.ExplainEntry - (*StartAsyncSearchRequest)(nil), // 9: api.StartAsyncSearchRequest - (*StartAsyncSearchResponse)(nil), // 10: api.StartAsyncSearchResponse - (*FetchAsyncSearchResultRequest)(nil), // 11: api.FetchAsyncSearchResultRequest - (*FetchAsyncSearchResultResponse)(nil), // 12: api.FetchAsyncSearchResultResponse - (*IdWithHint)(nil), // 13: api.IdWithHint - (*FetchRequest)(nil), // 14: api.FetchRequest - (*StatusRequest)(nil), // 15: api.StatusRequest - (*StatusResponse)(nil), // 16: api.StatusResponse - (*SearchResponse_Id)(nil), // 17: api.SearchResponse.Id - (*SearchResponse_IdWithHint)(nil), // 18: api.SearchResponse.IdWithHint - (*SearchResponse_Histogram)(nil), // 19: api.SearchResponse.Histogram - (*SearchResponse_Bin)(nil), // 20: api.SearchResponse.Bin - (*SearchResponse_Agg)(nil), // 21: api.SearchResponse.Agg - nil, // 22: api.SearchResponse.HistogramEntry - nil, // 23: api.SearchResponse.Agg.AggEntry - nil, // 24: api.SearchResponse.Agg.AggHistogramEntry - (*FetchRequest_FieldsFilter)(nil), // 25: api.FetchRequest.FieldsFilter - (*durationpb.Duration)(nil), // 26: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 28: google.protobuf.Empty + (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 } var file_storeapi_store_api_proto_depIdxs = []int32{ 0, // 0: api.AggQuery.func:type_name -> api.AggFunc - 5, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery + 6, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery 1, // 2: api.SearchRequest.order:type_name -> api.Order - 18, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint - 22, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry - 21, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg + 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 2, // 6: api.SearchResponse.code:type_name -> api.SearchErrorCode - 8, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry - 26, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration - 8, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry - 5, // 10: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery - 1, // 11: api.StartAsyncSearchRequest.order:type_name -> api.Order - 7, // 12: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse - 27, // 13: api.FetchAsyncSearchResultResponse.expiration:type_name -> google.protobuf.Timestamp - 5, // 14: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery - 1, // 15: api.FetchAsyncSearchResultResponse.order:type_name -> api.Order - 13, // 16: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint - 25, // 17: api.FetchRequest.fields_filter:type_name -> api.FetchRequest.FieldsFilter - 27, // 18: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp - 17, // 19: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id - 27, // 20: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp - 19, // 21: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram - 23, // 22: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry - 24, // 23: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry - 20, // 24: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin - 19, // 25: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram - 3, // 26: api.StoreApi.Bulk:input_type -> api.BulkRequest - 6, // 27: api.StoreApi.Search:input_type -> api.SearchRequest - 9, // 28: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest - 11, // 29: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest - 14, // 30: api.StoreApi.Fetch:input_type -> api.FetchRequest - 15, // 31: api.StoreApi.Status:input_type -> api.StatusRequest - 28, // 32: api.StoreApi.Bulk:output_type -> google.protobuf.Empty - 7, // 33: api.StoreApi.Search:output_type -> api.SearchResponse - 10, // 34: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse - 12, // 35: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse - 4, // 36: api.StoreApi.Fetch:output_type -> api.BinaryData - 16, // 37: api.StoreApi.Status:output_type -> api.StatusResponse - 32, // [32:38] is the sub-list for method output_type - 26, // [26:32] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 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 + 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 + 3, // 22: api.GetAsyncSearchesListRequest.status:type_name -> api.AsyncSearchStatus + 20, // 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 } func init() { file_storeapi_store_api_proto_init() } @@ -1870,13 +2565,16 @@ func file_storeapi_store_api_proto_init() { return } file_storeapi_store_api_proto_msgTypes[4].OneofWrappers = []any{} + 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{} 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: 3, - NumMessages: 23, + NumEnums: 4, + NumMessages: 30, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/storeapi/store_api.pb.gw.go b/pkg/storeapi/store_api.pb.gw.go index af9937dd..385ec993 100644 --- a/pkg/storeapi/store_api.pb.gw.go +++ b/pkg/storeapi/store_api.pb.gw.go @@ -131,6 +131,78 @@ func local_request_StoreApi_FetchAsyncSearchResult_0(ctx context.Context, marsha return msg, metadata, err } +func request_StoreApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CancelAsyncSearchRequest + 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.CancelAsyncSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_StoreApi_CancelAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, server StoreApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CancelAsyncSearchRequest + 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.CancelAsyncSearch(ctx, &protoReq) + return msg, metadata, err +} + +func request_StoreApi_DeleteAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq DeleteAsyncSearchRequest + 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.DeleteAsyncSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_StoreApi_DeleteAsyncSearch_0(ctx context.Context, marshaler runtime.Marshaler, server StoreApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq DeleteAsyncSearchRequest + 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.DeleteAsyncSearch(ctx, &protoReq) + return msg, metadata, err +} + +func request_StoreApi_GetAsyncSearchesList_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAsyncSearchesListRequest + 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.GetAsyncSearchesList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_StoreApi_GetAsyncSearchesList_0(ctx context.Context, marshaler runtime.Marshaler, server StoreApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetAsyncSearchesListRequest + 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.GetAsyncSearchesList(ctx, &protoReq) + return msg, metadata, err +} + func request_StoreApi_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (StoreApi_FetchClient, runtime.ServerMetadata, error) { var ( protoReq FetchRequest @@ -261,6 +333,66 @@ func RegisterStoreApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_StoreApi_FetchAsyncSearchResult_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_CancelAsyncSearch_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, "/api.StoreApi/CancelAsyncSearch", runtime.WithHTTPPathPattern("/api.StoreApi/CancelAsyncSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StoreApi_CancelAsyncSearch_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_StoreApi_CancelAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_StoreApi_DeleteAsyncSearch_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, "/api.StoreApi/DeleteAsyncSearch", runtime.WithHTTPPathPattern("/api.StoreApi/DeleteAsyncSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StoreApi_DeleteAsyncSearch_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_StoreApi_DeleteAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_StoreApi_GetAsyncSearchesList_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, "/api.StoreApi/GetAsyncSearchesList", runtime.WithHTTPPathPattern("/api.StoreApi/GetAsyncSearchesList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StoreApi_GetAsyncSearchesList_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_StoreApi_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle(http.MethodPost, pattern_StoreApi_Fetch_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") @@ -396,6 +528,57 @@ func RegisterStoreApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_StoreApi_FetchAsyncSearchResult_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_CancelAsyncSearch_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/CancelAsyncSearch", runtime.WithHTTPPathPattern("/api.StoreApi/CancelAsyncSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StoreApi_CancelAsyncSearch_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_CancelAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_StoreApi_DeleteAsyncSearch_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/DeleteAsyncSearch", runtime.WithHTTPPathPattern("/api.StoreApi/DeleteAsyncSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StoreApi_DeleteAsyncSearch_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_DeleteAsyncSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_StoreApi_GetAsyncSearchesList_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/GetAsyncSearchesList", runtime.WithHTTPPathPattern("/api.StoreApi/GetAsyncSearchesList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StoreApi_GetAsyncSearchesList_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_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle(http.MethodPost, pattern_StoreApi_Fetch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -438,6 +621,9 @@ var ( pattern_StoreApi_Search_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "Search"}, "")) pattern_StoreApi_StartAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "StartAsyncSearch"}, "")) pattern_StoreApi_FetchAsyncSearchResult_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "FetchAsyncSearchResult"}, "")) + pattern_StoreApi_CancelAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "CancelAsyncSearch"}, "")) + pattern_StoreApi_DeleteAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "DeleteAsyncSearch"}, "")) + 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"}, "")) ) @@ -447,6 +633,9 @@ var ( forward_StoreApi_Search_0 = runtime.ForwardResponseMessage forward_StoreApi_StartAsyncSearch_0 = runtime.ForwardResponseMessage forward_StoreApi_FetchAsyncSearchResult_0 = runtime.ForwardResponseMessage + forward_StoreApi_CancelAsyncSearch_0 = runtime.ForwardResponseMessage + forward_StoreApi_DeleteAsyncSearch_0 = runtime.ForwardResponseMessage + forward_StoreApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage forward_StoreApi_Fetch_0 = runtime.ForwardResponseStream forward_StoreApi_Status_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/storeapi/store_api_vtproto.pb.go b/pkg/storeapi/store_api_vtproto.pb.go index 4ba1d793..28fc34ef 100644 --- a/pkg/storeapi/store_api_vtproto.pb.go +++ b/pkg/storeapi/store_api_vtproto.pb.go @@ -338,11 +338,12 @@ func (m *StartAsyncSearchRequest) CloneVT() *StartAsyncSearchRequest { } r := new(StartAsyncSearchRequest) r.SearchId = m.SearchId + r.Retention = (*durationpb.Duration)((*durationpb1.Duration)(m.Retention).CloneVT()) r.Query = m.Query r.From = m.From r.To = m.To r.HistogramInterval = m.HistogramInterval - r.Order = m.Order + r.WithDocs = m.WithDocs if rhs := m.Aggs; rhs != nil { tmpContainer := make([]*AggQuery, len(rhs)) for k, v := range rhs { @@ -383,9 +384,9 @@ func (m *FetchAsyncSearchResultRequest) CloneVT() *FetchAsyncSearchResultRequest } r := new(FetchAsyncSearchResultRequest) r.SearchId = m.SearchId - r.WithDocs = m.WithDocs r.Size = m.Size r.Offset = m.Offset + r.Order = m.Order if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -402,11 +403,20 @@ func (m *FetchAsyncSearchResultResponse) CloneVT() *FetchAsyncSearchResultRespon return (*FetchAsyncSearchResultResponse)(nil) } r := new(FetchAsyncSearchResultResponse) - r.Done = m.Done + r.Status = m.Status r.Response = m.Response.CloneVT() - r.Expiration = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.Expiration).CloneVT()) + r.StartedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartedAt).CloneVT()) + r.ExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.ExpiresAt).CloneVT()) + r.CanceledAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CanceledAt).CloneVT()) + r.FracsDone = m.FracsDone + r.FracsQueue = m.FracsQueue + r.DiskUsage = m.DiskUsage r.HistogramInterval = m.HistogramInterval - r.Order = m.Order + r.Query = m.Query + r.From = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.From).CloneVT()) + r.To = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.To).CloneVT()) + r.Retention = (*durationpb.Duration)((*durationpb1.Duration)(m.Retention).CloneVT()) + r.WithDocs = m.WithDocs if rhs := m.Aggs; rhs != nil { tmpContainer := make([]*AggQuery, len(rhs)) for k, v := range rhs { @@ -425,6 +435,157 @@ func (m *FetchAsyncSearchResultResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *CancelAsyncSearchRequest) CloneVT() *CancelAsyncSearchRequest { + if m == nil { + return (*CancelAsyncSearchRequest)(nil) + } + r := new(CancelAsyncSearchRequest) + r.SearchId = m.SearchId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CancelAsyncSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *CancelAsyncSearchResponse) CloneVT() *CancelAsyncSearchResponse { + if m == nil { + return (*CancelAsyncSearchResponse)(nil) + } + r := new(CancelAsyncSearchResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *CancelAsyncSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeleteAsyncSearchRequest) CloneVT() *DeleteAsyncSearchRequest { + if m == nil { + return (*DeleteAsyncSearchRequest)(nil) + } + r := new(DeleteAsyncSearchRequest) + r.SearchId = m.SearchId + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeleteAsyncSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *DeleteAsyncSearchResponse) CloneVT() *DeleteAsyncSearchResponse { + if m == nil { + return (*DeleteAsyncSearchResponse)(nil) + } + r := new(DeleteAsyncSearchResponse) + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeleteAsyncSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetAsyncSearchesListRequest) CloneVT() *GetAsyncSearchesListRequest { + if m == nil { + return (*GetAsyncSearchesListRequest)(nil) + } + r := new(GetAsyncSearchesListRequest) + if rhs := m.Status; rhs != nil { + tmpVal := *rhs + r.Status = &tmpVal + } + if rhs := m.Ids; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Ids = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetAsyncSearchesListRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetAsyncSearchesListResponse) CloneVT() *GetAsyncSearchesListResponse { + if m == nil { + return (*GetAsyncSearchesListResponse)(nil) + } + r := new(GetAsyncSearchesListResponse) + if rhs := m.Searches; rhs != nil { + tmpContainer := make([]*AsyncSearchesListItem, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Searches = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetAsyncSearchesListResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *AsyncSearchesListItem) CloneVT() *AsyncSearchesListItem { + if m == nil { + return (*AsyncSearchesListItem)(nil) + } + r := new(AsyncSearchesListItem) + r.SearchId = m.SearchId + r.Status = m.Status + r.StartedAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.StartedAt).CloneVT()) + r.ExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.ExpiresAt).CloneVT()) + r.CanceledAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.CanceledAt).CloneVT()) + r.FracsDone = m.FracsDone + r.FracsQueue = m.FracsQueue + r.DiskUsage = m.DiskUsage + r.HistogramInterval = m.HistogramInterval + r.Query = m.Query + r.From = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.From).CloneVT()) + r.To = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.To).CloneVT()) + r.Retention = (*durationpb.Duration)((*durationpb1.Duration)(m.Retention).CloneVT()) + r.WithDocs = m.WithDocs + if rhs := m.Aggs; rhs != nil { + tmpContainer := make([]*AggQuery, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Aggs = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *AsyncSearchesListItem) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *IdWithHint) CloneVT() *IdWithHint { if m == nil { return (*IdWithHint)(nil) @@ -983,6 +1144,9 @@ func (this *StartAsyncSearchRequest) EqualVT(that *StartAsyncSearchRequest) bool if this.SearchId != that.SearchId { return false } + if !(*durationpb1.Duration)(this.Retention).EqualVT((*durationpb1.Duration)(that.Retention)) { + return false + } if this.Query != that.Query { return false } @@ -1012,7 +1176,7 @@ func (this *StartAsyncSearchRequest) EqualVT(that *StartAsyncSearchRequest) bool if this.HistogramInterval != that.HistogramInterval { return false } - if this.Order != that.Order { + if this.WithDocs != that.WithDocs { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1050,15 +1214,15 @@ func (this *FetchAsyncSearchResultRequest) EqualVT(that *FetchAsyncSearchResultR if this.SearchId != that.SearchId { return false } - if this.WithDocs != that.WithDocs { - return false - } if this.Size != that.Size { return false } if this.Offset != that.Offset { return false } + if this.Order != that.Order { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1075,13 +1239,28 @@ func (this *FetchAsyncSearchResultResponse) EqualVT(that *FetchAsyncSearchResult } else if this == nil || that == nil { return false } - if this.Done != that.Done { + if this.Status != that.Status { return false } if !this.Response.EqualVT(that.Response) { return false } - if !(*timestamppb1.Timestamp)(this.Expiration).EqualVT((*timestamppb1.Timestamp)(that.Expiration)) { + if !(*timestamppb1.Timestamp)(this.StartedAt).EqualVT((*timestamppb1.Timestamp)(that.StartedAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.ExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.ExpiresAt)) { + return false + } + if !(*timestamppb1.Timestamp)(this.CanceledAt).EqualVT((*timestamppb1.Timestamp)(that.CanceledAt)) { + return false + } + if this.FracsDone != that.FracsDone { + return false + } + if this.FracsQueue != that.FracsQueue { + return false + } + if this.DiskUsage != that.DiskUsage { return false } if len(this.Aggs) != len(that.Aggs) { @@ -1104,7 +1283,19 @@ func (this *FetchAsyncSearchResultResponse) EqualVT(that *FetchAsyncSearchResult if this.HistogramInterval != that.HistogramInterval { return false } - if this.Order != that.Order { + if this.Query != that.Query { + return false + } + 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 !(*durationpb1.Duration)(this.Retention).EqualVT((*durationpb1.Duration)(that.Retention)) { + return false + } + if this.WithDocs != that.WithDocs { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1117,62 +1308,85 @@ func (this *FetchAsyncSearchResultResponse) EqualMessageVT(thatMsg proto.Message } return this.EqualVT(that) } -func (this *IdWithHint) EqualVT(that *IdWithHint) bool { +func (this *CancelAsyncSearchRequest) EqualVT(that *CancelAsyncSearchRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } - if this.Id != that.Id { + if this.SearchId != that.SearchId { return false } - if this.Hint != that.Hint { + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *CancelAsyncSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CancelAsyncSearchRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *CancelAsyncSearchResponse) EqualVT(that *CancelAsyncSearchResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } -func (this *IdWithHint) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*IdWithHint) +func (this *CancelAsyncSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*CancelAsyncSearchResponse) if !ok { return false } return this.EqualVT(that) } -func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) bool { +func (this *DeleteAsyncSearchRequest) EqualVT(that *DeleteAsyncSearchRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } - if len(this.Fields) != len(that.Fields) { + if this.SearchId != that.SearchId { return false } - for i, vx := range this.Fields { - vy := that.Fields[i] - if vx != vy { - return false - } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeleteAsyncSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeleteAsyncSearchRequest) + if !ok { + return false } - if this.AllowList != that.AllowList { + return this.EqualVT(that) +} +func (this *DeleteAsyncSearchResponse) EqualVT(that *DeleteAsyncSearchResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } return string(this.unknownFields) == string(that.unknownFields) } -func (this *FetchRequest_FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*FetchRequest_FieldsFilter) +func (this *DeleteAsyncSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeleteAsyncSearchResponse) if !ok { return false } return this.EqualVT(that) } -func (this *FetchRequest) EqualVT(that *FetchRequest) bool { +func (this *GetAsyncSearchesListRequest) EqualVT(that *GetAsyncSearchesListRequest) bool { if this == that { return true } else if this == nil || that == nil { return false } + if p, q := this.Status, that.Status; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } if len(this.Ids) != len(that.Ids) { return false } @@ -1182,99 +1396,285 @@ func (this *FetchRequest) EqualVT(that *FetchRequest) bool { return false } } - if this.Explain != that.Explain { + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetAsyncSearchesListRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetAsyncSearchesListRequest) + if !ok { return false } - if len(this.IdsWithHints) != len(that.IdsWithHints) { + return this.EqualVT(that) +} +func (this *GetAsyncSearchesListResponse) EqualVT(that *GetAsyncSearchesListResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { return false } - for i, vx := range this.IdsWithHints { - vy := that.IdsWithHints[i] + if len(this.Searches) != len(that.Searches) { + return false + } + for i, vx := range this.Searches { + vy := that.Searches[i] if p, q := vx, vy; p != q { if p == nil { - p = &IdWithHint{} + p = &AsyncSearchesListItem{} } if q == nil { - q = &IdWithHint{} + q = &AsyncSearchesListItem{} } if !p.EqualVT(q) { return false } } } - if !this.FieldsFilter.EqualVT(that.FieldsFilter) { - return false - } return string(this.unknownFields) == string(that.unknownFields) } -func (this *FetchRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*FetchRequest) +func (this *GetAsyncSearchesListResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetAsyncSearchesListResponse) if !ok { return false } return this.EqualVT(that) } -func (this *StatusRequest) EqualVT(that *StatusRequest) bool { +func (this *AsyncSearchesListItem) EqualVT(that *AsyncSearchesListItem) bool { if this == that { return true } else if this == nil || that == nil { return false } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StatusRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StatusRequest) - if !ok { + if this.SearchId != that.SearchId { return false } - return this.EqualVT(that) -} -func (this *StatusResponse) EqualVT(that *StatusResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { + if this.Status != that.Status { return false } - if !(*timestamppb1.Timestamp)(this.OldestTime).EqualVT((*timestamppb1.Timestamp)(that.OldestTime)) { + if !(*timestamppb1.Timestamp)(this.StartedAt).EqualVT((*timestamppb1.Timestamp)(that.StartedAt)) { return false } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StatusResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StatusResponse) - if !ok { + if !(*timestamppb1.Timestamp)(this.ExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.ExpiresAt)) { 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) - 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} -} + if !(*timestamppb1.Timestamp)(this.CanceledAt).EqualVT((*timestamppb1.Timestamp)(that.CanceledAt)) { + return false + } + if this.FracsDone != that.FracsDone { + return false + } + if this.FracsQueue != that.FracsQueue { + return false + } + if this.DiskUsage != that.DiskUsage { + return false + } + if len(this.Aggs) != len(that.Aggs) { + return false + } + for i, vx := range this.Aggs { + vy := that.Aggs[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &AggQuery{} + } + if q == nil { + q = &AggQuery{} + } + if !p.EqualVT(q) { + return false + } + } + } + if this.HistogramInterval != that.HistogramInterval { + return false + } + if this.Query != that.Query { + return false + } + 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 !(*durationpb1.Duration)(this.Retention).EqualVT((*durationpb1.Duration)(that.Retention)) { + return false + } + if this.WithDocs != that.WithDocs { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *AsyncSearchesListItem) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*AsyncSearchesListItem) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *IdWithHint) EqualVT(that *IdWithHint) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Id != that.Id { + return false + } + if this.Hint != that.Hint { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *IdWithHint) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*IdWithHint) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Fields) != len(that.Fields) { + return false + } + for i, vx := range this.Fields { + vy := that.Fields[i] + if vx != vy { + return false + } + } + if this.AllowList != that.AllowList { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *FetchRequest_FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*FetchRequest_FieldsFilter) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *FetchRequest) EqualVT(that *FetchRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Ids) != len(that.Ids) { + return false + } + for i, vx := range this.Ids { + vy := that.Ids[i] + if vx != vy { + return false + } + } + if this.Explain != that.Explain { + return false + } + if len(this.IdsWithHints) != len(that.IdsWithHints) { + return false + } + for i, vx := range this.IdsWithHints { + vy := that.IdsWithHints[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &IdWithHint{} + } + if q == nil { + q = &IdWithHint{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.FieldsFilter.EqualVT(that.FieldsFilter) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *FetchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*FetchRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StatusRequest) EqualVT(that *StatusRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StatusRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StatusRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StatusResponse) EqualVT(that *StatusResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !(*timestamppb1.Timestamp)(this.OldestTime).EqualVT((*timestamppb1.Timestamp)(that.OldestTime)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StatusResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*StatusResponse) + 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) +} + +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) @@ -1312,6 +1712,33 @@ func (c *storeApiClient) FetchAsyncSearchResult(ctx context.Context, in *FetchAs 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) { + out := new(GetAsyncSearchesListResponse) + err := c.cc.Invoke(ctx, "/api.StoreApi/GetAsyncSearchesList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *storeApiClient) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (StoreApi_FetchClient, error) { stream, err := c.cc.NewStream(ctx, &StoreApi_ServiceDesc.Streams[0], "/api.StoreApi/Fetch", opts...) if err != nil { @@ -1361,6 +1788,9 @@ type StoreApiServer interface { Search(context.Context, *SearchRequest) (*SearchResponse, error) StartAsyncSearch(context.Context, *StartAsyncSearchRequest) (*StartAsyncSearchResponse, error) FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) + CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) + DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) + GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) Fetch(*FetchRequest, StoreApi_FetchServer) error Status(context.Context, *StatusRequest) (*StatusResponse, error) mustEmbedUnimplementedStoreApiServer() @@ -1382,6 +1812,15 @@ func (UnimplementedStoreApiServer) StartAsyncSearch(context.Context, *StartAsync func (UnimplementedStoreApiServer) FetchAsyncSearchResult(context.Context, *FetchAsyncSearchResultRequest) (*FetchAsyncSearchResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FetchAsyncSearchResult not implemented") } +func (UnimplementedStoreApiServer) CancelAsyncSearch(context.Context, *CancelAsyncSearchRequest) (*CancelAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelAsyncSearch not implemented") +} +func (UnimplementedStoreApiServer) DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAsyncSearch not implemented") +} +func (UnimplementedStoreApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") +} func (UnimplementedStoreApiServer) Fetch(*FetchRequest, StoreApi_FetchServer) error { return status.Errorf(codes.Unimplemented, "method Fetch not implemented") } @@ -1473,48 +1912,102 @@ func _StoreApi_FetchAsyncSearchResult_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _StoreApi_Fetch_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(FetchRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StoreApiServer).Fetch(m, &storeApiFetchServer{stream}) -} - -type StoreApi_FetchServer interface { - Send(*BinaryData) error - grpc.ServerStream -} - -type storeApiFetchServer struct { - grpc.ServerStream -} - -func (x *storeApiFetchServer) Send(m *BinaryData) error { - return x.ServerStream.SendMsg(m) -} - -func _StoreApi_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusRequest) +func _StoreApi_CancelAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelAsyncSearchRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(StoreApiServer).Status(ctx, in) + return srv.(StoreApiServer).CancelAsyncSearch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.StoreApi/Status", + FullMethod: "/api.StoreApi/CancelAsyncSearch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StoreApiServer).Status(ctx, req.(*StatusRequest)) + return srv.(StoreApiServer).CancelAsyncSearch(ctx, req.(*CancelAsyncSearchRequest)) } return interceptor(ctx, in, info, handler) } -// 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) +func _StoreApi_DeleteAsyncSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAsyncSearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreApiServer).DeleteAsyncSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.StoreApi/DeleteAsyncSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreApiServer).DeleteAsyncSearch(ctx, req.(*DeleteAsyncSearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoreApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAsyncSearchesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreApiServer).GetAsyncSearchesList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.StoreApi/GetAsyncSearchesList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreApiServer).GetAsyncSearchesList(ctx, req.(*GetAsyncSearchesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoreApi_Fetch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FetchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StoreApiServer).Fetch(m, &storeApiFetchServer{stream}) +} + +type StoreApi_FetchServer interface { + Send(*BinaryData) error + grpc.ServerStream +} + +type storeApiFetchServer struct { + grpc.ServerStream +} + +func (x *storeApiFetchServer) Send(m *BinaryData) error { + return x.ServerStream.SendMsg(m) +} + +func _StoreApi_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreApiServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.StoreApi/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreApiServer).Status(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// 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) var StoreApi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.StoreApi", HandlerType: (*StoreApiServer)(nil), @@ -1535,6 +2028,18 @@ var StoreApi_ServiceDesc = grpc.ServiceDesc{ MethodName: "FetchAsyncSearchResult", Handler: _StoreApi_FetchAsyncSearchResult_Handler, }, + { + MethodName: "CancelAsyncSearch", + Handler: _StoreApi_CancelAsyncSearch_Handler, + }, + { + MethodName: "DeleteAsyncSearch", + Handler: _StoreApi_DeleteAsyncSearch_Handler, + }, + { + MethodName: "GetAsyncSearchesList", + Handler: _StoreApi_GetAsyncSearchesList_Handler, + }, { MethodName: "Status", Handler: _StoreApi_Status_Handler, @@ -2338,15 +2843,20 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if m.WithDocs { i-- - dAtA[i] = 0x38 + 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] = 0x30 + dAtA[i] = 0x38 } if len(m.Aggs) > 0 { for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { @@ -2357,24 +2867,34 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } } if m.To != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if m.From != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) i-- - dAtA[i] = 0x18 + 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).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- dAtA[i] = 0x12 } if len(m.SearchId) > 0 { @@ -2450,23 +2970,18 @@ func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVT(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- dAtA[i] = 0x20 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) i-- dAtA[i] = 0x18 } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) i-- dAtA[i] = 0x10 } @@ -2510,15 +3025,57 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if m.WithDocs { i-- - dAtA[i] = 0x38 + if m.WithDocs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 + } + if m.Retention != nil { + size, err := (*durationpb1.Duration)(m.Retention).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + 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] = 0x6a + } + 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] = 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 m.HistogramInterval != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x50 } if len(m.Aggs) > 0 { for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { @@ -2529,11 +3086,46 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x4a + } + } + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.FracsQueue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) + i-- + dAtA[i] = 0x38 + } + if m.FracsDone != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + i-- + dAtA[i] = 0x30 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - if m.Expiration != nil { - size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVT(dAtA[:i]) + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -2552,20 +3144,15 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVT(dAtA []byte) (in i-- dAtA[i] = 0x12 } - if m.Done { - i-- - if m.Done { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *IdWithHint) MarshalVT() (dAtA []byte, err error) { +func (m *CancelAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2578,12 +3165,12 @@ func (m *IdWithHint) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IdWithHint) MarshalToVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *IdWithHint) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2595,24 +3182,17 @@ func (m *IdWithHint) MarshalToSizedBufferVT(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) MarshalVT() (dAtA []byte, err error) { +func (m *CancelAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2625,12 +3205,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 *CancelAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2642,29 +3222,10 @@ func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.AllowList { - i-- - if m.AllowList { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - 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) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2677,12 +3238,12 @@ func (m *FetchRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2694,51 +3255,17 @@ func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.FieldsFilter != nil { - size, err := m.FieldsFilter.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + 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] = 0x2a - } - if len(m.IdsWithHints) > 0 { - for iNdEx := len(m.IdsWithHints) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.IdsWithHints[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if m.Explain { - i-- - if m.Explain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - 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) MarshalVT() (dAtA []byte, err error) { +func (m *DeleteAsyncSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2751,12 +3278,12 @@ func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2771,7 +3298,7 @@ func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -2784,12 +3311,12 @@ func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2801,38 +3328,42 @@ func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.OldestTime != nil { - size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVT(dAtA[:i]) - if 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) MarshalVTStrict() (dAtA []byte, err error) { +func (m *GetAsyncSearchesListResponse) 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 *GetAsyncSearchesListResponse) 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 *GetAsyncSearchesListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2844,47 +3375,40 @@ 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))) - 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))) - i-- - dAtA[i] = 0x12 - } - if m.Count != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x8 + if len(m.Searches) > 0 { + for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Searches[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { +func (m *AsyncSearchesListItem) 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 *AsyncSearchesListItem) 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 *AsyncSearchesListItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2896,35 +3420,149 @@ 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 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).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + 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] = 0x6a + } + 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] = 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 m.HistogramInterval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + i-- + dAtA[i] = 0x50 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a + } + } + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.FracsQueue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) + i-- + dAtA[i] = 0x38 + } + if m.FracsDone != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + i-- + dAtA[i] = 0x30 + } + if m.CanceledAt != nil { + size, err := (*timestamppb1.Timestamp)(m.CanceledAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } + if m.ExpiresAt != nil { + size, err := (*timestamppb1.Timestamp)(m.ExpiresAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + if m.StartedAt != nil { + size, err := (*timestamppb1.Timestamp)(m.StartedAt).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *IdWithHint) 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 *IdWithHint) 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 *IdWithHint) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -2936,62 +3574,42 @@ 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)) - } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) - i-- - dAtA[i] = 0x2a - } - if m.Func != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) - i-- - dAtA[i] = 0x20 - } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) + if len(m.Hint) > 0 { + i -= len(m.Hint) + copy(dAtA[i:], m.Hint) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hint))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.Field) > 0 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest_FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3003,39 +3621,79 @@ func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if m.AllowList { i-- - dAtA[i] = 0x68 - } - 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] = 0x62 + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x10 } - 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 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 + } } - if m.WithTotal { - i-- - if m.WithTotal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + return len(dAtA) - i, nil +} + +func (m *FetchRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FetchRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *FetchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if 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] = 0x50 + dAtA[i] = 0x2a + } + if len(m.IdsWithHints) > 0 { + for iNdEx := len(m.IdsWithHints) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.IdsWithHints[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } } if m.Explain { i-- @@ -3045,69 +3703,39 @@ func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 - } - 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 + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *SearchResponse_Id) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchResponse_Id) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StatusRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchResponse_Id) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3119,38 +3747,28 @@ 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 - } return len(dAtA) - i, nil } -func (m *SearchResponse_IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *SearchResponse_IdWithHint) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StatusResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SearchResponse_IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3162,15 +3780,8 @@ 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 m.OldestTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -3182,7 +3793,7 @@ func (m *SearchResponse_IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (i 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 } @@ -3195,12 +3806,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 } @@ -3212,48 +3823,29 @@ func (m *SearchResponse_Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Samples) > 0 { - for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Samples[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - } - 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 } @@ -3266,12 +3858,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 } @@ -3283,37 +3875,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 } @@ -3326,12 +3898,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 } @@ -3343,66 +3915,44 @@ func (m *SearchResponse_Agg) MarshalToSizedBufferVTStrict(dAtA []byte) (int, err i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - 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.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)) } + 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 } @@ -3415,12 +3965,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 } @@ -3432,34 +3982,10 @@ 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)) - 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 - } - } - 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-- { @@ -3470,47 +3996,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 } @@ -3523,12 +4081,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 } @@ -3540,39 +4098,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 } @@ -3585,12 +4124,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 } @@ -3602,56 +4141,27 @@ func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + 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] = 0x38 + dAtA[i] = 0x1a } - if m.HistogramInterval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) - i-- - dAtA[i] = 0x30 - } - 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] = 0x2a - } - } - if m.To != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) - i-- - dAtA[i] = 0x20 - } - if m.From != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) - i-- - dAtA[i] = 0x18 - } - 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] = 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.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] = 0xa } return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Histogram) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3664,12 +4174,12 @@ func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Histogram) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Histogram) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3681,70 +4191,48 @@ func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - return len(dAtA) - i, nil -} - -func (m *FetchAsyncSearchResultRequest) 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 *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil + if len(m.Samples) > 0 { + for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Samples[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Samples)*8)) + i-- + dAtA[i] = 0x32 } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) + i-- + dAtA[i] = 0x28 } - if m.Offset != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- dAtA[i] = 0x20 } - if m.Size != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + if m.Sum != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x19 } - if m.WithDocs { - i-- - if m.WithDocs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Max != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) i-- - dAtA[i] = 0x10 + 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 *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Bin) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3757,12 +4245,12 @@ func (m *FetchAsyncSearchResultResponse) MarshalVTStrict() (dAtA []byte, err err return dAtA[:n], nil } -func (m *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Bin) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Bin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3774,30 +4262,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) - i-- - dAtA[i] = 0x38 - } - if m.HistogramInterval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) - i-- - dAtA[i] = 0x30 - } - 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] = 0x2a - } - } - if m.Expiration != nil { - size, err := (*timestamppb1.Timestamp)(m.Expiration).MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Hist != nil { + size, err := m.Hist.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -3806,8 +4272,8 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i-- dAtA[i] = 0x1a } - if m.Response != nil { - size, err := m.Response.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Ts != nil { + size, err := (*timestamppb1.Timestamp)(m.Ts).MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -3816,20 +4282,17 @@ func (m *FetchAsyncSearchResultResponse) MarshalToSizedBufferVTStrict(dAtA []byt i-- dAtA[i] = 0x12 } - if m.Done { - i-- - if m.Done { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + 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] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse_Agg) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3842,12 +4305,12 @@ func (m *IdWithHint) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IdWithHint) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Agg) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse_Agg) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3859,24 +4322,66 @@ 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.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.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + if m.NotExists != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NotExists)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x18 + } + 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.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 *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *SearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3889,12 +4394,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 *SearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *SearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3906,29 +4411,85 @@ 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 + 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] = 0x10 + dAtA[i] = 0x42 } - 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 + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + 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 + } + } + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x28 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.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.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 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 *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *ExplainEntry) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3941,12 +4502,12 @@ func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *ExplainEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3958,51 +4519,133 @@ func (m *FetchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.FieldsFilter != nil { - size, err := m.FieldsFilter.MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.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)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x12 } - if len(m.IdsWithHints) > 0 { - for iNdEx := len(m.IdsWithHints) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.IdsWithHints[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StartAsyncSearchRequest) 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 *StartAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StartAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.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] = 0x22 + dAtA[i] = 0x32 } } - if m.Explain { + if m.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) i-- - if m.Explain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x28 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } - 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 + 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) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *StartAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4015,12 +4658,12 @@ func (m *StatusRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *StartAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4035,7 +4678,7 @@ func (m *StatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FetchAsyncSearchResultRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4048,12 +4691,12 @@ func (m *StatusResponse) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatusResponse) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FetchAsyncSearchResultRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4065,524 +4708,3681 @@ 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 - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x20 + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x18 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x10 + } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *BulkRequest) SizeVT() (n int) { +func (m *FetchAsyncSearchResultResponse) 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 *FetchAsyncSearchResultResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *AggQuery) SizeVT() (n int) { +func (m *FetchAsyncSearchResultResponse) 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.Func != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Quantiles) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + 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 } - n += len(m.unknownFields) - return n -} - -func (m *SearchRequest) SizeVT() (n int) { - if m == nil { - return 0 + 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 } - var l int - _ = l - l = len(m.Query) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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.From != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + 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 m.To != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + if m.HistogramInterval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + i-- + dAtA[i] = 0x50 } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + 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] = 0x4a + } } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 } - if m.Interval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + if m.FracsQueue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) + i-- + dAtA[i] = 0x38 } - l = len(m.Aggregation) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.FracsDone != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + i-- + dAtA[i] = 0x30 } - if m.Explain { - n += 2 + 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 } - if m.WithTotal { - n += 2 + 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 } - l = len(m.AggregationFilter) - if l > 0 { - 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 } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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] = 0x12 } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchResponse_Id) SizeVT() (n int) { +func (m *CancelAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Mid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Mid)) + return nil, nil } - if m.Rid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Rid)) + 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_IdWithHint) SizeVT() (n int) { +func (m *CancelAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CancelAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Id != nil { - l = m.Id.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Hint) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchResponse_Histogram) SizeVT() (n int) { +func (m *CancelAsyncSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - 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)) + return nil, nil } - if len(m.Samples) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Samples)*8)) + len(m.Samples)*8 + 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 *CancelAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *CancelAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.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.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Hist != nil { - l = m.Hist.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SearchResponse_Agg) SizeVT() (n int) { +func (m *DeleteAsyncSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { 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)) + return nil, nil } - if len(m.Timeseries) > 0 { - for _, e := range m.Timeseries { - 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 *SearchResponse) SizeVT() (n int) { +func (m *DeleteAsyncSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeleteAsyncSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - 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 m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Errors) > 0 { - for _, s := range m.Errors { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } + 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 m.Code != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + return len(dAtA) - i, nil +} + +func (m *DeleteAsyncSearchResponse) 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 *DeleteAsyncSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DeleteAsyncSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Duration != nil { - l = (*durationpb1.Duration)(m.Duration).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *GetAsyncSearchesListRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if len(m.Children) > 0 { - for _, e := range m.Children { - 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 *StartAsyncSearchRequest) SizeVT() (n int) { +func (m *GetAsyncSearchesListRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAsyncSearchesListRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SearchId) - if l > 0 { - 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.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.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.HistogramInterval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) - } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if m.Status != nil { + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Status)) + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *StartAsyncSearchResponse) SizeVT() (n int) { +func (m *GetAsyncSearchesListResponse) 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 *GetAsyncSearchesListResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *GetAsyncSearchesListResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SearchId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.WithDocs { - n += 2 - } - 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 len(m.Searches) > 0 { + for iNdEx := len(m.Searches) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Searches[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *FetchAsyncSearchResultResponse) SizeVT() (n int) { +func (m *AsyncSearchesListItem) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.Done { - n += 2 + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.Response != nil { - l = m.Response.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - if m.Expiration != nil { - l = (*timestamppb1.Timestamp)(m.Expiration).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 len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x72 + } + 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.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 m.HistogramInterval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HistogramInterval)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HistogramInterval)) + i-- + dAtA[i] = 0x50 } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + 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] = 0x4a + } } - n += len(m.unknownFields) - return n + if m.DiskUsage != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DiskUsage)) + i-- + dAtA[i] = 0x40 + } + if m.FracsQueue != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsQueue)) + i-- + dAtA[i] = 0x38 + } + if m.FracsDone != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FracsDone)) + i-- + dAtA[i] = 0x30 + } + 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 + } + 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 + } + 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 + } + if m.Status != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.SearchId) > 0 { + i -= len(m.SearchId) + copy(dAtA[i:], m.SearchId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SearchId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *IdWithHint) SizeVT() (n int) { +func (m *IdWithHint) 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 *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 + } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Hint) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } - n += len(m.unknownFields) - return n + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) SizeVT() (n int) { +func (m *FetchRequest_FieldsFilter) 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_FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AllowList { + i-- + if m.AllowList { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if len(m.Fields) > 0 { - for _, s := range m.Fields { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + 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 } } - if m.AllowList { - n += 2 + return len(dAtA) - i, nil +} + +func (m *FetchRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - n += len(m.unknownFields) - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *FetchRequest) SizeVT() (n int) { +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 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.Explain { - n += 2 + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.IdsWithHints) > 0 { - for _, e := range m.IdsWithHints { - l = e.SizeVT() + 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 + } + 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 + } + } + return len(dAtA) - i, nil +} + +func (m *StatusRequest) 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 *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 + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + return len(dAtA) - i, nil +} + +func (m *StatusResponse) 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 *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, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.OldestTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OldestTime).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BulkRequest) SizeVT() (n int) { + 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)) + } + l = len(m.Metas) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +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 *AggQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Func != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + } + if len(m.Quantiles) > 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + } + if m.Interval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchRequest) 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 != 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 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() - 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 -} + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + n += len(m.unknownFields) + return n +} + +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 *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.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 + } + 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)) + } + } + 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 + } + 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 + } + 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 + } + 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 *FetchRequest_FieldsFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for _, s := range m.Fields { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.AllowList { + n += 2 + } + n += len(m.unknownFields) + return n +} + +func (m *FetchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.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 *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 + } + } + 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) + } + 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 + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdSources", 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.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) + } + 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.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 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, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].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) + } + 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.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 + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } -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)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - n += len(m.unknownFields) - return n + return nil } - -func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4605,17 +8405,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: StartAsyncSearchRequest: 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: StartAsyncSearchRequest: 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 SearchId", wireType) } - m.Count = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4625,16 +8425,29 @@ func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= 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.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4644,31 +8457,137 @@ 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{} + 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 != 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 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].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) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var byteLen int + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4678,26 +8597,31 @@ func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.HistogramInterval |= int64(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 + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.Metas = append(m.Metas[:0], dAtA[iNdEx:postIndex]...) - if m.Metas == nil { - m.Metas = []byte{} + 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 + } } - iNdEx = postIndex + m.WithDocs = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -4720,7 +8644,7 @@ func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *BinaryData) UnmarshalVT(dAtA []byte) error { +func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4743,46 +8667,12 @@ func (m *BinaryData) UnmarshalVT(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: StartAsyncSearchResponse: 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: 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 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:]) @@ -4805,7 +8695,7 @@ func (m *BinaryData) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4828,15 +8718,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: FetchAsyncSearchResultRequest: 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: 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 Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4864,13 +8754,13 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Field = string(dAtA[iNdEx:postIndex]) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var stringLen uint64 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4880,29 +8770,16 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Size |= int32(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: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.Func = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4912,70 +8789,16 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift + m.Offset |= int32(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: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - m.Interval = 0 + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -4985,7 +8808,7 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } @@ -5012,7 +8835,7 @@ func (m *AggQuery) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5035,17 +8858,36 @@ 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: FetchAsyncSearchResultResponse: 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: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5055,29 +8897,69 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + 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) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } - m.From = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5087,16 +8969,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 } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.To = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).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 @@ -5106,16 +9005,33 @@ func (m *SearchRequest) UnmarshalVT(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 msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) } - m.Size = 0 + m.FracsDone = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5125,16 +9041,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + m.FracsDone |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) } - m.Offset = 0 + m.FracsQueue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5144,16 +9060,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int64(b&0x7F) << shift + m.FracsQueue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - m.Interval = 0 + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5163,16 +9079,16 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", 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 @@ -5182,49 +9098,31 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.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.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Explain = bool(v != 0) + iNdEx = postIndex case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var v int + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5234,15 +9132,14 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.HistogramInterval |= int64(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) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5270,11 +9167,11 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AggregationFilter = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5301,16 +9198,18 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - m.Order = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5320,67 +9219,33 @@ func (m *SearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - 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_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 + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - 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) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - m.Mid = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5390,16 +9255,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 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 Rid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.Rid = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -5409,11 +9291,12 @@ func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Rid |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.WithDocs = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -5436,74 +9319,38 @@ func (m *SearchResponse_Id) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_IdWithHint) UnmarshalVT(dAtA []byte) error { +func (m *CancelAsyncSearchRequest) 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 + 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.Id == nil { - m.Id = &SearchResponse_Id{} - } - if err := m.Id.UnmarshalVT(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: CancelAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5531,7 +9378,7 @@ func (m *SearchResponse_IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hint = string(dAtA[iNdEx:postIndex]) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5555,7 +9402,7 @@ func (m *SearchResponse_IdWithHint) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { +func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5578,137 +9425,12 @@ func (m *SearchResponse_Histogram) UnmarshalVT(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: CancelAsyncSearchResponse: 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: CancelAsyncSearchResponse: 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) - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -5731,7 +9453,7 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5754,15 +9476,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: DeleteAsyncSearchRequest: 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: 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 Label", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5790,80 +9512,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 - } - 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 { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if 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 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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: 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:]) @@ -5886,7 +9587,7 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5909,259 +9610,37 @@ 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: GetAsyncSearchesListRequest: 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: GetAsyncSearchesListRequest: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + 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++ - 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 + 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.AggHistogram[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + m.Status = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - m.NotExists = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6171,14 +9650,78 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + 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) 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 Timeseries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6205,8 +9748,8 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { 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.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6232,7 +9775,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 { @@ -6255,17 +9798,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 @@ -6275,29 +9818,46 @@ 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 != 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 IdSources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6324,14 +9884,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { 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 { + 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 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 { @@ -6358,77 +9920,107 @@ 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.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).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 } - 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 + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 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 } } - m.Histogram[mapkey] = mapvalue - iNdEx = postIndex - case 4: + 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) } @@ -6457,16 +10049,16 @@ func (m *SearchResponse) UnmarshalVT(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].UnmarshalVT(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 @@ -6476,14 +10068,14 @@ func (m *SearchResponse) UnmarshalVT(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 { @@ -6511,13 +10103,13 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.Code = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6527,14 +10119,31 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.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 Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6561,13 +10170,69 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &ExplainEntry{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 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) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -6590,7 +10255,7 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { +func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6613,15 +10278,15 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6649,49 +10314,13 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6701,25 +10330,23 @@ 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 } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Hint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6743,7 +10370,7 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6766,15 +10393,15 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest_FieldsFilter: 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: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6802,11 +10429,82 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowList = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + 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: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6834,13 +10532,13 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + 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 From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.From = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6850,33 +10548,15 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.Explain = bool(v != 0) case 4: - 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 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6903,16 +10583,16 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + 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 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } - m.HistogramInterval = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -6922,30 +10602,28 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Order = 0 - 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 - } + 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.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -6968,7 +10646,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6991,10 +10669,10 @@ 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: StatusRequest: 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: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -7019,7 +10697,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7042,17 +10720,17 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StatusResponse: 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: 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 @@ -7062,82 +10740,28 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} } - 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 - } + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7160,7 +10784,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { +func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7183,17 +10807,17 @@ 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: BulkRequest: 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: 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 Done", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - var v int + m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7203,17 +10827,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.Done = bool(v != 0) 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 Docs", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7223,33 +10846,28 @@ func (m *FetchAsyncSearchResultResponse) 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.Response == nil { - m.Response = &SearchResponse{} - } - if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Docs = dAtA[iNdEx:postIndex] iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metas", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7259,33 +10877,79 @@ func (m *FetchAsyncSearchResultResponse) 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.Expiration == nil { - m.Expiration = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Expiration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Metas = 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 *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 Aggs", 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 @@ -7295,64 +10959,23 @@ func (m *FetchAsyncSearchResultResponse) 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.Data = dAtA[iNdEx:postIndex] iNdEx = postIndex - case 6: - 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 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7375,7 +10998,7 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { +func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7398,15 +11021,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: AggQuery: 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: 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 Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7434,11 +11057,15 @@ 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.Field = stringValue iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7466,8 +11093,104 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hint = string(dAtA[iNdEx:postIndex]) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.GroupBy = stringValue iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) + } + m.Func = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Func |= AggFunc(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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:]) @@ -7490,7 +11213,7 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { +func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7513,15 +11236,15 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") + return fmt.Errorf("proto: SearchRequest: 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: 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 Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7533,29 +11256,90 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue + iNdEx = postIndex + case 2: + if wireType != 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 } } - 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: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - var v int + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7565,66 +11349,33 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (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 + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7652,9 +11403,13 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Aggregation = stringValue iNdEx = postIndex - case 3: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } @@ -7674,11 +11429,31 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } } m.Explain = bool(v != 0) - case 4: + 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 IdsWithHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7688,29 +11463,31 @@ 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 } - m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.AggregationFilter = stringValue iNdEx = postIndex - case 5: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7737,13 +11514,30 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} - } - if err := m.FieldsFilter.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 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 + } + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7766,7 +11560,7 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { +func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7789,12 +11583,50 @@ func (m *StatusRequest) UnmarshalVT(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: SearchResponse_Id: 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: 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:]) @@ -7817,7 +11649,7 @@ func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { +func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7840,17 +11672,53 @@ 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_IdWithHint: 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_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 OldestTime", wireType) + 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.UnmarshalVTUnsafe(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 msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7860,27 +11728,27 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -7904,7 +11772,7 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7927,17 +11795,50 @@ 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_Histogram: 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_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 Count", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Count = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7947,16 +11848,16 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= int64(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - var byteLen int + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7966,54 +11867,65 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.NotExists |= int64(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 = dAtA[iNdEx:postIndex] - 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 + case 6: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - if iNdEx >= l { + 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 } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break + 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 byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metas = dAtA[iNdEx:postIndex] - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8036,7 +11948,7 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8059,17 +11971,17 @@ 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_Bin: 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_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 Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8079,22 +11991,99 @@ func (m *BinaryData) 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 + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Label = stringValue + 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).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) + } + 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.Data = dAtA[iNdEx:postIndex] + 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 @@ -8118,7 +12107,7 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8141,17 +12130,267 @@ 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_Agg: 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_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 Field", wireType) + 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 + } + 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 + } + } + 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 + } + 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 + } + } + m.AggHistogram[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - var stringLen uint64 + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8161,33 +12400,16 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Field = stringValue - iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8197,120 +12419,26 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) + if err := m.Timeseries[len(m.Timeseries)-1].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) - } - 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:]) @@ -8333,7 +12461,7 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8356,17 +12484,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: 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: 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 Data", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8376,71 +12504,28 @@ 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.Query = stringValue + m.Data = 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8450,54 +12535,31 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.Offset = 0 - 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 - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - 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 - } + m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) + if err := m.IdSources[len(m.IdSources)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 7: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8507,33 +12569,96 @@ 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) + if m.Histogram == nil { + m.Histogram = make(map[uint64]uint64) } - m.Aggregation = stringValue + 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 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8543,17 +12668,31 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Explain = bool(v != 0) - case 10: + 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, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - var v int + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8563,15 +12702,14 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Total |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 11: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8603,11 +12741,30 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.AggregationFilter = stringValue + m.Errors = append(m.Errors, stringValue) iNdEx = postIndex - case 12: + 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: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8634,30 +12791,13 @@ 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 { + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.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) - } - 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 - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8680,7 +12820,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8703,36 +12843,17 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(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: ExplainEntry: 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: ExplainEntry: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - m.Rid = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8742,65 +12863,31 @@ 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: + } + 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 Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8827,18 +12914,18 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Id == nil { - m.Id = &SearchResponse_Id{} + if m.Duration == nil { + m.Duration = &durationpb.Duration{} } - if err := m.Id.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + 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 Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8848,27 +12935,25 @@ 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) + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -8892,7 +12977,7 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8915,50 +13000,53 @@ 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: StartAsyncSearchRequest: 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: StartAsyncSearchRequest: 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 + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - 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 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 + } } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - 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) + postIndex := iNdEx + intStringLen + 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.Sum = float64(math.Float64frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Total = 0 + 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 @@ -8968,16 +13056,33 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.NotExists = 0 + 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).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 @@ -8987,121 +13092,52 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(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 - } - 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) - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + 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_Bin) 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 + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Query = stringValue + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + 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 + } } - } - 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) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var stringLen uint64 + m.To = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9111,31 +13147,14 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.To |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Label = stringValue - iNdEx = postIndex - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9162,18 +13181,16 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var msglen int + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9183,28 +13200,82 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.HistogramInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { + 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) + 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 } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: 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:]) @@ -9227,7 +13298,7 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9250,17 +13321,17 @@ 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: FetchAsyncSearchResultRequest: 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: 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 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 @@ -9270,247 +13341,52 @@ 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.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 - } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Agg[mapkey] = mapvalue + m.SearchId = stringValue 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - 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 - } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - 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 + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break } } - m.AggHistogram[mapkey] = mapvalue - iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.NotExists = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9520,16 +13396,16 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - var msglen int + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9539,26 +13415,11 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Order |= Order(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 = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9581,7 +13442,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 { @@ -9604,17 +13465,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 @@ -9624,26 +13504,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 { @@ -9670,14 +13555,52 @@ 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 { + 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.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + 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 { @@ -9704,77 +13627,71 @@ 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.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(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 + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - 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 - } + m.DiskUsage = 0 + 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++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break } } - m.Histogram[mapkey] = mapvalue - iNdEx = postIndex - case 4: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } @@ -9803,16 +13720,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 @@ -9822,14 +13739,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 { @@ -9861,13 +13778,13 @@ 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) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.Code = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9877,14 +13794,31 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9911,13 +13845,69 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &ExplainEntry{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(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 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).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) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9940,7 +13930,7 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9963,15 +13953,15 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: 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 Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10003,78 +13993,59 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Message = stringValue + m.SearchId = stringValue iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + 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.Duration == nil { - m.Duration = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + 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 postIndex > l { + if iNdEx >= 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 + 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:]) @@ -10097,7 +14068,7 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10120,10 +14091,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: DeleteAsyncSearchRequest: 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: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10162,66 +14133,113 @@ 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 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 - } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen - 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 *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + 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 } - m.Query = stringValue - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - 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 - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 4: + } + 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 To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.To = 0 + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10231,16 +14249,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + v |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - case 5: + m.Status = &v + 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 Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10250,64 +14269,28 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 6: - 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 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10330,7 +14313,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10353,12 +14336,46 @@ 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: GetAsyncSearchesListResponse: 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: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10381,7 +14398,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10404,10 +14421,10 @@ 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: AsyncSearchesListItem: 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: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10448,9 +14465,9 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10460,17 +14477,16 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10480,16 +14496,33 @@ 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 } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } - m.Offset = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10499,67 +14532,69 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Offset |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - 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 *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - if iNdEx >= l { + 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 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Done", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) } - var v int + m.FracsDone = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10569,15 +14604,52 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.FracsDone |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Done = bool(v != 0) - case 2: + 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 Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10604,16 +14676,69 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &SearchResponse{} - } - if err := m.Response.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 3: + 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 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 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10640,16 +14765,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Expiration == nil { - m.Expiration = ×tamppb.Timestamp{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.Expiration).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 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10676,16 +14801,18 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - m.HistogramInterval = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10695,16 +14822,33 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= 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 + } + 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 Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.Order = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10714,11 +14858,12 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.WithDocs = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) diff --git a/proxy/search/async.go b/proxy/search/async.go index edf52ec4..f796b61e 100644 --- a/proxy/search/async.go +++ b/proxy/search/async.go @@ -3,25 +3,32 @@ package search import ( "context" "fmt" + "sort" + "sync" "time" "github.com/google/uuid" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/durationpb" + "github.com/ozontech/seq-db/fracmanager" "github.com/ozontech/seq-db/logger" "github.com/ozontech/seq-db/pkg/storeapi" + "github.com/ozontech/seq-db/proxy/stores" "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/util" ) type AsyncRequest struct { + Retention time.Duration Query string From time.Time To time.Time - Order seq.DocsOrder Aggregations []AggQuery HistogramInterval seq.MID + WithDocs bool } type AsyncResponse struct { @@ -31,9 +38,9 @@ type AsyncResponse struct { func (si *Ingestor) StartAsyncSearch(ctx context.Context, r AsyncRequest) (AsyncResponse, error) { requestID := uuid.New().String() - searchStores := si.config.HotStores - if si.config.HotReadStores != nil && len(si.config.HotReadStores.Shards) > 0 { - searchStores = si.config.HotReadStores + searchStores, err := si.getAsyncSearchStores() + if err != nil { + return AsyncResponse{}, err } req := storeapi.StartAsyncSearchRequest{ @@ -42,14 +49,18 @@ func (si *Ingestor) StartAsyncSearch(ctx context.Context, r AsyncRequest) (Async From: r.From.UnixMilli(), To: r.To.UnixMilli(), Aggs: convertToAggsQuery(r.Aggregations), - Order: storeapi.MustProtoOrder(r.Order), HistogramInterval: int64(r.HistogramInterval), + Retention: durationpb.New(r.Retention), + // TODO: enable WithDocs after we implement async searches' qprs merging in batches + WithDocs: false, } + for i, shard := range searchStores.Shards { var err error - // todo shuffle - for _, replica := range shard { + idx := util.IdxShuffle(len(shard)) + for i := range len(shard) { + replica := shard[idx[i]] _, err = si.clients[replica].StartAsyncSearch(ctx, &req) if err != nil { logger.Error("Can't start async search", @@ -67,101 +78,443 @@ func (si *Ingestor) StartAsyncSearch(ctx context.Context, r AsyncRequest) (Async } type FetchAsyncSearchResultRequest struct { - ID string - WithDocs bool - Size int - Offset int + ID string + Size int + Offset int + Order seq.DocsOrder } type FetchAsyncSearchResultResponse struct { - Done bool - Expiration time.Time + Status fracmanager.AsyncSearchStatus QPR seq.QPR - AggResult []seq.AggregationResult + CanceledAt time.Time + + StartedAt time.Time + ExpiresAt time.Time + + Progress float64 + DiskUsage uint64 + + AggResult []seq.AggregationResult + + Request AsyncRequest +} + +type GetAsyncSearchesListRequest struct { + Status *fracmanager.AsyncSearchStatus + Size int + Offset int + IDs []string } -func (si *Ingestor) FetchAsyncSearchResult(ctx context.Context, r FetchAsyncSearchResultRequest) (FetchAsyncSearchResultResponse, error) { - searchStores := si.config.HotStores - if si.config.HotReadStores != nil && len(si.config.HotReadStores.Shards) > 0 { - searchStores = si.config.HotReadStores +type AsyncSearchesListItem struct { + ID string + Status fracmanager.AsyncSearchStatus + + StartedAt time.Time + ExpiresAt time.Time + CanceledAt time.Time + + Progress float64 + DiskUsage uint64 + + Request AsyncRequest +} + +func (si *Ingestor) FetchAsyncSearchResult( + ctx context.Context, + r FetchAsyncSearchResultRequest, +) (FetchAsyncSearchResultResponse, DocsIterator, error) { + searchStores, err := si.getAsyncSearchStores() + if err != nil { + return FetchAsyncSearchResultResponse{}, nil, err } req := storeapi.FetchAsyncSearchResultRequest{ SearchId: r.ID, - WithDocs: r.WithDocs, Size: int32(r.Size), Offset: int32(r.Offset), } - done := true - var expiration time.Time - var aggQueries []seq.AggregateArgs + storesCtx, cancel := context.WithCancel(ctx) + defer cancel() - var qprs []*seq.QPR - anyResponse := false - histInterval := seq.MID(0) - aggsCount := 0 - order := seq.DocsOrderAsc + type shardResponse struct { + replica string + data *storeapi.FetchAsyncSearchResultResponse + err error + } + + wg := sync.WaitGroup{} + wg.Add(len(searchStores.Shards)) + respChan := make(chan shardResponse, len(searchStores.Shards)) for _, shard := range searchStores.Shards { - var storeResp *storeapi.FetchAsyncSearchResultResponse - var err error - var replica string - for _, replica = range shard { - storeResp, err = si.clients[replica].FetchAsyncSearchResult(ctx, &req) - if err != nil { - if status.Code(err) == codes.NotFound { - continue + go func(shard []string) { + defer wg.Done() + + for _, replica := range shard { + storeResp, err := si.clients[replica].FetchAsyncSearchResult(storesCtx, &req) + if err != nil { + if status.Code(err) == codes.NotFound { + continue + } } - return FetchAsyncSearchResultResponse{}, err + + respChan <- shardResponse{ + replica: replica, + data: storeResp, + err: err, + } + + break } - break + }(shard) + } + + go func() { + wg.Wait() + close(respChan) + }() + + fracsDone := 0 + fracsInQueue := 0 + histInterval := seq.MID(0) + pr := FetchAsyncSearchResultResponse{} + mergeStoreResp := func(sr *storeapi.FetchAsyncSearchResultResponse, replica string) { + pr.DiskUsage += sr.DiskUsage + fracsInQueue += int(sr.FracsQueue) + fracsDone += int(sr.FracsDone) + + histInterval = seq.MID(sr.HistogramInterval) + + ss := sr.Status.MustAsyncSearchStatus() + pr.Status = mergeAsyncSearchStatus(pr.Status, ss) + + for _, errStr := range sr.GetResponse().GetErrors() { + pr.QPR.Errors = append(pr.QPR.Errors, seq.ErrorSource{ + ErrStr: errStr, + Source: si.sourceByClient[replica], + }) } - if err != nil { - logger.Warn("shard does not have async search request") - continue + + t := sr.ExpiresAt.AsTime() + if pr.ExpiresAt.IsZero() || pr.ExpiresAt.After(t) { + pr.ExpiresAt = t + } + t = sr.StartedAt.AsTime() + if pr.StartedAt.IsZero() || pr.StartedAt.After(t) { + pr.StartedAt = t + } + t = sr.CanceledAt.AsTime() + if sr.CanceledAt != nil && (pr.CanceledAt.IsZero() || pr.CanceledAt.After(t)) { + pr.CanceledAt = t } - anyResponse = true + qpr := responseToQPR(sr.Response, si.sourceByClient[replica], false) + seq.MergeQPRs(&pr.QPR, []*seq.QPR{qpr}, r.Size+r.Offset, histInterval, r.Order) + } - histInterval = seq.MID(storeResp.HistogramInterval) - aggsCount = len(storeResp.Aggs) - order = storeResp.Order.MustDocsOrder() + var aggQueries []seq.AggregateArgs + var searchReq *AsyncRequest + anyResponse := false - if !storeResp.Done { - done = false + for resp := range respChan { + if err := resp.err; err != nil { + return FetchAsyncSearchResultResponse{}, nil, err } - storeExpiration := storeResp.Expiration.AsTime() - if expiration.IsZero() || expiration.After(storeExpiration) { - expiration = storeExpiration + anyResponse = true + storeResp := resp.data + mergeStoreResp(storeResp, resp.replica) + + if len(aggQueries) == 0 { + for _, agg := range storeResp.Aggs { + aggQueries = append(aggQueries, seq.AggregateArgs{ + Func: agg.Func.MustAggFunc(), + Quantiles: agg.Quantiles, + }) + } } - for _, agg := range storeResp.Aggs { - aggQueries = append(aggQueries, seq.AggregateArgs{ - Func: agg.Func.MustAggFunc(), - Quantiles: agg.Quantiles, - SkipWithoutTimestamp: agg.Interval > 0, - }) + if searchReq == nil { + searchReq = &AsyncRequest{ + Retention: storeResp.Retention.AsDuration(), + Query: storeResp.Query, + From: storeResp.From.AsTime(), + To: storeResp.To.AsTime(), + Aggregations: buildRequestAggs(storeResp.Aggs), + HistogramInterval: histInterval, + WithDocs: storeResp.WithDocs, + } } - qpr := responseToQPR(storeResp.Response, si.sourceByClient[replica], false) // todo pass args - qprs = append(qprs, qpr) } if !anyResponse { - return FetchAsyncSearchResultResponse{}, status.Error(codes.NotFound, "async search result not found") + return FetchAsyncSearchResultResponse{}, nil, status.Error(codes.NotFound, "async search result not found") } - qpr := seq.QPR{ - Aggs: make([]seq.AggregatableSamples, aggsCount), + if fracsDone != 0 { + pr.Progress = float64(fracsDone) / float64(fracsDone+fracsInQueue) + } + if pr.Status == fracmanager.AsyncSearchStatusDone { + pr.Progress = 1 } - seq.MergeQPRs(&qpr, qprs, r.Size, histInterval, order) + pr.AggResult = pr.QPR.Aggregate(aggQueries) + pr.Request = *searchReq - aggResult := qpr.Aggregate(aggQueries) + docsStream := DocsIterator(EmptyDocsStream{}) + var size int + pr.QPR.IDs, size = paginateIDs(pr.QPR.IDs, r.Offset, r.Size) + if size > 0 { + fieldsFilter := tryParseFieldsFilter(pr.Request.Query) + var err error + docsStream, err = si.FetchDocsStream(ctx, pr.QPR.IDs, false, fieldsFilter) + if err != nil { + return pr, nil, err + } + } - return FetchAsyncSearchResultResponse{ - Done: done, - Expiration: expiration, - QPR: qpr, - AggResult: aggResult, - }, nil + return pr, docsStream, nil +} + +func (si *Ingestor) GetAsyncSearchesList( + ctx context.Context, + r GetAsyncSearchesListRequest, +) ([]*AsyncSearchesListItem, error) { + searchStores, err := si.getAsyncSearchStores() + if err != nil { + return nil, err + } + + var searchStatus *storeapi.AsyncSearchStatus + if r.Status != nil { + s := storeapi.MustProtoAsyncSearchStatus(*r.Status) + searchStatus = &s + } + req := storeapi.GetAsyncSearchesListRequest{ + Status: searchStatus, + Ids: r.IDs, + } + + storesCtx, cancel := context.WithCancel(ctx) + defer cancel() + + type shardResponse struct { + data *storeapi.GetAsyncSearchesListResponse + err error + } + + wg := sync.WaitGroup{} + wg.Add(len(searchStores.Shards)) + respChan := make(chan shardResponse, len(searchStores.Shards)) + for _, shard := range searchStores.Shards { + go func(shard []string) { + defer wg.Done() + + // we must query all replicas since the required data’s location is unknown in advance + for _, replica := range shard { + storeResp, err := si.clients[replica].GetAsyncSearchesList(storesCtx, &req) + if err != nil { + if status.Code(err) == codes.NotFound { + continue + } + } + + respChan <- shardResponse{ + data: storeResp, + err: err, + } + } + }(shard) + } + + go func() { + wg.Wait() + close(respChan) + }() + + responsesByID := make(map[string][]*storeapi.AsyncSearchesListItem) + + for resp := range respChan { + if err := resp.err; err != nil { + return nil, err + } + + for _, s := range resp.data.Searches { + responsesByID[s.SearchId] = append(responsesByID[s.SearchId], s) + } + } + + searches := make([]*AsyncSearchesListItem, 0) + + for id, items := range responsesByID { + fracsDone := 0 + fracsInQueue := 0 + var searchReq *AsyncRequest + search := AsyncSearchesListItem{ + ID: id, + } + + mergeListItem := func(sr *storeapi.AsyncSearchesListItem) { + search.DiskUsage += sr.DiskUsage + fracsInQueue += int(sr.FracsQueue) + fracsDone += int(sr.FracsDone) + + ss := sr.Status.MustAsyncSearchStatus() + search.Status = mergeAsyncSearchStatus(search.Status, ss) + + t := sr.StartedAt.AsTime() + if search.StartedAt.IsZero() || search.StartedAt.After(t) { + search.StartedAt = t + } + t = sr.ExpiresAt.AsTime() + if search.ExpiresAt.IsZero() || search.ExpiresAt.After(t) { + search.ExpiresAt = t + } + t = sr.CanceledAt.AsTime() + if sr.CanceledAt != nil && (search.CanceledAt.IsZero() || search.CanceledAt.After(t)) { + search.CanceledAt = t + } + } + + for _, s := range items { + mergeListItem(s) + + if searchReq == nil { + searchReq = &AsyncRequest{ + Retention: s.Retention.AsDuration(), + Query: s.Query, + From: s.From.AsTime(), + To: s.To.AsTime(), + Aggregations: buildRequestAggs(s.Aggs), + HistogramInterval: seq.MID(s.HistogramInterval), + WithDocs: s.WithDocs, + } + } + } + + if fracsDone != 0 { + search.Progress = float64(fracsDone) / float64(fracsDone+fracsInQueue) + } + if search.Status == fracmanager.AsyncSearchStatusDone { + search.Progress = 1 + } + search.Request = *searchReq + + searches = append(searches, &search) + } + + // order by StartedAt DESC + sort.Slice(searches, func(i, j int) bool { + return searches[i].StartedAt.After(searches[j].StartedAt) + }) + + // limit offset + if r.Offset > 0 { + searches = searches[min(r.Offset, len(searches)):] + } + if r.Size > 0 { + searches = searches[:min(r.Size, len(searches))] + } + + return searches, nil +} + +func mergeAsyncSearchStatus(a, b fracmanager.AsyncSearchStatus) fracmanager.AsyncSearchStatus { + statusWeight := []fracmanager.AsyncSearchStatus{ + fracmanager.AsyncSearchStatusDone: 1, + fracmanager.AsyncSearchStatusInProgress: 2, + fracmanager.AsyncSearchStatusCanceled: 3, + fracmanager.AsyncSearchStatusError: 4, + } + weightA := statusWeight[a] + weightB := statusWeight[b] + if weightA >= weightB { + return a + } + return b +} + +func buildRequestAggs(in []*storeapi.AggQuery) []AggQuery { + reqAggs := make([]AggQuery, 0, len(in)) + for _, agg := range in { + reqAggs = append(reqAggs, AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: agg.Func.MustAggFunc(), + Quantiles: agg.Quantiles, + }) + } + return reqAggs +} + +func (si *Ingestor) CancelAsyncSearch(ctx context.Context, id string) error { + searchStores, err := si.getAsyncSearchStores() + if err != nil { + return err + } + + var lastErr error + cancelSearch := func(client storeapi.StoreApiClient) { + _, err := client.CancelAsyncSearch(ctx, &storeapi.CancelAsyncSearchRequest{SearchId: id}) + if err != nil { + logger.Error("can't cancel async search", zap.String("id", id), zap.Error(err)) + lastErr = err + } + } + + si.visitEachReplica(searchStores, cancelSearch) + if lastErr != nil { + return fmt.Errorf("unable to cancel async search for all shards in cluster; last err: %w", lastErr) + } + return nil +} + +func (si *Ingestor) DeleteAsyncSearch(ctx context.Context, id string) error { + searchStores, err := si.getAsyncSearchStores() + if err != nil { + return err + } + + var lastErr error + cancelSearch := func(client storeapi.StoreApiClient) { + _, err := client.DeleteAsyncSearch(ctx, &storeapi.DeleteAsyncSearchRequest{SearchId: id}) + if err != nil { + logger.Error("can't delete async search", zap.String("id", id), zap.Error(err)) + lastErr = err + } + } + + si.visitEachReplica(searchStores, cancelSearch) + if lastErr != nil { + return fmt.Errorf("unable to delete async search for all shards in cluster; last err: %w", lastErr) + } + return nil +} + +func (si *Ingestor) visitEachReplica(s *stores.Stores, cb func(client storeapi.StoreApiClient)) { + for _, shard := range s.Shards { + for _, replica := range shard { + client := si.clients[replica] + cb(client) + } + } +} + +func (si *Ingestor) getAsyncSearchStores() (*stores.Stores, error) { + var searchStores *stores.Stores + // TODO: should we support QueryWantsOldData? + rs := si.config.ReadStores + hrs := si.config.HotReadStores + hs := si.config.HotStores + if rs != nil && len(rs.Shards) != 0 { + searchStores = rs + } else if hrs != nil && len(hrs.Shards) != 0 { + searchStores = hrs + } else if hs != nil && len(hs.Shards) != 0 { + searchStores = hs + } else { + return nil, fmt.Errorf("can't find store shards in config") + } + return searchStores, nil } diff --git a/proxy/search/ingestor.go b/proxy/search/ingestor.go index 4e88e296..c98e0312 100644 --- a/proxy/search/ingestor.go +++ b/proxy/search/ingestor.go @@ -134,7 +134,7 @@ func (si *Ingestor) Search( } var size int - qpr.IDs, size = si.paginateIDs(qpr.IDs, sr.Offset, sr.Size) + qpr.IDs, size = paginateIDs(qpr.IDs, sr.Offset, sr.Size) ids := qpr.IDs t = time.Now() @@ -194,7 +194,7 @@ func tryParseFieldsFilter(query string) FetchFieldsFilter { return FetchFieldsFilter{} } -func (si *Ingestor) paginateIDs(ids seq.IDSources, offset, size int) (seq.IDSources, int) { +func paginateIDs(ids seq.IDSources, offset, size int) (seq.IDSources, int) { if len(ids) > offset { ids = ids[offset:] } else { diff --git a/proxy/search/mock/store_api_client_mock.go b/proxy/search/mock/store_api_client_mock.go index d4a92e41..3f593d18 100644 --- a/proxy/search/mock/store_api_client_mock.go +++ b/proxy/search/mock/store_api_client_mock.go @@ -57,6 +57,46 @@ func (mr *MockStoreApiClientMockRecorder) Bulk(arg0, arg1 interface{}, arg2 ...i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bulk", reflect.TypeOf((*MockStoreApiClient)(nil).Bulk), varargs...) } +// CancelAsyncSearch mocks base method. +func (m *MockStoreApiClient) CancelAsyncSearch(arg0 context.Context, arg1 *storeapi.CancelAsyncSearchRequest, arg2 ...grpc.CallOption) (*storeapi.CancelAsyncSearchResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CancelAsyncSearch", varargs...) + ret0, _ := ret[0].(*storeapi.CancelAsyncSearchResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CancelAsyncSearch indicates an expected call of CancelAsyncSearch. +func (mr *MockStoreApiClientMockRecorder) CancelAsyncSearch(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, "CancelAsyncSearch", reflect.TypeOf((*MockStoreApiClient)(nil).CancelAsyncSearch), varargs...) +} + +// DeleteAsyncSearch mocks base method. +func (m *MockStoreApiClient) DeleteAsyncSearch(arg0 context.Context, arg1 *storeapi.DeleteAsyncSearchRequest, arg2 ...grpc.CallOption) (*storeapi.DeleteAsyncSearchResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteAsyncSearch", varargs...) + ret0, _ := ret[0].(*storeapi.DeleteAsyncSearchResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteAsyncSearch indicates an expected call of DeleteAsyncSearch. +func (mr *MockStoreApiClientMockRecorder) DeleteAsyncSearch(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, "DeleteAsyncSearch", reflect.TypeOf((*MockStoreApiClient)(nil).DeleteAsyncSearch), varargs...) +} + // Fetch mocks base method. func (m *MockStoreApiClient) Fetch(arg0 context.Context, arg1 *storeapi.FetchRequest, arg2 ...grpc.CallOption) (storeapi.StoreApi_FetchClient, error) { m.ctrl.T.Helper() @@ -97,6 +137,26 @@ func (mr *MockStoreApiClientMockRecorder) FetchAsyncSearchResult(arg0, arg1 inte return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchAsyncSearchResult", reflect.TypeOf((*MockStoreApiClient)(nil).FetchAsyncSearchResult), varargs...) } +// GetAsyncSearchesList mocks base method. +func (m *MockStoreApiClient) GetAsyncSearchesList(arg0 context.Context, arg1 *storeapi.GetAsyncSearchesListRequest, arg2 ...grpc.CallOption) (*storeapi.GetAsyncSearchesListResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAsyncSearchesList", varargs...) + ret0, _ := ret[0].(*storeapi.GetAsyncSearchesListResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAsyncSearchesList indicates an expected call of GetAsyncSearchesList. +func (mr *MockStoreApiClientMockRecorder) GetAsyncSearchesList(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, "GetAsyncSearchesList", reflect.TypeOf((*MockStoreApiClient)(nil).GetAsyncSearchesList), 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/proxyapi/grpc_async_search.go b/proxyapi/grpc_async_search.go index 67816664..30558b8e 100644 --- a/proxyapi/grpc_async_search.go +++ b/proxyapi/grpc_async_search.go @@ -5,15 +5,20 @@ import ( "fmt" "time" + "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/ozontech/seq-db/fracmanager" "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" "github.com/ozontech/seq-db/proxy/search" "github.com/ozontech/seq-db/seq" "github.com/ozontech/seq-db/util" ) -func (g *grpcV1) StartAsyncSearch(ctx context.Context, r *seqproxyapi.StartAsyncSearchRequest) (*seqproxyapi.StartAsyncSearchResponse, error) { +func (g *grpcV1) StartAsyncSearch( + ctx context.Context, + r *seqproxyapi.StartAsyncSearchRequest, +) (*seqproxyapi.StartAsyncSearchResponse, error) { aggs, err := convertAggsQuery(r.Aggs) if err != nil { return nil, err @@ -28,12 +33,13 @@ func (g *grpcV1) StartAsyncSearch(ctx context.Context, r *seqproxyapi.StartAsync } resp, err := g.searchIngestor.StartAsyncSearch(ctx, search.AsyncRequest{ + Retention: r.Retention.AsDuration(), Query: r.GetQuery().GetQuery(), - From: r.GetQuery().From.AsTime(), - To: r.GetQuery().To.AsTime(), - Order: r.Order.MustDocsOrder(), + From: r.GetQuery().GetFrom().AsTime(), + To: r.GetQuery().GetTo().AsTime(), Aggregations: aggs, HistogramInterval: seq.MID(histInterval.Milliseconds()), + WithDocs: r.WithDocs, }) if err != nil { return nil, err @@ -43,27 +49,157 @@ func (g *grpcV1) StartAsyncSearch(ctx context.Context, r *seqproxyapi.StartAsync }, nil } -func (g *grpcV1) FetchAsyncSearchResult(ctx context.Context, r *seqproxyapi.FetchAsyncSearchResultRequest) (*seqproxyapi.FetchAsyncSearchResultResponse, error) { - resp, err := g.searchIngestor.FetchAsyncSearchResult(ctx, search.FetchAsyncSearchResultRequest{ - ID: r.SearchId, - WithDocs: r.WithDocs, - Size: int(r.Size), - Offset: int(r.Offset), +func (g *grpcV1) FetchAsyncSearchResult( + ctx context.Context, + r *seqproxyapi.FetchAsyncSearchResultRequest, +) (*seqproxyapi.FetchAsyncSearchResultResponse, error) { + resp, stream, err := g.searchIngestor.FetchAsyncSearchResult(ctx, search.FetchAsyncSearchResultRequest{ + ID: r.SearchId, + Size: int(r.Size), + Offset: int(r.Offset), + Order: r.Order.MustDocsOrder(), }) if err != nil { return nil, err } + var canceledAt *timestamppb.Timestamp + if !resp.CanceledAt.IsZero() { + canceledAt = timestamppb.New(resp.CanceledAt) + } + + docs := makeProtoDocs(&resp.QPR, stream) + + searchReq := &seqproxyapi.StartAsyncSearchRequest{ + Retention: durationpb.New(resp.Request.Retention), + Query: &seqproxyapi.SearchQuery{ + Query: resp.Request.Query, + From: timestamppb.New(resp.Request.From), + To: timestamppb.New(resp.Request.To), + }, + Aggs: makeProtoRequestAggregations(resp.Request.Aggregations), + WithDocs: resp.Request.WithDocs, + } + if resp.Request.HistogramInterval > 0 { + searchReq.Hist = &seqproxyapi.HistQuery{ + Interval: seq.MIDToDuration(resp.Request.HistogramInterval).String(), + } + } + return &seqproxyapi.FetchAsyncSearchResultResponse{ - Done: resp.Done, - Expiration: timestamppb.New(resp.Expiration), + Status: seqproxyapi.MustProtoAsyncSearchStatus(resp.Status), + Request: searchReq, Response: &seqproxyapi.ComplexSearchResponse{ - Total: 0, - Docs: makeProtoDocs(&resp.QPR, nil), + Total: int64(resp.QPR.Total), + Docs: docs, Aggs: makeProtoAggregation(resp.AggResult), Hist: makeProtoHistogram(&resp.QPR), Error: nil, Explain: nil, }, + StartedAt: timestamppb.New(resp.StartedAt), + ExpiresAt: timestamppb.New(resp.ExpiresAt), + CanceledAt: canceledAt, + Progress: resp.Progress, + DiskUsage: resp.DiskUsage, + }, nil +} + +func (g *grpcV1) GetAsyncSearchesList( + ctx context.Context, + r *seqproxyapi.GetAsyncSearchesListRequest, +) (*seqproxyapi.GetAsyncSearchesListResponse, error) { + var status *fracmanager.AsyncSearchStatus + if r.Status != nil { + s := r.Status.MustAsyncSearchStatus() + status = &s + } + + req := search.GetAsyncSearchesListRequest{ + Status: status, + Size: int(r.Size), + Offset: int(r.Offset), + IDs: r.Ids, + } + + searches, err := g.searchIngestor.GetAsyncSearchesList(ctx, req) + if err != nil { + return nil, err + } + + return &seqproxyapi.GetAsyncSearchesListResponse{ + Searches: makeProtoAsyncSearchesList(searches), }, nil } + +func (g *grpcV1) CancelAsyncSearch( + ctx context.Context, + r *seqproxyapi.CancelAsyncSearchRequest, +) (*seqproxyapi.CancelAsyncSearchResponse, error) { + if err := g.searchIngestor.CancelAsyncSearch(ctx, r.SearchId); err != nil { + return nil, fmt.Errorf("cancelling search: %s", err) + } + return &seqproxyapi.CancelAsyncSearchResponse{}, nil +} + +func (g *grpcV1) DeleteAsyncSearch( + ctx context.Context, + r *seqproxyapi.DeleteAsyncSearchRequest, +) (*seqproxyapi.DeleteAsyncSearchResponse, error) { + if err := g.searchIngestor.DeleteAsyncSearch(ctx, r.SearchId); err != nil { + return nil, fmt.Errorf("deleting search: %s", err) + } + return &seqproxyapi.DeleteAsyncSearchResponse{}, nil +} + +func makeProtoRequestAggregations(sourceAggs []search.AggQuery) []*seqproxyapi.AggQuery { + aggs := make([]*seqproxyapi.AggQuery, 0, len(sourceAggs)) + for _, agg := range sourceAggs { + aggs = append(aggs, &seqproxyapi.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: seqproxyapi.AggFunc(agg.Func), + Quantiles: agg.Quantiles, + }) + } + return aggs +} + +func makeProtoAsyncSearchesList(in []*search.AsyncSearchesListItem) []*seqproxyapi.AsyncSearchesListItem { + searches := make([]*seqproxyapi.AsyncSearchesListItem, 0, len(in)) + for _, s := range in { + var canceledAt *timestamppb.Timestamp + if !s.CanceledAt.IsZero() { + canceledAt = timestamppb.New(s.CanceledAt) + } + + searchReq := &seqproxyapi.StartAsyncSearchRequest{ + Retention: durationpb.New(s.Request.Retention), + Query: &seqproxyapi.SearchQuery{ + Query: s.Request.Query, + From: timestamppb.New(s.Request.From), + To: timestamppb.New(s.Request.To), + }, + Aggs: makeProtoRequestAggregations(s.Request.Aggregations), + WithDocs: s.Request.WithDocs, + } + if s.Request.HistogramInterval > 0 { + searchReq.Hist = &seqproxyapi.HistQuery{ + Interval: seq.MIDToDuration(s.Request.HistogramInterval).String(), + } + } + + searches = append(searches, &seqproxyapi.AsyncSearchesListItem{ + SearchId: s.ID, + Status: seqproxyapi.MustProtoAsyncSearchStatus(s.Status), + Request: searchReq, + StartedAt: timestamppb.New(s.StartedAt), + ExpiresAt: timestamppb.New(s.ExpiresAt), + CanceledAt: canceledAt, + Progress: s.Progress, + DiskUsage: s.DiskUsage, + }) + } + + return searches +} diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 2a33dd6b..f23dc4c1 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -30,7 +30,10 @@ type SearchIngestor interface { Documents(ctx context.Context, r search.FetchRequest) (search.DocsIterator, error) Status(ctx context.Context) *search.IngestorStatus StartAsyncSearch(context.Context, search.AsyncRequest) (search.AsyncResponse, error) - FetchAsyncSearchResult(context.Context, search.FetchAsyncSearchResultRequest) (search.FetchAsyncSearchResultResponse, error) + FetchAsyncSearchResult(context.Context, search.FetchAsyncSearchResultRequest) (search.FetchAsyncSearchResultResponse, search.DocsIterator, error) + CancelAsyncSearch(ctx context.Context, id string) error + DeleteAsyncSearch(ctx context.Context, id string) error + GetAsyncSearchesList(context.Context, search.GetAsyncSearchesListRequest) ([]*search.AsyncSearchesListItem, error) } type MappingProvider interface { diff --git a/proxyapi/ingestor.go b/proxyapi/ingestor.go index 57230fa8..1eb0d80a 100644 --- a/proxyapi/ingestor.go +++ b/proxyapi/ingestor.go @@ -219,3 +219,7 @@ type humanReadableMarshaler struct { func (m humanReadableMarshaler) Marshal(v interface{}) ([]byte, error) { return m.stdlibMarshaler.Marshal(v) } + +func (m humanReadableMarshaler) Unmarshal(data []byte, v interface{}) error { + return m.stdlibMarshaler.Unmarshal(data, v) +} diff --git a/proxyapi/mock/grpc_v1.go b/proxyapi/mock/grpc_v1.go index 5b52861c..40f1e694 100644 --- a/proxyapi/mock/grpc_v1.go +++ b/proxyapi/mock/grpc_v1.go @@ -41,6 +41,34 @@ func (m *MockSearchIngestor) EXPECT() *MockSearchIngestorMockRecorder { return m.recorder } +// CancelAsyncSearch mocks base method. +func (m *MockSearchIngestor) CancelAsyncSearch(ctx context.Context, id string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelAsyncSearch", ctx, id) + ret0, _ := ret[0].(error) + return ret0 +} + +// CancelAsyncSearch indicates an expected call of CancelAsyncSearch. +func (mr *MockSearchIngestorMockRecorder) CancelAsyncSearch(ctx, id interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelAsyncSearch", reflect.TypeOf((*MockSearchIngestor)(nil).CancelAsyncSearch), ctx, id) +} + +// DeleteAsyncSearch mocks base method. +func (m *MockSearchIngestor) DeleteAsyncSearch(ctx context.Context, id string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAsyncSearch", ctx, id) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAsyncSearch indicates an expected call of DeleteAsyncSearch. +func (mr *MockSearchIngestorMockRecorder) DeleteAsyncSearch(ctx, id interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAsyncSearch", reflect.TypeOf((*MockSearchIngestor)(nil).DeleteAsyncSearch), ctx, id) +} + // Documents mocks base method. func (m *MockSearchIngestor) Documents(ctx context.Context, r search.FetchRequest) (search.DocsIterator, error) { m.ctrl.T.Helper() @@ -57,12 +85,13 @@ func (mr *MockSearchIngestorMockRecorder) Documents(ctx, r interface{}) *gomock. } // FetchAsyncSearchResult mocks base method. -func (m *MockSearchIngestor) FetchAsyncSearchResult(arg0 context.Context, arg1 search.FetchAsyncSearchResultRequest) (search.FetchAsyncSearchResultResponse, error) { +func (m *MockSearchIngestor) FetchAsyncSearchResult(arg0 context.Context, arg1 search.FetchAsyncSearchResultRequest) (search.FetchAsyncSearchResultResponse, search.DocsIterator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FetchAsyncSearchResult", arg0, arg1) ret0, _ := ret[0].(search.FetchAsyncSearchResultResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret1, _ := ret[1].(search.DocsIterator) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 } // FetchAsyncSearchResult indicates an expected call of FetchAsyncSearchResult. @@ -71,6 +100,21 @@ func (mr *MockSearchIngestorMockRecorder) FetchAsyncSearchResult(arg0, arg1 inte return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchAsyncSearchResult", reflect.TypeOf((*MockSearchIngestor)(nil).FetchAsyncSearchResult), arg0, arg1) } +// GetAsyncSearchesList mocks base method. +func (m *MockSearchIngestor) GetAsyncSearchesList(arg0 context.Context, arg1 search.GetAsyncSearchesListRequest) ([]*search.AsyncSearchesListItem, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAsyncSearchesList", arg0, arg1) + ret0, _ := ret[0].([]*search.AsyncSearchesListItem) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAsyncSearchesList indicates an expected call of GetAsyncSearchesList. +func (mr *MockSearchIngestorMockRecorder) GetAsyncSearchesList(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAsyncSearchesList", reflect.TypeOf((*MockSearchIngestor)(nil).GetAsyncSearchesList), arg0, arg1) +} + // 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/seq/qpr.go b/seq/qpr.go index a7a6d463..b2b1b772 100644 --- a/seq/qpr.go +++ b/seq/qpr.go @@ -2,13 +2,10 @@ package seq import ( "cmp" - "encoding/json" "fmt" "math" "slices" "sort" - "strconv" - "strings" "github.com/valyala/fastrand" @@ -108,75 +105,16 @@ const ( AggFuncUnique ) -const AggBinSeparator = "|" - type AggBin struct { MID MID Token string } -func (tb *AggBin) toKey() string { - mid := strconv.Itoa(int(tb.MID)) - return mid + AggBinSeparator + tb.Token -} - -func (tb *AggBin) fromKey(k string) { - smid, token, found := strings.Cut(k, AggBinSeparator) - if !found { - panic("BUG: AggBin missing separator") - } - - mid, err := strconv.Atoi(smid) - if err != nil { - panic("BUG: AggBin key contains invalid MID") - } - - tb.Token = token - tb.MID = MID(mid) -} - type AggregatableSamples struct { SamplesByBin map[AggBin]*SamplesContainer NotExists int64 } -// aggregatableSamples is used for marshaling/unmarshaling to/from [AggregatableSamples]. -type aggregatableSamples struct { - SamplesByBin map[string]*SamplesContainer - NotExists int64 -} - -func (q *AggregatableSamples) MarshalJSON() ([]byte, error) { - qh := aggregatableSamples{ - SamplesByBin: make(map[string]*SamplesContainer), - NotExists: q.NotExists, - } - - for bin, hist := range q.SamplesByBin { - qh.SamplesByBin[bin.toKey()] = hist - } - - return json.Marshal(qh) -} - -func (q *AggregatableSamples) UnmarshalJSON(b []byte) error { - var qh aggregatableSamples - if err := json.Unmarshal(b, &qh); err != nil { - return err - } - - q.SamplesByBin = make(map[AggBin]*SamplesContainer, len(qh.SamplesByBin)) - q.NotExists = qh.NotExists - - for bKey, hist := range qh.SamplesByBin { - var tb AggBin - tb.fromKey(bKey) - q.SamplesByBin[tb] = hist - } - - return nil -} - type AggregationBucket struct { Name string Value float64 @@ -431,7 +369,7 @@ func MergeQPRs(dst *QPR, qprs []*QPR, limit int, histInterval MID, order DocsOrd dst.Histogram[time] += count } - if qpr.Aggs != nil && dst.Aggs == nil { + if len(qpr.Aggs) != 0 && len(dst.Aggs) == 0 { dst.Aggs = make([]AggregatableSamples, len(qpr.Aggs)) } for i := range qpr.Aggs { diff --git a/storeapi/client.go b/storeapi/client.go index 9ac03514..59ea8224 100644 --- a/storeapi/client.go +++ b/storeapi/client.go @@ -38,6 +38,18 @@ func (i inMemoryAPIClient) FetchAsyncSearchResult(ctx context.Context, in *store return i.store.GrpcV1().FetchAsyncSearchResult(ctx, in) } +func (i inMemoryAPIClient) CancelAsyncSearch(ctx context.Context, in *storeapi.CancelAsyncSearchRequest, _ ...grpc.CallOption) (*storeapi.CancelAsyncSearchResponse, error) { + return i.store.GrpcV1().CancelAsyncSearch(ctx, in) +} + +func (i inMemoryAPIClient) DeleteAsyncSearch(ctx context.Context, in *storeapi.DeleteAsyncSearchRequest, _ ...grpc.CallOption) (*storeapi.DeleteAsyncSearchResponse, error) { + return i.store.GrpcV1().DeleteAsyncSearch(ctx, in) +} + +func (i inMemoryAPIClient) GetAsyncSearchesList(ctx context.Context, in *storeapi.GetAsyncSearchesListRequest, _ ...grpc.CallOption) (*storeapi.GetAsyncSearchesListResponse, error) { + return i.store.GrpcV1().GetAsyncSearchesList(ctx, in) +} + type storeAPIFetchServer struct { grpc.ServerStream ctx context.Context diff --git a/storeapi/grpc_async_search.go b/storeapi/grpc_async_search.go index c534d9ac..324e3a17 100644 --- a/storeapi/grpc_async_search.go +++ b/storeapi/grpc_async_search.go @@ -3,10 +3,10 @@ package storeapi import ( "context" "math" - "time" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" "github.com/ozontech/seq-db/frac/processor" @@ -15,51 +15,117 @@ import ( "github.com/ozontech/seq-db/seq" ) -func (g *GrpcV1) StartAsyncSearch(_ context.Context, r *storeapi.StartAsyncSearchRequest) (*storeapi.StartAsyncSearchResponse, error) { +func (g *GrpcV1) StartAsyncSearch( + _ context.Context, + r *storeapi.StartAsyncSearchRequest, +) (*storeapi.StartAsyncSearchResponse, error) { aggs, err := aggQueriesFromProto(r.Aggs) if err != nil { return nil, err } + limit := 0 + if r.WithDocs { + limit = math.MaxInt + } + params := processor.SearchParams{ AST: nil, // Parse AST later. AggQ: aggs, HistInterval: uint64(r.HistogramInterval), From: seq.MID(r.From), To: seq.MID(r.To), - Limit: math.MaxInt32, // TODO: use WithDocs from request - WithTotal: false, - Order: r.Order.MustDocsOrder(), + Limit: limit, + WithTotal: r.WithDocs, // return total if docs needed + Order: seq.DocsOrderDesc, } req := fracmanager.AsyncSearchRequest{ ID: r.SearchId, Query: r.Query, Params: params, - Retention: time.Hour * 24, // todo: use value from request + Retention: r.Retention.AsDuration(), } - if err := g.asyncSearcher.StartSearch(req); err != nil { + fracs := g.fracManager.GetAllFracs().FilterInRange(seq.MID(r.From), seq.MID(r.To)) + if err := g.asyncSearcher.StartSearch(req, fracs); err != nil { return nil, err } return &storeapi.StartAsyncSearchResponse{}, nil } -func (g *GrpcV1) FetchAsyncSearchResult(_ context.Context, r *storeapi.FetchAsyncSearchResultRequest) (*storeapi.FetchAsyncSearchResultResponse, error) { - fetchResp, exists := g.asyncSearcher.FetchSearchResult(fracmanager.FetchSearchResultRequest{ID: r.SearchId}) +func (g *GrpcV1) FetchAsyncSearchResult( + _ context.Context, + r *storeapi.FetchAsyncSearchResultRequest, +) (*storeapi.FetchAsyncSearchResultResponse, error) { + fr, exists := g.asyncSearcher.FetchSearchResult(fracmanager.FetchSearchResultRequest{ + ID: r.SearchId, + Limit: int(r.Size + r.Offset), + Order: r.Order.MustDocsOrder(), + }) if !exists { return nil, status.Error(codes.NotFound, "search not found") } - resp := buildSearchResponse(&fetchResp.QPR) + resp := buildSearchResponse(&fr.QPR) + + var canceledAt *timestamppb.Timestamp + if !fr.CanceledAt.IsZero() { + canceledAt = timestamppb.New(fr.CanceledAt) + } return &storeapi.FetchAsyncSearchResultResponse{ - Done: fetchResp.Done, + Status: storeapi.MustProtoAsyncSearchStatus(fr.Status), Response: resp, - Expiration: timestamppb.New(fetchResp.Expiration), - Aggs: convertAggQueriesToProto(fetchResp.AggQueries), - HistogramInterval: int64(fetchResp.HistInterval), - Order: storeapi.MustProtoOrder(fetchResp.Order), + StartedAt: timestamppb.New(fr.StartedAt), + ExpiresAt: timestamppb.New(fr.ExpiresAt), + CanceledAt: canceledAt, + FracsDone: uint64(fr.FracsDone), + FracsQueue: uint64(fr.FracsInQueue), + DiskUsage: uint64(fr.DiskUsage), + Aggs: convertAggQueriesToProto(fr.AggQueries), + HistogramInterval: int64(fr.HistInterval), + Query: fr.Query, + From: timestamppb.New(fr.From.Time()), + To: timestamppb.New(fr.To.Time()), + Retention: durationpb.New(fr.Retention), + WithDocs: fr.WithDocs, + }, nil +} + +func (g *GrpcV1) CancelAsyncSearch( + _ context.Context, + r *storeapi.CancelAsyncSearchRequest, +) (*storeapi.CancelAsyncSearchResponse, error) { + g.asyncSearcher.CancelSearch(r.SearchId) + return &storeapi.CancelAsyncSearchResponse{}, nil +} + +func (g *GrpcV1) DeleteAsyncSearch( + _ context.Context, + r *storeapi.DeleteAsyncSearchRequest, +) (*storeapi.DeleteAsyncSearchResponse, error) { + g.asyncSearcher.DeleteSearch(r.SearchId) + return &storeapi.DeleteAsyncSearchResponse{}, nil +} + +func (g *GrpcV1) GetAsyncSearchesList( + _ context.Context, + r *storeapi.GetAsyncSearchesListRequest, +) (*storeapi.GetAsyncSearchesListResponse, error) { + var searchStatus *fracmanager.AsyncSearchStatus + if r.Status != nil { + s := r.Status.MustAsyncSearchStatus() + searchStatus = &s + } + + searches := g.asyncSearcher.GetAsyncSearchesList(fracmanager.GetAsyncSearchesListRequest{ + Status: searchStatus, + IDs: r.Ids, + }) + + return &storeapi.GetAsyncSearchesListResponse{ + Searches: convertAsyncSearchesToProto(searches), }, nil } @@ -80,3 +146,34 @@ func convertAggQueriesToProto(query []processor.AggQuery) []*storeapi.AggQuery { } return res } + +func convertAsyncSearchesToProto(in []*fracmanager.AsyncSearchesListItem) []*storeapi.AsyncSearchesListItem { + res := make([]*storeapi.AsyncSearchesListItem, 0, len(in)) + + for _, s := range in { + var canceledAt *timestamppb.Timestamp + if !s.CanceledAt.IsZero() { + canceledAt = timestamppb.New(s.CanceledAt) + } + + res = append(res, &storeapi.AsyncSearchesListItem{ + SearchId: s.ID, + Status: storeapi.MustProtoAsyncSearchStatus(s.Status), + StartedAt: timestamppb.New(s.StartedAt), + ExpiresAt: timestamppb.New(s.ExpiresAt), + CanceledAt: canceledAt, + FracsDone: uint64(s.FracsDone), + FracsQueue: uint64(s.FracsInQueue), + DiskUsage: uint64(s.DiskUsage), + Aggs: convertAggQueriesToProto(s.AggQueries), + HistogramInterval: int64(s.HistInterval), + Query: s.Query, + From: timestamppb.New(s.From.Time()), + To: timestamppb.New(s.To.Time()), + Retention: durationpb.New(s.Retention), + WithDocs: s.WithDocs, + }) + } + + return res +} diff --git a/storeapi/grpc_v1.go b/storeapi/grpc_v1.go index 1167d65e..00d7bb91 100644 --- a/storeapi/grpc_v1.go +++ b/storeapi/grpc_v1.go @@ -111,7 +111,7 @@ func NewGrpcV1(cfg APIConfig, fracManager *fracmanager.FracManager, mappingProvi fetchData: fetchData{ docFetcher: fracmanager.NewFetcher(config.FetchWorkers), }, - asyncSearcher: fracmanager.MustStartAsync(cfg.Search.Async, mappingProvider, fracManager), + asyncSearcher: fracmanager.MustStartAsync(cfg.Search.Async, mappingProvider, fracManager.GetAllFracs()), } go g.bulkStats() diff --git a/tests/integration_tests/integration_test.go b/tests/integration_tests/integration_test.go index 3d03c519..00fa4345 100644 --- a/tests/integration_tests/integration_test.go +++ b/tests/integration_tests/integration_test.go @@ -26,6 +26,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/ozontech/seq-db/consts" + "github.com/ozontech/seq-db/fracmanager" "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" "github.com/ozontech/seq-db/pkg/storeapi" "github.com/ozontech/seq-db/proxy/search" @@ -1942,16 +1943,21 @@ func (s *IntegrationTestSuite) TestAsyncSearch() { searcher := env.Ingestor().Ingestor.SearchIngestor ctx := t.Context() - resp, err := searcher.StartAsyncSearch(ctx, search.AsyncRequest{ - Query: "* | fields ip, method, uri", - From: time.UnixMilli(0), - To: time.Now().Add(time.Hour), + + searchIDs := make([]string, 0) + + // StartAsyncSearch + + startReq := search.AsyncRequest{ + Query: "* | fields ip, method, uri", + From: time.UnixMilli(0).UTC(), + To: time.Now().UTC().Add(time.Hour).Truncate(time.Millisecond), + Retention: time.Minute * 5, Aggregations: []search.AggQuery{ { - Field: "size", - GroupBy: "ip", - Func: seq.AggFuncSum, - Quantiles: nil, + Field: "size", + GroupBy: "ip", + Func: seq.AggFuncSum, }, { Field: "size", @@ -1961,36 +1967,33 @@ func (s *IntegrationTestSuite) TestAsyncSearch() { }, }, HistogramInterval: seq.MID(time.Second.Milliseconds()), - }) + WithDocs: false, + } + resp, err := searcher.StartAsyncSearch(ctx, startReq) r.NoError(err) r.NotEmpty(resp.ID) + searchIDs = append(searchIDs, resp.ID) - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() + // FetchAsyncSearchResult - fr := search.FetchAsyncSearchResultRequest{ - ID: resp.ID, - WithDocs: true, - Size: 100, - Offset: 0, + freq := search.FetchAsyncSearchResultRequest{ + ID: resp.ID, + Size: 100, + Offset: 0, } - for ctx.Err() == nil { - fetchResp, err := searcher.FetchAsyncSearchResult(ctx, fr) + r.Eventually(func() bool { + resp, _, err := searcher.FetchAsyncSearchResult(ctx, freq) r.NoError(err) - if fetchResp.Done { - break - } - time.Sleep(time.Millisecond * 200) - } + return resp.Status == fracmanager.AsyncSearchStatusDone + }, 10*time.Second, 50*time.Millisecond) - r.NoError(ctx.Err()) - - fetchResp, err := searcher.FetchAsyncSearchResult(ctx, fr) + fresp, _, err := searcher.FetchAsyncSearchResult(ctx, freq) r.NoError(err) - r.True(fetchResp.Done) - r.True(fetchResp.Expiration.After(time.Now())) + r.Equalf(fracmanager.AsyncSearchStatusDone, fresp.Status, "unexpected status code=%d with error=%q", fresp.Status, fresp.QPR.Errors) + r.Equal([]seq.ErrorSource(nil), fresp.QPR.Errors) + r.True(fresp.ExpiresAt.After(time.Now().UTC())) r.Equal([]seq.AggregationResult{ { Buckets: []seq.AggregationBucket{ @@ -2014,8 +2017,48 @@ func (s *IntegrationTestSuite) TestAsyncSearch() { {Name: "put", Value: 5116, Quantiles: []float64{5116, 5116, 4334}}, }, }, - }, fetchResp.AggResult) + }, fresp.AggResult) + r.Equal(startReq, fresp.Request) + + r.True(len(fresp.QPR.Histogram) != 0) + // TODO: compare ids after with_docs is enabled + // r.Equal(len(docs), fresp.QPR.IDs.Len()) + r.Equal(float64(1), fresp.Progress) + + // GetAsyncSearchesList - r.True(len(fetchResp.QPR.Histogram) != 0) - r.Equal(len(docs), fetchResp.QPR.IDs.Len()) + startResp, err := searcher.StartAsyncSearch(ctx, startReq) + r.NoError(err) + r.NotEmpty(startResp.ID) + searchIDs = append(searchIDs, startResp.ID) + freq.ID = startResp.ID + + r.Eventually(func() bool { + resp, _, err := searcher.FetchAsyncSearchResult(ctx, freq) + r.NoError(err) + return resp.Status == fracmanager.AsyncSearchStatusDone + }, 10*time.Second, 50*time.Millisecond) + + listResp, err := searcher.GetAsyncSearchesList(ctx, search.GetAsyncSearchesListRequest{}) + r.NoError(err) + r.Len(listResp, 2) + + for i, s := range listResp { + r.True(s.ID == searchIDs[len(searchIDs)-i-1]) // list is sorted by startedAt desc + r.Equal(fracmanager.AsyncSearchStatusDone, s.Status) + r.Equal(startReq, s.Request) + r.True(s.ExpiresAt.After(time.Now().UTC())) + r.Equal(float64(1), s.Progress) + } + + // DeleteAsyncSearch + + err = searcher.DeleteAsyncSearch(ctx, startResp.ID) + r.NoError(err) + + r.Eventually(func() bool { + listResp, err := searcher.GetAsyncSearchesList(ctx, search.GetAsyncSearchesListRequest{}) + r.NoError(err) + return len(listResp) == 1 + }, 10*time.Second, 50*time.Millisecond) } diff --git a/util/bufferpool.go b/util/bufferpool.go new file mode 100644 index 00000000..56a23786 --- /dev/null +++ b/util/bufferpool.go @@ -0,0 +1,24 @@ +package util + +import ( + "sync" + + "github.com/ozontech/seq-db/bytespool" +) + +type BufferPool struct { + pool sync.Pool +} + +func (q *BufferPool) Get() *bytespool.Buffer { + v := q.pool.Get() + if v != nil { + return v.(*bytespool.Buffer) + } + return new(bytespool.Buffer) +} + +func (q *BufferPool) Put(b *bytespool.Buffer) { + b.Reset() + q.pool.Put(b) +}