qdrant_client/
qdrant.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct VectorParams {
4    /// Size of the vectors
5    #[prost(uint64, tag = "1")]
6    pub size: u64,
7    /// Distance function used for comparing vectors
8    #[prost(enumeration = "Distance", tag = "2")]
9    pub distance: i32,
10    /// Configuration of vector HNSW graph. If omitted - the collection configuration will be used
11    #[prost(message, optional, tag = "3")]
12    pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
13    /// Configuration of vector quantization config. If omitted - the collection configuration will be used
14    #[prost(message, optional, tag = "4")]
15    pub quantization_config: ::core::option::Option<QuantizationConfig>,
16    /// If true - serve vectors from disk. If set to false, the vectors will be loaded in RAM.
17    #[prost(bool, optional, tag = "5")]
18    pub on_disk: ::core::option::Option<bool>,
19    /// Data type of the vectors
20    #[prost(enumeration = "Datatype", optional, tag = "6")]
21    pub datatype: ::core::option::Option<i32>,
22    /// Configuration for multi-vector search
23    #[prost(message, optional, tag = "7")]
24    pub multivector_config: ::core::option::Option<MultiVectorConfig>,
25}
26#[derive(Clone, Copy, PartialEq, ::prost::Message)]
27pub struct VectorParamsDiff {
28    /// Update params for HNSW index. If empty object - it will be unset
29    #[prost(message, optional, tag = "1")]
30    pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
31    /// Update quantization params. If none - it is left unchanged.
32    #[prost(message, optional, tag = "2")]
33    pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
34    /// If true - serve vectors from disk. If set to false, the vectors will be loaded in RAM.
35    #[prost(bool, optional, tag = "3")]
36    pub on_disk: ::core::option::Option<bool>,
37}
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct VectorParamsMap {
40    #[prost(map = "string, message", tag = "1")]
41    pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
42}
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct VectorParamsDiffMap {
45    #[prost(map = "string, message", tag = "1")]
46    pub map: ::std::collections::HashMap<
47        ::prost::alloc::string::String,
48        VectorParamsDiff,
49    >,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct VectorsConfig {
53    #[prost(oneof = "vectors_config::Config", tags = "1, 2")]
54    pub config: ::core::option::Option<vectors_config::Config>,
55}
56/// Nested message and enum types in `VectorsConfig`.
57pub mod vectors_config {
58    #[derive(Clone, PartialEq, ::prost::Oneof)]
59    pub enum Config {
60        #[prost(message, tag = "1")]
61        Params(super::VectorParams),
62        #[prost(message, tag = "2")]
63        ParamsMap(super::VectorParamsMap),
64    }
65}
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct VectorsConfigDiff {
68    #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
69    pub config: ::core::option::Option<vectors_config_diff::Config>,
70}
71/// Nested message and enum types in `VectorsConfigDiff`.
72pub mod vectors_config_diff {
73    #[derive(Clone, PartialEq, ::prost::Oneof)]
74    pub enum Config {
75        #[prost(message, tag = "1")]
76        Params(super::VectorParamsDiff),
77        #[prost(message, tag = "2")]
78        ParamsMap(super::VectorParamsDiffMap),
79    }
80}
81#[derive(Clone, Copy, PartialEq, ::prost::Message)]
82pub struct SparseVectorParams {
83    /// Configuration of sparse index
84    #[prost(message, optional, tag = "1")]
85    pub index: ::core::option::Option<SparseIndexConfig>,
86    /// If set - apply modifier to the vector values
87    #[prost(enumeration = "Modifier", optional, tag = "2")]
88    pub modifier: ::core::option::Option<i32>,
89}
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct SparseVectorConfig {
92    #[prost(map = "string, message", tag = "1")]
93    pub map: ::std::collections::HashMap<
94        ::prost::alloc::string::String,
95        SparseVectorParams,
96    >,
97}
98#[derive(Clone, Copy, PartialEq, ::prost::Message)]
99pub struct MultiVectorConfig {
100    /// Comparator for multi-vector search
101    #[prost(enumeration = "MultiVectorComparator", tag = "1")]
102    pub comparator: i32,
103}
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct GetCollectionInfoRequest {
106    /// Name of the collection
107    #[prost(string, tag = "1")]
108    pub collection_name: ::prost::alloc::string::String,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct CollectionExistsRequest {
112    #[prost(string, tag = "1")]
113    pub collection_name: ::prost::alloc::string::String,
114}
115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct CollectionExists {
117    #[prost(bool, tag = "1")]
118    pub exists: bool,
119}
120#[derive(Clone, Copy, PartialEq, ::prost::Message)]
121pub struct CollectionExistsResponse {
122    #[prost(message, optional, tag = "1")]
123    pub result: ::core::option::Option<CollectionExists>,
124    /// Time spent to process
125    #[prost(double, tag = "2")]
126    pub time: f64,
127}
128#[derive(Clone, Copy, PartialEq, ::prost::Message)]
129pub struct ListCollectionsRequest {}
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct CollectionDescription {
132    /// Name of the collection
133    #[prost(string, tag = "1")]
134    pub name: ::prost::alloc::string::String,
135}
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct GetCollectionInfoResponse {
138    #[prost(message, optional, tag = "1")]
139    pub result: ::core::option::Option<CollectionInfo>,
140    /// Time spent to process
141    #[prost(double, tag = "2")]
142    pub time: f64,
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct ListCollectionsResponse {
146    #[prost(message, repeated, tag = "1")]
147    pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
148    /// Time spent to process
149    #[prost(double, tag = "2")]
150    pub time: f64,
151}
152#[derive(Clone, Copy, PartialEq, ::prost::Message)]
153pub struct MaxOptimizationThreads {
154    #[prost(oneof = "max_optimization_threads::Variant", tags = "1, 2")]
155    pub variant: ::core::option::Option<max_optimization_threads::Variant>,
156}
157/// Nested message and enum types in `MaxOptimizationThreads`.
158pub mod max_optimization_threads {
159    #[derive(
160        Clone,
161        Copy,
162        Debug,
163        PartialEq,
164        Eq,
165        Hash,
166        PartialOrd,
167        Ord,
168        ::prost::Enumeration
169    )]
170    #[repr(i32)]
171    pub enum Setting {
172        Auto = 0,
173    }
174    impl Setting {
175        /// String value of the enum field names used in the ProtoBuf definition.
176        ///
177        /// The values are not transformed in any way and thus are considered stable
178        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
179        pub fn as_str_name(&self) -> &'static str {
180            match self {
181                Self::Auto => "Auto",
182            }
183        }
184        /// Creates an enum from field names used in the ProtoBuf definition.
185        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
186            match value {
187                "Auto" => Some(Self::Auto),
188                _ => None,
189            }
190        }
191    }
192    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
193    pub enum Variant {
194        #[prost(uint64, tag = "1")]
195        Value(u64),
196        #[prost(enumeration = "Setting", tag = "2")]
197        Setting(i32),
198    }
199}
200#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct OptimizerStatus {
202    #[prost(bool, tag = "1")]
203    pub ok: bool,
204    #[prost(string, tag = "2")]
205    pub error: ::prost::alloc::string::String,
206}
207#[derive(Clone, Copy, PartialEq, ::prost::Message)]
208pub struct HnswConfigDiff {
209    ///
210    /// Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.
211    #[prost(uint64, optional, tag = "1")]
212    pub m: ::core::option::Option<u64>,
213    ///
214    /// Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.
215    #[prost(uint64, optional, tag = "2")]
216    pub ef_construct: ::core::option::Option<u64>,
217    ///
218    /// Minimal size (in KiloBytes) of vectors for additional payload-based indexing.
219    /// If the payload chunk is smaller than `full_scan_threshold` additional indexing won't be used -
220    /// in this case full-scan search should be preferred by query planner and additional indexing is not required.
221    /// Note: 1 Kb = 1 vector of size 256
222    #[prost(uint64, optional, tag = "3")]
223    pub full_scan_threshold: ::core::option::Option<u64>,
224    ///
225    /// Number of parallel threads used for background index building.
226    /// If 0 - automatically select from 8 to 16.
227    /// Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs.
228    /// On small CPUs, less threads are used.
229    #[prost(uint64, optional, tag = "4")]
230    pub max_indexing_threads: ::core::option::Option<u64>,
231    ///
232    /// Store HNSW index on disk. If set to false, the index will be stored in RAM.
233    #[prost(bool, optional, tag = "5")]
234    pub on_disk: ::core::option::Option<bool>,
235    ///
236    /// Number of additional payload-aware links per node in the index graph. If not set - regular M parameter will be used.
237    #[prost(uint64, optional, tag = "6")]
238    pub payload_m: ::core::option::Option<u64>,
239}
240#[derive(Clone, Copy, PartialEq, ::prost::Message)]
241pub struct SparseIndexConfig {
242    ///
243    /// Prefer a full scan search upto (excluding) this number of vectors.
244    /// Note: this is number of vectors, not KiloBytes.
245    #[prost(uint64, optional, tag = "1")]
246    pub full_scan_threshold: ::core::option::Option<u64>,
247    ///
248    /// Store inverted index on disk. If set to false, the index will be stored in RAM.
249    #[prost(bool, optional, tag = "2")]
250    pub on_disk: ::core::option::Option<bool>,
251    ///
252    /// Datatype used to store weights in the index.
253    #[prost(enumeration = "Datatype", optional, tag = "3")]
254    pub datatype: ::core::option::Option<i32>,
255}
256#[derive(Clone, Copy, PartialEq, ::prost::Message)]
257pub struct WalConfigDiff {
258    /// Size of a single WAL block file
259    #[prost(uint64, optional, tag = "1")]
260    pub wal_capacity_mb: ::core::option::Option<u64>,
261    /// Number of segments to create in advance
262    #[prost(uint64, optional, tag = "2")]
263    pub wal_segments_ahead: ::core::option::Option<u64>,
264}
265#[derive(Clone, Copy, PartialEq, ::prost::Message)]
266pub struct OptimizersConfigDiff {
267    ///
268    /// The minimal fraction of deleted vectors in a segment, required to perform segment optimization
269    #[prost(double, optional, tag = "1")]
270    pub deleted_threshold: ::core::option::Option<f64>,
271    ///
272    /// The minimal number of vectors in a segment, required to perform segment optimization
273    #[prost(uint64, optional, tag = "2")]
274    pub vacuum_min_vector_number: ::core::option::Option<u64>,
275    ///
276    /// Target amount of segments the optimizer will try to keep.
277    /// Real amount of segments may vary depending on multiple parameters:
278    ///
279    /// - Amount of stored points.
280    /// - Current write RPS.
281    ///
282    /// It is recommended to select the default number of segments as a factor of the number of search threads,
283    /// so that each segment would be handled evenly by one of the threads.
284    #[prost(uint64, optional, tag = "3")]
285    pub default_segment_number: ::core::option::Option<u64>,
286    ///
287    /// Do not create segments larger this size (in kilobytes).
288    /// Large segments might require disproportionately long indexation times,
289    /// therefore it makes sense to limit the size of segments.
290    ///
291    /// If indexing speed is more important - make this parameter lower.
292    /// If search speed is more important - make this parameter higher.
293    /// Note: 1Kb = 1 vector of size 256
294    /// If not set, will be automatically selected considering the number of available CPUs.
295    #[prost(uint64, optional, tag = "4")]
296    pub max_segment_size: ::core::option::Option<u64>,
297    ///
298    /// Maximum size (in kilobytes) of vectors to store in-memory per segment.
299    /// Segments larger than this threshold will be stored as read-only memmapped file.
300    ///
301    /// Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value.
302    ///
303    /// To disable memmap storage, set this to `0`.
304    ///
305    /// Note: 1Kb = 1 vector of size 256
306    #[prost(uint64, optional, tag = "5")]
307    pub memmap_threshold: ::core::option::Option<u64>,
308    ///
309    /// Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing
310    ///
311    /// Default value is 20,000, based on <<https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md>.>
312    ///
313    /// To disable vector indexing, set to `0`.
314    ///
315    /// Note: 1kB = 1 vector of size 256.
316    #[prost(uint64, optional, tag = "6")]
317    pub indexing_threshold: ::core::option::Option<u64>,
318    ///
319    /// Interval between forced flushes.
320    #[prost(uint64, optional, tag = "7")]
321    pub flush_interval_sec: ::core::option::Option<u64>,
322    /// Deprecated in favor of `max_optimization_threads`
323    #[prost(uint64, optional, tag = "8")]
324    pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
325    ///
326    /// Max number of threads (jobs) for running optimizations per shard.
327    /// Note: each optimization job will also use `max_indexing_threads` threads by itself for index building.
328    /// If "auto" - have no limit and choose dynamically to saturate CPU.
329    /// If 0 - no optimization threads, optimizations will be disabled.
330    #[prost(message, optional, tag = "9")]
331    pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
332}
333#[derive(Clone, Copy, PartialEq, ::prost::Message)]
334pub struct ScalarQuantization {
335    /// Type of quantization
336    #[prost(enumeration = "QuantizationType", tag = "1")]
337    pub r#type: i32,
338    /// Number of bits to use for quantization
339    #[prost(float, optional, tag = "2")]
340    pub quantile: ::core::option::Option<f32>,
341    /// If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
342    #[prost(bool, optional, tag = "3")]
343    pub always_ram: ::core::option::Option<bool>,
344}
345#[derive(Clone, Copy, PartialEq, ::prost::Message)]
346pub struct ProductQuantization {
347    /// Compression ratio
348    #[prost(enumeration = "CompressionRatio", tag = "1")]
349    pub compression: i32,
350    /// If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
351    #[prost(bool, optional, tag = "2")]
352    pub always_ram: ::core::option::Option<bool>,
353}
354#[derive(Clone, Copy, PartialEq, ::prost::Message)]
355pub struct BinaryQuantizationQueryEncoding {
356    #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
357    pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
358}
359/// Nested message and enum types in `BinaryQuantizationQueryEncoding`.
360pub mod binary_quantization_query_encoding {
361    #[derive(
362        Clone,
363        Copy,
364        Debug,
365        PartialEq,
366        Eq,
367        Hash,
368        PartialOrd,
369        Ord,
370        ::prost::Enumeration
371    )]
372    #[repr(i32)]
373    pub enum Setting {
374        Default = 0,
375        Binary = 1,
376        Scalar4Bits = 2,
377        Scalar8Bits = 3,
378    }
379    impl Setting {
380        /// String value of the enum field names used in the ProtoBuf definition.
381        ///
382        /// The values are not transformed in any way and thus are considered stable
383        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
384        pub fn as_str_name(&self) -> &'static str {
385            match self {
386                Self::Default => "Default",
387                Self::Binary => "Binary",
388                Self::Scalar4Bits => "Scalar4Bits",
389                Self::Scalar8Bits => "Scalar8Bits",
390            }
391        }
392        /// Creates an enum from field names used in the ProtoBuf definition.
393        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
394            match value {
395                "Default" => Some(Self::Default),
396                "Binary" => Some(Self::Binary),
397                "Scalar4Bits" => Some(Self::Scalar4Bits),
398                "Scalar8Bits" => Some(Self::Scalar8Bits),
399                _ => None,
400            }
401        }
402    }
403    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
404    pub enum Variant {
405        #[prost(enumeration = "Setting", tag = "4")]
406        Setting(i32),
407    }
408}
409#[derive(Clone, Copy, PartialEq, ::prost::Message)]
410pub struct BinaryQuantization {
411    /// If true - quantized vectors always will be stored in RAM, ignoring the config of main storage
412    #[prost(bool, optional, tag = "1")]
413    pub always_ram: ::core::option::Option<bool>,
414    /// Binary quantization encoding method
415    #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
416    pub encoding: ::core::option::Option<i32>,
417    ///
418    /// Asymmetric quantization configuration allows a query to have different quantization than stored vectors.
419    /// It can increase the accuracy of search at the cost of performance.
420    #[prost(message, optional, tag = "3")]
421    pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
422}
423#[derive(Clone, Copy, PartialEq, ::prost::Message)]
424pub struct QuantizationConfig {
425    #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")]
426    pub quantization: ::core::option::Option<quantization_config::Quantization>,
427}
428/// Nested message and enum types in `QuantizationConfig`.
429pub mod quantization_config {
430    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
431    pub enum Quantization {
432        #[prost(message, tag = "1")]
433        Scalar(super::ScalarQuantization),
434        #[prost(message, tag = "2")]
435        Product(super::ProductQuantization),
436        #[prost(message, tag = "3")]
437        Binary(super::BinaryQuantization),
438    }
439}
440#[derive(Clone, Copy, PartialEq, ::prost::Message)]
441pub struct Disabled {}
442#[derive(Clone, Copy, PartialEq, ::prost::Message)]
443pub struct QuantizationConfigDiff {
444    #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")]
445    pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
446}
447/// Nested message and enum types in `QuantizationConfigDiff`.
448pub mod quantization_config_diff {
449    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
450    pub enum Quantization {
451        #[prost(message, tag = "1")]
452        Scalar(super::ScalarQuantization),
453        #[prost(message, tag = "2")]
454        Product(super::ProductQuantization),
455        #[prost(message, tag = "3")]
456        Disabled(super::Disabled),
457        #[prost(message, tag = "4")]
458        Binary(super::BinaryQuantization),
459    }
460}
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct StrictModeConfig {
463    #[prost(bool, optional, tag = "1")]
464    pub enabled: ::core::option::Option<bool>,
465    #[prost(uint32, optional, tag = "2")]
466    pub max_query_limit: ::core::option::Option<u32>,
467    #[prost(uint32, optional, tag = "3")]
468    pub max_timeout: ::core::option::Option<u32>,
469    #[prost(bool, optional, tag = "4")]
470    pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
471    #[prost(bool, optional, tag = "5")]
472    pub unindexed_filtering_update: ::core::option::Option<bool>,
473    #[prost(uint32, optional, tag = "6")]
474    pub search_max_hnsw_ef: ::core::option::Option<u32>,
475    #[prost(bool, optional, tag = "7")]
476    pub search_allow_exact: ::core::option::Option<bool>,
477    #[prost(float, optional, tag = "8")]
478    pub search_max_oversampling: ::core::option::Option<f32>,
479    #[prost(uint64, optional, tag = "9")]
480    pub upsert_max_batchsize: ::core::option::Option<u64>,
481    #[prost(uint64, optional, tag = "10")]
482    pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
483    /// Max number of read operations per minute per replica
484    #[prost(uint32, optional, tag = "11")]
485    pub read_rate_limit: ::core::option::Option<u32>,
486    /// Max number of write operations per minute per replica
487    #[prost(uint32, optional, tag = "12")]
488    pub write_rate_limit: ::core::option::Option<u32>,
489    #[prost(uint64, optional, tag = "13")]
490    pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
491    #[prost(uint64, optional, tag = "14")]
492    pub filter_max_conditions: ::core::option::Option<u64>,
493    #[prost(uint64, optional, tag = "15")]
494    pub condition_max_size: ::core::option::Option<u64>,
495    #[prost(message, optional, tag = "16")]
496    pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
497    #[prost(message, optional, tag = "17")]
498    pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
499    #[prost(uint64, optional, tag = "18")]
500    pub max_points_count: ::core::option::Option<u64>,
501}
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct StrictModeSparseConfig {
504    #[prost(map = "string, message", tag = "1")]
505    pub sparse_config: ::std::collections::HashMap<
506        ::prost::alloc::string::String,
507        StrictModeSparse,
508    >,
509}
510#[derive(Clone, Copy, PartialEq, ::prost::Message)]
511pub struct StrictModeSparse {
512    #[prost(uint64, optional, tag = "10")]
513    pub max_length: ::core::option::Option<u64>,
514}
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct StrictModeMultivectorConfig {
517    #[prost(map = "string, message", tag = "1")]
518    pub multivector_config: ::std::collections::HashMap<
519        ::prost::alloc::string::String,
520        StrictModeMultivector,
521    >,
522}
523#[derive(Clone, Copy, PartialEq, ::prost::Message)]
524pub struct StrictModeMultivector {
525    #[prost(uint64, optional, tag = "1")]
526    pub max_vectors: ::core::option::Option<u64>,
527}
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct CreateCollection {
530    /// Name of the collection
531    #[prost(string, tag = "1")]
532    pub collection_name: ::prost::alloc::string::String,
533    /// Configuration of vector index
534    #[prost(message, optional, tag = "4")]
535    pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
536    /// Configuration of the Write-Ahead-Log
537    #[prost(message, optional, tag = "5")]
538    pub wal_config: ::core::option::Option<WalConfigDiff>,
539    /// Configuration of the optimizers
540    #[prost(message, optional, tag = "6")]
541    pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
542    /// Number of shards in the collection, default is 1 for standalone, otherwise equal to the number of nodes. Minimum is 1
543    #[prost(uint32, optional, tag = "7")]
544    pub shard_number: ::core::option::Option<u32>,
545    /// If true - point's payload will not be stored in memory
546    #[prost(bool, optional, tag = "8")]
547    pub on_disk_payload: ::core::option::Option<bool>,
548    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
549    #[prost(uint64, optional, tag = "9")]
550    pub timeout: ::core::option::Option<u64>,
551    /// Configuration for vectors
552    #[prost(message, optional, tag = "10")]
553    pub vectors_config: ::core::option::Option<VectorsConfig>,
554    /// Number of replicas of each shard that network tries to maintain, default = 1
555    #[prost(uint32, optional, tag = "11")]
556    pub replication_factor: ::core::option::Option<u32>,
557    /// How many replicas should apply the operation for us to consider it successful, default = 1
558    #[prost(uint32, optional, tag = "12")]
559    pub write_consistency_factor: ::core::option::Option<u32>,
560    /// Specify name of the other collection to copy data from
561    #[prost(string, optional, tag = "13")]
562    pub init_from_collection: ::core::option::Option<::prost::alloc::string::String>,
563    /// Quantization configuration of vector
564    #[prost(message, optional, tag = "14")]
565    pub quantization_config: ::core::option::Option<QuantizationConfig>,
566    /// Sharding method
567    #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
568    pub sharding_method: ::core::option::Option<i32>,
569    /// Configuration for sparse vectors
570    #[prost(message, optional, tag = "16")]
571    pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
572    /// Configuration for strict mode
573    #[prost(message, optional, tag = "17")]
574    pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
575}
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct UpdateCollection {
578    /// Name of the collection
579    #[prost(string, tag = "1")]
580    pub collection_name: ::prost::alloc::string::String,
581    /// New configuration parameters for the collection. This operation is blocking, it will only proceed once all current optimizations are complete
582    #[prost(message, optional, tag = "2")]
583    pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
584    /// Wait timeout for operation commit in seconds if blocking, if not specified - default value will be supplied
585    #[prost(uint64, optional, tag = "3")]
586    pub timeout: ::core::option::Option<u64>,
587    /// New configuration parameters for the collection
588    #[prost(message, optional, tag = "4")]
589    pub params: ::core::option::Option<CollectionParamsDiff>,
590    /// New HNSW parameters for the collection index
591    #[prost(message, optional, tag = "5")]
592    pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
593    /// New vector parameters
594    #[prost(message, optional, tag = "6")]
595    pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
596    /// Quantization configuration of vector
597    #[prost(message, optional, tag = "7")]
598    pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
599    /// New sparse vector parameters
600    #[prost(message, optional, tag = "8")]
601    pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
602    /// New strict mode configuration
603    #[prost(message, optional, tag = "9")]
604    pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
605}
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct DeleteCollection {
608    /// Name of the collection
609    #[prost(string, tag = "1")]
610    pub collection_name: ::prost::alloc::string::String,
611    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
612    #[prost(uint64, optional, tag = "2")]
613    pub timeout: ::core::option::Option<u64>,
614}
615#[derive(Clone, Copy, PartialEq, ::prost::Message)]
616pub struct CollectionOperationResponse {
617    /// if operation made changes
618    #[prost(bool, tag = "1")]
619    pub result: bool,
620    /// Time spent to process
621    #[prost(double, tag = "2")]
622    pub time: f64,
623}
624#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct CollectionParams {
626    /// Number of shards in collection
627    #[prost(uint32, tag = "3")]
628    pub shard_number: u32,
629    /// If true - point's payload will not be stored in memory
630    #[prost(bool, tag = "4")]
631    pub on_disk_payload: bool,
632    /// Configuration for vectors
633    #[prost(message, optional, tag = "5")]
634    pub vectors_config: ::core::option::Option<VectorsConfig>,
635    /// Number of replicas of each shard that network tries to maintain
636    #[prost(uint32, optional, tag = "6")]
637    pub replication_factor: ::core::option::Option<u32>,
638    /// How many replicas should apply the operation for us to consider it successful
639    #[prost(uint32, optional, tag = "7")]
640    pub write_consistency_factor: ::core::option::Option<u32>,
641    /// Fan-out every read request to these many additional remote nodes (and return first available response)
642    #[prost(uint32, optional, tag = "8")]
643    pub read_fan_out_factor: ::core::option::Option<u32>,
644    /// Sharding method
645    #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
646    pub sharding_method: ::core::option::Option<i32>,
647    /// Configuration for sparse vectors
648    #[prost(message, optional, tag = "10")]
649    pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
650}
651#[derive(Clone, Copy, PartialEq, ::prost::Message)]
652pub struct CollectionParamsDiff {
653    /// Number of replicas of each shard that network tries to maintain
654    #[prost(uint32, optional, tag = "1")]
655    pub replication_factor: ::core::option::Option<u32>,
656    /// How many replicas should apply the operation for us to consider it successful
657    #[prost(uint32, optional, tag = "2")]
658    pub write_consistency_factor: ::core::option::Option<u32>,
659    /// If true - point's payload will not be stored in memory
660    #[prost(bool, optional, tag = "3")]
661    pub on_disk_payload: ::core::option::Option<bool>,
662    /// Fan-out every read request to these many additional remote nodes (and return first available response)
663    #[prost(uint32, optional, tag = "4")]
664    pub read_fan_out_factor: ::core::option::Option<u32>,
665}
666#[derive(Clone, PartialEq, ::prost::Message)]
667pub struct CollectionConfig {
668    /// Collection parameters
669    #[prost(message, optional, tag = "1")]
670    pub params: ::core::option::Option<CollectionParams>,
671    /// Configuration of vector index
672    #[prost(message, optional, tag = "2")]
673    pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
674    /// Configuration of the optimizers
675    #[prost(message, optional, tag = "3")]
676    pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
677    /// Configuration of the Write-Ahead-Log
678    #[prost(message, optional, tag = "4")]
679    pub wal_config: ::core::option::Option<WalConfigDiff>,
680    /// Configuration of the vector quantization
681    #[prost(message, optional, tag = "5")]
682    pub quantization_config: ::core::option::Option<QuantizationConfig>,
683    /// Configuration of strict mode.
684    #[prost(message, optional, tag = "6")]
685    pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
686}
687#[derive(Clone, Copy, PartialEq, ::prost::Message)]
688pub struct KeywordIndexParams {
689    /// If true - used for tenant optimization.
690    #[prost(bool, optional, tag = "1")]
691    pub is_tenant: ::core::option::Option<bool>,
692    /// If true - store index on disk.
693    #[prost(bool, optional, tag = "2")]
694    pub on_disk: ::core::option::Option<bool>,
695}
696#[derive(Clone, Copy, PartialEq, ::prost::Message)]
697pub struct IntegerIndexParams {
698    /// If true - support direct lookups. Default is true.
699    #[prost(bool, optional, tag = "1")]
700    pub lookup: ::core::option::Option<bool>,
701    /// If true - support ranges filters. Default is true.
702    #[prost(bool, optional, tag = "2")]
703    pub range: ::core::option::Option<bool>,
704    /// If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. Default is false.
705    #[prost(bool, optional, tag = "3")]
706    pub is_principal: ::core::option::Option<bool>,
707    /// If true - store index on disk. Default is false.
708    #[prost(bool, optional, tag = "4")]
709    pub on_disk: ::core::option::Option<bool>,
710}
711#[derive(Clone, Copy, PartialEq, ::prost::Message)]
712pub struct FloatIndexParams {
713    /// If true - store index on disk.
714    #[prost(bool, optional, tag = "1")]
715    pub on_disk: ::core::option::Option<bool>,
716    /// If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.
717    #[prost(bool, optional, tag = "2")]
718    pub is_principal: ::core::option::Option<bool>,
719}
720#[derive(Clone, Copy, PartialEq, ::prost::Message)]
721pub struct GeoIndexParams {
722    /// If true - store index on disk.
723    #[prost(bool, optional, tag = "1")]
724    pub on_disk: ::core::option::Option<bool>,
725}
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct StopwordsSet {
728    /// List of languages to use stopwords from
729    #[prost(string, repeated, tag = "1")]
730    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
731    /// List of custom stopwords
732    #[prost(string, repeated, tag = "2")]
733    pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
734}
735#[derive(Clone, PartialEq, ::prost::Message)]
736pub struct TextIndexParams {
737    /// Tokenizer type
738    #[prost(enumeration = "TokenizerType", tag = "1")]
739    pub tokenizer: i32,
740    /// If true - all tokens will be lowercase
741    #[prost(bool, optional, tag = "2")]
742    pub lowercase: ::core::option::Option<bool>,
743    /// Minimal token length
744    #[prost(uint64, optional, tag = "3")]
745    pub min_token_len: ::core::option::Option<u64>,
746    /// Maximal token length
747    #[prost(uint64, optional, tag = "4")]
748    pub max_token_len: ::core::option::Option<u64>,
749    /// If true - store index on disk.
750    #[prost(bool, optional, tag = "5")]
751    pub on_disk: ::core::option::Option<bool>,
752    /// Stopwords for the text index
753    #[prost(message, optional, tag = "6")]
754    pub stopwords: ::core::option::Option<StopwordsSet>,
755    /// If true - support phrase matching.
756    #[prost(bool, optional, tag = "7")]
757    pub phrase_matching: ::core::option::Option<bool>,
758    /// Set an algorithm for stemming.
759    #[prost(message, optional, tag = "8")]
760    pub stemmer: ::core::option::Option<StemmingAlgorithm>,
761}
762#[derive(Clone, PartialEq, ::prost::Message)]
763pub struct StemmingAlgorithm {
764    #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1")]
765    pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
766}
767/// Nested message and enum types in `StemmingAlgorithm`.
768pub mod stemming_algorithm {
769    #[derive(Clone, PartialEq, ::prost::Oneof)]
770    pub enum StemmingParams {
771        /// Parameters for snowball stemming
772        #[prost(message, tag = "1")]
773        Snowball(super::SnowballParams),
774    }
775}
776#[derive(Clone, PartialEq, ::prost::Message)]
777pub struct SnowballParams {
778    /// Which language the algorithm should stem.
779    #[prost(string, tag = "1")]
780    pub language: ::prost::alloc::string::String,
781}
782#[derive(Clone, Copy, PartialEq, ::prost::Message)]
783pub struct BoolIndexParams {
784    /// If true - store index on disk.
785    #[prost(bool, optional, tag = "1")]
786    pub on_disk: ::core::option::Option<bool>,
787}
788#[derive(Clone, Copy, PartialEq, ::prost::Message)]
789pub struct DatetimeIndexParams {
790    /// If true - store index on disk.
791    #[prost(bool, optional, tag = "1")]
792    pub on_disk: ::core::option::Option<bool>,
793    /// If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.
794    #[prost(bool, optional, tag = "2")]
795    pub is_principal: ::core::option::Option<bool>,
796}
797#[derive(Clone, Copy, PartialEq, ::prost::Message)]
798pub struct UuidIndexParams {
799    /// If true - used for tenant optimization.
800    #[prost(bool, optional, tag = "1")]
801    pub is_tenant: ::core::option::Option<bool>,
802    /// If true - store index on disk.
803    #[prost(bool, optional, tag = "2")]
804    pub on_disk: ::core::option::Option<bool>,
805}
806#[derive(Clone, PartialEq, ::prost::Message)]
807pub struct PayloadIndexParams {
808    #[prost(
809        oneof = "payload_index_params::IndexParams",
810        tags = "3, 2, 4, 5, 1, 6, 7, 8"
811    )]
812    pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
813}
814/// Nested message and enum types in `PayloadIndexParams`.
815pub mod payload_index_params {
816    #[derive(Clone, PartialEq, ::prost::Oneof)]
817    pub enum IndexParams {
818        /// Parameters for keyword index
819        #[prost(message, tag = "3")]
820        KeywordIndexParams(super::KeywordIndexParams),
821        /// Parameters for integer index
822        #[prost(message, tag = "2")]
823        IntegerIndexParams(super::IntegerIndexParams),
824        /// Parameters for float index
825        #[prost(message, tag = "4")]
826        FloatIndexParams(super::FloatIndexParams),
827        /// Parameters for geo index
828        #[prost(message, tag = "5")]
829        GeoIndexParams(super::GeoIndexParams),
830        /// Parameters for text index
831        #[prost(message, tag = "1")]
832        TextIndexParams(super::TextIndexParams),
833        /// Parameters for bool index
834        #[prost(message, tag = "6")]
835        BoolIndexParams(super::BoolIndexParams),
836        /// Parameters for datetime index
837        #[prost(message, tag = "7")]
838        DatetimeIndexParams(super::DatetimeIndexParams),
839        /// Parameters for uuid index
840        #[prost(message, tag = "8")]
841        UuidIndexParams(super::UuidIndexParams),
842    }
843}
844#[derive(Clone, PartialEq, ::prost::Message)]
845pub struct PayloadSchemaInfo {
846    /// Field data type
847    #[prost(enumeration = "PayloadSchemaType", tag = "1")]
848    pub data_type: i32,
849    /// Field index parameters
850    #[prost(message, optional, tag = "2")]
851    pub params: ::core::option::Option<PayloadIndexParams>,
852    /// Number of points indexed within this field indexed
853    #[prost(uint64, optional, tag = "3")]
854    pub points: ::core::option::Option<u64>,
855}
856#[derive(Clone, PartialEq, ::prost::Message)]
857pub struct CollectionInfo {
858    /// operating condition of the collection
859    #[prost(enumeration = "CollectionStatus", tag = "1")]
860    pub status: i32,
861    /// status of collection optimizers
862    #[prost(message, optional, tag = "2")]
863    pub optimizer_status: ::core::option::Option<OptimizerStatus>,
864    /// Approximate number of vectors in the collection
865    #[prost(uint64, optional, tag = "3")]
866    pub vectors_count: ::core::option::Option<u64>,
867    /// Number of independent segments
868    #[prost(uint64, tag = "4")]
869    pub segments_count: u64,
870    /// Configuration
871    #[prost(message, optional, tag = "7")]
872    pub config: ::core::option::Option<CollectionConfig>,
873    /// Collection data types
874    #[prost(map = "string, message", tag = "8")]
875    pub payload_schema: ::std::collections::HashMap<
876        ::prost::alloc::string::String,
877        PayloadSchemaInfo,
878    >,
879    /// Approximate number of points in the collection
880    #[prost(uint64, optional, tag = "9")]
881    pub points_count: ::core::option::Option<u64>,
882    /// Approximate number of indexed vectors in the collection.
883    #[prost(uint64, optional, tag = "10")]
884    pub indexed_vectors_count: ::core::option::Option<u64>,
885}
886#[derive(Clone, PartialEq, ::prost::Message)]
887pub struct ChangeAliases {
888    /// List of actions
889    #[prost(message, repeated, tag = "1")]
890    pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
891    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
892    #[prost(uint64, optional, tag = "2")]
893    pub timeout: ::core::option::Option<u64>,
894}
895#[derive(Clone, PartialEq, ::prost::Message)]
896pub struct AliasOperations {
897    #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
898    pub action: ::core::option::Option<alias_operations::Action>,
899}
900/// Nested message and enum types in `AliasOperations`.
901pub mod alias_operations {
902    #[derive(Clone, PartialEq, ::prost::Oneof)]
903    pub enum Action {
904        #[prost(message, tag = "1")]
905        CreateAlias(super::CreateAlias),
906        #[prost(message, tag = "2")]
907        RenameAlias(super::RenameAlias),
908        #[prost(message, tag = "3")]
909        DeleteAlias(super::DeleteAlias),
910    }
911}
912#[derive(Clone, PartialEq, ::prost::Message)]
913pub struct CreateAlias {
914    /// Name of the collection
915    #[prost(string, tag = "1")]
916    pub collection_name: ::prost::alloc::string::String,
917    /// New name of the alias
918    #[prost(string, tag = "2")]
919    pub alias_name: ::prost::alloc::string::String,
920}
921#[derive(Clone, PartialEq, ::prost::Message)]
922pub struct RenameAlias {
923    /// Name of the alias to rename
924    #[prost(string, tag = "1")]
925    pub old_alias_name: ::prost::alloc::string::String,
926    /// Name of the alias
927    #[prost(string, tag = "2")]
928    pub new_alias_name: ::prost::alloc::string::String,
929}
930#[derive(Clone, PartialEq, ::prost::Message)]
931pub struct DeleteAlias {
932    /// Name of the alias
933    #[prost(string, tag = "1")]
934    pub alias_name: ::prost::alloc::string::String,
935}
936#[derive(Clone, Copy, PartialEq, ::prost::Message)]
937pub struct ListAliasesRequest {}
938#[derive(Clone, PartialEq, ::prost::Message)]
939pub struct ListCollectionAliasesRequest {
940    /// Name of the collection
941    #[prost(string, tag = "1")]
942    pub collection_name: ::prost::alloc::string::String,
943}
944#[derive(Clone, PartialEq, ::prost::Message)]
945pub struct AliasDescription {
946    /// Name of the alias
947    #[prost(string, tag = "1")]
948    pub alias_name: ::prost::alloc::string::String,
949    /// Name of the collection
950    #[prost(string, tag = "2")]
951    pub collection_name: ::prost::alloc::string::String,
952}
953#[derive(Clone, PartialEq, ::prost::Message)]
954pub struct ListAliasesResponse {
955    #[prost(message, repeated, tag = "1")]
956    pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
957    /// Time spent to process
958    #[prost(double, tag = "2")]
959    pub time: f64,
960}
961#[derive(Clone, PartialEq, ::prost::Message)]
962pub struct CollectionClusterInfoRequest {
963    /// Name of the collection
964    #[prost(string, tag = "1")]
965    pub collection_name: ::prost::alloc::string::String,
966}
967#[derive(Clone, PartialEq, ::prost::Message)]
968pub struct ShardKey {
969    #[prost(oneof = "shard_key::Key", tags = "1, 2")]
970    pub key: ::core::option::Option<shard_key::Key>,
971}
972/// Nested message and enum types in `ShardKey`.
973pub mod shard_key {
974    #[derive(Clone, PartialEq, ::prost::Oneof)]
975    pub enum Key {
976        /// String key
977        #[prost(string, tag = "1")]
978        Keyword(::prost::alloc::string::String),
979        /// Number key
980        #[prost(uint64, tag = "2")]
981        Number(u64),
982    }
983}
984#[derive(Clone, PartialEq, ::prost::Message)]
985pub struct LocalShardInfo {
986    /// Local shard id
987    #[prost(uint32, tag = "1")]
988    pub shard_id: u32,
989    /// Number of points in the shard
990    #[prost(uint64, tag = "2")]
991    pub points_count: u64,
992    /// Is replica active
993    #[prost(enumeration = "ReplicaState", tag = "3")]
994    pub state: i32,
995    /// User-defined shard key
996    #[prost(message, optional, tag = "4")]
997    pub shard_key: ::core::option::Option<ShardKey>,
998}
999#[derive(Clone, PartialEq, ::prost::Message)]
1000pub struct RemoteShardInfo {
1001    /// Local shard id
1002    #[prost(uint32, tag = "1")]
1003    pub shard_id: u32,
1004    /// Remote peer id
1005    #[prost(uint64, tag = "2")]
1006    pub peer_id: u64,
1007    /// Is replica active
1008    #[prost(enumeration = "ReplicaState", tag = "3")]
1009    pub state: i32,
1010    /// User-defined shard key
1011    #[prost(message, optional, tag = "4")]
1012    pub shard_key: ::core::option::Option<ShardKey>,
1013}
1014#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1015pub struct ShardTransferInfo {
1016    /// Local shard id
1017    #[prost(uint32, tag = "1")]
1018    pub shard_id: u32,
1019    #[prost(uint32, optional, tag = "5")]
1020    pub to_shard_id: ::core::option::Option<u32>,
1021    #[prost(uint64, tag = "2")]
1022    pub from: u64,
1023    #[prost(uint64, tag = "3")]
1024    pub to: u64,
1025    /// If `true` transfer is a synchronization of a replicas; If `false` transfer is a moving of a shard from one peer to another
1026    #[prost(bool, tag = "4")]
1027    pub sync: bool,
1028}
1029#[derive(Clone, PartialEq, ::prost::Message)]
1030pub struct ReshardingInfo {
1031    #[prost(uint32, tag = "1")]
1032    pub shard_id: u32,
1033    #[prost(uint64, tag = "2")]
1034    pub peer_id: u64,
1035    #[prost(message, optional, tag = "3")]
1036    pub shard_key: ::core::option::Option<ShardKey>,
1037    #[prost(enumeration = "ReshardingDirection", tag = "4")]
1038    pub direction: i32,
1039}
1040#[derive(Clone, PartialEq, ::prost::Message)]
1041pub struct CollectionClusterInfoResponse {
1042    /// ID of this peer
1043    #[prost(uint64, tag = "1")]
1044    pub peer_id: u64,
1045    /// Total number of shards
1046    #[prost(uint64, tag = "2")]
1047    pub shard_count: u64,
1048    /// Local shards
1049    #[prost(message, repeated, tag = "3")]
1050    pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1051    /// Remote shards
1052    #[prost(message, repeated, tag = "4")]
1053    pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1054    /// Shard transfers
1055    #[prost(message, repeated, tag = "5")]
1056    pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1057    /// Resharding operations
1058    #[prost(message, repeated, tag = "6")]
1059    pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1060}
1061#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1062pub struct MoveShard {
1063    /// Local shard id
1064    #[prost(uint32, tag = "1")]
1065    pub shard_id: u32,
1066    #[prost(uint32, optional, tag = "5")]
1067    pub to_shard_id: ::core::option::Option<u32>,
1068    #[prost(uint64, tag = "2")]
1069    pub from_peer_id: u64,
1070    #[prost(uint64, tag = "3")]
1071    pub to_peer_id: u64,
1072    #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1073    pub method: ::core::option::Option<i32>,
1074}
1075#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1076pub struct ReplicateShard {
1077    /// Local shard id
1078    #[prost(uint32, tag = "1")]
1079    pub shard_id: u32,
1080    #[prost(uint32, optional, tag = "5")]
1081    pub to_shard_id: ::core::option::Option<u32>,
1082    #[prost(uint64, tag = "2")]
1083    pub from_peer_id: u64,
1084    #[prost(uint64, tag = "3")]
1085    pub to_peer_id: u64,
1086    #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1087    pub method: ::core::option::Option<i32>,
1088}
1089#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1090pub struct AbortShardTransfer {
1091    /// Local shard id
1092    #[prost(uint32, tag = "1")]
1093    pub shard_id: u32,
1094    #[prost(uint32, optional, tag = "4")]
1095    pub to_shard_id: ::core::option::Option<u32>,
1096    #[prost(uint64, tag = "2")]
1097    pub from_peer_id: u64,
1098    #[prost(uint64, tag = "3")]
1099    pub to_peer_id: u64,
1100}
1101#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1102pub struct RestartTransfer {
1103    /// Local shard id
1104    #[prost(uint32, tag = "1")]
1105    pub shard_id: u32,
1106    #[prost(uint32, optional, tag = "5")]
1107    pub to_shard_id: ::core::option::Option<u32>,
1108    #[prost(uint64, tag = "2")]
1109    pub from_peer_id: u64,
1110    #[prost(uint64, tag = "3")]
1111    pub to_peer_id: u64,
1112    #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1113    pub method: i32,
1114}
1115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1116pub struct Replica {
1117    #[prost(uint32, tag = "1")]
1118    pub shard_id: u32,
1119    #[prost(uint64, tag = "2")]
1120    pub peer_id: u64,
1121}
1122#[derive(Clone, PartialEq, ::prost::Message)]
1123pub struct CreateShardKey {
1124    /// User-defined shard key
1125    #[prost(message, optional, tag = "1")]
1126    pub shard_key: ::core::option::Option<ShardKey>,
1127    /// Number of shards to create per shard key
1128    #[prost(uint32, optional, tag = "2")]
1129    pub shards_number: ::core::option::Option<u32>,
1130    /// Number of replicas of each shard to create
1131    #[prost(uint32, optional, tag = "3")]
1132    pub replication_factor: ::core::option::Option<u32>,
1133    /// List of peer ids, allowed to create shards. If empty - all peers are allowed
1134    #[prost(uint64, repeated, tag = "4")]
1135    pub placement: ::prost::alloc::vec::Vec<u64>,
1136}
1137#[derive(Clone, PartialEq, ::prost::Message)]
1138pub struct DeleteShardKey {
1139    /// Shard key to delete
1140    #[prost(message, optional, tag = "1")]
1141    pub shard_key: ::core::option::Option<ShardKey>,
1142}
1143#[derive(Clone, PartialEq, ::prost::Message)]
1144pub struct UpdateCollectionClusterSetupRequest {
1145    /// Name of the collection
1146    #[prost(string, tag = "1")]
1147    pub collection_name: ::prost::alloc::string::String,
1148    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
1149    #[prost(uint64, optional, tag = "6")]
1150    pub timeout: ::core::option::Option<u64>,
1151    #[prost(
1152        oneof = "update_collection_cluster_setup_request::Operation",
1153        tags = "2, 3, 4, 5, 7, 8, 9"
1154    )]
1155    pub operation: ::core::option::Option<
1156        update_collection_cluster_setup_request::Operation,
1157    >,
1158}
1159/// Nested message and enum types in `UpdateCollectionClusterSetupRequest`.
1160pub mod update_collection_cluster_setup_request {
1161    #[derive(Clone, PartialEq, ::prost::Oneof)]
1162    pub enum Operation {
1163        #[prost(message, tag = "2")]
1164        MoveShard(super::MoveShard),
1165        #[prost(message, tag = "3")]
1166        ReplicateShard(super::ReplicateShard),
1167        #[prost(message, tag = "4")]
1168        AbortTransfer(super::AbortShardTransfer),
1169        #[prost(message, tag = "5")]
1170        DropReplica(super::Replica),
1171        #[prost(message, tag = "7")]
1172        CreateShardKey(super::CreateShardKey),
1173        #[prost(message, tag = "8")]
1174        DeleteShardKey(super::DeleteShardKey),
1175        #[prost(message, tag = "9")]
1176        RestartTransfer(super::RestartTransfer),
1177    }
1178}
1179#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1180pub struct UpdateCollectionClusterSetupResponse {
1181    #[prost(bool, tag = "1")]
1182    pub result: bool,
1183}
1184#[derive(Clone, PartialEq, ::prost::Message)]
1185pub struct CreateShardKeyRequest {
1186    /// Name of the collection
1187    #[prost(string, tag = "1")]
1188    pub collection_name: ::prost::alloc::string::String,
1189    /// Request to create shard key
1190    #[prost(message, optional, tag = "2")]
1191    pub request: ::core::option::Option<CreateShardKey>,
1192    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
1193    #[prost(uint64, optional, tag = "3")]
1194    pub timeout: ::core::option::Option<u64>,
1195}
1196#[derive(Clone, PartialEq, ::prost::Message)]
1197pub struct DeleteShardKeyRequest {
1198    /// Name of the collection
1199    #[prost(string, tag = "1")]
1200    pub collection_name: ::prost::alloc::string::String,
1201    /// Request to delete shard key
1202    #[prost(message, optional, tag = "2")]
1203    pub request: ::core::option::Option<DeleteShardKey>,
1204    /// Wait timeout for operation commit in seconds, if not specified - default value will be supplied
1205    #[prost(uint64, optional, tag = "3")]
1206    pub timeout: ::core::option::Option<u64>,
1207}
1208#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1209pub struct CreateShardKeyResponse {
1210    #[prost(bool, tag = "1")]
1211    pub result: bool,
1212}
1213#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1214pub struct DeleteShardKeyResponse {
1215    #[prost(bool, tag = "1")]
1216    pub result: bool,
1217}
1218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1219#[repr(i32)]
1220pub enum Datatype {
1221    Default = 0,
1222    Float32 = 1,
1223    Uint8 = 2,
1224    Float16 = 3,
1225}
1226impl Datatype {
1227    /// String value of the enum field names used in the ProtoBuf definition.
1228    ///
1229    /// The values are not transformed in any way and thus are considered stable
1230    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1231    pub fn as_str_name(&self) -> &'static str {
1232        match self {
1233            Self::Default => "Default",
1234            Self::Float32 => "Float32",
1235            Self::Uint8 => "Uint8",
1236            Self::Float16 => "Float16",
1237        }
1238    }
1239    /// Creates an enum from field names used in the ProtoBuf definition.
1240    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1241        match value {
1242            "Default" => Some(Self::Default),
1243            "Float32" => Some(Self::Float32),
1244            "Uint8" => Some(Self::Uint8),
1245            "Float16" => Some(Self::Float16),
1246            _ => None,
1247        }
1248    }
1249}
1250#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1251#[repr(i32)]
1252pub enum Modifier {
1253    None = 0,
1254    /// Apply Inverse Document Frequency
1255    Idf = 1,
1256}
1257impl Modifier {
1258    /// String value of the enum field names used in the ProtoBuf definition.
1259    ///
1260    /// The values are not transformed in any way and thus are considered stable
1261    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1262    pub fn as_str_name(&self) -> &'static str {
1263        match self {
1264            Self::None => "None",
1265            Self::Idf => "Idf",
1266        }
1267    }
1268    /// Creates an enum from field names used in the ProtoBuf definition.
1269    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1270        match value {
1271            "None" => Some(Self::None),
1272            "Idf" => Some(Self::Idf),
1273            _ => None,
1274        }
1275    }
1276}
1277#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1278#[repr(i32)]
1279pub enum MultiVectorComparator {
1280    MaxSim = 0,
1281}
1282impl MultiVectorComparator {
1283    /// String value of the enum field names used in the ProtoBuf definition.
1284    ///
1285    /// The values are not transformed in any way and thus are considered stable
1286    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1287    pub fn as_str_name(&self) -> &'static str {
1288        match self {
1289            Self::MaxSim => "MaxSim",
1290        }
1291    }
1292    /// Creates an enum from field names used in the ProtoBuf definition.
1293    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1294        match value {
1295            "MaxSim" => Some(Self::MaxSim),
1296            _ => None,
1297        }
1298    }
1299}
1300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1301#[repr(i32)]
1302pub enum Distance {
1303    UnknownDistance = 0,
1304    Cosine = 1,
1305    Euclid = 2,
1306    Dot = 3,
1307    Manhattan = 4,
1308}
1309impl Distance {
1310    /// String value of the enum field names used in the ProtoBuf definition.
1311    ///
1312    /// The values are not transformed in any way and thus are considered stable
1313    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1314    pub fn as_str_name(&self) -> &'static str {
1315        match self {
1316            Self::UnknownDistance => "UnknownDistance",
1317            Self::Cosine => "Cosine",
1318            Self::Euclid => "Euclid",
1319            Self::Dot => "Dot",
1320            Self::Manhattan => "Manhattan",
1321        }
1322    }
1323    /// Creates an enum from field names used in the ProtoBuf definition.
1324    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1325        match value {
1326            "UnknownDistance" => Some(Self::UnknownDistance),
1327            "Cosine" => Some(Self::Cosine),
1328            "Euclid" => Some(Self::Euclid),
1329            "Dot" => Some(Self::Dot),
1330            "Manhattan" => Some(Self::Manhattan),
1331            _ => None,
1332        }
1333    }
1334}
1335#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1336#[repr(i32)]
1337pub enum CollectionStatus {
1338    UnknownCollectionStatus = 0,
1339    /// All segments are ready
1340    Green = 1,
1341    /// Optimization in process
1342    Yellow = 2,
1343    /// Something went wrong
1344    Red = 3,
1345    /// Optimization is pending
1346    Grey = 4,
1347}
1348impl CollectionStatus {
1349    /// String value of the enum field names used in the ProtoBuf definition.
1350    ///
1351    /// The values are not transformed in any way and thus are considered stable
1352    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1353    pub fn as_str_name(&self) -> &'static str {
1354        match self {
1355            Self::UnknownCollectionStatus => "UnknownCollectionStatus",
1356            Self::Green => "Green",
1357            Self::Yellow => "Yellow",
1358            Self::Red => "Red",
1359            Self::Grey => "Grey",
1360        }
1361    }
1362    /// Creates an enum from field names used in the ProtoBuf definition.
1363    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1364        match value {
1365            "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
1366            "Green" => Some(Self::Green),
1367            "Yellow" => Some(Self::Yellow),
1368            "Red" => Some(Self::Red),
1369            "Grey" => Some(Self::Grey),
1370            _ => None,
1371        }
1372    }
1373}
1374#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1375#[repr(i32)]
1376pub enum PayloadSchemaType {
1377    UnknownType = 0,
1378    Keyword = 1,
1379    Integer = 2,
1380    Float = 3,
1381    Geo = 4,
1382    Text = 5,
1383    Bool = 6,
1384    Datetime = 7,
1385    Uuid = 8,
1386}
1387impl PayloadSchemaType {
1388    /// String value of the enum field names used in the ProtoBuf definition.
1389    ///
1390    /// The values are not transformed in any way and thus are considered stable
1391    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1392    pub fn as_str_name(&self) -> &'static str {
1393        match self {
1394            Self::UnknownType => "UnknownType",
1395            Self::Keyword => "Keyword",
1396            Self::Integer => "Integer",
1397            Self::Float => "Float",
1398            Self::Geo => "Geo",
1399            Self::Text => "Text",
1400            Self::Bool => "Bool",
1401            Self::Datetime => "Datetime",
1402            Self::Uuid => "Uuid",
1403        }
1404    }
1405    /// Creates an enum from field names used in the ProtoBuf definition.
1406    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1407        match value {
1408            "UnknownType" => Some(Self::UnknownType),
1409            "Keyword" => Some(Self::Keyword),
1410            "Integer" => Some(Self::Integer),
1411            "Float" => Some(Self::Float),
1412            "Geo" => Some(Self::Geo),
1413            "Text" => Some(Self::Text),
1414            "Bool" => Some(Self::Bool),
1415            "Datetime" => Some(Self::Datetime),
1416            "Uuid" => Some(Self::Uuid),
1417            _ => None,
1418        }
1419    }
1420}
1421#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1422#[repr(i32)]
1423pub enum QuantizationType {
1424    UnknownQuantization = 0,
1425    Int8 = 1,
1426}
1427impl QuantizationType {
1428    /// String value of the enum field names used in the ProtoBuf definition.
1429    ///
1430    /// The values are not transformed in any way and thus are considered stable
1431    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1432    pub fn as_str_name(&self) -> &'static str {
1433        match self {
1434            Self::UnknownQuantization => "UnknownQuantization",
1435            Self::Int8 => "Int8",
1436        }
1437    }
1438    /// Creates an enum from field names used in the ProtoBuf definition.
1439    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1440        match value {
1441            "UnknownQuantization" => Some(Self::UnknownQuantization),
1442            "Int8" => Some(Self::Int8),
1443            _ => None,
1444        }
1445    }
1446}
1447#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1448#[repr(i32)]
1449pub enum CompressionRatio {
1450    X4 = 0,
1451    X8 = 1,
1452    X16 = 2,
1453    X32 = 3,
1454    X64 = 4,
1455}
1456impl CompressionRatio {
1457    /// String value of the enum field names used in the ProtoBuf definition.
1458    ///
1459    /// The values are not transformed in any way and thus are considered stable
1460    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1461    pub fn as_str_name(&self) -> &'static str {
1462        match self {
1463            Self::X4 => "x4",
1464            Self::X8 => "x8",
1465            Self::X16 => "x16",
1466            Self::X32 => "x32",
1467            Self::X64 => "x64",
1468        }
1469    }
1470    /// Creates an enum from field names used in the ProtoBuf definition.
1471    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1472        match value {
1473            "x4" => Some(Self::X4),
1474            "x8" => Some(Self::X8),
1475            "x16" => Some(Self::X16),
1476            "x32" => Some(Self::X32),
1477            "x64" => Some(Self::X64),
1478            _ => None,
1479        }
1480    }
1481}
1482#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1483#[repr(i32)]
1484pub enum BinaryQuantizationEncoding {
1485    OneBit = 0,
1486    TwoBits = 1,
1487    OneAndHalfBits = 2,
1488}
1489impl BinaryQuantizationEncoding {
1490    /// String value of the enum field names used in the ProtoBuf definition.
1491    ///
1492    /// The values are not transformed in any way and thus are considered stable
1493    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1494    pub fn as_str_name(&self) -> &'static str {
1495        match self {
1496            Self::OneBit => "OneBit",
1497            Self::TwoBits => "TwoBits",
1498            Self::OneAndHalfBits => "OneAndHalfBits",
1499        }
1500    }
1501    /// Creates an enum from field names used in the ProtoBuf definition.
1502    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1503        match value {
1504            "OneBit" => Some(Self::OneBit),
1505            "TwoBits" => Some(Self::TwoBits),
1506            "OneAndHalfBits" => Some(Self::OneAndHalfBits),
1507            _ => None,
1508        }
1509    }
1510}
1511#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1512#[repr(i32)]
1513pub enum ShardingMethod {
1514    /// Auto-sharding based on record ids
1515    Auto = 0,
1516    /// Shard by user-defined key
1517    Custom = 1,
1518}
1519impl ShardingMethod {
1520    /// String value of the enum field names used in the ProtoBuf definition.
1521    ///
1522    /// The values are not transformed in any way and thus are considered stable
1523    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1524    pub fn as_str_name(&self) -> &'static str {
1525        match self {
1526            Self::Auto => "Auto",
1527            Self::Custom => "Custom",
1528        }
1529    }
1530    /// Creates an enum from field names used in the ProtoBuf definition.
1531    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1532        match value {
1533            "Auto" => Some(Self::Auto),
1534            "Custom" => Some(Self::Custom),
1535            _ => None,
1536        }
1537    }
1538}
1539#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1540#[repr(i32)]
1541pub enum TokenizerType {
1542    Unknown = 0,
1543    Prefix = 1,
1544    Whitespace = 2,
1545    Word = 3,
1546    Multilingual = 4,
1547}
1548impl TokenizerType {
1549    /// String value of the enum field names used in the ProtoBuf definition.
1550    ///
1551    /// The values are not transformed in any way and thus are considered stable
1552    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1553    pub fn as_str_name(&self) -> &'static str {
1554        match self {
1555            Self::Unknown => "Unknown",
1556            Self::Prefix => "Prefix",
1557            Self::Whitespace => "Whitespace",
1558            Self::Word => "Word",
1559            Self::Multilingual => "Multilingual",
1560        }
1561    }
1562    /// Creates an enum from field names used in the ProtoBuf definition.
1563    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1564        match value {
1565            "Unknown" => Some(Self::Unknown),
1566            "Prefix" => Some(Self::Prefix),
1567            "Whitespace" => Some(Self::Whitespace),
1568            "Word" => Some(Self::Word),
1569            "Multilingual" => Some(Self::Multilingual),
1570            _ => None,
1571        }
1572    }
1573}
1574#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1575#[repr(i32)]
1576pub enum ReplicaState {
1577    /// Active and sound
1578    Active = 0,
1579    /// Failed for some reason
1580    Dead = 1,
1581    /// The shard is partially loaded and is currently receiving data from other shards
1582    Partial = 2,
1583    /// Collection is being created
1584    Initializing = 3,
1585    /// A shard which receives data, but is not used for search; Useful for backup shards
1586    Listener = 4,
1587    /// Deprecated: snapshot shard transfer is in progress; Updates should not be sent to (and are ignored by) the shard
1588    PartialSnapshot = 5,
1589    /// Shard is undergoing recovered by an external node; Normally rejects updates, accepts updates if force is true
1590    Recovery = 6,
1591    /// Points are being migrated to this shard as part of scale-up resharding
1592    Resharding = 7,
1593    /// Points are being migrated to this shard as part of scale-down resharding
1594    ReshardingScaleDown = 8,
1595}
1596impl ReplicaState {
1597    /// String value of the enum field names used in the ProtoBuf definition.
1598    ///
1599    /// The values are not transformed in any way and thus are considered stable
1600    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1601    pub fn as_str_name(&self) -> &'static str {
1602        match self {
1603            Self::Active => "Active",
1604            Self::Dead => "Dead",
1605            Self::Partial => "Partial",
1606            Self::Initializing => "Initializing",
1607            Self::Listener => "Listener",
1608            Self::PartialSnapshot => "PartialSnapshot",
1609            Self::Recovery => "Recovery",
1610            Self::Resharding => "Resharding",
1611            Self::ReshardingScaleDown => "ReshardingScaleDown",
1612        }
1613    }
1614    /// Creates an enum from field names used in the ProtoBuf definition.
1615    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1616        match value {
1617            "Active" => Some(Self::Active),
1618            "Dead" => Some(Self::Dead),
1619            "Partial" => Some(Self::Partial),
1620            "Initializing" => Some(Self::Initializing),
1621            "Listener" => Some(Self::Listener),
1622            "PartialSnapshot" => Some(Self::PartialSnapshot),
1623            "Recovery" => Some(Self::Recovery),
1624            "Resharding" => Some(Self::Resharding),
1625            "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
1626            _ => None,
1627        }
1628    }
1629}
1630///
1631/// Resharding direction, scale up or down in number of shards
1632#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1633#[repr(i32)]
1634pub enum ReshardingDirection {
1635    /// Scale up, add a new shard
1636    Up = 0,
1637    /// Scale down, remove a shard
1638    Down = 1,
1639}
1640impl ReshardingDirection {
1641    /// String value of the enum field names used in the ProtoBuf definition.
1642    ///
1643    /// The values are not transformed in any way and thus are considered stable
1644    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1645    pub fn as_str_name(&self) -> &'static str {
1646        match self {
1647            Self::Up => "Up",
1648            Self::Down => "Down",
1649        }
1650    }
1651    /// Creates an enum from field names used in the ProtoBuf definition.
1652    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1653        match value {
1654            "Up" => Some(Self::Up),
1655            "Down" => Some(Self::Down),
1656            _ => None,
1657        }
1658    }
1659}
1660#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1661#[repr(i32)]
1662pub enum ShardTransferMethod {
1663    /// Stream shard records in batches
1664    StreamRecords = 0,
1665    /// Snapshot the shard and recover it on the target peer
1666    Snapshot = 1,
1667    /// Resolve WAL delta between peers and transfer the difference
1668    WalDelta = 2,
1669    /// Stream shard records in batches for resharding
1670    ReshardingStreamRecords = 3,
1671}
1672impl ShardTransferMethod {
1673    /// String value of the enum field names used in the ProtoBuf definition.
1674    ///
1675    /// The values are not transformed in any way and thus are considered stable
1676    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1677    pub fn as_str_name(&self) -> &'static str {
1678        match self {
1679            Self::StreamRecords => "StreamRecords",
1680            Self::Snapshot => "Snapshot",
1681            Self::WalDelta => "WalDelta",
1682            Self::ReshardingStreamRecords => "ReshardingStreamRecords",
1683        }
1684    }
1685    /// Creates an enum from field names used in the ProtoBuf definition.
1686    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1687        match value {
1688            "StreamRecords" => Some(Self::StreamRecords),
1689            "Snapshot" => Some(Self::Snapshot),
1690            "WalDelta" => Some(Self::WalDelta),
1691            "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
1692            _ => None,
1693        }
1694    }
1695}
1696/// Generated client implementations.
1697pub mod collections_client {
1698    #![allow(
1699        unused_variables,
1700        dead_code,
1701        missing_docs,
1702        clippy::wildcard_imports,
1703        clippy::let_unit_value,
1704    )]
1705    use tonic::codegen::*;
1706    use tonic::codegen::http::Uri;
1707    #[derive(Debug, Clone)]
1708    pub struct CollectionsClient<T> {
1709        inner: tonic::client::Grpc<T>,
1710    }
1711    impl CollectionsClient<tonic::transport::Channel> {
1712        /// Attempt to create a new client by connecting to a given endpoint.
1713        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1714        where
1715            D: TryInto<tonic::transport::Endpoint>,
1716            D::Error: Into<StdError>,
1717        {
1718            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1719            Ok(Self::new(conn))
1720        }
1721    }
1722    impl<T> CollectionsClient<T>
1723    where
1724        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1725        T::Error: Into<StdError>,
1726        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1727        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1728    {
1729        pub fn new(inner: T) -> Self {
1730            let inner = tonic::client::Grpc::new(inner);
1731            Self { inner }
1732        }
1733        pub fn with_origin(inner: T, origin: Uri) -> Self {
1734            let inner = tonic::client::Grpc::with_origin(inner, origin);
1735            Self { inner }
1736        }
1737        pub fn with_interceptor<F>(
1738            inner: T,
1739            interceptor: F,
1740        ) -> CollectionsClient<InterceptedService<T, F>>
1741        where
1742            F: tonic::service::Interceptor,
1743            T::ResponseBody: Default,
1744            T: tonic::codegen::Service<
1745                http::Request<tonic::body::BoxBody>,
1746                Response = http::Response<
1747                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1748                >,
1749            >,
1750            <T as tonic::codegen::Service<
1751                http::Request<tonic::body::BoxBody>,
1752            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1753        {
1754            CollectionsClient::new(InterceptedService::new(inner, interceptor))
1755        }
1756        /// Compress requests with the given encoding.
1757        ///
1758        /// This requires the server to support it otherwise it might respond with an
1759        /// error.
1760        #[must_use]
1761        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1762            self.inner = self.inner.send_compressed(encoding);
1763            self
1764        }
1765        /// Enable decompressing responses.
1766        #[must_use]
1767        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1768            self.inner = self.inner.accept_compressed(encoding);
1769            self
1770        }
1771        /// Limits the maximum size of a decoded message.
1772        ///
1773        /// Default: `4MB`
1774        #[must_use]
1775        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1776            self.inner = self.inner.max_decoding_message_size(limit);
1777            self
1778        }
1779        /// Limits the maximum size of an encoded message.
1780        ///
1781        /// Default: `usize::MAX`
1782        #[must_use]
1783        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1784            self.inner = self.inner.max_encoding_message_size(limit);
1785            self
1786        }
1787        ///
1788        /// Get detailed information about specified existing collection
1789        pub async fn get(
1790            &mut self,
1791            request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
1792        ) -> std::result::Result<
1793            tonic::Response<super::GetCollectionInfoResponse>,
1794            tonic::Status,
1795        > {
1796            self.inner
1797                .ready()
1798                .await
1799                .map_err(|e| {
1800                    tonic::Status::unknown(
1801                        format!("Service was not ready: {}", e.into()),
1802                    )
1803                })?;
1804            let codec = tonic::codec::ProstCodec::default();
1805            let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
1806            let mut req = request.into_request();
1807            req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
1808            self.inner.unary(req, path, codec).await
1809        }
1810        ///
1811        /// Get list name of all existing collections
1812        pub async fn list(
1813            &mut self,
1814            request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
1815        ) -> std::result::Result<
1816            tonic::Response<super::ListCollectionsResponse>,
1817            tonic::Status,
1818        > {
1819            self.inner
1820                .ready()
1821                .await
1822                .map_err(|e| {
1823                    tonic::Status::unknown(
1824                        format!("Service was not ready: {}", e.into()),
1825                    )
1826                })?;
1827            let codec = tonic::codec::ProstCodec::default();
1828            let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
1829            let mut req = request.into_request();
1830            req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
1831            self.inner.unary(req, path, codec).await
1832        }
1833        ///
1834        /// Create new collection with given parameters
1835        pub async fn create(
1836            &mut self,
1837            request: impl tonic::IntoRequest<super::CreateCollection>,
1838        ) -> std::result::Result<
1839            tonic::Response<super::CollectionOperationResponse>,
1840            tonic::Status,
1841        > {
1842            self.inner
1843                .ready()
1844                .await
1845                .map_err(|e| {
1846                    tonic::Status::unknown(
1847                        format!("Service was not ready: {}", e.into()),
1848                    )
1849                })?;
1850            let codec = tonic::codec::ProstCodec::default();
1851            let path = http::uri::PathAndQuery::from_static(
1852                "/qdrant.Collections/Create",
1853            );
1854            let mut req = request.into_request();
1855            req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
1856            self.inner.unary(req, path, codec).await
1857        }
1858        ///
1859        /// Update parameters of the existing collection
1860        pub async fn update(
1861            &mut self,
1862            request: impl tonic::IntoRequest<super::UpdateCollection>,
1863        ) -> std::result::Result<
1864            tonic::Response<super::CollectionOperationResponse>,
1865            tonic::Status,
1866        > {
1867            self.inner
1868                .ready()
1869                .await
1870                .map_err(|e| {
1871                    tonic::Status::unknown(
1872                        format!("Service was not ready: {}", e.into()),
1873                    )
1874                })?;
1875            let codec = tonic::codec::ProstCodec::default();
1876            let path = http::uri::PathAndQuery::from_static(
1877                "/qdrant.Collections/Update",
1878            );
1879            let mut req = request.into_request();
1880            req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
1881            self.inner.unary(req, path, codec).await
1882        }
1883        ///
1884        /// Drop collection and all associated data
1885        pub async fn delete(
1886            &mut self,
1887            request: impl tonic::IntoRequest<super::DeleteCollection>,
1888        ) -> std::result::Result<
1889            tonic::Response<super::CollectionOperationResponse>,
1890            tonic::Status,
1891        > {
1892            self.inner
1893                .ready()
1894                .await
1895                .map_err(|e| {
1896                    tonic::Status::unknown(
1897                        format!("Service was not ready: {}", e.into()),
1898                    )
1899                })?;
1900            let codec = tonic::codec::ProstCodec::default();
1901            let path = http::uri::PathAndQuery::from_static(
1902                "/qdrant.Collections/Delete",
1903            );
1904            let mut req = request.into_request();
1905            req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
1906            self.inner.unary(req, path, codec).await
1907        }
1908        ///
1909        /// Update Aliases of the existing collection
1910        pub async fn update_aliases(
1911            &mut self,
1912            request: impl tonic::IntoRequest<super::ChangeAliases>,
1913        ) -> std::result::Result<
1914            tonic::Response<super::CollectionOperationResponse>,
1915            tonic::Status,
1916        > {
1917            self.inner
1918                .ready()
1919                .await
1920                .map_err(|e| {
1921                    tonic::Status::unknown(
1922                        format!("Service was not ready: {}", e.into()),
1923                    )
1924                })?;
1925            let codec = tonic::codec::ProstCodec::default();
1926            let path = http::uri::PathAndQuery::from_static(
1927                "/qdrant.Collections/UpdateAliases",
1928            );
1929            let mut req = request.into_request();
1930            req.extensions_mut()
1931                .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
1932            self.inner.unary(req, path, codec).await
1933        }
1934        ///
1935        /// Get list of all aliases for a collection
1936        pub async fn list_collection_aliases(
1937            &mut self,
1938            request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
1939        ) -> std::result::Result<
1940            tonic::Response<super::ListAliasesResponse>,
1941            tonic::Status,
1942        > {
1943            self.inner
1944                .ready()
1945                .await
1946                .map_err(|e| {
1947                    tonic::Status::unknown(
1948                        format!("Service was not ready: {}", e.into()),
1949                    )
1950                })?;
1951            let codec = tonic::codec::ProstCodec::default();
1952            let path = http::uri::PathAndQuery::from_static(
1953                "/qdrant.Collections/ListCollectionAliases",
1954            );
1955            let mut req = request.into_request();
1956            req.extensions_mut()
1957                .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
1958            self.inner.unary(req, path, codec).await
1959        }
1960        ///
1961        /// Get list of all aliases for all existing collections
1962        pub async fn list_aliases(
1963            &mut self,
1964            request: impl tonic::IntoRequest<super::ListAliasesRequest>,
1965        ) -> std::result::Result<
1966            tonic::Response<super::ListAliasesResponse>,
1967            tonic::Status,
1968        > {
1969            self.inner
1970                .ready()
1971                .await
1972                .map_err(|e| {
1973                    tonic::Status::unknown(
1974                        format!("Service was not ready: {}", e.into()),
1975                    )
1976                })?;
1977            let codec = tonic::codec::ProstCodec::default();
1978            let path = http::uri::PathAndQuery::from_static(
1979                "/qdrant.Collections/ListAliases",
1980            );
1981            let mut req = request.into_request();
1982            req.extensions_mut()
1983                .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
1984            self.inner.unary(req, path, codec).await
1985        }
1986        ///
1987        /// Get cluster information for a collection
1988        pub async fn collection_cluster_info(
1989            &mut self,
1990            request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
1991        ) -> std::result::Result<
1992            tonic::Response<super::CollectionClusterInfoResponse>,
1993            tonic::Status,
1994        > {
1995            self.inner
1996                .ready()
1997                .await
1998                .map_err(|e| {
1999                    tonic::Status::unknown(
2000                        format!("Service was not ready: {}", e.into()),
2001                    )
2002                })?;
2003            let codec = tonic::codec::ProstCodec::default();
2004            let path = http::uri::PathAndQuery::from_static(
2005                "/qdrant.Collections/CollectionClusterInfo",
2006            );
2007            let mut req = request.into_request();
2008            req.extensions_mut()
2009                .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2010            self.inner.unary(req, path, codec).await
2011        }
2012        ///
2013        /// Check the existence of a collection
2014        pub async fn collection_exists(
2015            &mut self,
2016            request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2017        ) -> std::result::Result<
2018            tonic::Response<super::CollectionExistsResponse>,
2019            tonic::Status,
2020        > {
2021            self.inner
2022                .ready()
2023                .await
2024                .map_err(|e| {
2025                    tonic::Status::unknown(
2026                        format!("Service was not ready: {}", e.into()),
2027                    )
2028                })?;
2029            let codec = tonic::codec::ProstCodec::default();
2030            let path = http::uri::PathAndQuery::from_static(
2031                "/qdrant.Collections/CollectionExists",
2032            );
2033            let mut req = request.into_request();
2034            req.extensions_mut()
2035                .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2036            self.inner.unary(req, path, codec).await
2037        }
2038        ///
2039        /// Update cluster setup for a collection
2040        pub async fn update_collection_cluster_setup(
2041            &mut self,
2042            request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2043        ) -> std::result::Result<
2044            tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2045            tonic::Status,
2046        > {
2047            self.inner
2048                .ready()
2049                .await
2050                .map_err(|e| {
2051                    tonic::Status::unknown(
2052                        format!("Service was not ready: {}", e.into()),
2053                    )
2054                })?;
2055            let codec = tonic::codec::ProstCodec::default();
2056            let path = http::uri::PathAndQuery::from_static(
2057                "/qdrant.Collections/UpdateCollectionClusterSetup",
2058            );
2059            let mut req = request.into_request();
2060            req.extensions_mut()
2061                .insert(
2062                    GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2063                );
2064            self.inner.unary(req, path, codec).await
2065        }
2066        ///
2067        /// Create shard key
2068        pub async fn create_shard_key(
2069            &mut self,
2070            request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2071        ) -> std::result::Result<
2072            tonic::Response<super::CreateShardKeyResponse>,
2073            tonic::Status,
2074        > {
2075            self.inner
2076                .ready()
2077                .await
2078                .map_err(|e| {
2079                    tonic::Status::unknown(
2080                        format!("Service was not ready: {}", e.into()),
2081                    )
2082                })?;
2083            let codec = tonic::codec::ProstCodec::default();
2084            let path = http::uri::PathAndQuery::from_static(
2085                "/qdrant.Collections/CreateShardKey",
2086            );
2087            let mut req = request.into_request();
2088            req.extensions_mut()
2089                .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2090            self.inner.unary(req, path, codec).await
2091        }
2092        ///
2093        /// Delete shard key
2094        pub async fn delete_shard_key(
2095            &mut self,
2096            request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2097        ) -> std::result::Result<
2098            tonic::Response<super::DeleteShardKeyResponse>,
2099            tonic::Status,
2100        > {
2101            self.inner
2102                .ready()
2103                .await
2104                .map_err(|e| {
2105                    tonic::Status::unknown(
2106                        format!("Service was not ready: {}", e.into()),
2107                    )
2108                })?;
2109            let codec = tonic::codec::ProstCodec::default();
2110            let path = http::uri::PathAndQuery::from_static(
2111                "/qdrant.Collections/DeleteShardKey",
2112            );
2113            let mut req = request.into_request();
2114            req.extensions_mut()
2115                .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2116            self.inner.unary(req, path, codec).await
2117        }
2118    }
2119}
2120/// Generated server implementations.
2121pub mod collections_server {
2122    #![allow(
2123        unused_variables,
2124        dead_code,
2125        missing_docs,
2126        clippy::wildcard_imports,
2127        clippy::let_unit_value,
2128    )]
2129    use tonic::codegen::*;
2130    /// Generated trait containing gRPC methods that should be implemented for use with CollectionsServer.
2131    #[async_trait]
2132    pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
2133        ///
2134        /// Get detailed information about specified existing collection
2135        async fn get(
2136            &self,
2137            request: tonic::Request<super::GetCollectionInfoRequest>,
2138        ) -> std::result::Result<
2139            tonic::Response<super::GetCollectionInfoResponse>,
2140            tonic::Status,
2141        >;
2142        ///
2143        /// Get list name of all existing collections
2144        async fn list(
2145            &self,
2146            request: tonic::Request<super::ListCollectionsRequest>,
2147        ) -> std::result::Result<
2148            tonic::Response<super::ListCollectionsResponse>,
2149            tonic::Status,
2150        >;
2151        ///
2152        /// Create new collection with given parameters
2153        async fn create(
2154            &self,
2155            request: tonic::Request<super::CreateCollection>,
2156        ) -> std::result::Result<
2157            tonic::Response<super::CollectionOperationResponse>,
2158            tonic::Status,
2159        >;
2160        ///
2161        /// Update parameters of the existing collection
2162        async fn update(
2163            &self,
2164            request: tonic::Request<super::UpdateCollection>,
2165        ) -> std::result::Result<
2166            tonic::Response<super::CollectionOperationResponse>,
2167            tonic::Status,
2168        >;
2169        ///
2170        /// Drop collection and all associated data
2171        async fn delete(
2172            &self,
2173            request: tonic::Request<super::DeleteCollection>,
2174        ) -> std::result::Result<
2175            tonic::Response<super::CollectionOperationResponse>,
2176            tonic::Status,
2177        >;
2178        ///
2179        /// Update Aliases of the existing collection
2180        async fn update_aliases(
2181            &self,
2182            request: tonic::Request<super::ChangeAliases>,
2183        ) -> std::result::Result<
2184            tonic::Response<super::CollectionOperationResponse>,
2185            tonic::Status,
2186        >;
2187        ///
2188        /// Get list of all aliases for a collection
2189        async fn list_collection_aliases(
2190            &self,
2191            request: tonic::Request<super::ListCollectionAliasesRequest>,
2192        ) -> std::result::Result<
2193            tonic::Response<super::ListAliasesResponse>,
2194            tonic::Status,
2195        >;
2196        ///
2197        /// Get list of all aliases for all existing collections
2198        async fn list_aliases(
2199            &self,
2200            request: tonic::Request<super::ListAliasesRequest>,
2201        ) -> std::result::Result<
2202            tonic::Response<super::ListAliasesResponse>,
2203            tonic::Status,
2204        >;
2205        ///
2206        /// Get cluster information for a collection
2207        async fn collection_cluster_info(
2208            &self,
2209            request: tonic::Request<super::CollectionClusterInfoRequest>,
2210        ) -> std::result::Result<
2211            tonic::Response<super::CollectionClusterInfoResponse>,
2212            tonic::Status,
2213        >;
2214        ///
2215        /// Check the existence of a collection
2216        async fn collection_exists(
2217            &self,
2218            request: tonic::Request<super::CollectionExistsRequest>,
2219        ) -> std::result::Result<
2220            tonic::Response<super::CollectionExistsResponse>,
2221            tonic::Status,
2222        >;
2223        ///
2224        /// Update cluster setup for a collection
2225        async fn update_collection_cluster_setup(
2226            &self,
2227            request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
2228        ) -> std::result::Result<
2229            tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2230            tonic::Status,
2231        >;
2232        ///
2233        /// Create shard key
2234        async fn create_shard_key(
2235            &self,
2236            request: tonic::Request<super::CreateShardKeyRequest>,
2237        ) -> std::result::Result<
2238            tonic::Response<super::CreateShardKeyResponse>,
2239            tonic::Status,
2240        >;
2241        ///
2242        /// Delete shard key
2243        async fn delete_shard_key(
2244            &self,
2245            request: tonic::Request<super::DeleteShardKeyRequest>,
2246        ) -> std::result::Result<
2247            tonic::Response<super::DeleteShardKeyResponse>,
2248            tonic::Status,
2249        >;
2250    }
2251    #[derive(Debug)]
2252    pub struct CollectionsServer<T> {
2253        inner: Arc<T>,
2254        accept_compression_encodings: EnabledCompressionEncodings,
2255        send_compression_encodings: EnabledCompressionEncodings,
2256        max_decoding_message_size: Option<usize>,
2257        max_encoding_message_size: Option<usize>,
2258    }
2259    impl<T> CollectionsServer<T> {
2260        pub fn new(inner: T) -> Self {
2261            Self::from_arc(Arc::new(inner))
2262        }
2263        pub fn from_arc(inner: Arc<T>) -> Self {
2264            Self {
2265                inner,
2266                accept_compression_encodings: Default::default(),
2267                send_compression_encodings: Default::default(),
2268                max_decoding_message_size: None,
2269                max_encoding_message_size: None,
2270            }
2271        }
2272        pub fn with_interceptor<F>(
2273            inner: T,
2274            interceptor: F,
2275        ) -> InterceptedService<Self, F>
2276        where
2277            F: tonic::service::Interceptor,
2278        {
2279            InterceptedService::new(Self::new(inner), interceptor)
2280        }
2281        /// Enable decompressing requests with the given encoding.
2282        #[must_use]
2283        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2284            self.accept_compression_encodings.enable(encoding);
2285            self
2286        }
2287        /// Compress responses with the given encoding, if the client supports it.
2288        #[must_use]
2289        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2290            self.send_compression_encodings.enable(encoding);
2291            self
2292        }
2293        /// Limits the maximum size of a decoded message.
2294        ///
2295        /// Default: `4MB`
2296        #[must_use]
2297        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2298            self.max_decoding_message_size = Some(limit);
2299            self
2300        }
2301        /// Limits the maximum size of an encoded message.
2302        ///
2303        /// Default: `usize::MAX`
2304        #[must_use]
2305        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2306            self.max_encoding_message_size = Some(limit);
2307            self
2308        }
2309    }
2310    impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
2311    where
2312        T: Collections,
2313        B: Body + std::marker::Send + 'static,
2314        B::Error: Into<StdError> + std::marker::Send + 'static,
2315    {
2316        type Response = http::Response<tonic::body::BoxBody>;
2317        type Error = std::convert::Infallible;
2318        type Future = BoxFuture<Self::Response, Self::Error>;
2319        fn poll_ready(
2320            &mut self,
2321            _cx: &mut Context<'_>,
2322        ) -> Poll<std::result::Result<(), Self::Error>> {
2323            Poll::Ready(Ok(()))
2324        }
2325        fn call(&mut self, req: http::Request<B>) -> Self::Future {
2326            match req.uri().path() {
2327                "/qdrant.Collections/Get" => {
2328                    #[allow(non_camel_case_types)]
2329                    struct GetSvc<T: Collections>(pub Arc<T>);
2330                    impl<
2331                        T: Collections,
2332                    > tonic::server::UnaryService<super::GetCollectionInfoRequest>
2333                    for GetSvc<T> {
2334                        type Response = super::GetCollectionInfoResponse;
2335                        type Future = BoxFuture<
2336                            tonic::Response<Self::Response>,
2337                            tonic::Status,
2338                        >;
2339                        fn call(
2340                            &mut self,
2341                            request: tonic::Request<super::GetCollectionInfoRequest>,
2342                        ) -> Self::Future {
2343                            let inner = Arc::clone(&self.0);
2344                            let fut = async move {
2345                                <T as Collections>::get(&inner, request).await
2346                            };
2347                            Box::pin(fut)
2348                        }
2349                    }
2350                    let accept_compression_encodings = self.accept_compression_encodings;
2351                    let send_compression_encodings = self.send_compression_encodings;
2352                    let max_decoding_message_size = self.max_decoding_message_size;
2353                    let max_encoding_message_size = self.max_encoding_message_size;
2354                    let inner = self.inner.clone();
2355                    let fut = async move {
2356                        let method = GetSvc(inner);
2357                        let codec = tonic::codec::ProstCodec::default();
2358                        let mut grpc = tonic::server::Grpc::new(codec)
2359                            .apply_compression_config(
2360                                accept_compression_encodings,
2361                                send_compression_encodings,
2362                            )
2363                            .apply_max_message_size_config(
2364                                max_decoding_message_size,
2365                                max_encoding_message_size,
2366                            );
2367                        let res = grpc.unary(method, req).await;
2368                        Ok(res)
2369                    };
2370                    Box::pin(fut)
2371                }
2372                "/qdrant.Collections/List" => {
2373                    #[allow(non_camel_case_types)]
2374                    struct ListSvc<T: Collections>(pub Arc<T>);
2375                    impl<
2376                        T: Collections,
2377                    > tonic::server::UnaryService<super::ListCollectionsRequest>
2378                    for ListSvc<T> {
2379                        type Response = super::ListCollectionsResponse;
2380                        type Future = BoxFuture<
2381                            tonic::Response<Self::Response>,
2382                            tonic::Status,
2383                        >;
2384                        fn call(
2385                            &mut self,
2386                            request: tonic::Request<super::ListCollectionsRequest>,
2387                        ) -> Self::Future {
2388                            let inner = Arc::clone(&self.0);
2389                            let fut = async move {
2390                                <T as Collections>::list(&inner, request).await
2391                            };
2392                            Box::pin(fut)
2393                        }
2394                    }
2395                    let accept_compression_encodings = self.accept_compression_encodings;
2396                    let send_compression_encodings = self.send_compression_encodings;
2397                    let max_decoding_message_size = self.max_decoding_message_size;
2398                    let max_encoding_message_size = self.max_encoding_message_size;
2399                    let inner = self.inner.clone();
2400                    let fut = async move {
2401                        let method = ListSvc(inner);
2402                        let codec = tonic::codec::ProstCodec::default();
2403                        let mut grpc = tonic::server::Grpc::new(codec)
2404                            .apply_compression_config(
2405                                accept_compression_encodings,
2406                                send_compression_encodings,
2407                            )
2408                            .apply_max_message_size_config(
2409                                max_decoding_message_size,
2410                                max_encoding_message_size,
2411                            );
2412                        let res = grpc.unary(method, req).await;
2413                        Ok(res)
2414                    };
2415                    Box::pin(fut)
2416                }
2417                "/qdrant.Collections/Create" => {
2418                    #[allow(non_camel_case_types)]
2419                    struct CreateSvc<T: Collections>(pub Arc<T>);
2420                    impl<
2421                        T: Collections,
2422                    > tonic::server::UnaryService<super::CreateCollection>
2423                    for CreateSvc<T> {
2424                        type Response = super::CollectionOperationResponse;
2425                        type Future = BoxFuture<
2426                            tonic::Response<Self::Response>,
2427                            tonic::Status,
2428                        >;
2429                        fn call(
2430                            &mut self,
2431                            request: tonic::Request<super::CreateCollection>,
2432                        ) -> Self::Future {
2433                            let inner = Arc::clone(&self.0);
2434                            let fut = async move {
2435                                <T as Collections>::create(&inner, request).await
2436                            };
2437                            Box::pin(fut)
2438                        }
2439                    }
2440                    let accept_compression_encodings = self.accept_compression_encodings;
2441                    let send_compression_encodings = self.send_compression_encodings;
2442                    let max_decoding_message_size = self.max_decoding_message_size;
2443                    let max_encoding_message_size = self.max_encoding_message_size;
2444                    let inner = self.inner.clone();
2445                    let fut = async move {
2446                        let method = CreateSvc(inner);
2447                        let codec = tonic::codec::ProstCodec::default();
2448                        let mut grpc = tonic::server::Grpc::new(codec)
2449                            .apply_compression_config(
2450                                accept_compression_encodings,
2451                                send_compression_encodings,
2452                            )
2453                            .apply_max_message_size_config(
2454                                max_decoding_message_size,
2455                                max_encoding_message_size,
2456                            );
2457                        let res = grpc.unary(method, req).await;
2458                        Ok(res)
2459                    };
2460                    Box::pin(fut)
2461                }
2462                "/qdrant.Collections/Update" => {
2463                    #[allow(non_camel_case_types)]
2464                    struct UpdateSvc<T: Collections>(pub Arc<T>);
2465                    impl<
2466                        T: Collections,
2467                    > tonic::server::UnaryService<super::UpdateCollection>
2468                    for UpdateSvc<T> {
2469                        type Response = super::CollectionOperationResponse;
2470                        type Future = BoxFuture<
2471                            tonic::Response<Self::Response>,
2472                            tonic::Status,
2473                        >;
2474                        fn call(
2475                            &mut self,
2476                            request: tonic::Request<super::UpdateCollection>,
2477                        ) -> Self::Future {
2478                            let inner = Arc::clone(&self.0);
2479                            let fut = async move {
2480                                <T as Collections>::update(&inner, request).await
2481                            };
2482                            Box::pin(fut)
2483                        }
2484                    }
2485                    let accept_compression_encodings = self.accept_compression_encodings;
2486                    let send_compression_encodings = self.send_compression_encodings;
2487                    let max_decoding_message_size = self.max_decoding_message_size;
2488                    let max_encoding_message_size = self.max_encoding_message_size;
2489                    let inner = self.inner.clone();
2490                    let fut = async move {
2491                        let method = UpdateSvc(inner);
2492                        let codec = tonic::codec::ProstCodec::default();
2493                        let mut grpc = tonic::server::Grpc::new(codec)
2494                            .apply_compression_config(
2495                                accept_compression_encodings,
2496                                send_compression_encodings,
2497                            )
2498                            .apply_max_message_size_config(
2499                                max_decoding_message_size,
2500                                max_encoding_message_size,
2501                            );
2502                        let res = grpc.unary(method, req).await;
2503                        Ok(res)
2504                    };
2505                    Box::pin(fut)
2506                }
2507                "/qdrant.Collections/Delete" => {
2508                    #[allow(non_camel_case_types)]
2509                    struct DeleteSvc<T: Collections>(pub Arc<T>);
2510                    impl<
2511                        T: Collections,
2512                    > tonic::server::UnaryService<super::DeleteCollection>
2513                    for DeleteSvc<T> {
2514                        type Response = super::CollectionOperationResponse;
2515                        type Future = BoxFuture<
2516                            tonic::Response<Self::Response>,
2517                            tonic::Status,
2518                        >;
2519                        fn call(
2520                            &mut self,
2521                            request: tonic::Request<super::DeleteCollection>,
2522                        ) -> Self::Future {
2523                            let inner = Arc::clone(&self.0);
2524                            let fut = async move {
2525                                <T as Collections>::delete(&inner, request).await
2526                            };
2527                            Box::pin(fut)
2528                        }
2529                    }
2530                    let accept_compression_encodings = self.accept_compression_encodings;
2531                    let send_compression_encodings = self.send_compression_encodings;
2532                    let max_decoding_message_size = self.max_decoding_message_size;
2533                    let max_encoding_message_size = self.max_encoding_message_size;
2534                    let inner = self.inner.clone();
2535                    let fut = async move {
2536                        let method = DeleteSvc(inner);
2537                        let codec = tonic::codec::ProstCodec::default();
2538                        let mut grpc = tonic::server::Grpc::new(codec)
2539                            .apply_compression_config(
2540                                accept_compression_encodings,
2541                                send_compression_encodings,
2542                            )
2543                            .apply_max_message_size_config(
2544                                max_decoding_message_size,
2545                                max_encoding_message_size,
2546                            );
2547                        let res = grpc.unary(method, req).await;
2548                        Ok(res)
2549                    };
2550                    Box::pin(fut)
2551                }
2552                "/qdrant.Collections/UpdateAliases" => {
2553                    #[allow(non_camel_case_types)]
2554                    struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
2555                    impl<
2556                        T: Collections,
2557                    > tonic::server::UnaryService<super::ChangeAliases>
2558                    for UpdateAliasesSvc<T> {
2559                        type Response = super::CollectionOperationResponse;
2560                        type Future = BoxFuture<
2561                            tonic::Response<Self::Response>,
2562                            tonic::Status,
2563                        >;
2564                        fn call(
2565                            &mut self,
2566                            request: tonic::Request<super::ChangeAliases>,
2567                        ) -> Self::Future {
2568                            let inner = Arc::clone(&self.0);
2569                            let fut = async move {
2570                                <T as Collections>::update_aliases(&inner, request).await
2571                            };
2572                            Box::pin(fut)
2573                        }
2574                    }
2575                    let accept_compression_encodings = self.accept_compression_encodings;
2576                    let send_compression_encodings = self.send_compression_encodings;
2577                    let max_decoding_message_size = self.max_decoding_message_size;
2578                    let max_encoding_message_size = self.max_encoding_message_size;
2579                    let inner = self.inner.clone();
2580                    let fut = async move {
2581                        let method = UpdateAliasesSvc(inner);
2582                        let codec = tonic::codec::ProstCodec::default();
2583                        let mut grpc = tonic::server::Grpc::new(codec)
2584                            .apply_compression_config(
2585                                accept_compression_encodings,
2586                                send_compression_encodings,
2587                            )
2588                            .apply_max_message_size_config(
2589                                max_decoding_message_size,
2590                                max_encoding_message_size,
2591                            );
2592                        let res = grpc.unary(method, req).await;
2593                        Ok(res)
2594                    };
2595                    Box::pin(fut)
2596                }
2597                "/qdrant.Collections/ListCollectionAliases" => {
2598                    #[allow(non_camel_case_types)]
2599                    struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
2600                    impl<
2601                        T: Collections,
2602                    > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
2603                    for ListCollectionAliasesSvc<T> {
2604                        type Response = super::ListAliasesResponse;
2605                        type Future = BoxFuture<
2606                            tonic::Response<Self::Response>,
2607                            tonic::Status,
2608                        >;
2609                        fn call(
2610                            &mut self,
2611                            request: tonic::Request<super::ListCollectionAliasesRequest>,
2612                        ) -> Self::Future {
2613                            let inner = Arc::clone(&self.0);
2614                            let fut = async move {
2615                                <T as Collections>::list_collection_aliases(&inner, request)
2616                                    .await
2617                            };
2618                            Box::pin(fut)
2619                        }
2620                    }
2621                    let accept_compression_encodings = self.accept_compression_encodings;
2622                    let send_compression_encodings = self.send_compression_encodings;
2623                    let max_decoding_message_size = self.max_decoding_message_size;
2624                    let max_encoding_message_size = self.max_encoding_message_size;
2625                    let inner = self.inner.clone();
2626                    let fut = async move {
2627                        let method = ListCollectionAliasesSvc(inner);
2628                        let codec = tonic::codec::ProstCodec::default();
2629                        let mut grpc = tonic::server::Grpc::new(codec)
2630                            .apply_compression_config(
2631                                accept_compression_encodings,
2632                                send_compression_encodings,
2633                            )
2634                            .apply_max_message_size_config(
2635                                max_decoding_message_size,
2636                                max_encoding_message_size,
2637                            );
2638                        let res = grpc.unary(method, req).await;
2639                        Ok(res)
2640                    };
2641                    Box::pin(fut)
2642                }
2643                "/qdrant.Collections/ListAliases" => {
2644                    #[allow(non_camel_case_types)]
2645                    struct ListAliasesSvc<T: Collections>(pub Arc<T>);
2646                    impl<
2647                        T: Collections,
2648                    > tonic::server::UnaryService<super::ListAliasesRequest>
2649                    for ListAliasesSvc<T> {
2650                        type Response = super::ListAliasesResponse;
2651                        type Future = BoxFuture<
2652                            tonic::Response<Self::Response>,
2653                            tonic::Status,
2654                        >;
2655                        fn call(
2656                            &mut self,
2657                            request: tonic::Request<super::ListAliasesRequest>,
2658                        ) -> Self::Future {
2659                            let inner = Arc::clone(&self.0);
2660                            let fut = async move {
2661                                <T as Collections>::list_aliases(&inner, request).await
2662                            };
2663                            Box::pin(fut)
2664                        }
2665                    }
2666                    let accept_compression_encodings = self.accept_compression_encodings;
2667                    let send_compression_encodings = self.send_compression_encodings;
2668                    let max_decoding_message_size = self.max_decoding_message_size;
2669                    let max_encoding_message_size = self.max_encoding_message_size;
2670                    let inner = self.inner.clone();
2671                    let fut = async move {
2672                        let method = ListAliasesSvc(inner);
2673                        let codec = tonic::codec::ProstCodec::default();
2674                        let mut grpc = tonic::server::Grpc::new(codec)
2675                            .apply_compression_config(
2676                                accept_compression_encodings,
2677                                send_compression_encodings,
2678                            )
2679                            .apply_max_message_size_config(
2680                                max_decoding_message_size,
2681                                max_encoding_message_size,
2682                            );
2683                        let res = grpc.unary(method, req).await;
2684                        Ok(res)
2685                    };
2686                    Box::pin(fut)
2687                }
2688                "/qdrant.Collections/CollectionClusterInfo" => {
2689                    #[allow(non_camel_case_types)]
2690                    struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
2691                    impl<
2692                        T: Collections,
2693                    > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
2694                    for CollectionClusterInfoSvc<T> {
2695                        type Response = super::CollectionClusterInfoResponse;
2696                        type Future = BoxFuture<
2697                            tonic::Response<Self::Response>,
2698                            tonic::Status,
2699                        >;
2700                        fn call(
2701                            &mut self,
2702                            request: tonic::Request<super::CollectionClusterInfoRequest>,
2703                        ) -> Self::Future {
2704                            let inner = Arc::clone(&self.0);
2705                            let fut = async move {
2706                                <T as Collections>::collection_cluster_info(&inner, request)
2707                                    .await
2708                            };
2709                            Box::pin(fut)
2710                        }
2711                    }
2712                    let accept_compression_encodings = self.accept_compression_encodings;
2713                    let send_compression_encodings = self.send_compression_encodings;
2714                    let max_decoding_message_size = self.max_decoding_message_size;
2715                    let max_encoding_message_size = self.max_encoding_message_size;
2716                    let inner = self.inner.clone();
2717                    let fut = async move {
2718                        let method = CollectionClusterInfoSvc(inner);
2719                        let codec = tonic::codec::ProstCodec::default();
2720                        let mut grpc = tonic::server::Grpc::new(codec)
2721                            .apply_compression_config(
2722                                accept_compression_encodings,
2723                                send_compression_encodings,
2724                            )
2725                            .apply_max_message_size_config(
2726                                max_decoding_message_size,
2727                                max_encoding_message_size,
2728                            );
2729                        let res = grpc.unary(method, req).await;
2730                        Ok(res)
2731                    };
2732                    Box::pin(fut)
2733                }
2734                "/qdrant.Collections/CollectionExists" => {
2735                    #[allow(non_camel_case_types)]
2736                    struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
2737                    impl<
2738                        T: Collections,
2739                    > tonic::server::UnaryService<super::CollectionExistsRequest>
2740                    for CollectionExistsSvc<T> {
2741                        type Response = super::CollectionExistsResponse;
2742                        type Future = BoxFuture<
2743                            tonic::Response<Self::Response>,
2744                            tonic::Status,
2745                        >;
2746                        fn call(
2747                            &mut self,
2748                            request: tonic::Request<super::CollectionExistsRequest>,
2749                        ) -> Self::Future {
2750                            let inner = Arc::clone(&self.0);
2751                            let fut = async move {
2752                                <T as Collections>::collection_exists(&inner, request).await
2753                            };
2754                            Box::pin(fut)
2755                        }
2756                    }
2757                    let accept_compression_encodings = self.accept_compression_encodings;
2758                    let send_compression_encodings = self.send_compression_encodings;
2759                    let max_decoding_message_size = self.max_decoding_message_size;
2760                    let max_encoding_message_size = self.max_encoding_message_size;
2761                    let inner = self.inner.clone();
2762                    let fut = async move {
2763                        let method = CollectionExistsSvc(inner);
2764                        let codec = tonic::codec::ProstCodec::default();
2765                        let mut grpc = tonic::server::Grpc::new(codec)
2766                            .apply_compression_config(
2767                                accept_compression_encodings,
2768                                send_compression_encodings,
2769                            )
2770                            .apply_max_message_size_config(
2771                                max_decoding_message_size,
2772                                max_encoding_message_size,
2773                            );
2774                        let res = grpc.unary(method, req).await;
2775                        Ok(res)
2776                    };
2777                    Box::pin(fut)
2778                }
2779                "/qdrant.Collections/UpdateCollectionClusterSetup" => {
2780                    #[allow(non_camel_case_types)]
2781                    struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
2782                    impl<
2783                        T: Collections,
2784                    > tonic::server::UnaryService<
2785                        super::UpdateCollectionClusterSetupRequest,
2786                    > for UpdateCollectionClusterSetupSvc<T> {
2787                        type Response = super::UpdateCollectionClusterSetupResponse;
2788                        type Future = BoxFuture<
2789                            tonic::Response<Self::Response>,
2790                            tonic::Status,
2791                        >;
2792                        fn call(
2793                            &mut self,
2794                            request: tonic::Request<
2795                                super::UpdateCollectionClusterSetupRequest,
2796                            >,
2797                        ) -> Self::Future {
2798                            let inner = Arc::clone(&self.0);
2799                            let fut = async move {
2800                                <T as Collections>::update_collection_cluster_setup(
2801                                        &inner,
2802                                        request,
2803                                    )
2804                                    .await
2805                            };
2806                            Box::pin(fut)
2807                        }
2808                    }
2809                    let accept_compression_encodings = self.accept_compression_encodings;
2810                    let send_compression_encodings = self.send_compression_encodings;
2811                    let max_decoding_message_size = self.max_decoding_message_size;
2812                    let max_encoding_message_size = self.max_encoding_message_size;
2813                    let inner = self.inner.clone();
2814                    let fut = async move {
2815                        let method = UpdateCollectionClusterSetupSvc(inner);
2816                        let codec = tonic::codec::ProstCodec::default();
2817                        let mut grpc = tonic::server::Grpc::new(codec)
2818                            .apply_compression_config(
2819                                accept_compression_encodings,
2820                                send_compression_encodings,
2821                            )
2822                            .apply_max_message_size_config(
2823                                max_decoding_message_size,
2824                                max_encoding_message_size,
2825                            );
2826                        let res = grpc.unary(method, req).await;
2827                        Ok(res)
2828                    };
2829                    Box::pin(fut)
2830                }
2831                "/qdrant.Collections/CreateShardKey" => {
2832                    #[allow(non_camel_case_types)]
2833                    struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
2834                    impl<
2835                        T: Collections,
2836                    > tonic::server::UnaryService<super::CreateShardKeyRequest>
2837                    for CreateShardKeySvc<T> {
2838                        type Response = super::CreateShardKeyResponse;
2839                        type Future = BoxFuture<
2840                            tonic::Response<Self::Response>,
2841                            tonic::Status,
2842                        >;
2843                        fn call(
2844                            &mut self,
2845                            request: tonic::Request<super::CreateShardKeyRequest>,
2846                        ) -> Self::Future {
2847                            let inner = Arc::clone(&self.0);
2848                            let fut = async move {
2849                                <T as Collections>::create_shard_key(&inner, request).await
2850                            };
2851                            Box::pin(fut)
2852                        }
2853                    }
2854                    let accept_compression_encodings = self.accept_compression_encodings;
2855                    let send_compression_encodings = self.send_compression_encodings;
2856                    let max_decoding_message_size = self.max_decoding_message_size;
2857                    let max_encoding_message_size = self.max_encoding_message_size;
2858                    let inner = self.inner.clone();
2859                    let fut = async move {
2860                        let method = CreateShardKeySvc(inner);
2861                        let codec = tonic::codec::ProstCodec::default();
2862                        let mut grpc = tonic::server::Grpc::new(codec)
2863                            .apply_compression_config(
2864                                accept_compression_encodings,
2865                                send_compression_encodings,
2866                            )
2867                            .apply_max_message_size_config(
2868                                max_decoding_message_size,
2869                                max_encoding_message_size,
2870                            );
2871                        let res = grpc.unary(method, req).await;
2872                        Ok(res)
2873                    };
2874                    Box::pin(fut)
2875                }
2876                "/qdrant.Collections/DeleteShardKey" => {
2877                    #[allow(non_camel_case_types)]
2878                    struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
2879                    impl<
2880                        T: Collections,
2881                    > tonic::server::UnaryService<super::DeleteShardKeyRequest>
2882                    for DeleteShardKeySvc<T> {
2883                        type Response = super::DeleteShardKeyResponse;
2884                        type Future = BoxFuture<
2885                            tonic::Response<Self::Response>,
2886                            tonic::Status,
2887                        >;
2888                        fn call(
2889                            &mut self,
2890                            request: tonic::Request<super::DeleteShardKeyRequest>,
2891                        ) -> Self::Future {
2892                            let inner = Arc::clone(&self.0);
2893                            let fut = async move {
2894                                <T as Collections>::delete_shard_key(&inner, request).await
2895                            };
2896                            Box::pin(fut)
2897                        }
2898                    }
2899                    let accept_compression_encodings = self.accept_compression_encodings;
2900                    let send_compression_encodings = self.send_compression_encodings;
2901                    let max_decoding_message_size = self.max_decoding_message_size;
2902                    let max_encoding_message_size = self.max_encoding_message_size;
2903                    let inner = self.inner.clone();
2904                    let fut = async move {
2905                        let method = DeleteShardKeySvc(inner);
2906                        let codec = tonic::codec::ProstCodec::default();
2907                        let mut grpc = tonic::server::Grpc::new(codec)
2908                            .apply_compression_config(
2909                                accept_compression_encodings,
2910                                send_compression_encodings,
2911                            )
2912                            .apply_max_message_size_config(
2913                                max_decoding_message_size,
2914                                max_encoding_message_size,
2915                            );
2916                        let res = grpc.unary(method, req).await;
2917                        Ok(res)
2918                    };
2919                    Box::pin(fut)
2920                }
2921                _ => {
2922                    Box::pin(async move {
2923                        let mut response = http::Response::new(empty_body());
2924                        let headers = response.headers_mut();
2925                        headers
2926                            .insert(
2927                                tonic::Status::GRPC_STATUS,
2928                                (tonic::Code::Unimplemented as i32).into(),
2929                            );
2930                        headers
2931                            .insert(
2932                                http::header::CONTENT_TYPE,
2933                                tonic::metadata::GRPC_CONTENT_TYPE,
2934                            );
2935                        Ok(response)
2936                    })
2937                }
2938            }
2939        }
2940    }
2941    impl<T> Clone for CollectionsServer<T> {
2942        fn clone(&self) -> Self {
2943            let inner = self.inner.clone();
2944            Self {
2945                inner,
2946                accept_compression_encodings: self.accept_compression_encodings,
2947                send_compression_encodings: self.send_compression_encodings,
2948                max_decoding_message_size: self.max_decoding_message_size,
2949                max_encoding_message_size: self.max_encoding_message_size,
2950            }
2951        }
2952    }
2953    /// Generated gRPC service name
2954    pub const SERVICE_NAME: &str = "qdrant.Collections";
2955    impl<T> tonic::server::NamedService for CollectionsServer<T> {
2956        const NAME: &'static str = SERVICE_NAME;
2957    }
2958}
2959/// `Struct` represents a structured data value, consisting of fields
2960/// which map to dynamically typed values. In some languages, `Struct`
2961/// might be supported by a native representation. For example, in
2962/// scripting languages like JS a struct is represented as an
2963/// object. The details of that representation are described together
2964/// with the proto support for the language.
2965///
2966/// The JSON representation for `Struct` is a JSON object.
2967#[derive(Clone, PartialEq, ::prost::Message)]
2968pub struct Struct {
2969    /// Unordered map of dynamically typed values.
2970    #[prost(map = "string, message", tag = "1")]
2971    pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
2972}
2973/// `Value` represents a dynamically typed value which can be either
2974/// null, a number, a string, a boolean, a recursive struct value, or a
2975/// list of values. A producer of value is expected to set one of those
2976/// variants, absence of any variant indicates an error.
2977///
2978/// The JSON representation for `Value` is a JSON value.
2979#[derive(Clone, PartialEq, ::prost::Message)]
2980pub struct Value {
2981    /// The kind of value.
2982    #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
2983    pub kind: ::core::option::Option<value::Kind>,
2984}
2985/// Nested message and enum types in `Value`.
2986pub mod value {
2987    /// The kind of value.
2988    #[derive(Clone, PartialEq, ::prost::Oneof)]
2989    pub enum Kind {
2990        /// Represents a null value.
2991        #[prost(enumeration = "super::NullValue", tag = "1")]
2992        NullValue(i32),
2993        /// Represents a double value.
2994        #[prost(double, tag = "2")]
2995        DoubleValue(f64),
2996        /// Represents an integer value
2997        #[prost(int64, tag = "3")]
2998        IntegerValue(i64),
2999        /// Represents a string value.
3000        #[prost(string, tag = "4")]
3001        StringValue(::prost::alloc::string::String),
3002        /// Represents a boolean value.
3003        #[prost(bool, tag = "5")]
3004        BoolValue(bool),
3005        /// Represents a structured value.
3006        #[prost(message, tag = "6")]
3007        StructValue(super::Struct),
3008        /// Represents a repeated `Value`.
3009        #[prost(message, tag = "7")]
3010        ListValue(super::ListValue),
3011    }
3012}
3013/// `ListValue` is a wrapper around a repeated field of values.
3014///
3015/// The JSON representation for `ListValue` is a JSON array.
3016#[derive(Clone, PartialEq, ::prost::Message)]
3017pub struct ListValue {
3018    /// Repeated field of dynamically typed values.
3019    #[prost(message, repeated, tag = "1")]
3020    pub values: ::prost::alloc::vec::Vec<Value>,
3021}
3022/// `NullValue` is a singleton enumeration to represent the null value for the
3023/// `Value` type union.
3024///
3025///   The JSON representation for `NullValue` is JSON `null`.
3026#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3027#[repr(i32)]
3028pub enum NullValue {
3029    /// Null value.
3030    NullValue = 0,
3031}
3032impl NullValue {
3033    /// String value of the enum field names used in the ProtoBuf definition.
3034    ///
3035    /// The values are not transformed in any way and thus are considered stable
3036    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3037    pub fn as_str_name(&self) -> &'static str {
3038        match self {
3039            Self::NullValue => "NULL_VALUE",
3040        }
3041    }
3042    /// Creates an enum from field names used in the ProtoBuf definition.
3043    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3044        match value {
3045            "NULL_VALUE" => Some(Self::NullValue),
3046            _ => None,
3047        }
3048    }
3049}
3050#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3051pub struct WriteOrdering {
3052    /// Write ordering guarantees
3053    #[prost(enumeration = "WriteOrderingType", tag = "1")]
3054    pub r#type: i32,
3055}
3056#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3057pub struct ReadConsistency {
3058    #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3059    pub value: ::core::option::Option<read_consistency::Value>,
3060}
3061/// Nested message and enum types in `ReadConsistency`.
3062pub mod read_consistency {
3063    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3064    pub enum Value {
3065        /// Common read consistency configurations
3066        #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3067        Type(i32),
3068        /// Send request to a specified number of nodes, and return points which are present on all of them
3069        #[prost(uint64, tag = "2")]
3070        Factor(u64),
3071    }
3072}
3073#[derive(Clone, PartialEq, ::prost::Message)]
3074pub struct PointId {
3075    #[prost(oneof = "point_id::PointIdOptions", tags = "1, 2")]
3076    pub point_id_options: ::core::option::Option<point_id::PointIdOptions>,
3077}
3078/// Nested message and enum types in `PointId`.
3079pub mod point_id {
3080    #[derive(Clone, PartialEq, ::prost::Oneof)]
3081    pub enum PointIdOptions {
3082        /// Numerical ID of the point
3083        #[prost(uint64, tag = "1")]
3084        Num(u64),
3085        /// UUID
3086        #[prost(string, tag = "2")]
3087        Uuid(::prost::alloc::string::String),
3088    }
3089}
3090#[derive(Clone, PartialEq, ::prost::Message)]
3091pub struct SparseIndices {
3092    #[prost(uint32, repeated, tag = "1")]
3093    pub data: ::prost::alloc::vec::Vec<u32>,
3094}
3095#[derive(Clone, PartialEq, ::prost::Message)]
3096pub struct Document {
3097    /// Text of the document
3098    #[prost(string, tag = "1")]
3099    pub text: ::prost::alloc::string::String,
3100    /// Model name
3101    #[prost(string, tag = "3")]
3102    pub model: ::prost::alloc::string::String,
3103    /// Model options
3104    #[prost(map = "string, message", tag = "4")]
3105    pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3106}
3107#[derive(Clone, PartialEq, ::prost::Message)]
3108pub struct Image {
3109    /// Image data, either base64 encoded or URL
3110    #[prost(message, optional, tag = "1")]
3111    pub image: ::core::option::Option<Value>,
3112    /// Model name
3113    #[prost(string, tag = "2")]
3114    pub model: ::prost::alloc::string::String,
3115    /// Model options
3116    #[prost(map = "string, message", tag = "3")]
3117    pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3118}
3119#[derive(Clone, PartialEq, ::prost::Message)]
3120pub struct InferenceObject {
3121    /// Object to infer
3122    #[prost(message, optional, tag = "1")]
3123    pub object: ::core::option::Option<Value>,
3124    /// Model name
3125    #[prost(string, tag = "2")]
3126    pub model: ::prost::alloc::string::String,
3127    /// Model options
3128    #[prost(map = "string, message", tag = "3")]
3129    pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3130}
3131/// Legacy vector format, which determines the vector type by the configuration of its fields.
3132#[derive(Clone, PartialEq, ::prost::Message)]
3133pub struct Vector {
3134    /// Vector data (flatten for multi vectors), deprecated
3135    #[prost(float, repeated, tag = "1")]
3136    pub data: ::prost::alloc::vec::Vec<f32>,
3137    /// Sparse indices for sparse vectors, deprecated
3138    #[prost(message, optional, tag = "2")]
3139    pub indices: ::core::option::Option<SparseIndices>,
3140    /// Number of vectors per multi vector, deprecated
3141    #[prost(uint32, optional, tag = "3")]
3142    pub vectors_count: ::core::option::Option<u32>,
3143    #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3144    pub vector: ::core::option::Option<vector::Vector>,
3145}
3146/// Nested message and enum types in `Vector`.
3147pub mod vector {
3148    #[derive(Clone, PartialEq, ::prost::Oneof)]
3149    pub enum Vector {
3150        /// Dense vector
3151        #[prost(message, tag = "101")]
3152        Dense(super::DenseVector),
3153        /// Sparse vector
3154        #[prost(message, tag = "102")]
3155        Sparse(super::SparseVector),
3156        /// Multi dense vector
3157        #[prost(message, tag = "103")]
3158        MultiDense(super::MultiDenseVector),
3159        #[prost(message, tag = "104")]
3160        Document(super::Document),
3161        #[prost(message, tag = "105")]
3162        Image(super::Image),
3163        #[prost(message, tag = "106")]
3164        Object(super::InferenceObject),
3165    }
3166}
3167#[derive(Clone, PartialEq, ::prost::Message)]
3168pub struct VectorOutput {
3169    /// Vector data (flatten for multi vectors), deprecated
3170    #[prost(float, repeated, tag = "1")]
3171    pub data: ::prost::alloc::vec::Vec<f32>,
3172    /// Sparse indices for sparse vectors, deprecated
3173    #[prost(message, optional, tag = "2")]
3174    pub indices: ::core::option::Option<SparseIndices>,
3175    /// Number of vectors per multi vector, deprecated
3176    #[prost(uint32, optional, tag = "3")]
3177    pub vectors_count: ::core::option::Option<u32>,
3178    #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
3179    pub vector: ::core::option::Option<vector_output::Vector>,
3180}
3181/// Nested message and enum types in `VectorOutput`.
3182pub mod vector_output {
3183    #[derive(Clone, PartialEq, ::prost::Oneof)]
3184    pub enum Vector {
3185        /// Dense vector
3186        #[prost(message, tag = "101")]
3187        Dense(super::DenseVector),
3188        /// Sparse vector
3189        #[prost(message, tag = "102")]
3190        Sparse(super::SparseVector),
3191        /// Multi dense vector
3192        #[prost(message, tag = "103")]
3193        MultiDense(super::MultiDenseVector),
3194    }
3195}
3196#[derive(Clone, PartialEq, ::prost::Message)]
3197pub struct DenseVector {
3198    #[prost(float, repeated, tag = "1")]
3199    pub data: ::prost::alloc::vec::Vec<f32>,
3200}
3201#[derive(Clone, PartialEq, ::prost::Message)]
3202pub struct SparseVector {
3203    #[prost(float, repeated, tag = "1")]
3204    pub values: ::prost::alloc::vec::Vec<f32>,
3205    #[prost(uint32, repeated, tag = "2")]
3206    pub indices: ::prost::alloc::vec::Vec<u32>,
3207}
3208#[derive(Clone, PartialEq, ::prost::Message)]
3209pub struct MultiDenseVector {
3210    #[prost(message, repeated, tag = "1")]
3211    pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
3212}
3213/// Vector type to be used in queries. Ids will be substituted with their corresponding vectors from the collection.
3214#[derive(Clone, PartialEq, ::prost::Message)]
3215pub struct VectorInput {
3216    #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
3217    pub variant: ::core::option::Option<vector_input::Variant>,
3218}
3219/// Nested message and enum types in `VectorInput`.
3220pub mod vector_input {
3221    #[derive(Clone, PartialEq, ::prost::Oneof)]
3222    pub enum Variant {
3223        #[prost(message, tag = "1")]
3224        Id(super::PointId),
3225        #[prost(message, tag = "2")]
3226        Dense(super::DenseVector),
3227        #[prost(message, tag = "3")]
3228        Sparse(super::SparseVector),
3229        #[prost(message, tag = "4")]
3230        MultiDense(super::MultiDenseVector),
3231        #[prost(message, tag = "5")]
3232        Document(super::Document),
3233        #[prost(message, tag = "6")]
3234        Image(super::Image),
3235        #[prost(message, tag = "7")]
3236        Object(super::InferenceObject),
3237    }
3238}
3239#[derive(Clone, PartialEq, ::prost::Message)]
3240pub struct ShardKeySelector {
3241    /// List of shard keys which should be used in the request
3242    #[prost(message, repeated, tag = "1")]
3243    pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
3244}
3245#[derive(Clone, PartialEq, ::prost::Message)]
3246pub struct UpsertPoints {
3247    /// name of the collection
3248    #[prost(string, tag = "1")]
3249    pub collection_name: ::prost::alloc::string::String,
3250    /// Wait until the changes have been applied?
3251    #[prost(bool, optional, tag = "2")]
3252    pub wait: ::core::option::Option<bool>,
3253    #[prost(message, repeated, tag = "3")]
3254    pub points: ::prost::alloc::vec::Vec<PointStruct>,
3255    /// Write ordering guarantees
3256    #[prost(message, optional, tag = "4")]
3257    pub ordering: ::core::option::Option<WriteOrdering>,
3258    /// Option for custom sharding to specify used shard keys
3259    #[prost(message, optional, tag = "5")]
3260    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3261}
3262#[derive(Clone, PartialEq, ::prost::Message)]
3263pub struct DeletePoints {
3264    /// name of the collection
3265    #[prost(string, tag = "1")]
3266    pub collection_name: ::prost::alloc::string::String,
3267    /// Wait until the changes have been applied?
3268    #[prost(bool, optional, tag = "2")]
3269    pub wait: ::core::option::Option<bool>,
3270    /// Affected points
3271    #[prost(message, optional, tag = "3")]
3272    pub points: ::core::option::Option<PointsSelector>,
3273    /// Write ordering guarantees
3274    #[prost(message, optional, tag = "4")]
3275    pub ordering: ::core::option::Option<WriteOrdering>,
3276    /// Option for custom sharding to specify used shard keys
3277    #[prost(message, optional, tag = "5")]
3278    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3279}
3280#[derive(Clone, PartialEq, ::prost::Message)]
3281pub struct GetPoints {
3282    /// name of the collection
3283    #[prost(string, tag = "1")]
3284    pub collection_name: ::prost::alloc::string::String,
3285    /// List of points to retrieve
3286    #[prost(message, repeated, tag = "2")]
3287    pub ids: ::prost::alloc::vec::Vec<PointId>,
3288    /// Options for specifying which payload to include or not
3289    #[prost(message, optional, tag = "4")]
3290    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3291    /// Options for specifying which vectors to include into response
3292    #[prost(message, optional, tag = "5")]
3293    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3294    /// Options for specifying read consistency guarantees
3295    #[prost(message, optional, tag = "6")]
3296    pub read_consistency: ::core::option::Option<ReadConsistency>,
3297    /// Specify in which shards to look for the points, if not specified - look in all shards
3298    #[prost(message, optional, tag = "7")]
3299    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3300    /// If set, overrides global timeout setting for this request. Unit is seconds.
3301    #[prost(uint64, optional, tag = "8")]
3302    pub timeout: ::core::option::Option<u64>,
3303}
3304#[derive(Clone, PartialEq, ::prost::Message)]
3305pub struct UpdatePointVectors {
3306    /// name of the collection
3307    #[prost(string, tag = "1")]
3308    pub collection_name: ::prost::alloc::string::String,
3309    /// Wait until the changes have been applied?
3310    #[prost(bool, optional, tag = "2")]
3311    pub wait: ::core::option::Option<bool>,
3312    /// List of points and vectors to update
3313    #[prost(message, repeated, tag = "3")]
3314    pub points: ::prost::alloc::vec::Vec<PointVectors>,
3315    /// Write ordering guarantees
3316    #[prost(message, optional, tag = "4")]
3317    pub ordering: ::core::option::Option<WriteOrdering>,
3318    /// Option for custom sharding to specify used shard keys
3319    #[prost(message, optional, tag = "5")]
3320    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3321}
3322#[derive(Clone, PartialEq, ::prost::Message)]
3323pub struct PointVectors {
3324    /// ID to update vectors for
3325    #[prost(message, optional, tag = "1")]
3326    pub id: ::core::option::Option<PointId>,
3327    /// Named vectors to update, leave others intact
3328    #[prost(message, optional, tag = "2")]
3329    pub vectors: ::core::option::Option<Vectors>,
3330}
3331#[derive(Clone, PartialEq, ::prost::Message)]
3332pub struct DeletePointVectors {
3333    /// name of the collection
3334    #[prost(string, tag = "1")]
3335    pub collection_name: ::prost::alloc::string::String,
3336    /// Wait until the changes have been applied?
3337    #[prost(bool, optional, tag = "2")]
3338    pub wait: ::core::option::Option<bool>,
3339    /// Affected points
3340    #[prost(message, optional, tag = "3")]
3341    pub points_selector: ::core::option::Option<PointsSelector>,
3342    /// List of vector names to delete
3343    #[prost(message, optional, tag = "4")]
3344    pub vectors: ::core::option::Option<VectorsSelector>,
3345    /// Write ordering guarantees
3346    #[prost(message, optional, tag = "5")]
3347    pub ordering: ::core::option::Option<WriteOrdering>,
3348    /// Option for custom sharding to specify used shard keys
3349    #[prost(message, optional, tag = "6")]
3350    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3351}
3352#[derive(Clone, PartialEq, ::prost::Message)]
3353pub struct SetPayloadPoints {
3354    /// name of the collection
3355    #[prost(string, tag = "1")]
3356    pub collection_name: ::prost::alloc::string::String,
3357    /// Wait until the changes have been applied?
3358    #[prost(bool, optional, tag = "2")]
3359    pub wait: ::core::option::Option<bool>,
3360    /// New payload values
3361    #[prost(map = "string, message", tag = "3")]
3362    pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3363    /// Affected points
3364    #[prost(message, optional, tag = "5")]
3365    pub points_selector: ::core::option::Option<PointsSelector>,
3366    /// Write ordering guarantees
3367    #[prost(message, optional, tag = "6")]
3368    pub ordering: ::core::option::Option<WriteOrdering>,
3369    /// Option for custom sharding to specify used shard keys
3370    #[prost(message, optional, tag = "7")]
3371    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3372    /// Option for indicate property of payload
3373    #[prost(string, optional, tag = "8")]
3374    pub key: ::core::option::Option<::prost::alloc::string::String>,
3375}
3376#[derive(Clone, PartialEq, ::prost::Message)]
3377pub struct DeletePayloadPoints {
3378    /// name of the collection
3379    #[prost(string, tag = "1")]
3380    pub collection_name: ::prost::alloc::string::String,
3381    /// Wait until the changes have been applied?
3382    #[prost(bool, optional, tag = "2")]
3383    pub wait: ::core::option::Option<bool>,
3384    /// List of keys to delete
3385    #[prost(string, repeated, tag = "3")]
3386    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3387    /// Affected points
3388    #[prost(message, optional, tag = "5")]
3389    pub points_selector: ::core::option::Option<PointsSelector>,
3390    /// Write ordering guarantees
3391    #[prost(message, optional, tag = "6")]
3392    pub ordering: ::core::option::Option<WriteOrdering>,
3393    /// Option for custom sharding to specify used shard keys
3394    #[prost(message, optional, tag = "7")]
3395    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3396}
3397#[derive(Clone, PartialEq, ::prost::Message)]
3398pub struct ClearPayloadPoints {
3399    /// name of the collection
3400    #[prost(string, tag = "1")]
3401    pub collection_name: ::prost::alloc::string::String,
3402    /// Wait until the changes have been applied?
3403    #[prost(bool, optional, tag = "2")]
3404    pub wait: ::core::option::Option<bool>,
3405    /// Affected points
3406    #[prost(message, optional, tag = "3")]
3407    pub points: ::core::option::Option<PointsSelector>,
3408    /// Write ordering guarantees
3409    #[prost(message, optional, tag = "4")]
3410    pub ordering: ::core::option::Option<WriteOrdering>,
3411    /// Option for custom sharding to specify used shard keys
3412    #[prost(message, optional, tag = "5")]
3413    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3414}
3415#[derive(Clone, PartialEq, ::prost::Message)]
3416pub struct CreateFieldIndexCollection {
3417    /// name of the collection
3418    #[prost(string, tag = "1")]
3419    pub collection_name: ::prost::alloc::string::String,
3420    /// Wait until the changes have been applied?
3421    #[prost(bool, optional, tag = "2")]
3422    pub wait: ::core::option::Option<bool>,
3423    /// Field name to index
3424    #[prost(string, tag = "3")]
3425    pub field_name: ::prost::alloc::string::String,
3426    /// Field type.
3427    #[prost(enumeration = "FieldType", optional, tag = "4")]
3428    pub field_type: ::core::option::Option<i32>,
3429    /// Payload index params.
3430    #[prost(message, optional, tag = "5")]
3431    pub field_index_params: ::core::option::Option<PayloadIndexParams>,
3432    /// Write ordering guarantees
3433    #[prost(message, optional, tag = "6")]
3434    pub ordering: ::core::option::Option<WriteOrdering>,
3435}
3436#[derive(Clone, PartialEq, ::prost::Message)]
3437pub struct DeleteFieldIndexCollection {
3438    /// name of the collection
3439    #[prost(string, tag = "1")]
3440    pub collection_name: ::prost::alloc::string::String,
3441    /// Wait until the changes have been applied?
3442    #[prost(bool, optional, tag = "2")]
3443    pub wait: ::core::option::Option<bool>,
3444    /// Field name to delete
3445    #[prost(string, tag = "3")]
3446    pub field_name: ::prost::alloc::string::String,
3447    /// Write ordering guarantees
3448    #[prost(message, optional, tag = "4")]
3449    pub ordering: ::core::option::Option<WriteOrdering>,
3450}
3451#[derive(Clone, PartialEq, ::prost::Message)]
3452pub struct PayloadIncludeSelector {
3453    /// List of payload keys to include into result
3454    #[prost(string, repeated, tag = "1")]
3455    pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3456}
3457#[derive(Clone, PartialEq, ::prost::Message)]
3458pub struct PayloadExcludeSelector {
3459    /// List of payload keys to exclude from the result
3460    #[prost(string, repeated, tag = "1")]
3461    pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3462}
3463#[derive(Clone, PartialEq, ::prost::Message)]
3464pub struct WithPayloadSelector {
3465    #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
3466    pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
3467}
3468/// Nested message and enum types in `WithPayloadSelector`.
3469pub mod with_payload_selector {
3470    #[derive(Clone, PartialEq, ::prost::Oneof)]
3471    pub enum SelectorOptions {
3472        /// If `true` - return all payload, if `false` - none
3473        #[prost(bool, tag = "1")]
3474        Enable(bool),
3475        #[prost(message, tag = "2")]
3476        Include(super::PayloadIncludeSelector),
3477        #[prost(message, tag = "3")]
3478        Exclude(super::PayloadExcludeSelector),
3479    }
3480}
3481#[derive(Clone, PartialEq, ::prost::Message)]
3482pub struct NamedVectors {
3483    #[prost(map = "string, message", tag = "1")]
3484    pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
3485}
3486#[derive(Clone, PartialEq, ::prost::Message)]
3487pub struct NamedVectorsOutput {
3488    #[prost(map = "string, message", tag = "1")]
3489    pub vectors: ::std::collections::HashMap<
3490        ::prost::alloc::string::String,
3491        VectorOutput,
3492    >,
3493}
3494#[derive(Clone, PartialEq, ::prost::Message)]
3495pub struct Vectors {
3496    #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
3497    pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
3498}
3499/// Nested message and enum types in `Vectors`.
3500pub mod vectors {
3501    #[derive(Clone, PartialEq, ::prost::Oneof)]
3502    pub enum VectorsOptions {
3503        #[prost(message, tag = "1")]
3504        Vector(super::Vector),
3505        #[prost(message, tag = "2")]
3506        Vectors(super::NamedVectors),
3507    }
3508}
3509#[derive(Clone, PartialEq, ::prost::Message)]
3510pub struct VectorsOutput {
3511    #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
3512    pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
3513}
3514/// Nested message and enum types in `VectorsOutput`.
3515pub mod vectors_output {
3516    #[derive(Clone, PartialEq, ::prost::Oneof)]
3517    pub enum VectorsOptions {
3518        #[prost(message, tag = "1")]
3519        Vector(super::VectorOutput),
3520        #[prost(message, tag = "2")]
3521        Vectors(super::NamedVectorsOutput),
3522    }
3523}
3524#[derive(Clone, PartialEq, ::prost::Message)]
3525pub struct VectorsSelector {
3526    /// List of vectors to include into result
3527    #[prost(string, repeated, tag = "1")]
3528    pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3529}
3530#[derive(Clone, PartialEq, ::prost::Message)]
3531pub struct WithVectorsSelector {
3532    #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
3533    pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
3534}
3535/// Nested message and enum types in `WithVectorsSelector`.
3536pub mod with_vectors_selector {
3537    #[derive(Clone, PartialEq, ::prost::Oneof)]
3538    pub enum SelectorOptions {
3539        /// If `true` - return all vectors, if `false` - none
3540        #[prost(bool, tag = "1")]
3541        Enable(bool),
3542        /// List of payload keys to include into result
3543        #[prost(message, tag = "2")]
3544        Include(super::VectorsSelector),
3545    }
3546}
3547#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3548pub struct QuantizationSearchParams {
3549    ///
3550    /// If set to true, search will ignore quantized vector data
3551    #[prost(bool, optional, tag = "1")]
3552    pub ignore: ::core::option::Option<bool>,
3553    ///
3554    /// If true, use original vectors to re-score top-k results. If ignored, qdrant decides automatically does rescore enabled or not.
3555    #[prost(bool, optional, tag = "2")]
3556    pub rescore: ::core::option::Option<bool>,
3557    ///
3558    /// Oversampling factor for quantization.
3559    ///
3560    /// Defines how many extra vectors should be pre-selected using quantized index,
3561    /// and then re-scored using original vectors.
3562    ///
3563    /// For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index,
3564    /// and then top-100 will be returned after re-scoring.
3565    #[prost(double, optional, tag = "3")]
3566    pub oversampling: ::core::option::Option<f64>,
3567}
3568#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3569pub struct SearchParams {
3570    ///
3571    /// Params relevant to HNSW index. Size of the beam in a beam-search.
3572    /// Larger the value - more accurate the result, more time required for search.
3573    #[prost(uint64, optional, tag = "1")]
3574    pub hnsw_ef: ::core::option::Option<u64>,
3575    ///
3576    /// Search without approximation. If set to true, search may run long but with exact results.
3577    #[prost(bool, optional, tag = "2")]
3578    pub exact: ::core::option::Option<bool>,
3579    ///
3580    /// If set to true, search will ignore quantized vector data
3581    #[prost(message, optional, tag = "3")]
3582    pub quantization: ::core::option::Option<QuantizationSearchParams>,
3583    ///
3584    /// If enabled, the engine will only perform search among indexed or small segments.
3585    /// Using this option prevents slow searches in case of delayed index, but does not
3586    /// guarantee that all uploaded vectors will be included in search results
3587    #[prost(bool, optional, tag = "4")]
3588    pub indexed_only: ::core::option::Option<bool>,
3589}
3590#[derive(Clone, PartialEq, ::prost::Message)]
3591pub struct SearchPoints {
3592    /// name of the collection
3593    #[prost(string, tag = "1")]
3594    pub collection_name: ::prost::alloc::string::String,
3595    /// vector
3596    #[prost(float, repeated, tag = "2")]
3597    pub vector: ::prost::alloc::vec::Vec<f32>,
3598    /// Filter conditions - return only those points that satisfy the specified conditions
3599    #[prost(message, optional, tag = "3")]
3600    pub filter: ::core::option::Option<Filter>,
3601    /// Max number of result
3602    #[prost(uint64, tag = "4")]
3603    pub limit: u64,
3604    /// Options for specifying which payload to include or not
3605    #[prost(message, optional, tag = "6")]
3606    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3607    /// Search config
3608    #[prost(message, optional, tag = "7")]
3609    pub params: ::core::option::Option<SearchParams>,
3610    /// If provided - cut off results with worse scores
3611    #[prost(float, optional, tag = "8")]
3612    pub score_threshold: ::core::option::Option<f32>,
3613    /// Offset of the result
3614    #[prost(uint64, optional, tag = "9")]
3615    pub offset: ::core::option::Option<u64>,
3616    /// Which vector to use for search, if not specified - use default vector
3617    #[prost(string, optional, tag = "10")]
3618    pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3619    /// Options for specifying which vectors to include into response
3620    #[prost(message, optional, tag = "11")]
3621    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3622    /// Options for specifying read consistency guarantees
3623    #[prost(message, optional, tag = "12")]
3624    pub read_consistency: ::core::option::Option<ReadConsistency>,
3625    /// If set, overrides global timeout setting for this request. Unit is seconds.
3626    #[prost(uint64, optional, tag = "13")]
3627    pub timeout: ::core::option::Option<u64>,
3628    /// Specify in which shards to look for the points, if not specified - look in all shards
3629    #[prost(message, optional, tag = "14")]
3630    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3631    #[prost(message, optional, tag = "15")]
3632    pub sparse_indices: ::core::option::Option<SparseIndices>,
3633}
3634#[derive(Clone, PartialEq, ::prost::Message)]
3635pub struct SearchBatchPoints {
3636    /// Name of the collection
3637    #[prost(string, tag = "1")]
3638    pub collection_name: ::prost::alloc::string::String,
3639    #[prost(message, repeated, tag = "2")]
3640    pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
3641    /// Options for specifying read consistency guarantees
3642    #[prost(message, optional, tag = "3")]
3643    pub read_consistency: ::core::option::Option<ReadConsistency>,
3644    /// If set, overrides global timeout setting for this request. Unit is seconds.
3645    #[prost(uint64, optional, tag = "4")]
3646    pub timeout: ::core::option::Option<u64>,
3647}
3648#[derive(Clone, PartialEq, ::prost::Message)]
3649pub struct WithLookup {
3650    /// Name of the collection to use for points lookup
3651    #[prost(string, tag = "1")]
3652    pub collection: ::prost::alloc::string::String,
3653    /// Options for specifying which payload to include (or not)
3654    #[prost(message, optional, tag = "2")]
3655    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3656    /// Options for specifying which vectors to include (or not)
3657    #[prost(message, optional, tag = "3")]
3658    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3659}
3660#[derive(Clone, PartialEq, ::prost::Message)]
3661pub struct SearchPointGroups {
3662    /// Name of the collection
3663    #[prost(string, tag = "1")]
3664    pub collection_name: ::prost::alloc::string::String,
3665    /// Vector to compare against
3666    #[prost(float, repeated, tag = "2")]
3667    pub vector: ::prost::alloc::vec::Vec<f32>,
3668    /// Filter conditions - return only those points that satisfy the specified conditions
3669    #[prost(message, optional, tag = "3")]
3670    pub filter: ::core::option::Option<Filter>,
3671    /// Max number of result
3672    #[prost(uint32, tag = "4")]
3673    pub limit: u32,
3674    /// Options for specifying which payload to include or not
3675    #[prost(message, optional, tag = "5")]
3676    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3677    /// Search config
3678    #[prost(message, optional, tag = "6")]
3679    pub params: ::core::option::Option<SearchParams>,
3680    /// If provided - cut off results with worse scores
3681    #[prost(float, optional, tag = "7")]
3682    pub score_threshold: ::core::option::Option<f32>,
3683    /// Which vector to use for search, if not specified - use default vector
3684    #[prost(string, optional, tag = "8")]
3685    pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3686    /// Options for specifying which vectors to include into response
3687    #[prost(message, optional, tag = "9")]
3688    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3689    /// Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups.
3690    #[prost(string, tag = "10")]
3691    pub group_by: ::prost::alloc::string::String,
3692    /// Maximum amount of points to return per group
3693    #[prost(uint32, tag = "11")]
3694    pub group_size: u32,
3695    /// Options for specifying read consistency guarantees
3696    #[prost(message, optional, tag = "12")]
3697    pub read_consistency: ::core::option::Option<ReadConsistency>,
3698    /// Options for specifying how to use the group id to lookup points in another collection
3699    #[prost(message, optional, tag = "13")]
3700    pub with_lookup: ::core::option::Option<WithLookup>,
3701    /// If set, overrides global timeout setting for this request. Unit is seconds.
3702    #[prost(uint64, optional, tag = "14")]
3703    pub timeout: ::core::option::Option<u64>,
3704    /// Specify in which shards to look for the points, if not specified - look in all shards
3705    #[prost(message, optional, tag = "15")]
3706    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3707    #[prost(message, optional, tag = "16")]
3708    pub sparse_indices: ::core::option::Option<SparseIndices>,
3709}
3710#[derive(Clone, PartialEq, ::prost::Message)]
3711pub struct StartFrom {
3712    #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
3713    pub value: ::core::option::Option<start_from::Value>,
3714}
3715/// Nested message and enum types in `StartFrom`.
3716pub mod start_from {
3717    #[derive(Clone, PartialEq, ::prost::Oneof)]
3718    pub enum Value {
3719        #[prost(double, tag = "1")]
3720        Float(f64),
3721        #[prost(int64, tag = "2")]
3722        Integer(i64),
3723        #[prost(message, tag = "3")]
3724        Timestamp(::prost_types::Timestamp),
3725        #[prost(string, tag = "4")]
3726        Datetime(::prost::alloc::string::String),
3727    }
3728}
3729#[derive(Clone, PartialEq, ::prost::Message)]
3730pub struct OrderBy {
3731    /// Payload key to order by
3732    #[prost(string, tag = "1")]
3733    pub key: ::prost::alloc::string::String,
3734    /// Ascending or descending order
3735    #[prost(enumeration = "Direction", optional, tag = "2")]
3736    pub direction: ::core::option::Option<i32>,
3737    /// Start from this value
3738    #[prost(message, optional, tag = "3")]
3739    pub start_from: ::core::option::Option<StartFrom>,
3740}
3741#[derive(Clone, PartialEq, ::prost::Message)]
3742pub struct ScrollPoints {
3743    #[prost(string, tag = "1")]
3744    pub collection_name: ::prost::alloc::string::String,
3745    /// Filter conditions - return only those points that satisfy the specified conditions
3746    #[prost(message, optional, tag = "2")]
3747    pub filter: ::core::option::Option<Filter>,
3748    /// Start with this ID
3749    #[prost(message, optional, tag = "3")]
3750    pub offset: ::core::option::Option<PointId>,
3751    /// Max number of result
3752    #[prost(uint32, optional, tag = "4")]
3753    pub limit: ::core::option::Option<u32>,
3754    /// Options for specifying which payload to include or not
3755    #[prost(message, optional, tag = "6")]
3756    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3757    /// Options for specifying which vectors to include into response
3758    #[prost(message, optional, tag = "7")]
3759    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3760    /// Options for specifying read consistency guarantees
3761    #[prost(message, optional, tag = "8")]
3762    pub read_consistency: ::core::option::Option<ReadConsistency>,
3763    /// Specify in which shards to look for the points, if not specified - look in all shards
3764    #[prost(message, optional, tag = "9")]
3765    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3766    /// Order the records by a payload field
3767    #[prost(message, optional, tag = "10")]
3768    pub order_by: ::core::option::Option<OrderBy>,
3769    /// If set, overrides global timeout setting for this request. Unit is seconds.
3770    #[prost(uint64, optional, tag = "11")]
3771    pub timeout: ::core::option::Option<u64>,
3772}
3773#[derive(Clone, PartialEq, ::prost::Message)]
3774pub struct LookupLocation {
3775    #[prost(string, tag = "1")]
3776    pub collection_name: ::prost::alloc::string::String,
3777    /// Which vector to use for search, if not specified - use default vector
3778    #[prost(string, optional, tag = "2")]
3779    pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3780    /// Specify in which shards to look for the points, if not specified - look in all shards
3781    #[prost(message, optional, tag = "3")]
3782    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3783}
3784#[derive(Clone, PartialEq, ::prost::Message)]
3785pub struct RecommendPoints {
3786    /// name of the collection
3787    #[prost(string, tag = "1")]
3788    pub collection_name: ::prost::alloc::string::String,
3789    /// Look for vectors closest to the vectors from these points
3790    #[prost(message, repeated, tag = "2")]
3791    pub positive: ::prost::alloc::vec::Vec<PointId>,
3792    /// Try to avoid vectors like the vector from these points
3793    #[prost(message, repeated, tag = "3")]
3794    pub negative: ::prost::alloc::vec::Vec<PointId>,
3795    /// Filter conditions - return only those points that satisfy the specified conditions
3796    #[prost(message, optional, tag = "4")]
3797    pub filter: ::core::option::Option<Filter>,
3798    /// Max number of result
3799    #[prost(uint64, tag = "5")]
3800    pub limit: u64,
3801    /// Options for specifying which payload to include or not
3802    #[prost(message, optional, tag = "7")]
3803    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3804    /// Search config
3805    #[prost(message, optional, tag = "8")]
3806    pub params: ::core::option::Option<SearchParams>,
3807    /// If provided - cut off results with worse scores
3808    #[prost(float, optional, tag = "9")]
3809    pub score_threshold: ::core::option::Option<f32>,
3810    /// Offset of the result
3811    #[prost(uint64, optional, tag = "10")]
3812    pub offset: ::core::option::Option<u64>,
3813    /// Define which vector to use for recommendation, if not specified - default vector
3814    #[prost(string, optional, tag = "11")]
3815    pub using: ::core::option::Option<::prost::alloc::string::String>,
3816    /// Options for specifying which vectors to include into response
3817    #[prost(message, optional, tag = "12")]
3818    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3819    /// Name of the collection to use for points lookup, if not specified - use current collection
3820    #[prost(message, optional, tag = "13")]
3821    pub lookup_from: ::core::option::Option<LookupLocation>,
3822    /// Options for specifying read consistency guarantees
3823    #[prost(message, optional, tag = "14")]
3824    pub read_consistency: ::core::option::Option<ReadConsistency>,
3825    /// How to use the example vectors to find the results
3826    #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
3827    pub strategy: ::core::option::Option<i32>,
3828    /// Look for vectors closest to those
3829    #[prost(message, repeated, tag = "17")]
3830    pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
3831    /// Try to avoid vectors like this
3832    #[prost(message, repeated, tag = "18")]
3833    pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
3834    /// If set, overrides global timeout setting for this request. Unit is seconds.
3835    #[prost(uint64, optional, tag = "19")]
3836    pub timeout: ::core::option::Option<u64>,
3837    /// Specify in which shards to look for the points, if not specified - look in all shards
3838    #[prost(message, optional, tag = "20")]
3839    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3840}
3841#[derive(Clone, PartialEq, ::prost::Message)]
3842pub struct RecommendBatchPoints {
3843    /// Name of the collection
3844    #[prost(string, tag = "1")]
3845    pub collection_name: ::prost::alloc::string::String,
3846    #[prost(message, repeated, tag = "2")]
3847    pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
3848    /// Options for specifying read consistency guarantees
3849    #[prost(message, optional, tag = "3")]
3850    pub read_consistency: ::core::option::Option<ReadConsistency>,
3851    /// If set, overrides global timeout setting for this request. Unit is seconds.
3852    #[prost(uint64, optional, tag = "4")]
3853    pub timeout: ::core::option::Option<u64>,
3854}
3855#[derive(Clone, PartialEq, ::prost::Message)]
3856pub struct RecommendPointGroups {
3857    /// Name of the collection
3858    #[prost(string, tag = "1")]
3859    pub collection_name: ::prost::alloc::string::String,
3860    /// Look for vectors closest to the vectors from these points
3861    #[prost(message, repeated, tag = "2")]
3862    pub positive: ::prost::alloc::vec::Vec<PointId>,
3863    /// Try to avoid vectors like the vector from these points
3864    #[prost(message, repeated, tag = "3")]
3865    pub negative: ::prost::alloc::vec::Vec<PointId>,
3866    /// Filter conditions - return only those points that satisfy the specified conditions
3867    #[prost(message, optional, tag = "4")]
3868    pub filter: ::core::option::Option<Filter>,
3869    /// Max number of groups in result
3870    #[prost(uint32, tag = "5")]
3871    pub limit: u32,
3872    /// Options for specifying which payload to include or not
3873    #[prost(message, optional, tag = "6")]
3874    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3875    /// Search config
3876    #[prost(message, optional, tag = "7")]
3877    pub params: ::core::option::Option<SearchParams>,
3878    /// If provided - cut off results with worse scores
3879    #[prost(float, optional, tag = "8")]
3880    pub score_threshold: ::core::option::Option<f32>,
3881    /// Define which vector to use for recommendation, if not specified - default vector
3882    #[prost(string, optional, tag = "9")]
3883    pub using: ::core::option::Option<::prost::alloc::string::String>,
3884    /// Options for specifying which vectors to include into response
3885    #[prost(message, optional, tag = "10")]
3886    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3887    /// Name of the collection to use for points lookup, if not specified - use current collection
3888    #[prost(message, optional, tag = "11")]
3889    pub lookup_from: ::core::option::Option<LookupLocation>,
3890    /// Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups.
3891    #[prost(string, tag = "12")]
3892    pub group_by: ::prost::alloc::string::String,
3893    /// Maximum amount of points to return per group
3894    #[prost(uint32, tag = "13")]
3895    pub group_size: u32,
3896    /// Options for specifying read consistency guarantees
3897    #[prost(message, optional, tag = "14")]
3898    pub read_consistency: ::core::option::Option<ReadConsistency>,
3899    /// Options for specifying how to use the group id to lookup points in another collection
3900    #[prost(message, optional, tag = "15")]
3901    pub with_lookup: ::core::option::Option<WithLookup>,
3902    /// How to use the example vectors to find the results
3903    #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
3904    pub strategy: ::core::option::Option<i32>,
3905    /// Look for vectors closest to those
3906    #[prost(message, repeated, tag = "18")]
3907    pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
3908    /// Try to avoid vectors like this
3909    #[prost(message, repeated, tag = "19")]
3910    pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
3911    /// If set, overrides global timeout setting for this request. Unit is seconds.
3912    #[prost(uint64, optional, tag = "20")]
3913    pub timeout: ::core::option::Option<u64>,
3914    /// Specify in which shards to look for the points, if not specified - look in all shards
3915    #[prost(message, optional, tag = "21")]
3916    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3917}
3918#[derive(Clone, PartialEq, ::prost::Message)]
3919pub struct TargetVector {
3920    #[prost(oneof = "target_vector::Target", tags = "1")]
3921    pub target: ::core::option::Option<target_vector::Target>,
3922}
3923/// Nested message and enum types in `TargetVector`.
3924pub mod target_vector {
3925    #[derive(Clone, PartialEq, ::prost::Oneof)]
3926    pub enum Target {
3927        #[prost(message, tag = "1")]
3928        Single(super::VectorExample),
3929    }
3930}
3931#[derive(Clone, PartialEq, ::prost::Message)]
3932pub struct VectorExample {
3933    #[prost(oneof = "vector_example::Example", tags = "1, 2")]
3934    pub example: ::core::option::Option<vector_example::Example>,
3935}
3936/// Nested message and enum types in `VectorExample`.
3937pub mod vector_example {
3938    #[derive(Clone, PartialEq, ::prost::Oneof)]
3939    pub enum Example {
3940        #[prost(message, tag = "1")]
3941        Id(super::PointId),
3942        #[prost(message, tag = "2")]
3943        Vector(super::Vector),
3944    }
3945}
3946#[derive(Clone, PartialEq, ::prost::Message)]
3947pub struct ContextExamplePair {
3948    #[prost(message, optional, tag = "1")]
3949    pub positive: ::core::option::Option<VectorExample>,
3950    #[prost(message, optional, tag = "2")]
3951    pub negative: ::core::option::Option<VectorExample>,
3952}
3953#[derive(Clone, PartialEq, ::prost::Message)]
3954pub struct DiscoverPoints {
3955    /// name of the collection
3956    #[prost(string, tag = "1")]
3957    pub collection_name: ::prost::alloc::string::String,
3958    /// Use this as the primary search objective
3959    #[prost(message, optional, tag = "2")]
3960    pub target: ::core::option::Option<TargetVector>,
3961    /// Search will be constrained by these pairs of examples
3962    #[prost(message, repeated, tag = "3")]
3963    pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
3964    /// Filter conditions - return only those points that satisfy the specified conditions
3965    #[prost(message, optional, tag = "4")]
3966    pub filter: ::core::option::Option<Filter>,
3967    /// Max number of result
3968    #[prost(uint64, tag = "5")]
3969    pub limit: u64,
3970    /// Options for specifying which payload to include or not
3971    #[prost(message, optional, tag = "6")]
3972    pub with_payload: ::core::option::Option<WithPayloadSelector>,
3973    /// Search config
3974    #[prost(message, optional, tag = "7")]
3975    pub params: ::core::option::Option<SearchParams>,
3976    /// Offset of the result
3977    #[prost(uint64, optional, tag = "8")]
3978    pub offset: ::core::option::Option<u64>,
3979    /// Define which vector to use for recommendation, if not specified - default vector
3980    #[prost(string, optional, tag = "9")]
3981    pub using: ::core::option::Option<::prost::alloc::string::String>,
3982    /// Options for specifying which vectors to include into response
3983    #[prost(message, optional, tag = "10")]
3984    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3985    /// Name of the collection to use for points lookup, if not specified - use current collection
3986    #[prost(message, optional, tag = "11")]
3987    pub lookup_from: ::core::option::Option<LookupLocation>,
3988    /// Options for specifying read consistency guarantees
3989    #[prost(message, optional, tag = "12")]
3990    pub read_consistency: ::core::option::Option<ReadConsistency>,
3991    /// If set, overrides global timeout setting for this request. Unit is seconds.
3992    #[prost(uint64, optional, tag = "13")]
3993    pub timeout: ::core::option::Option<u64>,
3994    /// Specify in which shards to look for the points, if not specified - look in all shards
3995    #[prost(message, optional, tag = "14")]
3996    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3997}
3998#[derive(Clone, PartialEq, ::prost::Message)]
3999pub struct DiscoverBatchPoints {
4000    /// Name of the collection
4001    #[prost(string, tag = "1")]
4002    pub collection_name: ::prost::alloc::string::String,
4003    #[prost(message, repeated, tag = "2")]
4004    pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
4005    /// Options for specifying read consistency guarantees
4006    #[prost(message, optional, tag = "3")]
4007    pub read_consistency: ::core::option::Option<ReadConsistency>,
4008    /// If set, overrides global timeout setting for this request. Unit is seconds.
4009    #[prost(uint64, optional, tag = "4")]
4010    pub timeout: ::core::option::Option<u64>,
4011}
4012#[derive(Clone, PartialEq, ::prost::Message)]
4013pub struct CountPoints {
4014    /// Name of the collection
4015    #[prost(string, tag = "1")]
4016    pub collection_name: ::prost::alloc::string::String,
4017    /// Filter conditions - return only those points that satisfy the specified conditions
4018    #[prost(message, optional, tag = "2")]
4019    pub filter: ::core::option::Option<Filter>,
4020    /// If `true` - return exact count, if `false` - return approximate count
4021    #[prost(bool, optional, tag = "3")]
4022    pub exact: ::core::option::Option<bool>,
4023    /// Options for specifying read consistency guarantees
4024    #[prost(message, optional, tag = "4")]
4025    pub read_consistency: ::core::option::Option<ReadConsistency>,
4026    /// Specify in which shards to look for the points, if not specified - look in all shards
4027    #[prost(message, optional, tag = "5")]
4028    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4029    /// If set, overrides global timeout setting for this request. Unit is seconds.
4030    #[prost(uint64, optional, tag = "6")]
4031    pub timeout: ::core::option::Option<u64>,
4032}
4033#[derive(Clone, PartialEq, ::prost::Message)]
4034pub struct RecommendInput {
4035    /// Look for vectors closest to the vectors from these points
4036    #[prost(message, repeated, tag = "1")]
4037    pub positive: ::prost::alloc::vec::Vec<VectorInput>,
4038    /// Try to avoid vectors like the vector from these points
4039    #[prost(message, repeated, tag = "2")]
4040    pub negative: ::prost::alloc::vec::Vec<VectorInput>,
4041    /// How to use the provided vectors to find the results
4042    #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
4043    pub strategy: ::core::option::Option<i32>,
4044}
4045#[derive(Clone, PartialEq, ::prost::Message)]
4046pub struct ContextInputPair {
4047    /// A positive vector
4048    #[prost(message, optional, tag = "1")]
4049    pub positive: ::core::option::Option<VectorInput>,
4050    /// Repel from this vector
4051    #[prost(message, optional, tag = "2")]
4052    pub negative: ::core::option::Option<VectorInput>,
4053}
4054#[derive(Clone, PartialEq, ::prost::Message)]
4055pub struct DiscoverInput {
4056    /// Use this as the primary search objective
4057    #[prost(message, optional, tag = "1")]
4058    pub target: ::core::option::Option<VectorInput>,
4059    /// Search space will be constrained by these pairs of vectors
4060    #[prost(message, optional, tag = "2")]
4061    pub context: ::core::option::Option<ContextInput>,
4062}
4063#[derive(Clone, PartialEq, ::prost::Message)]
4064pub struct ContextInput {
4065    /// Search space will be constrained by these pairs of vectors
4066    #[prost(message, repeated, tag = "1")]
4067    pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
4068}
4069#[derive(Clone, PartialEq, ::prost::Message)]
4070pub struct Formula {
4071    #[prost(message, optional, tag = "1")]
4072    pub expression: ::core::option::Option<Expression>,
4073    #[prost(map = "string, message", tag = "2")]
4074    pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4075}
4076#[derive(Clone, PartialEq, ::prost::Message)]
4077pub struct Expression {
4078    #[prost(
4079        oneof = "expression::Variant",
4080        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
4081    )]
4082    pub variant: ::core::option::Option<expression::Variant>,
4083}
4084/// Nested message and enum types in `Expression`.
4085pub mod expression {
4086    #[derive(Clone, PartialEq, ::prost::Oneof)]
4087    pub enum Variant {
4088        #[prost(float, tag = "1")]
4089        Constant(f32),
4090        /// Payload key or reference to score.
4091        #[prost(string, tag = "2")]
4092        Variable(::prost::alloc::string::String),
4093        /// Payload condition. If true, becomes 1.0; otherwise 0.0
4094        #[prost(message, tag = "3")]
4095        Condition(super::Condition),
4096        /// Geographic distance in meters
4097        #[prost(message, tag = "4")]
4098        GeoDistance(super::GeoDistance),
4099        /// Date-time constant
4100        #[prost(string, tag = "5")]
4101        Datetime(::prost::alloc::string::String),
4102        /// Payload key with date-time values
4103        #[prost(string, tag = "6")]
4104        DatetimeKey(::prost::alloc::string::String),
4105        /// Multiply
4106        #[prost(message, tag = "7")]
4107        Mult(super::MultExpression),
4108        /// Sum
4109        #[prost(message, tag = "8")]
4110        Sum(super::SumExpression),
4111        /// Divide
4112        #[prost(message, tag = "9")]
4113        Div(::prost::alloc::boxed::Box<super::DivExpression>),
4114        /// Negate
4115        #[prost(message, tag = "10")]
4116        Neg(::prost::alloc::boxed::Box<super::Expression>),
4117        /// Absolute value
4118        #[prost(message, tag = "11")]
4119        Abs(::prost::alloc::boxed::Box<super::Expression>),
4120        /// Square root
4121        #[prost(message, tag = "12")]
4122        Sqrt(::prost::alloc::boxed::Box<super::Expression>),
4123        /// Power
4124        #[prost(message, tag = "13")]
4125        Pow(::prost::alloc::boxed::Box<super::PowExpression>),
4126        /// Exponential
4127        #[prost(message, tag = "14")]
4128        Exp(::prost::alloc::boxed::Box<super::Expression>),
4129        /// Logarithm
4130        #[prost(message, tag = "15")]
4131        Log10(::prost::alloc::boxed::Box<super::Expression>),
4132        /// Natural logarithm
4133        #[prost(message, tag = "16")]
4134        Ln(::prost::alloc::boxed::Box<super::Expression>),
4135        /// Exponential decay
4136        #[prost(message, tag = "17")]
4137        ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4138        /// Gaussian decay
4139        #[prost(message, tag = "18")]
4140        GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4141        /// Linear decay
4142        #[prost(message, tag = "19")]
4143        LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4144    }
4145}
4146#[derive(Clone, PartialEq, ::prost::Message)]
4147pub struct GeoDistance {
4148    #[prost(message, optional, tag = "1")]
4149    pub origin: ::core::option::Option<GeoPoint>,
4150    #[prost(string, tag = "2")]
4151    pub to: ::prost::alloc::string::String,
4152}
4153#[derive(Clone, PartialEq, ::prost::Message)]
4154pub struct MultExpression {
4155    #[prost(message, repeated, tag = "1")]
4156    pub mult: ::prost::alloc::vec::Vec<Expression>,
4157}
4158#[derive(Clone, PartialEq, ::prost::Message)]
4159pub struct SumExpression {
4160    #[prost(message, repeated, tag = "1")]
4161    pub sum: ::prost::alloc::vec::Vec<Expression>,
4162}
4163#[derive(Clone, PartialEq, ::prost::Message)]
4164pub struct DivExpression {
4165    #[prost(message, optional, boxed, tag = "1")]
4166    pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4167    #[prost(message, optional, boxed, tag = "2")]
4168    pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4169    #[prost(float, optional, tag = "3")]
4170    pub by_zero_default: ::core::option::Option<f32>,
4171}
4172#[derive(Clone, PartialEq, ::prost::Message)]
4173pub struct PowExpression {
4174    #[prost(message, optional, boxed, tag = "1")]
4175    pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4176    #[prost(message, optional, boxed, tag = "2")]
4177    pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4178}
4179#[derive(Clone, PartialEq, ::prost::Message)]
4180pub struct DecayParamsExpression {
4181    /// The variable to decay
4182    #[prost(message, optional, boxed, tag = "1")]
4183    pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4184    /// The target value to start decaying from. Defaults to 0.
4185    #[prost(message, optional, boxed, tag = "2")]
4186    pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4187    /// The scale factor of the decay, in terms of `x`. Defaults to 1.0. Must be a non-zero positive number.
4188    #[prost(float, optional, tag = "3")]
4189    pub scale: ::core::option::Option<f32>,
4190    /// The midpoint of the decay. Defaults to 0.5. Output will be this value when `|x - target| == scale`.
4191    #[prost(float, optional, tag = "4")]
4192    pub midpoint: ::core::option::Option<f32>,
4193}
4194#[derive(Clone, PartialEq, ::prost::Message)]
4195pub struct NearestInputWithMmr {
4196    /// The vector to search for nearest neighbors.
4197    #[prost(message, optional, tag = "1")]
4198    pub nearest: ::core::option::Option<VectorInput>,
4199    /// Perform MMR (Maximal Marginal Relevance) reranking after search,
4200    /// using the same vector in this query to calculate relevance.
4201    #[prost(message, optional, tag = "2")]
4202    pub mmr: ::core::option::Option<Mmr>,
4203}
4204/// Maximal Marginal Relevance (MMR) algorithm for re-ranking the points.
4205#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4206pub struct Mmr {
4207    /// Tunable parameter for the MMR algorithm.
4208    /// Determines the balance between diversity and relevance.
4209    ///
4210    /// A higher value favors diversity (dissimilarity to selected results),
4211    /// while a lower value favors relevance (similarity to the query vector).
4212    ///
4213    /// Must be in the range \[0, 1\].
4214    /// Default value is 0.5.
4215    #[prost(float, optional, tag = "2")]
4216    pub diversity: ::core::option::Option<f32>,
4217    /// The maximum number of candidates to consider for re-ranking.
4218    ///
4219    /// If not specified, the `limit` value is used.
4220    #[prost(uint32, optional, tag = "3")]
4221    pub candidates_limit: ::core::option::Option<u32>,
4222}
4223#[derive(Clone, PartialEq, ::prost::Message)]
4224pub struct Query {
4225    #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
4226    pub variant: ::core::option::Option<query::Variant>,
4227}
4228/// Nested message and enum types in `Query`.
4229pub mod query {
4230    #[derive(Clone, PartialEq, ::prost::Oneof)]
4231    pub enum Variant {
4232        /// Find the nearest neighbors to this vector.
4233        #[prost(message, tag = "1")]
4234        Nearest(super::VectorInput),
4235        /// Use multiple positive and negative vectors to find the results.
4236        #[prost(message, tag = "2")]
4237        Recommend(super::RecommendInput),
4238        /// Search for nearest points, but constrain the search space with context
4239        #[prost(message, tag = "3")]
4240        Discover(super::DiscoverInput),
4241        /// Return points that live in positive areas.
4242        #[prost(message, tag = "4")]
4243        Context(super::ContextInput),
4244        /// Order the points by a payload field.
4245        #[prost(message, tag = "5")]
4246        OrderBy(super::OrderBy),
4247        /// Fuse the results of multiple prefetches.
4248        #[prost(enumeration = "super::Fusion", tag = "6")]
4249        Fusion(i32),
4250        /// Sample points from the collection.
4251        #[prost(enumeration = "super::Sample", tag = "7")]
4252        Sample(i32),
4253        /// Score boosting via an arbitrary formula
4254        #[prost(message, tag = "8")]
4255        Formula(super::Formula),
4256        /// Search nearest neighbors, but re-rank based on the Maximal Marginal Relevance algorithm.
4257        #[prost(message, tag = "9")]
4258        NearestWithMmr(super::NearestInputWithMmr),
4259    }
4260}
4261#[derive(Clone, PartialEq, ::prost::Message)]
4262pub struct PrefetchQuery {
4263    /// Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
4264    #[prost(message, repeated, tag = "1")]
4265    pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4266    /// Query to perform. If missing, returns points ordered by their IDs.
4267    #[prost(message, optional, tag = "2")]
4268    pub query: ::core::option::Option<Query>,
4269    /// Define which vector to use for querying. If missing, the default vector is is used.
4270    #[prost(string, optional, tag = "3")]
4271    pub using: ::core::option::Option<::prost::alloc::string::String>,
4272    /// Filter conditions - return only those points that satisfy the specified conditions.
4273    #[prost(message, optional, tag = "4")]
4274    pub filter: ::core::option::Option<Filter>,
4275    /// Search params for when there is no prefetch.
4276    #[prost(message, optional, tag = "5")]
4277    pub params: ::core::option::Option<SearchParams>,
4278    /// Return points with scores better than this threshold.
4279    #[prost(float, optional, tag = "6")]
4280    pub score_threshold: ::core::option::Option<f32>,
4281    /// Max number of points. Default is 10
4282    #[prost(uint64, optional, tag = "7")]
4283    pub limit: ::core::option::Option<u64>,
4284    /// The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
4285    #[prost(message, optional, tag = "8")]
4286    pub lookup_from: ::core::option::Option<LookupLocation>,
4287}
4288#[derive(Clone, PartialEq, ::prost::Message)]
4289pub struct QueryPoints {
4290    /// Name of the collection
4291    #[prost(string, tag = "1")]
4292    pub collection_name: ::prost::alloc::string::String,
4293    /// Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
4294    #[prost(message, repeated, tag = "2")]
4295    pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4296    /// Query to perform. If missing, returns points ordered by their IDs.
4297    #[prost(message, optional, tag = "3")]
4298    pub query: ::core::option::Option<Query>,
4299    /// Define which vector to use for querying. If missing, the default vector is used.
4300    #[prost(string, optional, tag = "4")]
4301    pub using: ::core::option::Option<::prost::alloc::string::String>,
4302    /// Filter conditions - return only those points that satisfy the specified conditions.
4303    #[prost(message, optional, tag = "5")]
4304    pub filter: ::core::option::Option<Filter>,
4305    /// Search params for when there is no prefetch.
4306    #[prost(message, optional, tag = "6")]
4307    pub params: ::core::option::Option<SearchParams>,
4308    /// Return points with scores better than this threshold.
4309    #[prost(float, optional, tag = "7")]
4310    pub score_threshold: ::core::option::Option<f32>,
4311    /// Max number of points. Default is 10.
4312    #[prost(uint64, optional, tag = "8")]
4313    pub limit: ::core::option::Option<u64>,
4314    /// Offset of the result. Skip this many points. Default is 0.
4315    #[prost(uint64, optional, tag = "9")]
4316    pub offset: ::core::option::Option<u64>,
4317    /// Options for specifying which vectors to include into the response.
4318    #[prost(message, optional, tag = "10")]
4319    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4320    /// Options for specifying which payload to include or not.
4321    #[prost(message, optional, tag = "11")]
4322    pub with_payload: ::core::option::Option<WithPayloadSelector>,
4323    /// Options for specifying read consistency guarantees.
4324    #[prost(message, optional, tag = "12")]
4325    pub read_consistency: ::core::option::Option<ReadConsistency>,
4326    /// Specify in which shards to look for the points, if not specified - look in all shards.
4327    #[prost(message, optional, tag = "13")]
4328    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4329    /// The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
4330    #[prost(message, optional, tag = "14")]
4331    pub lookup_from: ::core::option::Option<LookupLocation>,
4332    /// If set, overrides global timeout setting for this request. Unit is seconds.
4333    #[prost(uint64, optional, tag = "15")]
4334    pub timeout: ::core::option::Option<u64>,
4335}
4336#[derive(Clone, PartialEq, ::prost::Message)]
4337pub struct QueryBatchPoints {
4338    #[prost(string, tag = "1")]
4339    pub collection_name: ::prost::alloc::string::String,
4340    #[prost(message, repeated, tag = "2")]
4341    pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
4342    /// Options for specifying read consistency guarantees
4343    #[prost(message, optional, tag = "3")]
4344    pub read_consistency: ::core::option::Option<ReadConsistency>,
4345    /// If set, overrides global timeout setting for this request. Unit is seconds.
4346    #[prost(uint64, optional, tag = "4")]
4347    pub timeout: ::core::option::Option<u64>,
4348}
4349#[derive(Clone, PartialEq, ::prost::Message)]
4350pub struct QueryPointGroups {
4351    /// Name of the collection
4352    #[prost(string, tag = "1")]
4353    pub collection_name: ::prost::alloc::string::String,
4354    /// Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.
4355    #[prost(message, repeated, tag = "2")]
4356    pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4357    /// Query to perform. If missing, returns points ordered by their IDs.
4358    #[prost(message, optional, tag = "3")]
4359    pub query: ::core::option::Option<Query>,
4360    /// Define which vector to use for querying. If missing, the default vector is used.
4361    #[prost(string, optional, tag = "4")]
4362    pub using: ::core::option::Option<::prost::alloc::string::String>,
4363    /// Filter conditions - return only those points that satisfy the specified conditions.
4364    #[prost(message, optional, tag = "5")]
4365    pub filter: ::core::option::Option<Filter>,
4366    /// Search params for when there is no prefetch.
4367    #[prost(message, optional, tag = "6")]
4368    pub params: ::core::option::Option<SearchParams>,
4369    /// Return points with scores better than this threshold.
4370    #[prost(float, optional, tag = "7")]
4371    pub score_threshold: ::core::option::Option<f32>,
4372    /// Options for specifying which payload to include or not
4373    #[prost(message, optional, tag = "8")]
4374    pub with_payload: ::core::option::Option<WithPayloadSelector>,
4375    /// Options for specifying which vectors to include into response
4376    #[prost(message, optional, tag = "9")]
4377    pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4378    /// The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector
4379    #[prost(message, optional, tag = "10")]
4380    pub lookup_from: ::core::option::Option<LookupLocation>,
4381    /// Max number of points. Default is 3.
4382    #[prost(uint64, optional, tag = "11")]
4383    pub limit: ::core::option::Option<u64>,
4384    /// Maximum amount of points to return per group. Default to 10.
4385    #[prost(uint64, optional, tag = "12")]
4386    pub group_size: ::core::option::Option<u64>,
4387    /// Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups.
4388    #[prost(string, tag = "13")]
4389    pub group_by: ::prost::alloc::string::String,
4390    /// Options for specifying read consistency guarantees
4391    #[prost(message, optional, tag = "14")]
4392    pub read_consistency: ::core::option::Option<ReadConsistency>,
4393    /// Options for specifying how to use the group id to lookup points in another collection
4394    #[prost(message, optional, tag = "15")]
4395    pub with_lookup: ::core::option::Option<WithLookup>,
4396    /// If set, overrides global timeout setting for this request. Unit is seconds.
4397    #[prost(uint64, optional, tag = "16")]
4398    pub timeout: ::core::option::Option<u64>,
4399    /// Specify in which shards to look for the points, if not specified - look in all shards
4400    #[prost(message, optional, tag = "17")]
4401    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4402}
4403#[derive(Clone, PartialEq, ::prost::Message)]
4404pub struct FacetCounts {
4405    /// Name of the collection
4406    #[prost(string, tag = "1")]
4407    pub collection_name: ::prost::alloc::string::String,
4408    /// Payload key of the facet
4409    #[prost(string, tag = "2")]
4410    pub key: ::prost::alloc::string::String,
4411    /// Filter conditions - return only those points that satisfy the specified conditions.
4412    #[prost(message, optional, tag = "3")]
4413    pub filter: ::core::option::Option<Filter>,
4414    /// Max number of facets. Default is 10.
4415    #[prost(uint64, optional, tag = "4")]
4416    pub limit: ::core::option::Option<u64>,
4417    /// If true, return exact counts, slower but useful for debugging purposes. Default is false.
4418    #[prost(bool, optional, tag = "5")]
4419    pub exact: ::core::option::Option<bool>,
4420    /// If set, overrides global timeout setting for this request. Unit is seconds.
4421    #[prost(uint64, optional, tag = "6")]
4422    pub timeout: ::core::option::Option<u64>,
4423    /// Options for specifying read consistency guarantees
4424    #[prost(message, optional, tag = "7")]
4425    pub read_consistency: ::core::option::Option<ReadConsistency>,
4426    /// Specify in which shards to look for the points, if not specified - look in all shards
4427    #[prost(message, optional, tag = "8")]
4428    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4429}
4430#[derive(Clone, PartialEq, ::prost::Message)]
4431pub struct FacetValue {
4432    #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
4433    pub variant: ::core::option::Option<facet_value::Variant>,
4434}
4435/// Nested message and enum types in `FacetValue`.
4436pub mod facet_value {
4437    #[derive(Clone, PartialEq, ::prost::Oneof)]
4438    pub enum Variant {
4439        /// String value from the facet
4440        #[prost(string, tag = "1")]
4441        StringValue(::prost::alloc::string::String),
4442        /// Integer value from the facet
4443        #[prost(int64, tag = "2")]
4444        IntegerValue(i64),
4445        /// Boolean value from the facet
4446        #[prost(bool, tag = "3")]
4447        BoolValue(bool),
4448    }
4449}
4450#[derive(Clone, PartialEq, ::prost::Message)]
4451pub struct FacetHit {
4452    /// Value from the facet
4453    #[prost(message, optional, tag = "1")]
4454    pub value: ::core::option::Option<FacetValue>,
4455    /// Number of points with this value
4456    #[prost(uint64, tag = "2")]
4457    pub count: u64,
4458}
4459#[derive(Clone, PartialEq, ::prost::Message)]
4460pub struct SearchMatrixPoints {
4461    /// Name of the collection
4462    #[prost(string, tag = "1")]
4463    pub collection_name: ::prost::alloc::string::String,
4464    /// Filter conditions - return only those points that satisfy the specified conditions.
4465    #[prost(message, optional, tag = "2")]
4466    pub filter: ::core::option::Option<Filter>,
4467    /// How many points to select and search within. Default is 10.
4468    #[prost(uint64, optional, tag = "3")]
4469    pub sample: ::core::option::Option<u64>,
4470    /// How many neighbours per sample to find. Default is 3.
4471    #[prost(uint64, optional, tag = "4")]
4472    pub limit: ::core::option::Option<u64>,
4473    /// Define which vector to use for querying. If missing, the default vector is is used.
4474    #[prost(string, optional, tag = "5")]
4475    pub using: ::core::option::Option<::prost::alloc::string::String>,
4476    /// If set, overrides global timeout setting for this request. Unit is seconds.
4477    #[prost(uint64, optional, tag = "6")]
4478    pub timeout: ::core::option::Option<u64>,
4479    /// Options for specifying read consistency guarantees
4480    #[prost(message, optional, tag = "7")]
4481    pub read_consistency: ::core::option::Option<ReadConsistency>,
4482    /// Specify in which shards to look for the points, if not specified - look in all shards
4483    #[prost(message, optional, tag = "8")]
4484    pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4485}
4486#[derive(Clone, PartialEq, ::prost::Message)]
4487pub struct SearchMatrixPairs {
4488    /// List of pairs of points with scores
4489    #[prost(message, repeated, tag = "1")]
4490    pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
4491}
4492#[derive(Clone, PartialEq, ::prost::Message)]
4493pub struct SearchMatrixPair {
4494    /// first id of the pair
4495    #[prost(message, optional, tag = "1")]
4496    pub a: ::core::option::Option<PointId>,
4497    /// second id of the pair
4498    #[prost(message, optional, tag = "2")]
4499    pub b: ::core::option::Option<PointId>,
4500    /// score of the pair
4501    #[prost(float, tag = "3")]
4502    pub score: f32,
4503}
4504#[derive(Clone, PartialEq, ::prost::Message)]
4505pub struct SearchMatrixOffsets {
4506    /// Row indices of the matrix
4507    #[prost(uint64, repeated, tag = "1")]
4508    pub offsets_row: ::prost::alloc::vec::Vec<u64>,
4509    /// Column indices of the matrix
4510    #[prost(uint64, repeated, tag = "2")]
4511    pub offsets_col: ::prost::alloc::vec::Vec<u64>,
4512    /// Scores associated with matrix coordinates
4513    #[prost(float, repeated, tag = "3")]
4514    pub scores: ::prost::alloc::vec::Vec<f32>,
4515    /// Ids of the points in order
4516    #[prost(message, repeated, tag = "4")]
4517    pub ids: ::prost::alloc::vec::Vec<PointId>,
4518}
4519#[derive(Clone, PartialEq, ::prost::Message)]
4520pub struct PointsUpdateOperation {
4521    #[prost(
4522        oneof = "points_update_operation::Operation",
4523        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
4524    )]
4525    pub operation: ::core::option::Option<points_update_operation::Operation>,
4526}
4527/// Nested message and enum types in `PointsUpdateOperation`.
4528pub mod points_update_operation {
4529    #[derive(Clone, PartialEq, ::prost::Message)]
4530    pub struct PointStructList {
4531        #[prost(message, repeated, tag = "1")]
4532        pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
4533        /// Option for custom sharding to specify used shard keys
4534        #[prost(message, optional, tag = "2")]
4535        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4536    }
4537    #[derive(Clone, PartialEq, ::prost::Message)]
4538    pub struct SetPayload {
4539        #[prost(map = "string, message", tag = "1")]
4540        pub payload: ::std::collections::HashMap<
4541            ::prost::alloc::string::String,
4542            super::Value,
4543        >,
4544        /// Affected points
4545        #[prost(message, optional, tag = "2")]
4546        pub points_selector: ::core::option::Option<super::PointsSelector>,
4547        /// Option for custom sharding to specify used shard keys
4548        #[prost(message, optional, tag = "3")]
4549        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4550        /// Option for indicate property of payload
4551        #[prost(string, optional, tag = "4")]
4552        pub key: ::core::option::Option<::prost::alloc::string::String>,
4553    }
4554    #[derive(Clone, PartialEq, ::prost::Message)]
4555    pub struct OverwritePayload {
4556        #[prost(map = "string, message", tag = "1")]
4557        pub payload: ::std::collections::HashMap<
4558            ::prost::alloc::string::String,
4559            super::Value,
4560        >,
4561        /// Affected points
4562        #[prost(message, optional, tag = "2")]
4563        pub points_selector: ::core::option::Option<super::PointsSelector>,
4564        /// Option for custom sharding to specify used shard keys
4565        #[prost(message, optional, tag = "3")]
4566        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4567        /// Option for indicate property of payload
4568        #[prost(string, optional, tag = "4")]
4569        pub key: ::core::option::Option<::prost::alloc::string::String>,
4570    }
4571    #[derive(Clone, PartialEq, ::prost::Message)]
4572    pub struct DeletePayload {
4573        #[prost(string, repeated, tag = "1")]
4574        pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4575        /// Affected points
4576        #[prost(message, optional, tag = "2")]
4577        pub points_selector: ::core::option::Option<super::PointsSelector>,
4578        /// Option for custom sharding to specify used shard keys
4579        #[prost(message, optional, tag = "3")]
4580        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4581    }
4582    #[derive(Clone, PartialEq, ::prost::Message)]
4583    pub struct UpdateVectors {
4584        /// List of points and vectors to update
4585        #[prost(message, repeated, tag = "1")]
4586        pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
4587        /// Option for custom sharding to specify used shard keys
4588        #[prost(message, optional, tag = "2")]
4589        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4590    }
4591    #[derive(Clone, PartialEq, ::prost::Message)]
4592    pub struct DeleteVectors {
4593        /// Affected points
4594        #[prost(message, optional, tag = "1")]
4595        pub points_selector: ::core::option::Option<super::PointsSelector>,
4596        /// List of vector names to delete
4597        #[prost(message, optional, tag = "2")]
4598        pub vectors: ::core::option::Option<super::VectorsSelector>,
4599        /// Option for custom sharding to specify used shard keys
4600        #[prost(message, optional, tag = "3")]
4601        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4602    }
4603    #[derive(Clone, PartialEq, ::prost::Message)]
4604    pub struct DeletePoints {
4605        /// Affected points
4606        #[prost(message, optional, tag = "1")]
4607        pub points: ::core::option::Option<super::PointsSelector>,
4608        /// Option for custom sharding to specify used shard keys
4609        #[prost(message, optional, tag = "2")]
4610        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4611    }
4612    #[derive(Clone, PartialEq, ::prost::Message)]
4613    pub struct ClearPayload {
4614        /// Affected points
4615        #[prost(message, optional, tag = "1")]
4616        pub points: ::core::option::Option<super::PointsSelector>,
4617        /// Option for custom sharding to specify used shard keys
4618        #[prost(message, optional, tag = "2")]
4619        pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4620    }
4621    #[derive(Clone, PartialEq, ::prost::Oneof)]
4622    pub enum Operation {
4623        #[prost(message, tag = "1")]
4624        Upsert(PointStructList),
4625        #[prost(message, tag = "2")]
4626        #[deprecated(since = "1.7.0", note = "use `DeletePoints` instead")]
4627        DeleteDeprecated(super::PointsSelector),
4628        #[prost(message, tag = "3")]
4629        SetPayload(SetPayload),
4630        #[prost(message, tag = "4")]
4631        OverwritePayload(OverwritePayload),
4632        #[prost(message, tag = "5")]
4633        DeletePayload(DeletePayload),
4634        #[prost(message, tag = "6")]
4635        #[deprecated(since = "1.7.0", note = "use `ClearPayload` instead")]
4636        ClearPayloadDeprecated(super::PointsSelector),
4637        #[prost(message, tag = "7")]
4638        UpdateVectors(UpdateVectors),
4639        #[prost(message, tag = "8")]
4640        DeleteVectors(DeleteVectors),
4641        #[prost(message, tag = "9")]
4642        DeletePoints(DeletePoints),
4643        #[prost(message, tag = "10")]
4644        ClearPayload(ClearPayload),
4645    }
4646}
4647#[derive(Clone, PartialEq, ::prost::Message)]
4648pub struct UpdateBatchPoints {
4649    /// name of the collection
4650    #[prost(string, tag = "1")]
4651    pub collection_name: ::prost::alloc::string::String,
4652    /// Wait until the changes have been applied?
4653    #[prost(bool, optional, tag = "2")]
4654    pub wait: ::core::option::Option<bool>,
4655    #[prost(message, repeated, tag = "3")]
4656    pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
4657    /// Write ordering guarantees
4658    #[prost(message, optional, tag = "4")]
4659    pub ordering: ::core::option::Option<WriteOrdering>,
4660}
4661#[derive(Clone, PartialEq, ::prost::Message)]
4662pub struct PointsOperationResponse {
4663    #[prost(message, optional, tag = "1")]
4664    pub result: ::core::option::Option<UpdateResult>,
4665    /// Time spent to process
4666    #[prost(double, tag = "2")]
4667    pub time: f64,
4668    #[prost(message, optional, tag = "3")]
4669    pub usage: ::core::option::Option<Usage>,
4670}
4671#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4672pub struct UpdateResult {
4673    /// Number of operation
4674    #[prost(uint64, optional, tag = "1")]
4675    pub operation_id: ::core::option::Option<u64>,
4676    /// Operation status
4677    #[prost(enumeration = "UpdateStatus", tag = "2")]
4678    pub status: i32,
4679}
4680#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4681pub struct OrderValue {
4682    #[prost(oneof = "order_value::Variant", tags = "1, 2")]
4683    pub variant: ::core::option::Option<order_value::Variant>,
4684}
4685/// Nested message and enum types in `OrderValue`.
4686pub mod order_value {
4687    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4688    pub enum Variant {
4689        #[prost(int64, tag = "1")]
4690        Int(i64),
4691        #[prost(double, tag = "2")]
4692        Float(f64),
4693    }
4694}
4695#[derive(Clone, PartialEq, ::prost::Message)]
4696pub struct ScoredPoint {
4697    /// Point id
4698    #[prost(message, optional, tag = "1")]
4699    pub id: ::core::option::Option<PointId>,
4700    /// Payload
4701    #[prost(map = "string, message", tag = "2")]
4702    pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4703    /// Similarity score
4704    #[prost(float, tag = "3")]
4705    pub score: f32,
4706    /// Last update operation applied to this point
4707    #[prost(uint64, tag = "5")]
4708    pub version: u64,
4709    /// Vectors to search
4710    #[prost(message, optional, tag = "6")]
4711    pub vectors: ::core::option::Option<VectorsOutput>,
4712    /// Shard key
4713    #[prost(message, optional, tag = "7")]
4714    pub shard_key: ::core::option::Option<ShardKey>,
4715    /// Order by value
4716    #[prost(message, optional, tag = "8")]
4717    pub order_value: ::core::option::Option<OrderValue>,
4718}
4719#[derive(Clone, PartialEq, ::prost::Message)]
4720pub struct GroupId {
4721    #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
4722    pub kind: ::core::option::Option<group_id::Kind>,
4723}
4724/// Nested message and enum types in `GroupId`.
4725pub mod group_id {
4726    #[derive(Clone, PartialEq, ::prost::Oneof)]
4727    pub enum Kind {
4728        /// Represents a double value.
4729        #[prost(uint64, tag = "1")]
4730        UnsignedValue(u64),
4731        /// Represents an integer value
4732        #[prost(int64, tag = "2")]
4733        IntegerValue(i64),
4734        /// Represents a string value.
4735        #[prost(string, tag = "3")]
4736        StringValue(::prost::alloc::string::String),
4737    }
4738}
4739#[derive(Clone, PartialEq, ::prost::Message)]
4740pub struct PointGroup {
4741    /// Group id
4742    #[prost(message, optional, tag = "1")]
4743    pub id: ::core::option::Option<GroupId>,
4744    /// Points in the group
4745    #[prost(message, repeated, tag = "2")]
4746    pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
4747    /// Point(s) from the lookup collection that matches the group id
4748    #[prost(message, optional, tag = "3")]
4749    pub lookup: ::core::option::Option<RetrievedPoint>,
4750}
4751#[derive(Clone, PartialEq, ::prost::Message)]
4752pub struct GroupsResult {
4753    /// Groups
4754    #[prost(message, repeated, tag = "1")]
4755    pub groups: ::prost::alloc::vec::Vec<PointGroup>,
4756}
4757#[derive(Clone, PartialEq, ::prost::Message)]
4758pub struct SearchResponse {
4759    #[prost(message, repeated, tag = "1")]
4760    pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
4761    /// Time spent to process
4762    #[prost(double, tag = "2")]
4763    pub time: f64,
4764    #[prost(message, optional, tag = "3")]
4765    pub usage: ::core::option::Option<Usage>,
4766}
4767#[derive(Clone, PartialEq, ::prost::Message)]
4768pub struct QueryResponse {
4769    #[prost(message, repeated, tag = "1")]
4770    pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
4771    /// Time spent to process
4772    #[prost(double, tag = "2")]
4773    pub time: f64,
4774    #[prost(message, optional, tag = "3")]
4775    pub usage: ::core::option::Option<Usage>,
4776}
4777#[derive(Clone, PartialEq, ::prost::Message)]
4778pub struct QueryBatchResponse {
4779    #[prost(message, repeated, tag = "1")]
4780    pub result: ::prost::alloc::vec::Vec<BatchResult>,
4781    /// Time spent to process
4782    #[prost(double, tag = "2")]
4783    pub time: f64,
4784    #[prost(message, optional, tag = "3")]
4785    pub usage: ::core::option::Option<Usage>,
4786}
4787#[derive(Clone, PartialEq, ::prost::Message)]
4788pub struct QueryGroupsResponse {
4789    #[prost(message, optional, tag = "1")]
4790    pub result: ::core::option::Option<GroupsResult>,
4791    /// Time spent to process
4792    #[prost(double, tag = "2")]
4793    pub time: f64,
4794    #[prost(message, optional, tag = "3")]
4795    pub usage: ::core::option::Option<Usage>,
4796}
4797#[derive(Clone, PartialEq, ::prost::Message)]
4798pub struct BatchResult {
4799    #[prost(message, repeated, tag = "1")]
4800    pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
4801}
4802#[derive(Clone, PartialEq, ::prost::Message)]
4803pub struct SearchBatchResponse {
4804    #[prost(message, repeated, tag = "1")]
4805    pub result: ::prost::alloc::vec::Vec<BatchResult>,
4806    /// Time spent to process
4807    #[prost(double, tag = "2")]
4808    pub time: f64,
4809    #[prost(message, optional, tag = "3")]
4810    pub usage: ::core::option::Option<Usage>,
4811}
4812#[derive(Clone, PartialEq, ::prost::Message)]
4813pub struct SearchGroupsResponse {
4814    #[prost(message, optional, tag = "1")]
4815    pub result: ::core::option::Option<GroupsResult>,
4816    /// Time spent to process
4817    #[prost(double, tag = "2")]
4818    pub time: f64,
4819    #[prost(message, optional, tag = "3")]
4820    pub usage: ::core::option::Option<Usage>,
4821}
4822#[derive(Clone, PartialEq, ::prost::Message)]
4823pub struct CountResponse {
4824    #[prost(message, optional, tag = "1")]
4825    pub result: ::core::option::Option<CountResult>,
4826    /// Time spent to process
4827    #[prost(double, tag = "2")]
4828    pub time: f64,
4829    #[prost(message, optional, tag = "3")]
4830    pub usage: ::core::option::Option<Usage>,
4831}
4832#[derive(Clone, PartialEq, ::prost::Message)]
4833pub struct ScrollResponse {
4834    /// Use this offset for the next query
4835    #[prost(message, optional, tag = "1")]
4836    pub next_page_offset: ::core::option::Option<PointId>,
4837    #[prost(message, repeated, tag = "2")]
4838    pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
4839    /// Time spent to process
4840    #[prost(double, tag = "3")]
4841    pub time: f64,
4842    #[prost(message, optional, tag = "4")]
4843    pub usage: ::core::option::Option<Usage>,
4844}
4845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4846pub struct CountResult {
4847    #[prost(uint64, tag = "1")]
4848    pub count: u64,
4849}
4850#[derive(Clone, PartialEq, ::prost::Message)]
4851pub struct RetrievedPoint {
4852    #[prost(message, optional, tag = "1")]
4853    pub id: ::core::option::Option<PointId>,
4854    #[prost(map = "string, message", tag = "2")]
4855    pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4856    #[prost(message, optional, tag = "4")]
4857    pub vectors: ::core::option::Option<VectorsOutput>,
4858    /// Shard key
4859    #[prost(message, optional, tag = "5")]
4860    pub shard_key: ::core::option::Option<ShardKey>,
4861    /// Order-by value
4862    #[prost(message, optional, tag = "6")]
4863    pub order_value: ::core::option::Option<OrderValue>,
4864}
4865#[derive(Clone, PartialEq, ::prost::Message)]
4866pub struct GetResponse {
4867    #[prost(message, repeated, tag = "1")]
4868    pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
4869    /// Time spent to process
4870    #[prost(double, tag = "2")]
4871    pub time: f64,
4872    #[prost(message, optional, tag = "3")]
4873    pub usage: ::core::option::Option<Usage>,
4874}
4875#[derive(Clone, PartialEq, ::prost::Message)]
4876pub struct RecommendResponse {
4877    #[prost(message, repeated, tag = "1")]
4878    pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
4879    /// Time spent to process
4880    #[prost(double, tag = "2")]
4881    pub time: f64,
4882    #[prost(message, optional, tag = "3")]
4883    pub usage: ::core::option::Option<Usage>,
4884}
4885#[derive(Clone, PartialEq, ::prost::Message)]
4886pub struct RecommendBatchResponse {
4887    #[prost(message, repeated, tag = "1")]
4888    pub result: ::prost::alloc::vec::Vec<BatchResult>,
4889    /// Time spent to process
4890    #[prost(double, tag = "2")]
4891    pub time: f64,
4892    #[prost(message, optional, tag = "3")]
4893    pub usage: ::core::option::Option<Usage>,
4894}
4895#[derive(Clone, PartialEq, ::prost::Message)]
4896pub struct DiscoverResponse {
4897    #[prost(message, repeated, tag = "1")]
4898    pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
4899    /// Time spent to process
4900    #[prost(double, tag = "2")]
4901    pub time: f64,
4902    #[prost(message, optional, tag = "3")]
4903    pub usage: ::core::option::Option<Usage>,
4904}
4905#[derive(Clone, PartialEq, ::prost::Message)]
4906pub struct DiscoverBatchResponse {
4907    #[prost(message, repeated, tag = "1")]
4908    pub result: ::prost::alloc::vec::Vec<BatchResult>,
4909    /// Time spent to process
4910    #[prost(double, tag = "2")]
4911    pub time: f64,
4912    #[prost(message, optional, tag = "3")]
4913    pub usage: ::core::option::Option<Usage>,
4914}
4915#[derive(Clone, PartialEq, ::prost::Message)]
4916pub struct RecommendGroupsResponse {
4917    #[prost(message, optional, tag = "1")]
4918    pub result: ::core::option::Option<GroupsResult>,
4919    /// Time spent to process
4920    #[prost(double, tag = "2")]
4921    pub time: f64,
4922    #[prost(message, optional, tag = "3")]
4923    pub usage: ::core::option::Option<Usage>,
4924}
4925#[derive(Clone, PartialEq, ::prost::Message)]
4926pub struct UpdateBatchResponse {
4927    #[prost(message, repeated, tag = "1")]
4928    pub result: ::prost::alloc::vec::Vec<UpdateResult>,
4929    /// Time spent to process
4930    #[prost(double, tag = "2")]
4931    pub time: f64,
4932    #[prost(message, optional, tag = "3")]
4933    pub usage: ::core::option::Option<Usage>,
4934}
4935#[derive(Clone, PartialEq, ::prost::Message)]
4936pub struct FacetResponse {
4937    #[prost(message, repeated, tag = "1")]
4938    pub hits: ::prost::alloc::vec::Vec<FacetHit>,
4939    /// Time spent to process
4940    #[prost(double, tag = "2")]
4941    pub time: f64,
4942}
4943#[derive(Clone, PartialEq, ::prost::Message)]
4944pub struct SearchMatrixPairsResponse {
4945    #[prost(message, optional, tag = "1")]
4946    pub result: ::core::option::Option<SearchMatrixPairs>,
4947    /// Time spent to process
4948    #[prost(double, tag = "2")]
4949    pub time: f64,
4950    #[prost(message, optional, tag = "3")]
4951    pub usage: ::core::option::Option<Usage>,
4952}
4953#[derive(Clone, PartialEq, ::prost::Message)]
4954pub struct SearchMatrixOffsetsResponse {
4955    #[prost(message, optional, tag = "1")]
4956    pub result: ::core::option::Option<SearchMatrixOffsets>,
4957    /// Time spent to process
4958    #[prost(double, tag = "2")]
4959    pub time: f64,
4960    #[prost(message, optional, tag = "3")]
4961    pub usage: ::core::option::Option<Usage>,
4962}
4963#[derive(Clone, PartialEq, ::prost::Message)]
4964pub struct Filter {
4965    /// At least one of those conditions should match
4966    #[prost(message, repeated, tag = "1")]
4967    pub should: ::prost::alloc::vec::Vec<Condition>,
4968    /// All conditions must match
4969    #[prost(message, repeated, tag = "2")]
4970    pub must: ::prost::alloc::vec::Vec<Condition>,
4971    /// All conditions must NOT match
4972    #[prost(message, repeated, tag = "3")]
4973    pub must_not: ::prost::alloc::vec::Vec<Condition>,
4974    /// At least minimum amount of given conditions should match
4975    #[prost(message, optional, tag = "4")]
4976    pub min_should: ::core::option::Option<MinShould>,
4977}
4978#[derive(Clone, PartialEq, ::prost::Message)]
4979pub struct MinShould {
4980    #[prost(message, repeated, tag = "1")]
4981    pub conditions: ::prost::alloc::vec::Vec<Condition>,
4982    #[prost(uint64, tag = "2")]
4983    pub min_count: u64,
4984}
4985#[derive(Clone, PartialEq, ::prost::Message)]
4986pub struct Condition {
4987    #[prost(oneof = "condition::ConditionOneOf", tags = "1, 2, 3, 4, 5, 6, 7")]
4988    pub condition_one_of: ::core::option::Option<condition::ConditionOneOf>,
4989}
4990/// Nested message and enum types in `Condition`.
4991pub mod condition {
4992    #[derive(Clone, PartialEq, ::prost::Oneof)]
4993    pub enum ConditionOneOf {
4994        #[prost(message, tag = "1")]
4995        Field(super::FieldCondition),
4996        #[prost(message, tag = "2")]
4997        IsEmpty(super::IsEmptyCondition),
4998        #[prost(message, tag = "3")]
4999        HasId(super::HasIdCondition),
5000        #[prost(message, tag = "4")]
5001        Filter(super::Filter),
5002        #[prost(message, tag = "5")]
5003        IsNull(super::IsNullCondition),
5004        #[prost(message, tag = "6")]
5005        Nested(super::NestedCondition),
5006        #[prost(message, tag = "7")]
5007        HasVector(super::HasVectorCondition),
5008    }
5009}
5010#[derive(Clone, PartialEq, ::prost::Message)]
5011pub struct IsEmptyCondition {
5012    #[prost(string, tag = "1")]
5013    pub key: ::prost::alloc::string::String,
5014}
5015#[derive(Clone, PartialEq, ::prost::Message)]
5016pub struct IsNullCondition {
5017    #[prost(string, tag = "1")]
5018    pub key: ::prost::alloc::string::String,
5019}
5020#[derive(Clone, PartialEq, ::prost::Message)]
5021pub struct HasIdCondition {
5022    #[prost(message, repeated, tag = "1")]
5023    pub has_id: ::prost::alloc::vec::Vec<PointId>,
5024}
5025#[derive(Clone, PartialEq, ::prost::Message)]
5026pub struct HasVectorCondition {
5027    #[prost(string, tag = "1")]
5028    pub has_vector: ::prost::alloc::string::String,
5029}
5030#[derive(Clone, PartialEq, ::prost::Message)]
5031pub struct NestedCondition {
5032    /// Path to nested object
5033    #[prost(string, tag = "1")]
5034    pub key: ::prost::alloc::string::String,
5035    /// Filter condition
5036    #[prost(message, optional, tag = "2")]
5037    pub filter: ::core::option::Option<Filter>,
5038}
5039#[derive(Clone, PartialEq, ::prost::Message)]
5040pub struct FieldCondition {
5041    #[prost(string, tag = "1")]
5042    pub key: ::prost::alloc::string::String,
5043    /// Check if point has field with a given value
5044    #[prost(message, optional, tag = "2")]
5045    pub r#match: ::core::option::Option<Match>,
5046    /// Check if points value lies in a given range
5047    #[prost(message, optional, tag = "3")]
5048    pub range: ::core::option::Option<Range>,
5049    /// Check if points geolocation lies in a given area
5050    #[prost(message, optional, tag = "4")]
5051    pub geo_bounding_box: ::core::option::Option<GeoBoundingBox>,
5052    /// Check if geo point is within a given radius
5053    #[prost(message, optional, tag = "5")]
5054    pub geo_radius: ::core::option::Option<GeoRadius>,
5055    /// Check number of values for a specific field
5056    #[prost(message, optional, tag = "6")]
5057    pub values_count: ::core::option::Option<ValuesCount>,
5058    /// Check if geo point is within a given polygon
5059    #[prost(message, optional, tag = "7")]
5060    pub geo_polygon: ::core::option::Option<GeoPolygon>,
5061    /// Check if datetime is within a given range
5062    #[prost(message, optional, tag = "8")]
5063    pub datetime_range: ::core::option::Option<DatetimeRange>,
5064    /// Check if field is empty
5065    #[prost(bool, optional, tag = "9")]
5066    pub is_empty: ::core::option::Option<bool>,
5067    /// Check if field is null
5068    #[prost(bool, optional, tag = "10")]
5069    pub is_null: ::core::option::Option<bool>,
5070}
5071#[derive(Clone, PartialEq, ::prost::Message)]
5072pub struct Match {
5073    #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
5074    pub match_value: ::core::option::Option<r#match::MatchValue>,
5075}
5076/// Nested message and enum types in `Match`.
5077pub mod r#match {
5078    #[derive(Clone, PartialEq, ::prost::Oneof)]
5079    pub enum MatchValue {
5080        /// Match string keyword
5081        #[prost(string, tag = "1")]
5082        Keyword(::prost::alloc::string::String),
5083        /// Match integer
5084        #[prost(int64, tag = "2")]
5085        Integer(i64),
5086        /// Match boolean
5087        #[prost(bool, tag = "3")]
5088        Boolean(bool),
5089        /// Match text
5090        #[prost(string, tag = "4")]
5091        Text(::prost::alloc::string::String),
5092        /// Match multiple keywords
5093        #[prost(message, tag = "5")]
5094        Keywords(super::RepeatedStrings),
5095        /// Match multiple integers
5096        #[prost(message, tag = "6")]
5097        Integers(super::RepeatedIntegers),
5098        /// Match any other value except those integers
5099        #[prost(message, tag = "7")]
5100        ExceptIntegers(super::RepeatedIntegers),
5101        /// Match any other value except those keywords
5102        #[prost(message, tag = "8")]
5103        ExceptKeywords(super::RepeatedStrings),
5104        /// Match phrase text
5105        #[prost(string, tag = "9")]
5106        Phrase(::prost::alloc::string::String),
5107    }
5108}
5109#[derive(Clone, PartialEq, ::prost::Message)]
5110pub struct RepeatedStrings {
5111    #[prost(string, repeated, tag = "1")]
5112    pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5113}
5114#[derive(Clone, PartialEq, ::prost::Message)]
5115pub struct RepeatedIntegers {
5116    #[prost(int64, repeated, tag = "1")]
5117    pub integers: ::prost::alloc::vec::Vec<i64>,
5118}
5119#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5120pub struct Range {
5121    #[prost(double, optional, tag = "1")]
5122    pub lt: ::core::option::Option<f64>,
5123    #[prost(double, optional, tag = "2")]
5124    pub gt: ::core::option::Option<f64>,
5125    #[prost(double, optional, tag = "3")]
5126    pub gte: ::core::option::Option<f64>,
5127    #[prost(double, optional, tag = "4")]
5128    pub lte: ::core::option::Option<f64>,
5129}
5130#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5131pub struct DatetimeRange {
5132    #[prost(message, optional, tag = "1")]
5133    pub lt: ::core::option::Option<::prost_types::Timestamp>,
5134    #[prost(message, optional, tag = "2")]
5135    pub gt: ::core::option::Option<::prost_types::Timestamp>,
5136    #[prost(message, optional, tag = "3")]
5137    pub gte: ::core::option::Option<::prost_types::Timestamp>,
5138    #[prost(message, optional, tag = "4")]
5139    pub lte: ::core::option::Option<::prost_types::Timestamp>,
5140}
5141#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5142pub struct GeoBoundingBox {
5143    /// north-west corner
5144    #[prost(message, optional, tag = "1")]
5145    pub top_left: ::core::option::Option<GeoPoint>,
5146    /// south-east corner
5147    #[prost(message, optional, tag = "2")]
5148    pub bottom_right: ::core::option::Option<GeoPoint>,
5149}
5150#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5151pub struct GeoRadius {
5152    /// Center of the circle
5153    #[prost(message, optional, tag = "1")]
5154    pub center: ::core::option::Option<GeoPoint>,
5155    /// In meters
5156    #[prost(float, tag = "2")]
5157    pub radius: f32,
5158}
5159#[derive(Clone, PartialEq, ::prost::Message)]
5160pub struct GeoLineString {
5161    /// Ordered sequence of GeoPoints representing the line
5162    #[prost(message, repeated, tag = "1")]
5163    pub points: ::prost::alloc::vec::Vec<GeoPoint>,
5164}
5165/// For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points.
5166/// Additionally, the first and last points of each GeoLineString must be the same.
5167#[derive(Clone, PartialEq, ::prost::Message)]
5168pub struct GeoPolygon {
5169    /// The exterior line bounds the surface
5170    #[prost(message, optional, tag = "1")]
5171    pub exterior: ::core::option::Option<GeoLineString>,
5172    /// Interior lines (if present) bound holes within the surface
5173    #[prost(message, repeated, tag = "2")]
5174    pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
5175}
5176#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5177pub struct ValuesCount {
5178    #[prost(uint64, optional, tag = "1")]
5179    pub lt: ::core::option::Option<u64>,
5180    #[prost(uint64, optional, tag = "2")]
5181    pub gt: ::core::option::Option<u64>,
5182    #[prost(uint64, optional, tag = "3")]
5183    pub gte: ::core::option::Option<u64>,
5184    #[prost(uint64, optional, tag = "4")]
5185    pub lte: ::core::option::Option<u64>,
5186}
5187#[derive(Clone, PartialEq, ::prost::Message)]
5188pub struct PointsSelector {
5189    #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
5190    pub points_selector_one_of: ::core::option::Option<
5191        points_selector::PointsSelectorOneOf,
5192    >,
5193}
5194/// Nested message and enum types in `PointsSelector`.
5195pub mod points_selector {
5196    #[derive(Clone, PartialEq, ::prost::Oneof)]
5197    pub enum PointsSelectorOneOf {
5198        #[prost(message, tag = "1")]
5199        Points(super::PointsIdsList),
5200        #[prost(message, tag = "2")]
5201        Filter(super::Filter),
5202    }
5203}
5204#[derive(Clone, PartialEq, ::prost::Message)]
5205pub struct PointsIdsList {
5206    #[prost(message, repeated, tag = "1")]
5207    pub ids: ::prost::alloc::vec::Vec<PointId>,
5208}
5209#[derive(Clone, PartialEq, ::prost::Message)]
5210pub struct PointStruct {
5211    #[prost(message, optional, tag = "1")]
5212    pub id: ::core::option::Option<PointId>,
5213    #[prost(map = "string, message", tag = "3")]
5214    pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5215    #[prost(message, optional, tag = "4")]
5216    pub vectors: ::core::option::Option<Vectors>,
5217}
5218#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5219pub struct GeoPoint {
5220    #[prost(double, tag = "1")]
5221    pub lon: f64,
5222    #[prost(double, tag = "2")]
5223    pub lat: f64,
5224}
5225/// ---------------------------------------------
5226/// ----------- Measurements collector ----------
5227/// ---------------------------------------------
5228#[derive(Clone, PartialEq, ::prost::Message)]
5229pub struct Usage {
5230    #[prost(message, optional, tag = "1")]
5231    pub hardware: ::core::option::Option<HardwareUsage>,
5232    #[prost(message, optional, tag = "2")]
5233    pub inference: ::core::option::Option<InferenceUsage>,
5234}
5235#[derive(Clone, PartialEq, ::prost::Message)]
5236pub struct InferenceUsage {
5237    #[prost(map = "string, message", tag = "1")]
5238    pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
5239}
5240#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5241pub struct ModelUsage {
5242    #[prost(uint64, tag = "1")]
5243    pub tokens: u64,
5244}
5245#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5246pub struct HardwareUsage {
5247    #[prost(uint64, tag = "1")]
5248    pub cpu: u64,
5249    #[prost(uint64, tag = "2")]
5250    pub payload_io_read: u64,
5251    #[prost(uint64, tag = "3")]
5252    pub payload_io_write: u64,
5253    #[prost(uint64, tag = "4")]
5254    pub payload_index_io_read: u64,
5255    #[prost(uint64, tag = "5")]
5256    pub payload_index_io_write: u64,
5257    #[prost(uint64, tag = "6")]
5258    pub vector_io_read: u64,
5259    #[prost(uint64, tag = "7")]
5260    pub vector_io_write: u64,
5261}
5262#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5263#[repr(i32)]
5264pub enum WriteOrderingType {
5265    /// Write operations may be reordered, works faster, default
5266    Weak = 0,
5267    /// Write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
5268    Medium = 1,
5269    /// Write operations go through the permanent leader, consistent, but may be unavailable if leader is down
5270    Strong = 2,
5271}
5272impl WriteOrderingType {
5273    /// String value of the enum field names used in the ProtoBuf definition.
5274    ///
5275    /// The values are not transformed in any way and thus are considered stable
5276    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5277    pub fn as_str_name(&self) -> &'static str {
5278        match self {
5279            Self::Weak => "Weak",
5280            Self::Medium => "Medium",
5281            Self::Strong => "Strong",
5282        }
5283    }
5284    /// Creates an enum from field names used in the ProtoBuf definition.
5285    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5286        match value {
5287            "Weak" => Some(Self::Weak),
5288            "Medium" => Some(Self::Medium),
5289            "Strong" => Some(Self::Strong),
5290            _ => None,
5291        }
5292    }
5293}
5294#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5295#[repr(i32)]
5296pub enum ReadConsistencyType {
5297    /// Send request to all nodes and return points which are present on all of them
5298    All = 0,
5299    /// Send requests to all nodes and return points which are present on majority of them
5300    Majority = 1,
5301    /// Send requests to half + 1 nodes, return points which are present on all of them
5302    Quorum = 2,
5303}
5304impl ReadConsistencyType {
5305    /// String value of the enum field names used in the ProtoBuf definition.
5306    ///
5307    /// The values are not transformed in any way and thus are considered stable
5308    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5309    pub fn as_str_name(&self) -> &'static str {
5310        match self {
5311            Self::All => "All",
5312            Self::Majority => "Majority",
5313            Self::Quorum => "Quorum",
5314        }
5315    }
5316    /// Creates an enum from field names used in the ProtoBuf definition.
5317    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5318        match value {
5319            "All" => Some(Self::All),
5320            "Majority" => Some(Self::Majority),
5321            "Quorum" => Some(Self::Quorum),
5322            _ => None,
5323        }
5324    }
5325}
5326#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5327#[repr(i32)]
5328pub enum FieldType {
5329    Keyword = 0,
5330    Integer = 1,
5331    Float = 2,
5332    Geo = 3,
5333    Text = 4,
5334    Bool = 5,
5335    Datetime = 6,
5336    Uuid = 7,
5337}
5338impl FieldType {
5339    /// String value of the enum field names used in the ProtoBuf definition.
5340    ///
5341    /// The values are not transformed in any way and thus are considered stable
5342    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5343    pub fn as_str_name(&self) -> &'static str {
5344        match self {
5345            Self::Keyword => "FieldTypeKeyword",
5346            Self::Integer => "FieldTypeInteger",
5347            Self::Float => "FieldTypeFloat",
5348            Self::Geo => "FieldTypeGeo",
5349            Self::Text => "FieldTypeText",
5350            Self::Bool => "FieldTypeBool",
5351            Self::Datetime => "FieldTypeDatetime",
5352            Self::Uuid => "FieldTypeUuid",
5353        }
5354    }
5355    /// Creates an enum from field names used in the ProtoBuf definition.
5356    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5357        match value {
5358            "FieldTypeKeyword" => Some(Self::Keyword),
5359            "FieldTypeInteger" => Some(Self::Integer),
5360            "FieldTypeFloat" => Some(Self::Float),
5361            "FieldTypeGeo" => Some(Self::Geo),
5362            "FieldTypeText" => Some(Self::Text),
5363            "FieldTypeBool" => Some(Self::Bool),
5364            "FieldTypeDatetime" => Some(Self::Datetime),
5365            "FieldTypeUuid" => Some(Self::Uuid),
5366            _ => None,
5367        }
5368    }
5369}
5370#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5371#[repr(i32)]
5372pub enum Direction {
5373    Asc = 0,
5374    Desc = 1,
5375}
5376impl Direction {
5377    /// String value of the enum field names used in the ProtoBuf definition.
5378    ///
5379    /// The values are not transformed in any way and thus are considered stable
5380    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5381    pub fn as_str_name(&self) -> &'static str {
5382        match self {
5383            Self::Asc => "Asc",
5384            Self::Desc => "Desc",
5385        }
5386    }
5387    /// Creates an enum from field names used in the ProtoBuf definition.
5388    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5389        match value {
5390            "Asc" => Some(Self::Asc),
5391            "Desc" => Some(Self::Desc),
5392            _ => None,
5393        }
5394    }
5395}
5396/// How to use positive and negative vectors to find the results, default is `AverageVector`.
5397#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5398#[repr(i32)]
5399pub enum RecommendStrategy {
5400    /// Average positive and negative vectors and create a single query with the formula
5401    /// `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.
5402    AverageVector = 0,
5403    /// Uses custom search objective. Each candidate is compared against all
5404    /// examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`.
5405    /// If the `max_neg_score` is chosen then it is squared and negated.
5406    BestScore = 1,
5407    /// Uses custom search objective. Compares against all inputs, sums all the scores.
5408    /// Scores against positive vectors are added, against negatives are subtracted.
5409    SumScores = 2,
5410}
5411impl RecommendStrategy {
5412    /// String value of the enum field names used in the ProtoBuf definition.
5413    ///
5414    /// The values are not transformed in any way and thus are considered stable
5415    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5416    pub fn as_str_name(&self) -> &'static str {
5417        match self {
5418            Self::AverageVector => "AverageVector",
5419            Self::BestScore => "BestScore",
5420            Self::SumScores => "SumScores",
5421        }
5422    }
5423    /// Creates an enum from field names used in the ProtoBuf definition.
5424    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5425        match value {
5426            "AverageVector" => Some(Self::AverageVector),
5427            "BestScore" => Some(Self::BestScore),
5428            "SumScores" => Some(Self::SumScores),
5429            _ => None,
5430        }
5431    }
5432}
5433#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5434#[repr(i32)]
5435pub enum Fusion {
5436    /// Reciprocal Rank Fusion
5437    Rrf = 0,
5438    /// Distribution-Based Score Fusion
5439    Dbsf = 1,
5440}
5441impl Fusion {
5442    /// String value of the enum field names used in the ProtoBuf definition.
5443    ///
5444    /// The values are not transformed in any way and thus are considered stable
5445    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5446    pub fn as_str_name(&self) -> &'static str {
5447        match self {
5448            Self::Rrf => "RRF",
5449            Self::Dbsf => "DBSF",
5450        }
5451    }
5452    /// Creates an enum from field names used in the ProtoBuf definition.
5453    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5454        match value {
5455            "RRF" => Some(Self::Rrf),
5456            "DBSF" => Some(Self::Dbsf),
5457            _ => None,
5458        }
5459    }
5460}
5461/// Sample points from the collection
5462///
5463/// Available sampling methods:
5464///
5465/// * `random` - Random sampling
5466#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5467#[repr(i32)]
5468pub enum Sample {
5469    Random = 0,
5470}
5471impl Sample {
5472    /// String value of the enum field names used in the ProtoBuf definition.
5473    ///
5474    /// The values are not transformed in any way and thus are considered stable
5475    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5476    pub fn as_str_name(&self) -> &'static str {
5477        match self {
5478            Self::Random => "Random",
5479        }
5480    }
5481    /// Creates an enum from field names used in the ProtoBuf definition.
5482    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5483        match value {
5484            "Random" => Some(Self::Random),
5485            _ => None,
5486        }
5487    }
5488}
5489#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5490#[repr(i32)]
5491pub enum UpdateStatus {
5492    UnknownUpdateStatus = 0,
5493    /// Update is received, but not processed yet
5494    Acknowledged = 1,
5495    /// Update is applied and ready for search
5496    Completed = 2,
5497    /// Internal: update is rejected due to an outdated clock
5498    ClockRejected = 3,
5499}
5500impl UpdateStatus {
5501    /// String value of the enum field names used in the ProtoBuf definition.
5502    ///
5503    /// The values are not transformed in any way and thus are considered stable
5504    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
5505    pub fn as_str_name(&self) -> &'static str {
5506        match self {
5507            Self::UnknownUpdateStatus => "UnknownUpdateStatus",
5508            Self::Acknowledged => "Acknowledged",
5509            Self::Completed => "Completed",
5510            Self::ClockRejected => "ClockRejected",
5511        }
5512    }
5513    /// Creates an enum from field names used in the ProtoBuf definition.
5514    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5515        match value {
5516            "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
5517            "Acknowledged" => Some(Self::Acknowledged),
5518            "Completed" => Some(Self::Completed),
5519            "ClockRejected" => Some(Self::ClockRejected),
5520            _ => None,
5521        }
5522    }
5523}
5524/// Generated client implementations.
5525pub mod points_client {
5526    #![allow(
5527        unused_variables,
5528        dead_code,
5529        missing_docs,
5530        clippy::wildcard_imports,
5531        clippy::let_unit_value,
5532    )]
5533    use tonic::codegen::*;
5534    use tonic::codegen::http::Uri;
5535    #[derive(Debug, Clone)]
5536    pub struct PointsClient<T> {
5537        inner: tonic::client::Grpc<T>,
5538    }
5539    impl PointsClient<tonic::transport::Channel> {
5540        /// Attempt to create a new client by connecting to a given endpoint.
5541        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5542        where
5543            D: TryInto<tonic::transport::Endpoint>,
5544            D::Error: Into<StdError>,
5545        {
5546            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5547            Ok(Self::new(conn))
5548        }
5549    }
5550    impl<T> PointsClient<T>
5551    where
5552        T: tonic::client::GrpcService<tonic::body::BoxBody>,
5553        T::Error: Into<StdError>,
5554        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
5555        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
5556    {
5557        pub fn new(inner: T) -> Self {
5558            let inner = tonic::client::Grpc::new(inner);
5559            Self { inner }
5560        }
5561        pub fn with_origin(inner: T, origin: Uri) -> Self {
5562            let inner = tonic::client::Grpc::with_origin(inner, origin);
5563            Self { inner }
5564        }
5565        pub fn with_interceptor<F>(
5566            inner: T,
5567            interceptor: F,
5568        ) -> PointsClient<InterceptedService<T, F>>
5569        where
5570            F: tonic::service::Interceptor,
5571            T::ResponseBody: Default,
5572            T: tonic::codegen::Service<
5573                http::Request<tonic::body::BoxBody>,
5574                Response = http::Response<
5575                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
5576                >,
5577            >,
5578            <T as tonic::codegen::Service<
5579                http::Request<tonic::body::BoxBody>,
5580            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
5581        {
5582            PointsClient::new(InterceptedService::new(inner, interceptor))
5583        }
5584        /// Compress requests with the given encoding.
5585        ///
5586        /// This requires the server to support it otherwise it might respond with an
5587        /// error.
5588        #[must_use]
5589        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5590            self.inner = self.inner.send_compressed(encoding);
5591            self
5592        }
5593        /// Enable decompressing responses.
5594        #[must_use]
5595        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5596            self.inner = self.inner.accept_compressed(encoding);
5597            self
5598        }
5599        /// Limits the maximum size of a decoded message.
5600        ///
5601        /// Default: `4MB`
5602        #[must_use]
5603        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5604            self.inner = self.inner.max_decoding_message_size(limit);
5605            self
5606        }
5607        /// Limits the maximum size of an encoded message.
5608        ///
5609        /// Default: `usize::MAX`
5610        #[must_use]
5611        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5612            self.inner = self.inner.max_encoding_message_size(limit);
5613            self
5614        }
5615        ///
5616        /// Perform insert + updates on points. If a point with a given ID already exists - it will be overwritten.
5617        pub async fn upsert(
5618            &mut self,
5619            request: impl tonic::IntoRequest<super::UpsertPoints>,
5620        ) -> std::result::Result<
5621            tonic::Response<super::PointsOperationResponse>,
5622            tonic::Status,
5623        > {
5624            self.inner
5625                .ready()
5626                .await
5627                .map_err(|e| {
5628                    tonic::Status::unknown(
5629                        format!("Service was not ready: {}", e.into()),
5630                    )
5631                })?;
5632            let codec = tonic::codec::ProstCodec::default();
5633            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
5634            let mut req = request.into_request();
5635            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
5636            self.inner.unary(req, path, codec).await
5637        }
5638        ///
5639        /// Delete points
5640        pub async fn delete(
5641            &mut self,
5642            request: impl tonic::IntoRequest<super::DeletePoints>,
5643        ) -> std::result::Result<
5644            tonic::Response<super::PointsOperationResponse>,
5645            tonic::Status,
5646        > {
5647            self.inner
5648                .ready()
5649                .await
5650                .map_err(|e| {
5651                    tonic::Status::unknown(
5652                        format!("Service was not ready: {}", e.into()),
5653                    )
5654                })?;
5655            let codec = tonic::codec::ProstCodec::default();
5656            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
5657            let mut req = request.into_request();
5658            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
5659            self.inner.unary(req, path, codec).await
5660        }
5661        ///
5662        /// Retrieve points
5663        pub async fn get(
5664            &mut self,
5665            request: impl tonic::IntoRequest<super::GetPoints>,
5666        ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
5667            self.inner
5668                .ready()
5669                .await
5670                .map_err(|e| {
5671                    tonic::Status::unknown(
5672                        format!("Service was not ready: {}", e.into()),
5673                    )
5674                })?;
5675            let codec = tonic::codec::ProstCodec::default();
5676            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
5677            let mut req = request.into_request();
5678            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
5679            self.inner.unary(req, path, codec).await
5680        }
5681        ///
5682        /// Update named vectors for point
5683        pub async fn update_vectors(
5684            &mut self,
5685            request: impl tonic::IntoRequest<super::UpdatePointVectors>,
5686        ) -> std::result::Result<
5687            tonic::Response<super::PointsOperationResponse>,
5688            tonic::Status,
5689        > {
5690            self.inner
5691                .ready()
5692                .await
5693                .map_err(|e| {
5694                    tonic::Status::unknown(
5695                        format!("Service was not ready: {}", e.into()),
5696                    )
5697                })?;
5698            let codec = tonic::codec::ProstCodec::default();
5699            let path = http::uri::PathAndQuery::from_static(
5700                "/qdrant.Points/UpdateVectors",
5701            );
5702            let mut req = request.into_request();
5703            req.extensions_mut()
5704                .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
5705            self.inner.unary(req, path, codec).await
5706        }
5707        ///
5708        /// Delete named vectors for points
5709        pub async fn delete_vectors(
5710            &mut self,
5711            request: impl tonic::IntoRequest<super::DeletePointVectors>,
5712        ) -> std::result::Result<
5713            tonic::Response<super::PointsOperationResponse>,
5714            tonic::Status,
5715        > {
5716            self.inner
5717                .ready()
5718                .await
5719                .map_err(|e| {
5720                    tonic::Status::unknown(
5721                        format!("Service was not ready: {}", e.into()),
5722                    )
5723                })?;
5724            let codec = tonic::codec::ProstCodec::default();
5725            let path = http::uri::PathAndQuery::from_static(
5726                "/qdrant.Points/DeleteVectors",
5727            );
5728            let mut req = request.into_request();
5729            req.extensions_mut()
5730                .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
5731            self.inner.unary(req, path, codec).await
5732        }
5733        ///
5734        /// Set payload for points
5735        pub async fn set_payload(
5736            &mut self,
5737            request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5738        ) -> std::result::Result<
5739            tonic::Response<super::PointsOperationResponse>,
5740            tonic::Status,
5741        > {
5742            self.inner
5743                .ready()
5744                .await
5745                .map_err(|e| {
5746                    tonic::Status::unknown(
5747                        format!("Service was not ready: {}", e.into()),
5748                    )
5749                })?;
5750            let codec = tonic::codec::ProstCodec::default();
5751            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
5752            let mut req = request.into_request();
5753            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
5754            self.inner.unary(req, path, codec).await
5755        }
5756        ///
5757        /// Overwrite payload for points
5758        pub async fn overwrite_payload(
5759            &mut self,
5760            request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5761        ) -> std::result::Result<
5762            tonic::Response<super::PointsOperationResponse>,
5763            tonic::Status,
5764        > {
5765            self.inner
5766                .ready()
5767                .await
5768                .map_err(|e| {
5769                    tonic::Status::unknown(
5770                        format!("Service was not ready: {}", e.into()),
5771                    )
5772                })?;
5773            let codec = tonic::codec::ProstCodec::default();
5774            let path = http::uri::PathAndQuery::from_static(
5775                "/qdrant.Points/OverwritePayload",
5776            );
5777            let mut req = request.into_request();
5778            req.extensions_mut()
5779                .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
5780            self.inner.unary(req, path, codec).await
5781        }
5782        ///
5783        /// Delete specified key payload for points
5784        pub async fn delete_payload(
5785            &mut self,
5786            request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
5787        ) -> std::result::Result<
5788            tonic::Response<super::PointsOperationResponse>,
5789            tonic::Status,
5790        > {
5791            self.inner
5792                .ready()
5793                .await
5794                .map_err(|e| {
5795                    tonic::Status::unknown(
5796                        format!("Service was not ready: {}", e.into()),
5797                    )
5798                })?;
5799            let codec = tonic::codec::ProstCodec::default();
5800            let path = http::uri::PathAndQuery::from_static(
5801                "/qdrant.Points/DeletePayload",
5802            );
5803            let mut req = request.into_request();
5804            req.extensions_mut()
5805                .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
5806            self.inner.unary(req, path, codec).await
5807        }
5808        ///
5809        /// Remove all payload for specified points
5810        pub async fn clear_payload(
5811            &mut self,
5812            request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
5813        ) -> std::result::Result<
5814            tonic::Response<super::PointsOperationResponse>,
5815            tonic::Status,
5816        > {
5817            self.inner
5818                .ready()
5819                .await
5820                .map_err(|e| {
5821                    tonic::Status::unknown(
5822                        format!("Service was not ready: {}", e.into()),
5823                    )
5824                })?;
5825            let codec = tonic::codec::ProstCodec::default();
5826            let path = http::uri::PathAndQuery::from_static(
5827                "/qdrant.Points/ClearPayload",
5828            );
5829            let mut req = request.into_request();
5830            req.extensions_mut()
5831                .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
5832            self.inner.unary(req, path, codec).await
5833        }
5834        ///
5835        /// Create index for field in collection
5836        pub async fn create_field_index(
5837            &mut self,
5838            request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
5839        ) -> std::result::Result<
5840            tonic::Response<super::PointsOperationResponse>,
5841            tonic::Status,
5842        > {
5843            self.inner
5844                .ready()
5845                .await
5846                .map_err(|e| {
5847                    tonic::Status::unknown(
5848                        format!("Service was not ready: {}", e.into()),
5849                    )
5850                })?;
5851            let codec = tonic::codec::ProstCodec::default();
5852            let path = http::uri::PathAndQuery::from_static(
5853                "/qdrant.Points/CreateFieldIndex",
5854            );
5855            let mut req = request.into_request();
5856            req.extensions_mut()
5857                .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
5858            self.inner.unary(req, path, codec).await
5859        }
5860        ///
5861        /// Delete field index for collection
5862        pub async fn delete_field_index(
5863            &mut self,
5864            request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
5865        ) -> std::result::Result<
5866            tonic::Response<super::PointsOperationResponse>,
5867            tonic::Status,
5868        > {
5869            self.inner
5870                .ready()
5871                .await
5872                .map_err(|e| {
5873                    tonic::Status::unknown(
5874                        format!("Service was not ready: {}", e.into()),
5875                    )
5876                })?;
5877            let codec = tonic::codec::ProstCodec::default();
5878            let path = http::uri::PathAndQuery::from_static(
5879                "/qdrant.Points/DeleteFieldIndex",
5880            );
5881            let mut req = request.into_request();
5882            req.extensions_mut()
5883                .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
5884            self.inner.unary(req, path, codec).await
5885        }
5886        ///
5887        /// Retrieve closest points based on vector similarity and given filtering conditions
5888        pub async fn search(
5889            &mut self,
5890            request: impl tonic::IntoRequest<super::SearchPoints>,
5891        ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
5892            self.inner
5893                .ready()
5894                .await
5895                .map_err(|e| {
5896                    tonic::Status::unknown(
5897                        format!("Service was not ready: {}", e.into()),
5898                    )
5899                })?;
5900            let codec = tonic::codec::ProstCodec::default();
5901            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
5902            let mut req = request.into_request();
5903            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
5904            self.inner.unary(req, path, codec).await
5905        }
5906        ///
5907        /// Retrieve closest points based on vector similarity and given filtering conditions
5908        pub async fn search_batch(
5909            &mut self,
5910            request: impl tonic::IntoRequest<super::SearchBatchPoints>,
5911        ) -> std::result::Result<
5912            tonic::Response<super::SearchBatchResponse>,
5913            tonic::Status,
5914        > {
5915            self.inner
5916                .ready()
5917                .await
5918                .map_err(|e| {
5919                    tonic::Status::unknown(
5920                        format!("Service was not ready: {}", e.into()),
5921                    )
5922                })?;
5923            let codec = tonic::codec::ProstCodec::default();
5924            let path = http::uri::PathAndQuery::from_static(
5925                "/qdrant.Points/SearchBatch",
5926            );
5927            let mut req = request.into_request();
5928            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
5929            self.inner.unary(req, path, codec).await
5930        }
5931        ///
5932        /// Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given field
5933        pub async fn search_groups(
5934            &mut self,
5935            request: impl tonic::IntoRequest<super::SearchPointGroups>,
5936        ) -> std::result::Result<
5937            tonic::Response<super::SearchGroupsResponse>,
5938            tonic::Status,
5939        > {
5940            self.inner
5941                .ready()
5942                .await
5943                .map_err(|e| {
5944                    tonic::Status::unknown(
5945                        format!("Service was not ready: {}", e.into()),
5946                    )
5947                })?;
5948            let codec = tonic::codec::ProstCodec::default();
5949            let path = http::uri::PathAndQuery::from_static(
5950                "/qdrant.Points/SearchGroups",
5951            );
5952            let mut req = request.into_request();
5953            req.extensions_mut()
5954                .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
5955            self.inner.unary(req, path, codec).await
5956        }
5957        ///
5958        /// Iterate over all or filtered points
5959        pub async fn scroll(
5960            &mut self,
5961            request: impl tonic::IntoRequest<super::ScrollPoints>,
5962        ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
5963            self.inner
5964                .ready()
5965                .await
5966                .map_err(|e| {
5967                    tonic::Status::unknown(
5968                        format!("Service was not ready: {}", e.into()),
5969                    )
5970                })?;
5971            let codec = tonic::codec::ProstCodec::default();
5972            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
5973            let mut req = request.into_request();
5974            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
5975            self.inner.unary(req, path, codec).await
5976        }
5977        ///
5978        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples.
5979        pub async fn recommend(
5980            &mut self,
5981            request: impl tonic::IntoRequest<super::RecommendPoints>,
5982        ) -> std::result::Result<
5983            tonic::Response<super::RecommendResponse>,
5984            tonic::Status,
5985        > {
5986            self.inner
5987                .ready()
5988                .await
5989                .map_err(|e| {
5990                    tonic::Status::unknown(
5991                        format!("Service was not ready: {}", e.into()),
5992                    )
5993                })?;
5994            let codec = tonic::codec::ProstCodec::default();
5995            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
5996            let mut req = request.into_request();
5997            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
5998            self.inner.unary(req, path, codec).await
5999        }
6000        ///
6001        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples.
6002        pub async fn recommend_batch(
6003            &mut self,
6004            request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
6005        ) -> std::result::Result<
6006            tonic::Response<super::RecommendBatchResponse>,
6007            tonic::Status,
6008        > {
6009            self.inner
6010                .ready()
6011                .await
6012                .map_err(|e| {
6013                    tonic::Status::unknown(
6014                        format!("Service was not ready: {}", e.into()),
6015                    )
6016                })?;
6017            let codec = tonic::codec::ProstCodec::default();
6018            let path = http::uri::PathAndQuery::from_static(
6019                "/qdrant.Points/RecommendBatch",
6020            );
6021            let mut req = request.into_request();
6022            req.extensions_mut()
6023                .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
6024            self.inner.unary(req, path, codec).await
6025        }
6026        ///
6027        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given field
6028        pub async fn recommend_groups(
6029            &mut self,
6030            request: impl tonic::IntoRequest<super::RecommendPointGroups>,
6031        ) -> std::result::Result<
6032            tonic::Response<super::RecommendGroupsResponse>,
6033            tonic::Status,
6034        > {
6035            self.inner
6036                .ready()
6037                .await
6038                .map_err(|e| {
6039                    tonic::Status::unknown(
6040                        format!("Service was not ready: {}", e.into()),
6041                    )
6042                })?;
6043            let codec = tonic::codec::ProstCodec::default();
6044            let path = http::uri::PathAndQuery::from_static(
6045                "/qdrant.Points/RecommendGroups",
6046            );
6047            let mut req = request.into_request();
6048            req.extensions_mut()
6049                .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
6050            self.inner.unary(req, path, codec).await
6051        }
6052        ///
6053        /// Use context and a target to find the most similar points to the target, constrained by the context.
6054        ///
6055        /// When using only the context (without a target), a special search - called context search - is performed where
6056        /// pairs of points are used to generate a loss that guides the search towards the zone where
6057        /// most positive examples overlap. This means that the score minimizes the scenario of
6058        /// finding a point closer to a negative than to a positive part of a pair.
6059        ///
6060        /// Since the score of a context relates to loss, the maximum score a point can get is 0.0,
6061        /// and it becomes normal that many points can have a score of 0.0.
6062        ///
6063        /// When using target (with or without context), the score behaves a little different: The
6064        /// integer part of the score represents the rank with respect to the context, while the
6065        /// decimal part of the score relates to the distance to the target. The context part of the score for
6066        /// each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair,
6067        /// and -1 otherwise.
6068        pub async fn discover(
6069            &mut self,
6070            request: impl tonic::IntoRequest<super::DiscoverPoints>,
6071        ) -> std::result::Result<
6072            tonic::Response<super::DiscoverResponse>,
6073            tonic::Status,
6074        > {
6075            self.inner
6076                .ready()
6077                .await
6078                .map_err(|e| {
6079                    tonic::Status::unknown(
6080                        format!("Service was not ready: {}", e.into()),
6081                    )
6082                })?;
6083            let codec = tonic::codec::ProstCodec::default();
6084            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
6085            let mut req = request.into_request();
6086            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
6087            self.inner.unary(req, path, codec).await
6088        }
6089        ///
6090        /// Batch request points based on { positive, negative } pairs of examples, and/or a target
6091        pub async fn discover_batch(
6092            &mut self,
6093            request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
6094        ) -> std::result::Result<
6095            tonic::Response<super::DiscoverBatchResponse>,
6096            tonic::Status,
6097        > {
6098            self.inner
6099                .ready()
6100                .await
6101                .map_err(|e| {
6102                    tonic::Status::unknown(
6103                        format!("Service was not ready: {}", e.into()),
6104                    )
6105                })?;
6106            let codec = tonic::codec::ProstCodec::default();
6107            let path = http::uri::PathAndQuery::from_static(
6108                "/qdrant.Points/DiscoverBatch",
6109            );
6110            let mut req = request.into_request();
6111            req.extensions_mut()
6112                .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
6113            self.inner.unary(req, path, codec).await
6114        }
6115        ///
6116        /// Count points in collection with given filtering conditions
6117        pub async fn count(
6118            &mut self,
6119            request: impl tonic::IntoRequest<super::CountPoints>,
6120        ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
6121            self.inner
6122                .ready()
6123                .await
6124                .map_err(|e| {
6125                    tonic::Status::unknown(
6126                        format!("Service was not ready: {}", e.into()),
6127                    )
6128                })?;
6129            let codec = tonic::codec::ProstCodec::default();
6130            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
6131            let mut req = request.into_request();
6132            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
6133            self.inner.unary(req, path, codec).await
6134        }
6135        ///
6136        /// Perform multiple update operations in one request
6137        pub async fn update_batch(
6138            &mut self,
6139            request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
6140        ) -> std::result::Result<
6141            tonic::Response<super::UpdateBatchResponse>,
6142            tonic::Status,
6143        > {
6144            self.inner
6145                .ready()
6146                .await
6147                .map_err(|e| {
6148                    tonic::Status::unknown(
6149                        format!("Service was not ready: {}", e.into()),
6150                    )
6151                })?;
6152            let codec = tonic::codec::ProstCodec::default();
6153            let path = http::uri::PathAndQuery::from_static(
6154                "/qdrant.Points/UpdateBatch",
6155            );
6156            let mut req = request.into_request();
6157            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
6158            self.inner.unary(req, path, codec).await
6159        }
6160        ///
6161        /// Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6162        pub async fn query(
6163            &mut self,
6164            request: impl tonic::IntoRequest<super::QueryPoints>,
6165        ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
6166            self.inner
6167                .ready()
6168                .await
6169                .map_err(|e| {
6170                    tonic::Status::unknown(
6171                        format!("Service was not ready: {}", e.into()),
6172                    )
6173                })?;
6174            let codec = tonic::codec::ProstCodec::default();
6175            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
6176            let mut req = request.into_request();
6177            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
6178            self.inner.unary(req, path, codec).await
6179        }
6180        ///
6181        /// Universally query points in a batch fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6182        pub async fn query_batch(
6183            &mut self,
6184            request: impl tonic::IntoRequest<super::QueryBatchPoints>,
6185        ) -> std::result::Result<
6186            tonic::Response<super::QueryBatchResponse>,
6187            tonic::Status,
6188        > {
6189            self.inner
6190                .ready()
6191                .await
6192                .map_err(|e| {
6193                    tonic::Status::unknown(
6194                        format!("Service was not ready: {}", e.into()),
6195                    )
6196                })?;
6197            let codec = tonic::codec::ProstCodec::default();
6198            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
6199            let mut req = request.into_request();
6200            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
6201            self.inner.unary(req, path, codec).await
6202        }
6203        ///
6204        /// Universally query points in a group fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6205        pub async fn query_groups(
6206            &mut self,
6207            request: impl tonic::IntoRequest<super::QueryPointGroups>,
6208        ) -> std::result::Result<
6209            tonic::Response<super::QueryGroupsResponse>,
6210            tonic::Status,
6211        > {
6212            self.inner
6213                .ready()
6214                .await
6215                .map_err(|e| {
6216                    tonic::Status::unknown(
6217                        format!("Service was not ready: {}", e.into()),
6218                    )
6219                })?;
6220            let codec = tonic::codec::ProstCodec::default();
6221            let path = http::uri::PathAndQuery::from_static(
6222                "/qdrant.Points/QueryGroups",
6223            );
6224            let mut req = request.into_request();
6225            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
6226            self.inner.unary(req, path, codec).await
6227        }
6228        ///
6229        /// Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions.
6230        pub async fn facet(
6231            &mut self,
6232            request: impl tonic::IntoRequest<super::FacetCounts>,
6233        ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
6234            self.inner
6235                .ready()
6236                .await
6237                .map_err(|e| {
6238                    tonic::Status::unknown(
6239                        format!("Service was not ready: {}", e.into()),
6240                    )
6241                })?;
6242            let codec = tonic::codec::ProstCodec::default();
6243            let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
6244            let mut req = request.into_request();
6245            req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
6246            self.inner.unary(req, path, codec).await
6247        }
6248        ///
6249        /// Compute distance matrix for sampled points with a pair based output format
6250        pub async fn search_matrix_pairs(
6251            &mut self,
6252            request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6253        ) -> std::result::Result<
6254            tonic::Response<super::SearchMatrixPairsResponse>,
6255            tonic::Status,
6256        > {
6257            self.inner
6258                .ready()
6259                .await
6260                .map_err(|e| {
6261                    tonic::Status::unknown(
6262                        format!("Service was not ready: {}", e.into()),
6263                    )
6264                })?;
6265            let codec = tonic::codec::ProstCodec::default();
6266            let path = http::uri::PathAndQuery::from_static(
6267                "/qdrant.Points/SearchMatrixPairs",
6268            );
6269            let mut req = request.into_request();
6270            req.extensions_mut()
6271                .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
6272            self.inner.unary(req, path, codec).await
6273        }
6274        ///
6275        /// Compute distance matrix for sampled points with an offset based output format
6276        pub async fn search_matrix_offsets(
6277            &mut self,
6278            request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6279        ) -> std::result::Result<
6280            tonic::Response<super::SearchMatrixOffsetsResponse>,
6281            tonic::Status,
6282        > {
6283            self.inner
6284                .ready()
6285                .await
6286                .map_err(|e| {
6287                    tonic::Status::unknown(
6288                        format!("Service was not ready: {}", e.into()),
6289                    )
6290                })?;
6291            let codec = tonic::codec::ProstCodec::default();
6292            let path = http::uri::PathAndQuery::from_static(
6293                "/qdrant.Points/SearchMatrixOffsets",
6294            );
6295            let mut req = request.into_request();
6296            req.extensions_mut()
6297                .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
6298            self.inner.unary(req, path, codec).await
6299        }
6300    }
6301}
6302/// Generated server implementations.
6303pub mod points_server {
6304    #![allow(
6305        unused_variables,
6306        dead_code,
6307        missing_docs,
6308        clippy::wildcard_imports,
6309        clippy::let_unit_value,
6310    )]
6311    use tonic::codegen::*;
6312    /// Generated trait containing gRPC methods that should be implemented for use with PointsServer.
6313    #[async_trait]
6314    pub trait Points: std::marker::Send + std::marker::Sync + 'static {
6315        ///
6316        /// Perform insert + updates on points. If a point with a given ID already exists - it will be overwritten.
6317        async fn upsert(
6318            &self,
6319            request: tonic::Request<super::UpsertPoints>,
6320        ) -> std::result::Result<
6321            tonic::Response<super::PointsOperationResponse>,
6322            tonic::Status,
6323        >;
6324        ///
6325        /// Delete points
6326        async fn delete(
6327            &self,
6328            request: tonic::Request<super::DeletePoints>,
6329        ) -> std::result::Result<
6330            tonic::Response<super::PointsOperationResponse>,
6331            tonic::Status,
6332        >;
6333        ///
6334        /// Retrieve points
6335        async fn get(
6336            &self,
6337            request: tonic::Request<super::GetPoints>,
6338        ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
6339        ///
6340        /// Update named vectors for point
6341        async fn update_vectors(
6342            &self,
6343            request: tonic::Request<super::UpdatePointVectors>,
6344        ) -> std::result::Result<
6345            tonic::Response<super::PointsOperationResponse>,
6346            tonic::Status,
6347        >;
6348        ///
6349        /// Delete named vectors for points
6350        async fn delete_vectors(
6351            &self,
6352            request: tonic::Request<super::DeletePointVectors>,
6353        ) -> std::result::Result<
6354            tonic::Response<super::PointsOperationResponse>,
6355            tonic::Status,
6356        >;
6357        ///
6358        /// Set payload for points
6359        async fn set_payload(
6360            &self,
6361            request: tonic::Request<super::SetPayloadPoints>,
6362        ) -> std::result::Result<
6363            tonic::Response<super::PointsOperationResponse>,
6364            tonic::Status,
6365        >;
6366        ///
6367        /// Overwrite payload for points
6368        async fn overwrite_payload(
6369            &self,
6370            request: tonic::Request<super::SetPayloadPoints>,
6371        ) -> std::result::Result<
6372            tonic::Response<super::PointsOperationResponse>,
6373            tonic::Status,
6374        >;
6375        ///
6376        /// Delete specified key payload for points
6377        async fn delete_payload(
6378            &self,
6379            request: tonic::Request<super::DeletePayloadPoints>,
6380        ) -> std::result::Result<
6381            tonic::Response<super::PointsOperationResponse>,
6382            tonic::Status,
6383        >;
6384        ///
6385        /// Remove all payload for specified points
6386        async fn clear_payload(
6387            &self,
6388            request: tonic::Request<super::ClearPayloadPoints>,
6389        ) -> std::result::Result<
6390            tonic::Response<super::PointsOperationResponse>,
6391            tonic::Status,
6392        >;
6393        ///
6394        /// Create index for field in collection
6395        async fn create_field_index(
6396            &self,
6397            request: tonic::Request<super::CreateFieldIndexCollection>,
6398        ) -> std::result::Result<
6399            tonic::Response<super::PointsOperationResponse>,
6400            tonic::Status,
6401        >;
6402        ///
6403        /// Delete field index for collection
6404        async fn delete_field_index(
6405            &self,
6406            request: tonic::Request<super::DeleteFieldIndexCollection>,
6407        ) -> std::result::Result<
6408            tonic::Response<super::PointsOperationResponse>,
6409            tonic::Status,
6410        >;
6411        ///
6412        /// Retrieve closest points based on vector similarity and given filtering conditions
6413        async fn search(
6414            &self,
6415            request: tonic::Request<super::SearchPoints>,
6416        ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
6417        ///
6418        /// Retrieve closest points based on vector similarity and given filtering conditions
6419        async fn search_batch(
6420            &self,
6421            request: tonic::Request<super::SearchBatchPoints>,
6422        ) -> std::result::Result<
6423            tonic::Response<super::SearchBatchResponse>,
6424            tonic::Status,
6425        >;
6426        ///
6427        /// Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given field
6428        async fn search_groups(
6429            &self,
6430            request: tonic::Request<super::SearchPointGroups>,
6431        ) -> std::result::Result<
6432            tonic::Response<super::SearchGroupsResponse>,
6433            tonic::Status,
6434        >;
6435        ///
6436        /// Iterate over all or filtered points
6437        async fn scroll(
6438            &self,
6439            request: tonic::Request<super::ScrollPoints>,
6440        ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
6441        ///
6442        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples.
6443        async fn recommend(
6444            &self,
6445            request: tonic::Request<super::RecommendPoints>,
6446        ) -> std::result::Result<
6447            tonic::Response<super::RecommendResponse>,
6448            tonic::Status,
6449        >;
6450        ///
6451        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples.
6452        async fn recommend_batch(
6453            &self,
6454            request: tonic::Request<super::RecommendBatchPoints>,
6455        ) -> std::result::Result<
6456            tonic::Response<super::RecommendBatchResponse>,
6457            tonic::Status,
6458        >;
6459        ///
6460        /// Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given field
6461        async fn recommend_groups(
6462            &self,
6463            request: tonic::Request<super::RecommendPointGroups>,
6464        ) -> std::result::Result<
6465            tonic::Response<super::RecommendGroupsResponse>,
6466            tonic::Status,
6467        >;
6468        ///
6469        /// Use context and a target to find the most similar points to the target, constrained by the context.
6470        ///
6471        /// When using only the context (without a target), a special search - called context search - is performed where
6472        /// pairs of points are used to generate a loss that guides the search towards the zone where
6473        /// most positive examples overlap. This means that the score minimizes the scenario of
6474        /// finding a point closer to a negative than to a positive part of a pair.
6475        ///
6476        /// Since the score of a context relates to loss, the maximum score a point can get is 0.0,
6477        /// and it becomes normal that many points can have a score of 0.0.
6478        ///
6479        /// When using target (with or without context), the score behaves a little different: The
6480        /// integer part of the score represents the rank with respect to the context, while the
6481        /// decimal part of the score relates to the distance to the target. The context part of the score for
6482        /// each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair,
6483        /// and -1 otherwise.
6484        async fn discover(
6485            &self,
6486            request: tonic::Request<super::DiscoverPoints>,
6487        ) -> std::result::Result<
6488            tonic::Response<super::DiscoverResponse>,
6489            tonic::Status,
6490        >;
6491        ///
6492        /// Batch request points based on { positive, negative } pairs of examples, and/or a target
6493        async fn discover_batch(
6494            &self,
6495            request: tonic::Request<super::DiscoverBatchPoints>,
6496        ) -> std::result::Result<
6497            tonic::Response<super::DiscoverBatchResponse>,
6498            tonic::Status,
6499        >;
6500        ///
6501        /// Count points in collection with given filtering conditions
6502        async fn count(
6503            &self,
6504            request: tonic::Request<super::CountPoints>,
6505        ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
6506        ///
6507        /// Perform multiple update operations in one request
6508        async fn update_batch(
6509            &self,
6510            request: tonic::Request<super::UpdateBatchPoints>,
6511        ) -> std::result::Result<
6512            tonic::Response<super::UpdateBatchResponse>,
6513            tonic::Status,
6514        >;
6515        ///
6516        /// Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6517        async fn query(
6518            &self,
6519            request: tonic::Request<super::QueryPoints>,
6520        ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
6521        ///
6522        /// Universally query points in a batch fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6523        async fn query_batch(
6524            &self,
6525            request: tonic::Request<super::QueryBatchPoints>,
6526        ) -> std::result::Result<
6527            tonic::Response<super::QueryBatchResponse>,
6528            tonic::Status,
6529        >;
6530        ///
6531        /// Universally query points in a group fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
6532        async fn query_groups(
6533            &self,
6534            request: tonic::Request<super::QueryPointGroups>,
6535        ) -> std::result::Result<
6536            tonic::Response<super::QueryGroupsResponse>,
6537            tonic::Status,
6538        >;
6539        ///
6540        /// Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions.
6541        async fn facet(
6542            &self,
6543            request: tonic::Request<super::FacetCounts>,
6544        ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
6545        ///
6546        /// Compute distance matrix for sampled points with a pair based output format
6547        async fn search_matrix_pairs(
6548            &self,
6549            request: tonic::Request<super::SearchMatrixPoints>,
6550        ) -> std::result::Result<
6551            tonic::Response<super::SearchMatrixPairsResponse>,
6552            tonic::Status,
6553        >;
6554        ///
6555        /// Compute distance matrix for sampled points with an offset based output format
6556        async fn search_matrix_offsets(
6557            &self,
6558            request: tonic::Request<super::SearchMatrixPoints>,
6559        ) -> std::result::Result<
6560            tonic::Response<super::SearchMatrixOffsetsResponse>,
6561            tonic::Status,
6562        >;
6563    }
6564    #[derive(Debug)]
6565    pub struct PointsServer<T> {
6566        inner: Arc<T>,
6567        accept_compression_encodings: EnabledCompressionEncodings,
6568        send_compression_encodings: EnabledCompressionEncodings,
6569        max_decoding_message_size: Option<usize>,
6570        max_encoding_message_size: Option<usize>,
6571    }
6572    impl<T> PointsServer<T> {
6573        pub fn new(inner: T) -> Self {
6574            Self::from_arc(Arc::new(inner))
6575        }
6576        pub fn from_arc(inner: Arc<T>) -> Self {
6577            Self {
6578                inner,
6579                accept_compression_encodings: Default::default(),
6580                send_compression_encodings: Default::default(),
6581                max_decoding_message_size: None,
6582                max_encoding_message_size: None,
6583            }
6584        }
6585        pub fn with_interceptor<F>(
6586            inner: T,
6587            interceptor: F,
6588        ) -> InterceptedService<Self, F>
6589        where
6590            F: tonic::service::Interceptor,
6591        {
6592            InterceptedService::new(Self::new(inner), interceptor)
6593        }
6594        /// Enable decompressing requests with the given encoding.
6595        #[must_use]
6596        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6597            self.accept_compression_encodings.enable(encoding);
6598            self
6599        }
6600        /// Compress responses with the given encoding, if the client supports it.
6601        #[must_use]
6602        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6603            self.send_compression_encodings.enable(encoding);
6604            self
6605        }
6606        /// Limits the maximum size of a decoded message.
6607        ///
6608        /// Default: `4MB`
6609        #[must_use]
6610        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6611            self.max_decoding_message_size = Some(limit);
6612            self
6613        }
6614        /// Limits the maximum size of an encoded message.
6615        ///
6616        /// Default: `usize::MAX`
6617        #[must_use]
6618        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6619            self.max_encoding_message_size = Some(limit);
6620            self
6621        }
6622    }
6623    impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
6624    where
6625        T: Points,
6626        B: Body + std::marker::Send + 'static,
6627        B::Error: Into<StdError> + std::marker::Send + 'static,
6628    {
6629        type Response = http::Response<tonic::body::BoxBody>;
6630        type Error = std::convert::Infallible;
6631        type Future = BoxFuture<Self::Response, Self::Error>;
6632        fn poll_ready(
6633            &mut self,
6634            _cx: &mut Context<'_>,
6635        ) -> Poll<std::result::Result<(), Self::Error>> {
6636            Poll::Ready(Ok(()))
6637        }
6638        fn call(&mut self, req: http::Request<B>) -> Self::Future {
6639            match req.uri().path() {
6640                "/qdrant.Points/Upsert" => {
6641                    #[allow(non_camel_case_types)]
6642                    struct UpsertSvc<T: Points>(pub Arc<T>);
6643                    impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
6644                    for UpsertSvc<T> {
6645                        type Response = super::PointsOperationResponse;
6646                        type Future = BoxFuture<
6647                            tonic::Response<Self::Response>,
6648                            tonic::Status,
6649                        >;
6650                        fn call(
6651                            &mut self,
6652                            request: tonic::Request<super::UpsertPoints>,
6653                        ) -> Self::Future {
6654                            let inner = Arc::clone(&self.0);
6655                            let fut = async move {
6656                                <T as Points>::upsert(&inner, request).await
6657                            };
6658                            Box::pin(fut)
6659                        }
6660                    }
6661                    let accept_compression_encodings = self.accept_compression_encodings;
6662                    let send_compression_encodings = self.send_compression_encodings;
6663                    let max_decoding_message_size = self.max_decoding_message_size;
6664                    let max_encoding_message_size = self.max_encoding_message_size;
6665                    let inner = self.inner.clone();
6666                    let fut = async move {
6667                        let method = UpsertSvc(inner);
6668                        let codec = tonic::codec::ProstCodec::default();
6669                        let mut grpc = tonic::server::Grpc::new(codec)
6670                            .apply_compression_config(
6671                                accept_compression_encodings,
6672                                send_compression_encodings,
6673                            )
6674                            .apply_max_message_size_config(
6675                                max_decoding_message_size,
6676                                max_encoding_message_size,
6677                            );
6678                        let res = grpc.unary(method, req).await;
6679                        Ok(res)
6680                    };
6681                    Box::pin(fut)
6682                }
6683                "/qdrant.Points/Delete" => {
6684                    #[allow(non_camel_case_types)]
6685                    struct DeleteSvc<T: Points>(pub Arc<T>);
6686                    impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
6687                    for DeleteSvc<T> {
6688                        type Response = super::PointsOperationResponse;
6689                        type Future = BoxFuture<
6690                            tonic::Response<Self::Response>,
6691                            tonic::Status,
6692                        >;
6693                        fn call(
6694                            &mut self,
6695                            request: tonic::Request<super::DeletePoints>,
6696                        ) -> Self::Future {
6697                            let inner = Arc::clone(&self.0);
6698                            let fut = async move {
6699                                <T as Points>::delete(&inner, request).await
6700                            };
6701                            Box::pin(fut)
6702                        }
6703                    }
6704                    let accept_compression_encodings = self.accept_compression_encodings;
6705                    let send_compression_encodings = self.send_compression_encodings;
6706                    let max_decoding_message_size = self.max_decoding_message_size;
6707                    let max_encoding_message_size = self.max_encoding_message_size;
6708                    let inner = self.inner.clone();
6709                    let fut = async move {
6710                        let method = DeleteSvc(inner);
6711                        let codec = tonic::codec::ProstCodec::default();
6712                        let mut grpc = tonic::server::Grpc::new(codec)
6713                            .apply_compression_config(
6714                                accept_compression_encodings,
6715                                send_compression_encodings,
6716                            )
6717                            .apply_max_message_size_config(
6718                                max_decoding_message_size,
6719                                max_encoding_message_size,
6720                            );
6721                        let res = grpc.unary(method, req).await;
6722                        Ok(res)
6723                    };
6724                    Box::pin(fut)
6725                }
6726                "/qdrant.Points/Get" => {
6727                    #[allow(non_camel_case_types)]
6728                    struct GetSvc<T: Points>(pub Arc<T>);
6729                    impl<T: Points> tonic::server::UnaryService<super::GetPoints>
6730                    for GetSvc<T> {
6731                        type Response = super::GetResponse;
6732                        type Future = BoxFuture<
6733                            tonic::Response<Self::Response>,
6734                            tonic::Status,
6735                        >;
6736                        fn call(
6737                            &mut self,
6738                            request: tonic::Request<super::GetPoints>,
6739                        ) -> Self::Future {
6740                            let inner = Arc::clone(&self.0);
6741                            let fut = async move {
6742                                <T as Points>::get(&inner, request).await
6743                            };
6744                            Box::pin(fut)
6745                        }
6746                    }
6747                    let accept_compression_encodings = self.accept_compression_encodings;
6748                    let send_compression_encodings = self.send_compression_encodings;
6749                    let max_decoding_message_size = self.max_decoding_message_size;
6750                    let max_encoding_message_size = self.max_encoding_message_size;
6751                    let inner = self.inner.clone();
6752                    let fut = async move {
6753                        let method = GetSvc(inner);
6754                        let codec = tonic::codec::ProstCodec::default();
6755                        let mut grpc = tonic::server::Grpc::new(codec)
6756                            .apply_compression_config(
6757                                accept_compression_encodings,
6758                                send_compression_encodings,
6759                            )
6760                            .apply_max_message_size_config(
6761                                max_decoding_message_size,
6762                                max_encoding_message_size,
6763                            );
6764                        let res = grpc.unary(method, req).await;
6765                        Ok(res)
6766                    };
6767                    Box::pin(fut)
6768                }
6769                "/qdrant.Points/UpdateVectors" => {
6770                    #[allow(non_camel_case_types)]
6771                    struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
6772                    impl<
6773                        T: Points,
6774                    > tonic::server::UnaryService<super::UpdatePointVectors>
6775                    for UpdateVectorsSvc<T> {
6776                        type Response = super::PointsOperationResponse;
6777                        type Future = BoxFuture<
6778                            tonic::Response<Self::Response>,
6779                            tonic::Status,
6780                        >;
6781                        fn call(
6782                            &mut self,
6783                            request: tonic::Request<super::UpdatePointVectors>,
6784                        ) -> Self::Future {
6785                            let inner = Arc::clone(&self.0);
6786                            let fut = async move {
6787                                <T as Points>::update_vectors(&inner, request).await
6788                            };
6789                            Box::pin(fut)
6790                        }
6791                    }
6792                    let accept_compression_encodings = self.accept_compression_encodings;
6793                    let send_compression_encodings = self.send_compression_encodings;
6794                    let max_decoding_message_size = self.max_decoding_message_size;
6795                    let max_encoding_message_size = self.max_encoding_message_size;
6796                    let inner = self.inner.clone();
6797                    let fut = async move {
6798                        let method = UpdateVectorsSvc(inner);
6799                        let codec = tonic::codec::ProstCodec::default();
6800                        let mut grpc = tonic::server::Grpc::new(codec)
6801                            .apply_compression_config(
6802                                accept_compression_encodings,
6803                                send_compression_encodings,
6804                            )
6805                            .apply_max_message_size_config(
6806                                max_decoding_message_size,
6807                                max_encoding_message_size,
6808                            );
6809                        let res = grpc.unary(method, req).await;
6810                        Ok(res)
6811                    };
6812                    Box::pin(fut)
6813                }
6814                "/qdrant.Points/DeleteVectors" => {
6815                    #[allow(non_camel_case_types)]
6816                    struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
6817                    impl<
6818                        T: Points,
6819                    > tonic::server::UnaryService<super::DeletePointVectors>
6820                    for DeleteVectorsSvc<T> {
6821                        type Response = super::PointsOperationResponse;
6822                        type Future = BoxFuture<
6823                            tonic::Response<Self::Response>,
6824                            tonic::Status,
6825                        >;
6826                        fn call(
6827                            &mut self,
6828                            request: tonic::Request<super::DeletePointVectors>,
6829                        ) -> Self::Future {
6830                            let inner = Arc::clone(&self.0);
6831                            let fut = async move {
6832                                <T as Points>::delete_vectors(&inner, request).await
6833                            };
6834                            Box::pin(fut)
6835                        }
6836                    }
6837                    let accept_compression_encodings = self.accept_compression_encodings;
6838                    let send_compression_encodings = self.send_compression_encodings;
6839                    let max_decoding_message_size = self.max_decoding_message_size;
6840                    let max_encoding_message_size = self.max_encoding_message_size;
6841                    let inner = self.inner.clone();
6842                    let fut = async move {
6843                        let method = DeleteVectorsSvc(inner);
6844                        let codec = tonic::codec::ProstCodec::default();
6845                        let mut grpc = tonic::server::Grpc::new(codec)
6846                            .apply_compression_config(
6847                                accept_compression_encodings,
6848                                send_compression_encodings,
6849                            )
6850                            .apply_max_message_size_config(
6851                                max_decoding_message_size,
6852                                max_encoding_message_size,
6853                            );
6854                        let res = grpc.unary(method, req).await;
6855                        Ok(res)
6856                    };
6857                    Box::pin(fut)
6858                }
6859                "/qdrant.Points/SetPayload" => {
6860                    #[allow(non_camel_case_types)]
6861                    struct SetPayloadSvc<T: Points>(pub Arc<T>);
6862                    impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
6863                    for SetPayloadSvc<T> {
6864                        type Response = super::PointsOperationResponse;
6865                        type Future = BoxFuture<
6866                            tonic::Response<Self::Response>,
6867                            tonic::Status,
6868                        >;
6869                        fn call(
6870                            &mut self,
6871                            request: tonic::Request<super::SetPayloadPoints>,
6872                        ) -> Self::Future {
6873                            let inner = Arc::clone(&self.0);
6874                            let fut = async move {
6875                                <T as Points>::set_payload(&inner, request).await
6876                            };
6877                            Box::pin(fut)
6878                        }
6879                    }
6880                    let accept_compression_encodings = self.accept_compression_encodings;
6881                    let send_compression_encodings = self.send_compression_encodings;
6882                    let max_decoding_message_size = self.max_decoding_message_size;
6883                    let max_encoding_message_size = self.max_encoding_message_size;
6884                    let inner = self.inner.clone();
6885                    let fut = async move {
6886                        let method = SetPayloadSvc(inner);
6887                        let codec = tonic::codec::ProstCodec::default();
6888                        let mut grpc = tonic::server::Grpc::new(codec)
6889                            .apply_compression_config(
6890                                accept_compression_encodings,
6891                                send_compression_encodings,
6892                            )
6893                            .apply_max_message_size_config(
6894                                max_decoding_message_size,
6895                                max_encoding_message_size,
6896                            );
6897                        let res = grpc.unary(method, req).await;
6898                        Ok(res)
6899                    };
6900                    Box::pin(fut)
6901                }
6902                "/qdrant.Points/OverwritePayload" => {
6903                    #[allow(non_camel_case_types)]
6904                    struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
6905                    impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
6906                    for OverwritePayloadSvc<T> {
6907                        type Response = super::PointsOperationResponse;
6908                        type Future = BoxFuture<
6909                            tonic::Response<Self::Response>,
6910                            tonic::Status,
6911                        >;
6912                        fn call(
6913                            &mut self,
6914                            request: tonic::Request<super::SetPayloadPoints>,
6915                        ) -> Self::Future {
6916                            let inner = Arc::clone(&self.0);
6917                            let fut = async move {
6918                                <T as Points>::overwrite_payload(&inner, request).await
6919                            };
6920                            Box::pin(fut)
6921                        }
6922                    }
6923                    let accept_compression_encodings = self.accept_compression_encodings;
6924                    let send_compression_encodings = self.send_compression_encodings;
6925                    let max_decoding_message_size = self.max_decoding_message_size;
6926                    let max_encoding_message_size = self.max_encoding_message_size;
6927                    let inner = self.inner.clone();
6928                    let fut = async move {
6929                        let method = OverwritePayloadSvc(inner);
6930                        let codec = tonic::codec::ProstCodec::default();
6931                        let mut grpc = tonic::server::Grpc::new(codec)
6932                            .apply_compression_config(
6933                                accept_compression_encodings,
6934                                send_compression_encodings,
6935                            )
6936                            .apply_max_message_size_config(
6937                                max_decoding_message_size,
6938                                max_encoding_message_size,
6939                            );
6940                        let res = grpc.unary(method, req).await;
6941                        Ok(res)
6942                    };
6943                    Box::pin(fut)
6944                }
6945                "/qdrant.Points/DeletePayload" => {
6946                    #[allow(non_camel_case_types)]
6947                    struct DeletePayloadSvc<T: Points>(pub Arc<T>);
6948                    impl<
6949                        T: Points,
6950                    > tonic::server::UnaryService<super::DeletePayloadPoints>
6951                    for DeletePayloadSvc<T> {
6952                        type Response = super::PointsOperationResponse;
6953                        type Future = BoxFuture<
6954                            tonic::Response<Self::Response>,
6955                            tonic::Status,
6956                        >;
6957                        fn call(
6958                            &mut self,
6959                            request: tonic::Request<super::DeletePayloadPoints>,
6960                        ) -> Self::Future {
6961                            let inner = Arc::clone(&self.0);
6962                            let fut = async move {
6963                                <T as Points>::delete_payload(&inner, request).await
6964                            };
6965                            Box::pin(fut)
6966                        }
6967                    }
6968                    let accept_compression_encodings = self.accept_compression_encodings;
6969                    let send_compression_encodings = self.send_compression_encodings;
6970                    let max_decoding_message_size = self.max_decoding_message_size;
6971                    let max_encoding_message_size = self.max_encoding_message_size;
6972                    let inner = self.inner.clone();
6973                    let fut = async move {
6974                        let method = DeletePayloadSvc(inner);
6975                        let codec = tonic::codec::ProstCodec::default();
6976                        let mut grpc = tonic::server::Grpc::new(codec)
6977                            .apply_compression_config(
6978                                accept_compression_encodings,
6979                                send_compression_encodings,
6980                            )
6981                            .apply_max_message_size_config(
6982                                max_decoding_message_size,
6983                                max_encoding_message_size,
6984                            );
6985                        let res = grpc.unary(method, req).await;
6986                        Ok(res)
6987                    };
6988                    Box::pin(fut)
6989                }
6990                "/qdrant.Points/ClearPayload" => {
6991                    #[allow(non_camel_case_types)]
6992                    struct ClearPayloadSvc<T: Points>(pub Arc<T>);
6993                    impl<
6994                        T: Points,
6995                    > tonic::server::UnaryService<super::ClearPayloadPoints>
6996                    for ClearPayloadSvc<T> {
6997                        type Response = super::PointsOperationResponse;
6998                        type Future = BoxFuture<
6999                            tonic::Response<Self::Response>,
7000                            tonic::Status,
7001                        >;
7002                        fn call(
7003                            &mut self,
7004                            request: tonic::Request<super::ClearPayloadPoints>,
7005                        ) -> Self::Future {
7006                            let inner = Arc::clone(&self.0);
7007                            let fut = async move {
7008                                <T as Points>::clear_payload(&inner, request).await
7009                            };
7010                            Box::pin(fut)
7011                        }
7012                    }
7013                    let accept_compression_encodings = self.accept_compression_encodings;
7014                    let send_compression_encodings = self.send_compression_encodings;
7015                    let max_decoding_message_size = self.max_decoding_message_size;
7016                    let max_encoding_message_size = self.max_encoding_message_size;
7017                    let inner = self.inner.clone();
7018                    let fut = async move {
7019                        let method = ClearPayloadSvc(inner);
7020                        let codec = tonic::codec::ProstCodec::default();
7021                        let mut grpc = tonic::server::Grpc::new(codec)
7022                            .apply_compression_config(
7023                                accept_compression_encodings,
7024                                send_compression_encodings,
7025                            )
7026                            .apply_max_message_size_config(
7027                                max_decoding_message_size,
7028                                max_encoding_message_size,
7029                            );
7030                        let res = grpc.unary(method, req).await;
7031                        Ok(res)
7032                    };
7033                    Box::pin(fut)
7034                }
7035                "/qdrant.Points/CreateFieldIndex" => {
7036                    #[allow(non_camel_case_types)]
7037                    struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
7038                    impl<
7039                        T: Points,
7040                    > tonic::server::UnaryService<super::CreateFieldIndexCollection>
7041                    for CreateFieldIndexSvc<T> {
7042                        type Response = super::PointsOperationResponse;
7043                        type Future = BoxFuture<
7044                            tonic::Response<Self::Response>,
7045                            tonic::Status,
7046                        >;
7047                        fn call(
7048                            &mut self,
7049                            request: tonic::Request<super::CreateFieldIndexCollection>,
7050                        ) -> Self::Future {
7051                            let inner = Arc::clone(&self.0);
7052                            let fut = async move {
7053                                <T as Points>::create_field_index(&inner, request).await
7054                            };
7055                            Box::pin(fut)
7056                        }
7057                    }
7058                    let accept_compression_encodings = self.accept_compression_encodings;
7059                    let send_compression_encodings = self.send_compression_encodings;
7060                    let max_decoding_message_size = self.max_decoding_message_size;
7061                    let max_encoding_message_size = self.max_encoding_message_size;
7062                    let inner = self.inner.clone();
7063                    let fut = async move {
7064                        let method = CreateFieldIndexSvc(inner);
7065                        let codec = tonic::codec::ProstCodec::default();
7066                        let mut grpc = tonic::server::Grpc::new(codec)
7067                            .apply_compression_config(
7068                                accept_compression_encodings,
7069                                send_compression_encodings,
7070                            )
7071                            .apply_max_message_size_config(
7072                                max_decoding_message_size,
7073                                max_encoding_message_size,
7074                            );
7075                        let res = grpc.unary(method, req).await;
7076                        Ok(res)
7077                    };
7078                    Box::pin(fut)
7079                }
7080                "/qdrant.Points/DeleteFieldIndex" => {
7081                    #[allow(non_camel_case_types)]
7082                    struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
7083                    impl<
7084                        T: Points,
7085                    > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
7086                    for DeleteFieldIndexSvc<T> {
7087                        type Response = super::PointsOperationResponse;
7088                        type Future = BoxFuture<
7089                            tonic::Response<Self::Response>,
7090                            tonic::Status,
7091                        >;
7092                        fn call(
7093                            &mut self,
7094                            request: tonic::Request<super::DeleteFieldIndexCollection>,
7095                        ) -> Self::Future {
7096                            let inner = Arc::clone(&self.0);
7097                            let fut = async move {
7098                                <T as Points>::delete_field_index(&inner, request).await
7099                            };
7100                            Box::pin(fut)
7101                        }
7102                    }
7103                    let accept_compression_encodings = self.accept_compression_encodings;
7104                    let send_compression_encodings = self.send_compression_encodings;
7105                    let max_decoding_message_size = self.max_decoding_message_size;
7106                    let max_encoding_message_size = self.max_encoding_message_size;
7107                    let inner = self.inner.clone();
7108                    let fut = async move {
7109                        let method = DeleteFieldIndexSvc(inner);
7110                        let codec = tonic::codec::ProstCodec::default();
7111                        let mut grpc = tonic::server::Grpc::new(codec)
7112                            .apply_compression_config(
7113                                accept_compression_encodings,
7114                                send_compression_encodings,
7115                            )
7116                            .apply_max_message_size_config(
7117                                max_decoding_message_size,
7118                                max_encoding_message_size,
7119                            );
7120                        let res = grpc.unary(method, req).await;
7121                        Ok(res)
7122                    };
7123                    Box::pin(fut)
7124                }
7125                "/qdrant.Points/Search" => {
7126                    #[allow(non_camel_case_types)]
7127                    struct SearchSvc<T: Points>(pub Arc<T>);
7128                    impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
7129                    for SearchSvc<T> {
7130                        type Response = super::SearchResponse;
7131                        type Future = BoxFuture<
7132                            tonic::Response<Self::Response>,
7133                            tonic::Status,
7134                        >;
7135                        fn call(
7136                            &mut self,
7137                            request: tonic::Request<super::SearchPoints>,
7138                        ) -> Self::Future {
7139                            let inner = Arc::clone(&self.0);
7140                            let fut = async move {
7141                                <T as Points>::search(&inner, request).await
7142                            };
7143                            Box::pin(fut)
7144                        }
7145                    }
7146                    let accept_compression_encodings = self.accept_compression_encodings;
7147                    let send_compression_encodings = self.send_compression_encodings;
7148                    let max_decoding_message_size = self.max_decoding_message_size;
7149                    let max_encoding_message_size = self.max_encoding_message_size;
7150                    let inner = self.inner.clone();
7151                    let fut = async move {
7152                        let method = SearchSvc(inner);
7153                        let codec = tonic::codec::ProstCodec::default();
7154                        let mut grpc = tonic::server::Grpc::new(codec)
7155                            .apply_compression_config(
7156                                accept_compression_encodings,
7157                                send_compression_encodings,
7158                            )
7159                            .apply_max_message_size_config(
7160                                max_decoding_message_size,
7161                                max_encoding_message_size,
7162                            );
7163                        let res = grpc.unary(method, req).await;
7164                        Ok(res)
7165                    };
7166                    Box::pin(fut)
7167                }
7168                "/qdrant.Points/SearchBatch" => {
7169                    #[allow(non_camel_case_types)]
7170                    struct SearchBatchSvc<T: Points>(pub Arc<T>);
7171                    impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
7172                    for SearchBatchSvc<T> {
7173                        type Response = super::SearchBatchResponse;
7174                        type Future = BoxFuture<
7175                            tonic::Response<Self::Response>,
7176                            tonic::Status,
7177                        >;
7178                        fn call(
7179                            &mut self,
7180                            request: tonic::Request<super::SearchBatchPoints>,
7181                        ) -> Self::Future {
7182                            let inner = Arc::clone(&self.0);
7183                            let fut = async move {
7184                                <T as Points>::search_batch(&inner, request).await
7185                            };
7186                            Box::pin(fut)
7187                        }
7188                    }
7189                    let accept_compression_encodings = self.accept_compression_encodings;
7190                    let send_compression_encodings = self.send_compression_encodings;
7191                    let max_decoding_message_size = self.max_decoding_message_size;
7192                    let max_encoding_message_size = self.max_encoding_message_size;
7193                    let inner = self.inner.clone();
7194                    let fut = async move {
7195                        let method = SearchBatchSvc(inner);
7196                        let codec = tonic::codec::ProstCodec::default();
7197                        let mut grpc = tonic::server::Grpc::new(codec)
7198                            .apply_compression_config(
7199                                accept_compression_encodings,
7200                                send_compression_encodings,
7201                            )
7202                            .apply_max_message_size_config(
7203                                max_decoding_message_size,
7204                                max_encoding_message_size,
7205                            );
7206                        let res = grpc.unary(method, req).await;
7207                        Ok(res)
7208                    };
7209                    Box::pin(fut)
7210                }
7211                "/qdrant.Points/SearchGroups" => {
7212                    #[allow(non_camel_case_types)]
7213                    struct SearchGroupsSvc<T: Points>(pub Arc<T>);
7214                    impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
7215                    for SearchGroupsSvc<T> {
7216                        type Response = super::SearchGroupsResponse;
7217                        type Future = BoxFuture<
7218                            tonic::Response<Self::Response>,
7219                            tonic::Status,
7220                        >;
7221                        fn call(
7222                            &mut self,
7223                            request: tonic::Request<super::SearchPointGroups>,
7224                        ) -> Self::Future {
7225                            let inner = Arc::clone(&self.0);
7226                            let fut = async move {
7227                                <T as Points>::search_groups(&inner, request).await
7228                            };
7229                            Box::pin(fut)
7230                        }
7231                    }
7232                    let accept_compression_encodings = self.accept_compression_encodings;
7233                    let send_compression_encodings = self.send_compression_encodings;
7234                    let max_decoding_message_size = self.max_decoding_message_size;
7235                    let max_encoding_message_size = self.max_encoding_message_size;
7236                    let inner = self.inner.clone();
7237                    let fut = async move {
7238                        let method = SearchGroupsSvc(inner);
7239                        let codec = tonic::codec::ProstCodec::default();
7240                        let mut grpc = tonic::server::Grpc::new(codec)
7241                            .apply_compression_config(
7242                                accept_compression_encodings,
7243                                send_compression_encodings,
7244                            )
7245                            .apply_max_message_size_config(
7246                                max_decoding_message_size,
7247                                max_encoding_message_size,
7248                            );
7249                        let res = grpc.unary(method, req).await;
7250                        Ok(res)
7251                    };
7252                    Box::pin(fut)
7253                }
7254                "/qdrant.Points/Scroll" => {
7255                    #[allow(non_camel_case_types)]
7256                    struct ScrollSvc<T: Points>(pub Arc<T>);
7257                    impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
7258                    for ScrollSvc<T> {
7259                        type Response = super::ScrollResponse;
7260                        type Future = BoxFuture<
7261                            tonic::Response<Self::Response>,
7262                            tonic::Status,
7263                        >;
7264                        fn call(
7265                            &mut self,
7266                            request: tonic::Request<super::ScrollPoints>,
7267                        ) -> Self::Future {
7268                            let inner = Arc::clone(&self.0);
7269                            let fut = async move {
7270                                <T as Points>::scroll(&inner, request).await
7271                            };
7272                            Box::pin(fut)
7273                        }
7274                    }
7275                    let accept_compression_encodings = self.accept_compression_encodings;
7276                    let send_compression_encodings = self.send_compression_encodings;
7277                    let max_decoding_message_size = self.max_decoding_message_size;
7278                    let max_encoding_message_size = self.max_encoding_message_size;
7279                    let inner = self.inner.clone();
7280                    let fut = async move {
7281                        let method = ScrollSvc(inner);
7282                        let codec = tonic::codec::ProstCodec::default();
7283                        let mut grpc = tonic::server::Grpc::new(codec)
7284                            .apply_compression_config(
7285                                accept_compression_encodings,
7286                                send_compression_encodings,
7287                            )
7288                            .apply_max_message_size_config(
7289                                max_decoding_message_size,
7290                                max_encoding_message_size,
7291                            );
7292                        let res = grpc.unary(method, req).await;
7293                        Ok(res)
7294                    };
7295                    Box::pin(fut)
7296                }
7297                "/qdrant.Points/Recommend" => {
7298                    #[allow(non_camel_case_types)]
7299                    struct RecommendSvc<T: Points>(pub Arc<T>);
7300                    impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
7301                    for RecommendSvc<T> {
7302                        type Response = super::RecommendResponse;
7303                        type Future = BoxFuture<
7304                            tonic::Response<Self::Response>,
7305                            tonic::Status,
7306                        >;
7307                        fn call(
7308                            &mut self,
7309                            request: tonic::Request<super::RecommendPoints>,
7310                        ) -> Self::Future {
7311                            let inner = Arc::clone(&self.0);
7312                            let fut = async move {
7313                                <T as Points>::recommend(&inner, request).await
7314                            };
7315                            Box::pin(fut)
7316                        }
7317                    }
7318                    let accept_compression_encodings = self.accept_compression_encodings;
7319                    let send_compression_encodings = self.send_compression_encodings;
7320                    let max_decoding_message_size = self.max_decoding_message_size;
7321                    let max_encoding_message_size = self.max_encoding_message_size;
7322                    let inner = self.inner.clone();
7323                    let fut = async move {
7324                        let method = RecommendSvc(inner);
7325                        let codec = tonic::codec::ProstCodec::default();
7326                        let mut grpc = tonic::server::Grpc::new(codec)
7327                            .apply_compression_config(
7328                                accept_compression_encodings,
7329                                send_compression_encodings,
7330                            )
7331                            .apply_max_message_size_config(
7332                                max_decoding_message_size,
7333                                max_encoding_message_size,
7334                            );
7335                        let res = grpc.unary(method, req).await;
7336                        Ok(res)
7337                    };
7338                    Box::pin(fut)
7339                }
7340                "/qdrant.Points/RecommendBatch" => {
7341                    #[allow(non_camel_case_types)]
7342                    struct RecommendBatchSvc<T: Points>(pub Arc<T>);
7343                    impl<
7344                        T: Points,
7345                    > tonic::server::UnaryService<super::RecommendBatchPoints>
7346                    for RecommendBatchSvc<T> {
7347                        type Response = super::RecommendBatchResponse;
7348                        type Future = BoxFuture<
7349                            tonic::Response<Self::Response>,
7350                            tonic::Status,
7351                        >;
7352                        fn call(
7353                            &mut self,
7354                            request: tonic::Request<super::RecommendBatchPoints>,
7355                        ) -> Self::Future {
7356                            let inner = Arc::clone(&self.0);
7357                            let fut = async move {
7358                                <T as Points>::recommend_batch(&inner, request).await
7359                            };
7360                            Box::pin(fut)
7361                        }
7362                    }
7363                    let accept_compression_encodings = self.accept_compression_encodings;
7364                    let send_compression_encodings = self.send_compression_encodings;
7365                    let max_decoding_message_size = self.max_decoding_message_size;
7366                    let max_encoding_message_size = self.max_encoding_message_size;
7367                    let inner = self.inner.clone();
7368                    let fut = async move {
7369                        let method = RecommendBatchSvc(inner);
7370                        let codec = tonic::codec::ProstCodec::default();
7371                        let mut grpc = tonic::server::Grpc::new(codec)
7372                            .apply_compression_config(
7373                                accept_compression_encodings,
7374                                send_compression_encodings,
7375                            )
7376                            .apply_max_message_size_config(
7377                                max_decoding_message_size,
7378                                max_encoding_message_size,
7379                            );
7380                        let res = grpc.unary(method, req).await;
7381                        Ok(res)
7382                    };
7383                    Box::pin(fut)
7384                }
7385                "/qdrant.Points/RecommendGroups" => {
7386                    #[allow(non_camel_case_types)]
7387                    struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
7388                    impl<
7389                        T: Points,
7390                    > tonic::server::UnaryService<super::RecommendPointGroups>
7391                    for RecommendGroupsSvc<T> {
7392                        type Response = super::RecommendGroupsResponse;
7393                        type Future = BoxFuture<
7394                            tonic::Response<Self::Response>,
7395                            tonic::Status,
7396                        >;
7397                        fn call(
7398                            &mut self,
7399                            request: tonic::Request<super::RecommendPointGroups>,
7400                        ) -> Self::Future {
7401                            let inner = Arc::clone(&self.0);
7402                            let fut = async move {
7403                                <T as Points>::recommend_groups(&inner, request).await
7404                            };
7405                            Box::pin(fut)
7406                        }
7407                    }
7408                    let accept_compression_encodings = self.accept_compression_encodings;
7409                    let send_compression_encodings = self.send_compression_encodings;
7410                    let max_decoding_message_size = self.max_decoding_message_size;
7411                    let max_encoding_message_size = self.max_encoding_message_size;
7412                    let inner = self.inner.clone();
7413                    let fut = async move {
7414                        let method = RecommendGroupsSvc(inner);
7415                        let codec = tonic::codec::ProstCodec::default();
7416                        let mut grpc = tonic::server::Grpc::new(codec)
7417                            .apply_compression_config(
7418                                accept_compression_encodings,
7419                                send_compression_encodings,
7420                            )
7421                            .apply_max_message_size_config(
7422                                max_decoding_message_size,
7423                                max_encoding_message_size,
7424                            );
7425                        let res = grpc.unary(method, req).await;
7426                        Ok(res)
7427                    };
7428                    Box::pin(fut)
7429                }
7430                "/qdrant.Points/Discover" => {
7431                    #[allow(non_camel_case_types)]
7432                    struct DiscoverSvc<T: Points>(pub Arc<T>);
7433                    impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
7434                    for DiscoverSvc<T> {
7435                        type Response = super::DiscoverResponse;
7436                        type Future = BoxFuture<
7437                            tonic::Response<Self::Response>,
7438                            tonic::Status,
7439                        >;
7440                        fn call(
7441                            &mut self,
7442                            request: tonic::Request<super::DiscoverPoints>,
7443                        ) -> Self::Future {
7444                            let inner = Arc::clone(&self.0);
7445                            let fut = async move {
7446                                <T as Points>::discover(&inner, request).await
7447                            };
7448                            Box::pin(fut)
7449                        }
7450                    }
7451                    let accept_compression_encodings = self.accept_compression_encodings;
7452                    let send_compression_encodings = self.send_compression_encodings;
7453                    let max_decoding_message_size = self.max_decoding_message_size;
7454                    let max_encoding_message_size = self.max_encoding_message_size;
7455                    let inner = self.inner.clone();
7456                    let fut = async move {
7457                        let method = DiscoverSvc(inner);
7458                        let codec = tonic::codec::ProstCodec::default();
7459                        let mut grpc = tonic::server::Grpc::new(codec)
7460                            .apply_compression_config(
7461                                accept_compression_encodings,
7462                                send_compression_encodings,
7463                            )
7464                            .apply_max_message_size_config(
7465                                max_decoding_message_size,
7466                                max_encoding_message_size,
7467                            );
7468                        let res = grpc.unary(method, req).await;
7469                        Ok(res)
7470                    };
7471                    Box::pin(fut)
7472                }
7473                "/qdrant.Points/DiscoverBatch" => {
7474                    #[allow(non_camel_case_types)]
7475                    struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
7476                    impl<
7477                        T: Points,
7478                    > tonic::server::UnaryService<super::DiscoverBatchPoints>
7479                    for DiscoverBatchSvc<T> {
7480                        type Response = super::DiscoverBatchResponse;
7481                        type Future = BoxFuture<
7482                            tonic::Response<Self::Response>,
7483                            tonic::Status,
7484                        >;
7485                        fn call(
7486                            &mut self,
7487                            request: tonic::Request<super::DiscoverBatchPoints>,
7488                        ) -> Self::Future {
7489                            let inner = Arc::clone(&self.0);
7490                            let fut = async move {
7491                                <T as Points>::discover_batch(&inner, request).await
7492                            };
7493                            Box::pin(fut)
7494                        }
7495                    }
7496                    let accept_compression_encodings = self.accept_compression_encodings;
7497                    let send_compression_encodings = self.send_compression_encodings;
7498                    let max_decoding_message_size = self.max_decoding_message_size;
7499                    let max_encoding_message_size = self.max_encoding_message_size;
7500                    let inner = self.inner.clone();
7501                    let fut = async move {
7502                        let method = DiscoverBatchSvc(inner);
7503                        let codec = tonic::codec::ProstCodec::default();
7504                        let mut grpc = tonic::server::Grpc::new(codec)
7505                            .apply_compression_config(
7506                                accept_compression_encodings,
7507                                send_compression_encodings,
7508                            )
7509                            .apply_max_message_size_config(
7510                                max_decoding_message_size,
7511                                max_encoding_message_size,
7512                            );
7513                        let res = grpc.unary(method, req).await;
7514                        Ok(res)
7515                    };
7516                    Box::pin(fut)
7517                }
7518                "/qdrant.Points/Count" => {
7519                    #[allow(non_camel_case_types)]
7520                    struct CountSvc<T: Points>(pub Arc<T>);
7521                    impl<T: Points> tonic::server::UnaryService<super::CountPoints>
7522                    for CountSvc<T> {
7523                        type Response = super::CountResponse;
7524                        type Future = BoxFuture<
7525                            tonic::Response<Self::Response>,
7526                            tonic::Status,
7527                        >;
7528                        fn call(
7529                            &mut self,
7530                            request: tonic::Request<super::CountPoints>,
7531                        ) -> Self::Future {
7532                            let inner = Arc::clone(&self.0);
7533                            let fut = async move {
7534                                <T as Points>::count(&inner, request).await
7535                            };
7536                            Box::pin(fut)
7537                        }
7538                    }
7539                    let accept_compression_encodings = self.accept_compression_encodings;
7540                    let send_compression_encodings = self.send_compression_encodings;
7541                    let max_decoding_message_size = self.max_decoding_message_size;
7542                    let max_encoding_message_size = self.max_encoding_message_size;
7543                    let inner = self.inner.clone();
7544                    let fut = async move {
7545                        let method = CountSvc(inner);
7546                        let codec = tonic::codec::ProstCodec::default();
7547                        let mut grpc = tonic::server::Grpc::new(codec)
7548                            .apply_compression_config(
7549                                accept_compression_encodings,
7550                                send_compression_encodings,
7551                            )
7552                            .apply_max_message_size_config(
7553                                max_decoding_message_size,
7554                                max_encoding_message_size,
7555                            );
7556                        let res = grpc.unary(method, req).await;
7557                        Ok(res)
7558                    };
7559                    Box::pin(fut)
7560                }
7561                "/qdrant.Points/UpdateBatch" => {
7562                    #[allow(non_camel_case_types)]
7563                    struct UpdateBatchSvc<T: Points>(pub Arc<T>);
7564                    impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
7565                    for UpdateBatchSvc<T> {
7566                        type Response = super::UpdateBatchResponse;
7567                        type Future = BoxFuture<
7568                            tonic::Response<Self::Response>,
7569                            tonic::Status,
7570                        >;
7571                        fn call(
7572                            &mut self,
7573                            request: tonic::Request<super::UpdateBatchPoints>,
7574                        ) -> Self::Future {
7575                            let inner = Arc::clone(&self.0);
7576                            let fut = async move {
7577                                <T as Points>::update_batch(&inner, request).await
7578                            };
7579                            Box::pin(fut)
7580                        }
7581                    }
7582                    let accept_compression_encodings = self.accept_compression_encodings;
7583                    let send_compression_encodings = self.send_compression_encodings;
7584                    let max_decoding_message_size = self.max_decoding_message_size;
7585                    let max_encoding_message_size = self.max_encoding_message_size;
7586                    let inner = self.inner.clone();
7587                    let fut = async move {
7588                        let method = UpdateBatchSvc(inner);
7589                        let codec = tonic::codec::ProstCodec::default();
7590                        let mut grpc = tonic::server::Grpc::new(codec)
7591                            .apply_compression_config(
7592                                accept_compression_encodings,
7593                                send_compression_encodings,
7594                            )
7595                            .apply_max_message_size_config(
7596                                max_decoding_message_size,
7597                                max_encoding_message_size,
7598                            );
7599                        let res = grpc.unary(method, req).await;
7600                        Ok(res)
7601                    };
7602                    Box::pin(fut)
7603                }
7604                "/qdrant.Points/Query" => {
7605                    #[allow(non_camel_case_types)]
7606                    struct QuerySvc<T: Points>(pub Arc<T>);
7607                    impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
7608                    for QuerySvc<T> {
7609                        type Response = super::QueryResponse;
7610                        type Future = BoxFuture<
7611                            tonic::Response<Self::Response>,
7612                            tonic::Status,
7613                        >;
7614                        fn call(
7615                            &mut self,
7616                            request: tonic::Request<super::QueryPoints>,
7617                        ) -> Self::Future {
7618                            let inner = Arc::clone(&self.0);
7619                            let fut = async move {
7620                                <T as Points>::query(&inner, request).await
7621                            };
7622                            Box::pin(fut)
7623                        }
7624                    }
7625                    let accept_compression_encodings = self.accept_compression_encodings;
7626                    let send_compression_encodings = self.send_compression_encodings;
7627                    let max_decoding_message_size = self.max_decoding_message_size;
7628                    let max_encoding_message_size = self.max_encoding_message_size;
7629                    let inner = self.inner.clone();
7630                    let fut = async move {
7631                        let method = QuerySvc(inner);
7632                        let codec = tonic::codec::ProstCodec::default();
7633                        let mut grpc = tonic::server::Grpc::new(codec)
7634                            .apply_compression_config(
7635                                accept_compression_encodings,
7636                                send_compression_encodings,
7637                            )
7638                            .apply_max_message_size_config(
7639                                max_decoding_message_size,
7640                                max_encoding_message_size,
7641                            );
7642                        let res = grpc.unary(method, req).await;
7643                        Ok(res)
7644                    };
7645                    Box::pin(fut)
7646                }
7647                "/qdrant.Points/QueryBatch" => {
7648                    #[allow(non_camel_case_types)]
7649                    struct QueryBatchSvc<T: Points>(pub Arc<T>);
7650                    impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
7651                    for QueryBatchSvc<T> {
7652                        type Response = super::QueryBatchResponse;
7653                        type Future = BoxFuture<
7654                            tonic::Response<Self::Response>,
7655                            tonic::Status,
7656                        >;
7657                        fn call(
7658                            &mut self,
7659                            request: tonic::Request<super::QueryBatchPoints>,
7660                        ) -> Self::Future {
7661                            let inner = Arc::clone(&self.0);
7662                            let fut = async move {
7663                                <T as Points>::query_batch(&inner, request).await
7664                            };
7665                            Box::pin(fut)
7666                        }
7667                    }
7668                    let accept_compression_encodings = self.accept_compression_encodings;
7669                    let send_compression_encodings = self.send_compression_encodings;
7670                    let max_decoding_message_size = self.max_decoding_message_size;
7671                    let max_encoding_message_size = self.max_encoding_message_size;
7672                    let inner = self.inner.clone();
7673                    let fut = async move {
7674                        let method = QueryBatchSvc(inner);
7675                        let codec = tonic::codec::ProstCodec::default();
7676                        let mut grpc = tonic::server::Grpc::new(codec)
7677                            .apply_compression_config(
7678                                accept_compression_encodings,
7679                                send_compression_encodings,
7680                            )
7681                            .apply_max_message_size_config(
7682                                max_decoding_message_size,
7683                                max_encoding_message_size,
7684                            );
7685                        let res = grpc.unary(method, req).await;
7686                        Ok(res)
7687                    };
7688                    Box::pin(fut)
7689                }
7690                "/qdrant.Points/QueryGroups" => {
7691                    #[allow(non_camel_case_types)]
7692                    struct QueryGroupsSvc<T: Points>(pub Arc<T>);
7693                    impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
7694                    for QueryGroupsSvc<T> {
7695                        type Response = super::QueryGroupsResponse;
7696                        type Future = BoxFuture<
7697                            tonic::Response<Self::Response>,
7698                            tonic::Status,
7699                        >;
7700                        fn call(
7701                            &mut self,
7702                            request: tonic::Request<super::QueryPointGroups>,
7703                        ) -> Self::Future {
7704                            let inner = Arc::clone(&self.0);
7705                            let fut = async move {
7706                                <T as Points>::query_groups(&inner, request).await
7707                            };
7708                            Box::pin(fut)
7709                        }
7710                    }
7711                    let accept_compression_encodings = self.accept_compression_encodings;
7712                    let send_compression_encodings = self.send_compression_encodings;
7713                    let max_decoding_message_size = self.max_decoding_message_size;
7714                    let max_encoding_message_size = self.max_encoding_message_size;
7715                    let inner = self.inner.clone();
7716                    let fut = async move {
7717                        let method = QueryGroupsSvc(inner);
7718                        let codec = tonic::codec::ProstCodec::default();
7719                        let mut grpc = tonic::server::Grpc::new(codec)
7720                            .apply_compression_config(
7721                                accept_compression_encodings,
7722                                send_compression_encodings,
7723                            )
7724                            .apply_max_message_size_config(
7725                                max_decoding_message_size,
7726                                max_encoding_message_size,
7727                            );
7728                        let res = grpc.unary(method, req).await;
7729                        Ok(res)
7730                    };
7731                    Box::pin(fut)
7732                }
7733                "/qdrant.Points/Facet" => {
7734                    #[allow(non_camel_case_types)]
7735                    struct FacetSvc<T: Points>(pub Arc<T>);
7736                    impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
7737                    for FacetSvc<T> {
7738                        type Response = super::FacetResponse;
7739                        type Future = BoxFuture<
7740                            tonic::Response<Self::Response>,
7741                            tonic::Status,
7742                        >;
7743                        fn call(
7744                            &mut self,
7745                            request: tonic::Request<super::FacetCounts>,
7746                        ) -> Self::Future {
7747                            let inner = Arc::clone(&self.0);
7748                            let fut = async move {
7749                                <T as Points>::facet(&inner, request).await
7750                            };
7751                            Box::pin(fut)
7752                        }
7753                    }
7754                    let accept_compression_encodings = self.accept_compression_encodings;
7755                    let send_compression_encodings = self.send_compression_encodings;
7756                    let max_decoding_message_size = self.max_decoding_message_size;
7757                    let max_encoding_message_size = self.max_encoding_message_size;
7758                    let inner = self.inner.clone();
7759                    let fut = async move {
7760                        let method = FacetSvc(inner);
7761                        let codec = tonic::codec::ProstCodec::default();
7762                        let mut grpc = tonic::server::Grpc::new(codec)
7763                            .apply_compression_config(
7764                                accept_compression_encodings,
7765                                send_compression_encodings,
7766                            )
7767                            .apply_max_message_size_config(
7768                                max_decoding_message_size,
7769                                max_encoding_message_size,
7770                            );
7771                        let res = grpc.unary(method, req).await;
7772                        Ok(res)
7773                    };
7774                    Box::pin(fut)
7775                }
7776                "/qdrant.Points/SearchMatrixPairs" => {
7777                    #[allow(non_camel_case_types)]
7778                    struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
7779                    impl<
7780                        T: Points,
7781                    > tonic::server::UnaryService<super::SearchMatrixPoints>
7782                    for SearchMatrixPairsSvc<T> {
7783                        type Response = super::SearchMatrixPairsResponse;
7784                        type Future = BoxFuture<
7785                            tonic::Response<Self::Response>,
7786                            tonic::Status,
7787                        >;
7788                        fn call(
7789                            &mut self,
7790                            request: tonic::Request<super::SearchMatrixPoints>,
7791                        ) -> Self::Future {
7792                            let inner = Arc::clone(&self.0);
7793                            let fut = async move {
7794                                <T as Points>::search_matrix_pairs(&inner, request).await
7795                            };
7796                            Box::pin(fut)
7797                        }
7798                    }
7799                    let accept_compression_encodings = self.accept_compression_encodings;
7800                    let send_compression_encodings = self.send_compression_encodings;
7801                    let max_decoding_message_size = self.max_decoding_message_size;
7802                    let max_encoding_message_size = self.max_encoding_message_size;
7803                    let inner = self.inner.clone();
7804                    let fut = async move {
7805                        let method = SearchMatrixPairsSvc(inner);
7806                        let codec = tonic::codec::ProstCodec::default();
7807                        let mut grpc = tonic::server::Grpc::new(codec)
7808                            .apply_compression_config(
7809                                accept_compression_encodings,
7810                                send_compression_encodings,
7811                            )
7812                            .apply_max_message_size_config(
7813                                max_decoding_message_size,
7814                                max_encoding_message_size,
7815                            );
7816                        let res = grpc.unary(method, req).await;
7817                        Ok(res)
7818                    };
7819                    Box::pin(fut)
7820                }
7821                "/qdrant.Points/SearchMatrixOffsets" => {
7822                    #[allow(non_camel_case_types)]
7823                    struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
7824                    impl<
7825                        T: Points,
7826                    > tonic::server::UnaryService<super::SearchMatrixPoints>
7827                    for SearchMatrixOffsetsSvc<T> {
7828                        type Response = super::SearchMatrixOffsetsResponse;
7829                        type Future = BoxFuture<
7830                            tonic::Response<Self::Response>,
7831                            tonic::Status,
7832                        >;
7833                        fn call(
7834                            &mut self,
7835                            request: tonic::Request<super::SearchMatrixPoints>,
7836                        ) -> Self::Future {
7837                            let inner = Arc::clone(&self.0);
7838                            let fut = async move {
7839                                <T as Points>::search_matrix_offsets(&inner, request).await
7840                            };
7841                            Box::pin(fut)
7842                        }
7843                    }
7844                    let accept_compression_encodings = self.accept_compression_encodings;
7845                    let send_compression_encodings = self.send_compression_encodings;
7846                    let max_decoding_message_size = self.max_decoding_message_size;
7847                    let max_encoding_message_size = self.max_encoding_message_size;
7848                    let inner = self.inner.clone();
7849                    let fut = async move {
7850                        let method = SearchMatrixOffsetsSvc(inner);
7851                        let codec = tonic::codec::ProstCodec::default();
7852                        let mut grpc = tonic::server::Grpc::new(codec)
7853                            .apply_compression_config(
7854                                accept_compression_encodings,
7855                                send_compression_encodings,
7856                            )
7857                            .apply_max_message_size_config(
7858                                max_decoding_message_size,
7859                                max_encoding_message_size,
7860                            );
7861                        let res = grpc.unary(method, req).await;
7862                        Ok(res)
7863                    };
7864                    Box::pin(fut)
7865                }
7866                _ => {
7867                    Box::pin(async move {
7868                        let mut response = http::Response::new(empty_body());
7869                        let headers = response.headers_mut();
7870                        headers
7871                            .insert(
7872                                tonic::Status::GRPC_STATUS,
7873                                (tonic::Code::Unimplemented as i32).into(),
7874                            );
7875                        headers
7876                            .insert(
7877                                http::header::CONTENT_TYPE,
7878                                tonic::metadata::GRPC_CONTENT_TYPE,
7879                            );
7880                        Ok(response)
7881                    })
7882                }
7883            }
7884        }
7885    }
7886    impl<T> Clone for PointsServer<T> {
7887        fn clone(&self) -> Self {
7888            let inner = self.inner.clone();
7889            Self {
7890                inner,
7891                accept_compression_encodings: self.accept_compression_encodings,
7892                send_compression_encodings: self.send_compression_encodings,
7893                max_decoding_message_size: self.max_decoding_message_size,
7894                max_encoding_message_size: self.max_encoding_message_size,
7895            }
7896        }
7897    }
7898    /// Generated gRPC service name
7899    pub const SERVICE_NAME: &str = "qdrant.Points";
7900    impl<T> tonic::server::NamedService for PointsServer<T> {
7901        const NAME: &'static str = SERVICE_NAME;
7902    }
7903}
7904#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7905pub struct CreateFullSnapshotRequest {}
7906#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7907pub struct ListFullSnapshotsRequest {}
7908#[derive(Clone, PartialEq, ::prost::Message)]
7909pub struct DeleteFullSnapshotRequest {
7910    /// Name of the full snapshot
7911    #[prost(string, tag = "1")]
7912    pub snapshot_name: ::prost::alloc::string::String,
7913}
7914#[derive(Clone, PartialEq, ::prost::Message)]
7915pub struct CreateSnapshotRequest {
7916    /// Name of the collection
7917    #[prost(string, tag = "1")]
7918    pub collection_name: ::prost::alloc::string::String,
7919}
7920#[derive(Clone, PartialEq, ::prost::Message)]
7921pub struct ListSnapshotsRequest {
7922    /// Name of the collection
7923    #[prost(string, tag = "1")]
7924    pub collection_name: ::prost::alloc::string::String,
7925}
7926#[derive(Clone, PartialEq, ::prost::Message)]
7927pub struct DeleteSnapshotRequest {
7928    /// Name of the collection
7929    #[prost(string, tag = "1")]
7930    pub collection_name: ::prost::alloc::string::String,
7931    /// Name of the collection snapshot
7932    #[prost(string, tag = "2")]
7933    pub snapshot_name: ::prost::alloc::string::String,
7934}
7935#[derive(Clone, PartialEq, ::prost::Message)]
7936pub struct SnapshotDescription {
7937    /// Name of the snapshot
7938    #[prost(string, tag = "1")]
7939    pub name: ::prost::alloc::string::String,
7940    /// Creation time of the snapshot
7941    #[prost(message, optional, tag = "2")]
7942    pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
7943    /// Size of the snapshot in bytes
7944    #[prost(int64, tag = "3")]
7945    pub size: i64,
7946    /// SHA256 digest of the snapshot file
7947    #[prost(string, optional, tag = "4")]
7948    pub checksum: ::core::option::Option<::prost::alloc::string::String>,
7949}
7950#[derive(Clone, PartialEq, ::prost::Message)]
7951pub struct CreateSnapshotResponse {
7952    #[prost(message, optional, tag = "1")]
7953    pub snapshot_description: ::core::option::Option<SnapshotDescription>,
7954    /// Time spent to process
7955    #[prost(double, tag = "2")]
7956    pub time: f64,
7957}
7958#[derive(Clone, PartialEq, ::prost::Message)]
7959pub struct ListSnapshotsResponse {
7960    #[prost(message, repeated, tag = "1")]
7961    pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
7962    /// Time spent to process
7963    #[prost(double, tag = "2")]
7964    pub time: f64,
7965}
7966#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7967pub struct DeleteSnapshotResponse {
7968    /// Time spent to process
7969    #[prost(double, tag = "1")]
7970    pub time: f64,
7971}
7972/// Generated client implementations.
7973pub mod snapshots_client {
7974    #![allow(
7975        unused_variables,
7976        dead_code,
7977        missing_docs,
7978        clippy::wildcard_imports,
7979        clippy::let_unit_value,
7980    )]
7981    use tonic::codegen::*;
7982    use tonic::codegen::http::Uri;
7983    #[derive(Debug, Clone)]
7984    pub struct SnapshotsClient<T> {
7985        inner: tonic::client::Grpc<T>,
7986    }
7987    impl SnapshotsClient<tonic::transport::Channel> {
7988        /// Attempt to create a new client by connecting to a given endpoint.
7989        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
7990        where
7991            D: TryInto<tonic::transport::Endpoint>,
7992            D::Error: Into<StdError>,
7993        {
7994            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
7995            Ok(Self::new(conn))
7996        }
7997    }
7998    impl<T> SnapshotsClient<T>
7999    where
8000        T: tonic::client::GrpcService<tonic::body::BoxBody>,
8001        T::Error: Into<StdError>,
8002        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8003        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8004    {
8005        pub fn new(inner: T) -> Self {
8006            let inner = tonic::client::Grpc::new(inner);
8007            Self { inner }
8008        }
8009        pub fn with_origin(inner: T, origin: Uri) -> Self {
8010            let inner = tonic::client::Grpc::with_origin(inner, origin);
8011            Self { inner }
8012        }
8013        pub fn with_interceptor<F>(
8014            inner: T,
8015            interceptor: F,
8016        ) -> SnapshotsClient<InterceptedService<T, F>>
8017        where
8018            F: tonic::service::Interceptor,
8019            T::ResponseBody: Default,
8020            T: tonic::codegen::Service<
8021                http::Request<tonic::body::BoxBody>,
8022                Response = http::Response<
8023                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
8024                >,
8025            >,
8026            <T as tonic::codegen::Service<
8027                http::Request<tonic::body::BoxBody>,
8028            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8029        {
8030            SnapshotsClient::new(InterceptedService::new(inner, interceptor))
8031        }
8032        /// Compress requests with the given encoding.
8033        ///
8034        /// This requires the server to support it otherwise it might respond with an
8035        /// error.
8036        #[must_use]
8037        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8038            self.inner = self.inner.send_compressed(encoding);
8039            self
8040        }
8041        /// Enable decompressing responses.
8042        #[must_use]
8043        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8044            self.inner = self.inner.accept_compressed(encoding);
8045            self
8046        }
8047        /// Limits the maximum size of a decoded message.
8048        ///
8049        /// Default: `4MB`
8050        #[must_use]
8051        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8052            self.inner = self.inner.max_decoding_message_size(limit);
8053            self
8054        }
8055        /// Limits the maximum size of an encoded message.
8056        ///
8057        /// Default: `usize::MAX`
8058        #[must_use]
8059        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8060            self.inner = self.inner.max_encoding_message_size(limit);
8061            self
8062        }
8063        ///
8064        /// Create collection snapshot
8065        pub async fn create(
8066            &mut self,
8067            request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
8068        ) -> std::result::Result<
8069            tonic::Response<super::CreateSnapshotResponse>,
8070            tonic::Status,
8071        > {
8072            self.inner
8073                .ready()
8074                .await
8075                .map_err(|e| {
8076                    tonic::Status::unknown(
8077                        format!("Service was not ready: {}", e.into()),
8078                    )
8079                })?;
8080            let codec = tonic::codec::ProstCodec::default();
8081            let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
8082            let mut req = request.into_request();
8083            req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
8084            self.inner.unary(req, path, codec).await
8085        }
8086        ///
8087        /// List collection snapshots
8088        pub async fn list(
8089            &mut self,
8090            request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
8091        ) -> std::result::Result<
8092            tonic::Response<super::ListSnapshotsResponse>,
8093            tonic::Status,
8094        > {
8095            self.inner
8096                .ready()
8097                .await
8098                .map_err(|e| {
8099                    tonic::Status::unknown(
8100                        format!("Service was not ready: {}", e.into()),
8101                    )
8102                })?;
8103            let codec = tonic::codec::ProstCodec::default();
8104            let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
8105            let mut req = request.into_request();
8106            req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
8107            self.inner.unary(req, path, codec).await
8108        }
8109        ///
8110        /// Delete collection snapshot
8111        pub async fn delete(
8112            &mut self,
8113            request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
8114        ) -> std::result::Result<
8115            tonic::Response<super::DeleteSnapshotResponse>,
8116            tonic::Status,
8117        > {
8118            self.inner
8119                .ready()
8120                .await
8121                .map_err(|e| {
8122                    tonic::Status::unknown(
8123                        format!("Service was not ready: {}", e.into()),
8124                    )
8125                })?;
8126            let codec = tonic::codec::ProstCodec::default();
8127            let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
8128            let mut req = request.into_request();
8129            req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
8130            self.inner.unary(req, path, codec).await
8131        }
8132        ///
8133        /// Create full storage snapshot
8134        pub async fn create_full(
8135            &mut self,
8136            request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
8137        ) -> std::result::Result<
8138            tonic::Response<super::CreateSnapshotResponse>,
8139            tonic::Status,
8140        > {
8141            self.inner
8142                .ready()
8143                .await
8144                .map_err(|e| {
8145                    tonic::Status::unknown(
8146                        format!("Service was not ready: {}", e.into()),
8147                    )
8148                })?;
8149            let codec = tonic::codec::ProstCodec::default();
8150            let path = http::uri::PathAndQuery::from_static(
8151                "/qdrant.Snapshots/CreateFull",
8152            );
8153            let mut req = request.into_request();
8154            req.extensions_mut()
8155                .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
8156            self.inner.unary(req, path, codec).await
8157        }
8158        ///
8159        /// List full storage snapshots
8160        pub async fn list_full(
8161            &mut self,
8162            request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
8163        ) -> std::result::Result<
8164            tonic::Response<super::ListSnapshotsResponse>,
8165            tonic::Status,
8166        > {
8167            self.inner
8168                .ready()
8169                .await
8170                .map_err(|e| {
8171                    tonic::Status::unknown(
8172                        format!("Service was not ready: {}", e.into()),
8173                    )
8174                })?;
8175            let codec = tonic::codec::ProstCodec::default();
8176            let path = http::uri::PathAndQuery::from_static(
8177                "/qdrant.Snapshots/ListFull",
8178            );
8179            let mut req = request.into_request();
8180            req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
8181            self.inner.unary(req, path, codec).await
8182        }
8183        ///
8184        /// Delete full storage snapshot
8185        pub async fn delete_full(
8186            &mut self,
8187            request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
8188        ) -> std::result::Result<
8189            tonic::Response<super::DeleteSnapshotResponse>,
8190            tonic::Status,
8191        > {
8192            self.inner
8193                .ready()
8194                .await
8195                .map_err(|e| {
8196                    tonic::Status::unknown(
8197                        format!("Service was not ready: {}", e.into()),
8198                    )
8199                })?;
8200            let codec = tonic::codec::ProstCodec::default();
8201            let path = http::uri::PathAndQuery::from_static(
8202                "/qdrant.Snapshots/DeleteFull",
8203            );
8204            let mut req = request.into_request();
8205            req.extensions_mut()
8206                .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
8207            self.inner.unary(req, path, codec).await
8208        }
8209    }
8210}
8211/// Generated server implementations.
8212pub mod snapshots_server {
8213    #![allow(
8214        unused_variables,
8215        dead_code,
8216        missing_docs,
8217        clippy::wildcard_imports,
8218        clippy::let_unit_value,
8219    )]
8220    use tonic::codegen::*;
8221    /// Generated trait containing gRPC methods that should be implemented for use with SnapshotsServer.
8222    #[async_trait]
8223    pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
8224        ///
8225        /// Create collection snapshot
8226        async fn create(
8227            &self,
8228            request: tonic::Request<super::CreateSnapshotRequest>,
8229        ) -> std::result::Result<
8230            tonic::Response<super::CreateSnapshotResponse>,
8231            tonic::Status,
8232        >;
8233        ///
8234        /// List collection snapshots
8235        async fn list(
8236            &self,
8237            request: tonic::Request<super::ListSnapshotsRequest>,
8238        ) -> std::result::Result<
8239            tonic::Response<super::ListSnapshotsResponse>,
8240            tonic::Status,
8241        >;
8242        ///
8243        /// Delete collection snapshot
8244        async fn delete(
8245            &self,
8246            request: tonic::Request<super::DeleteSnapshotRequest>,
8247        ) -> std::result::Result<
8248            tonic::Response<super::DeleteSnapshotResponse>,
8249            tonic::Status,
8250        >;
8251        ///
8252        /// Create full storage snapshot
8253        async fn create_full(
8254            &self,
8255            request: tonic::Request<super::CreateFullSnapshotRequest>,
8256        ) -> std::result::Result<
8257            tonic::Response<super::CreateSnapshotResponse>,
8258            tonic::Status,
8259        >;
8260        ///
8261        /// List full storage snapshots
8262        async fn list_full(
8263            &self,
8264            request: tonic::Request<super::ListFullSnapshotsRequest>,
8265        ) -> std::result::Result<
8266            tonic::Response<super::ListSnapshotsResponse>,
8267            tonic::Status,
8268        >;
8269        ///
8270        /// Delete full storage snapshot
8271        async fn delete_full(
8272            &self,
8273            request: tonic::Request<super::DeleteFullSnapshotRequest>,
8274        ) -> std::result::Result<
8275            tonic::Response<super::DeleteSnapshotResponse>,
8276            tonic::Status,
8277        >;
8278    }
8279    #[derive(Debug)]
8280    pub struct SnapshotsServer<T> {
8281        inner: Arc<T>,
8282        accept_compression_encodings: EnabledCompressionEncodings,
8283        send_compression_encodings: EnabledCompressionEncodings,
8284        max_decoding_message_size: Option<usize>,
8285        max_encoding_message_size: Option<usize>,
8286    }
8287    impl<T> SnapshotsServer<T> {
8288        pub fn new(inner: T) -> Self {
8289            Self::from_arc(Arc::new(inner))
8290        }
8291        pub fn from_arc(inner: Arc<T>) -> Self {
8292            Self {
8293                inner,
8294                accept_compression_encodings: Default::default(),
8295                send_compression_encodings: Default::default(),
8296                max_decoding_message_size: None,
8297                max_encoding_message_size: None,
8298            }
8299        }
8300        pub fn with_interceptor<F>(
8301            inner: T,
8302            interceptor: F,
8303        ) -> InterceptedService<Self, F>
8304        where
8305            F: tonic::service::Interceptor,
8306        {
8307            InterceptedService::new(Self::new(inner), interceptor)
8308        }
8309        /// Enable decompressing requests with the given encoding.
8310        #[must_use]
8311        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8312            self.accept_compression_encodings.enable(encoding);
8313            self
8314        }
8315        /// Compress responses with the given encoding, if the client supports it.
8316        #[must_use]
8317        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8318            self.send_compression_encodings.enable(encoding);
8319            self
8320        }
8321        /// Limits the maximum size of a decoded message.
8322        ///
8323        /// Default: `4MB`
8324        #[must_use]
8325        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8326            self.max_decoding_message_size = Some(limit);
8327            self
8328        }
8329        /// Limits the maximum size of an encoded message.
8330        ///
8331        /// Default: `usize::MAX`
8332        #[must_use]
8333        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8334            self.max_encoding_message_size = Some(limit);
8335            self
8336        }
8337    }
8338    impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
8339    where
8340        T: Snapshots,
8341        B: Body + std::marker::Send + 'static,
8342        B::Error: Into<StdError> + std::marker::Send + 'static,
8343    {
8344        type Response = http::Response<tonic::body::BoxBody>;
8345        type Error = std::convert::Infallible;
8346        type Future = BoxFuture<Self::Response, Self::Error>;
8347        fn poll_ready(
8348            &mut self,
8349            _cx: &mut Context<'_>,
8350        ) -> Poll<std::result::Result<(), Self::Error>> {
8351            Poll::Ready(Ok(()))
8352        }
8353        fn call(&mut self, req: http::Request<B>) -> Self::Future {
8354            match req.uri().path() {
8355                "/qdrant.Snapshots/Create" => {
8356                    #[allow(non_camel_case_types)]
8357                    struct CreateSvc<T: Snapshots>(pub Arc<T>);
8358                    impl<
8359                        T: Snapshots,
8360                    > tonic::server::UnaryService<super::CreateSnapshotRequest>
8361                    for CreateSvc<T> {
8362                        type Response = super::CreateSnapshotResponse;
8363                        type Future = BoxFuture<
8364                            tonic::Response<Self::Response>,
8365                            tonic::Status,
8366                        >;
8367                        fn call(
8368                            &mut self,
8369                            request: tonic::Request<super::CreateSnapshotRequest>,
8370                        ) -> Self::Future {
8371                            let inner = Arc::clone(&self.0);
8372                            let fut = async move {
8373                                <T as Snapshots>::create(&inner, request).await
8374                            };
8375                            Box::pin(fut)
8376                        }
8377                    }
8378                    let accept_compression_encodings = self.accept_compression_encodings;
8379                    let send_compression_encodings = self.send_compression_encodings;
8380                    let max_decoding_message_size = self.max_decoding_message_size;
8381                    let max_encoding_message_size = self.max_encoding_message_size;
8382                    let inner = self.inner.clone();
8383                    let fut = async move {
8384                        let method = CreateSvc(inner);
8385                        let codec = tonic::codec::ProstCodec::default();
8386                        let mut grpc = tonic::server::Grpc::new(codec)
8387                            .apply_compression_config(
8388                                accept_compression_encodings,
8389                                send_compression_encodings,
8390                            )
8391                            .apply_max_message_size_config(
8392                                max_decoding_message_size,
8393                                max_encoding_message_size,
8394                            );
8395                        let res = grpc.unary(method, req).await;
8396                        Ok(res)
8397                    };
8398                    Box::pin(fut)
8399                }
8400                "/qdrant.Snapshots/List" => {
8401                    #[allow(non_camel_case_types)]
8402                    struct ListSvc<T: Snapshots>(pub Arc<T>);
8403                    impl<
8404                        T: Snapshots,
8405                    > tonic::server::UnaryService<super::ListSnapshotsRequest>
8406                    for ListSvc<T> {
8407                        type Response = super::ListSnapshotsResponse;
8408                        type Future = BoxFuture<
8409                            tonic::Response<Self::Response>,
8410                            tonic::Status,
8411                        >;
8412                        fn call(
8413                            &mut self,
8414                            request: tonic::Request<super::ListSnapshotsRequest>,
8415                        ) -> Self::Future {
8416                            let inner = Arc::clone(&self.0);
8417                            let fut = async move {
8418                                <T as Snapshots>::list(&inner, request).await
8419                            };
8420                            Box::pin(fut)
8421                        }
8422                    }
8423                    let accept_compression_encodings = self.accept_compression_encodings;
8424                    let send_compression_encodings = self.send_compression_encodings;
8425                    let max_decoding_message_size = self.max_decoding_message_size;
8426                    let max_encoding_message_size = self.max_encoding_message_size;
8427                    let inner = self.inner.clone();
8428                    let fut = async move {
8429                        let method = ListSvc(inner);
8430                        let codec = tonic::codec::ProstCodec::default();
8431                        let mut grpc = tonic::server::Grpc::new(codec)
8432                            .apply_compression_config(
8433                                accept_compression_encodings,
8434                                send_compression_encodings,
8435                            )
8436                            .apply_max_message_size_config(
8437                                max_decoding_message_size,
8438                                max_encoding_message_size,
8439                            );
8440                        let res = grpc.unary(method, req).await;
8441                        Ok(res)
8442                    };
8443                    Box::pin(fut)
8444                }
8445                "/qdrant.Snapshots/Delete" => {
8446                    #[allow(non_camel_case_types)]
8447                    struct DeleteSvc<T: Snapshots>(pub Arc<T>);
8448                    impl<
8449                        T: Snapshots,
8450                    > tonic::server::UnaryService<super::DeleteSnapshotRequest>
8451                    for DeleteSvc<T> {
8452                        type Response = super::DeleteSnapshotResponse;
8453                        type Future = BoxFuture<
8454                            tonic::Response<Self::Response>,
8455                            tonic::Status,
8456                        >;
8457                        fn call(
8458                            &mut self,
8459                            request: tonic::Request<super::DeleteSnapshotRequest>,
8460                        ) -> Self::Future {
8461                            let inner = Arc::clone(&self.0);
8462                            let fut = async move {
8463                                <T as Snapshots>::delete(&inner, request).await
8464                            };
8465                            Box::pin(fut)
8466                        }
8467                    }
8468                    let accept_compression_encodings = self.accept_compression_encodings;
8469                    let send_compression_encodings = self.send_compression_encodings;
8470                    let max_decoding_message_size = self.max_decoding_message_size;
8471                    let max_encoding_message_size = self.max_encoding_message_size;
8472                    let inner = self.inner.clone();
8473                    let fut = async move {
8474                        let method = DeleteSvc(inner);
8475                        let codec = tonic::codec::ProstCodec::default();
8476                        let mut grpc = tonic::server::Grpc::new(codec)
8477                            .apply_compression_config(
8478                                accept_compression_encodings,
8479                                send_compression_encodings,
8480                            )
8481                            .apply_max_message_size_config(
8482                                max_decoding_message_size,
8483                                max_encoding_message_size,
8484                            );
8485                        let res = grpc.unary(method, req).await;
8486                        Ok(res)
8487                    };
8488                    Box::pin(fut)
8489                }
8490                "/qdrant.Snapshots/CreateFull" => {
8491                    #[allow(non_camel_case_types)]
8492                    struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
8493                    impl<
8494                        T: Snapshots,
8495                    > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
8496                    for CreateFullSvc<T> {
8497                        type Response = super::CreateSnapshotResponse;
8498                        type Future = BoxFuture<
8499                            tonic::Response<Self::Response>,
8500                            tonic::Status,
8501                        >;
8502                        fn call(
8503                            &mut self,
8504                            request: tonic::Request<super::CreateFullSnapshotRequest>,
8505                        ) -> Self::Future {
8506                            let inner = Arc::clone(&self.0);
8507                            let fut = async move {
8508                                <T as Snapshots>::create_full(&inner, request).await
8509                            };
8510                            Box::pin(fut)
8511                        }
8512                    }
8513                    let accept_compression_encodings = self.accept_compression_encodings;
8514                    let send_compression_encodings = self.send_compression_encodings;
8515                    let max_decoding_message_size = self.max_decoding_message_size;
8516                    let max_encoding_message_size = self.max_encoding_message_size;
8517                    let inner = self.inner.clone();
8518                    let fut = async move {
8519                        let method = CreateFullSvc(inner);
8520                        let codec = tonic::codec::ProstCodec::default();
8521                        let mut grpc = tonic::server::Grpc::new(codec)
8522                            .apply_compression_config(
8523                                accept_compression_encodings,
8524                                send_compression_encodings,
8525                            )
8526                            .apply_max_message_size_config(
8527                                max_decoding_message_size,
8528                                max_encoding_message_size,
8529                            );
8530                        let res = grpc.unary(method, req).await;
8531                        Ok(res)
8532                    };
8533                    Box::pin(fut)
8534                }
8535                "/qdrant.Snapshots/ListFull" => {
8536                    #[allow(non_camel_case_types)]
8537                    struct ListFullSvc<T: Snapshots>(pub Arc<T>);
8538                    impl<
8539                        T: Snapshots,
8540                    > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
8541                    for ListFullSvc<T> {
8542                        type Response = super::ListSnapshotsResponse;
8543                        type Future = BoxFuture<
8544                            tonic::Response<Self::Response>,
8545                            tonic::Status,
8546                        >;
8547                        fn call(
8548                            &mut self,
8549                            request: tonic::Request<super::ListFullSnapshotsRequest>,
8550                        ) -> Self::Future {
8551                            let inner = Arc::clone(&self.0);
8552                            let fut = async move {
8553                                <T as Snapshots>::list_full(&inner, request).await
8554                            };
8555                            Box::pin(fut)
8556                        }
8557                    }
8558                    let accept_compression_encodings = self.accept_compression_encodings;
8559                    let send_compression_encodings = self.send_compression_encodings;
8560                    let max_decoding_message_size = self.max_decoding_message_size;
8561                    let max_encoding_message_size = self.max_encoding_message_size;
8562                    let inner = self.inner.clone();
8563                    let fut = async move {
8564                        let method = ListFullSvc(inner);
8565                        let codec = tonic::codec::ProstCodec::default();
8566                        let mut grpc = tonic::server::Grpc::new(codec)
8567                            .apply_compression_config(
8568                                accept_compression_encodings,
8569                                send_compression_encodings,
8570                            )
8571                            .apply_max_message_size_config(
8572                                max_decoding_message_size,
8573                                max_encoding_message_size,
8574                            );
8575                        let res = grpc.unary(method, req).await;
8576                        Ok(res)
8577                    };
8578                    Box::pin(fut)
8579                }
8580                "/qdrant.Snapshots/DeleteFull" => {
8581                    #[allow(non_camel_case_types)]
8582                    struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
8583                    impl<
8584                        T: Snapshots,
8585                    > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
8586                    for DeleteFullSvc<T> {
8587                        type Response = super::DeleteSnapshotResponse;
8588                        type Future = BoxFuture<
8589                            tonic::Response<Self::Response>,
8590                            tonic::Status,
8591                        >;
8592                        fn call(
8593                            &mut self,
8594                            request: tonic::Request<super::DeleteFullSnapshotRequest>,
8595                        ) -> Self::Future {
8596                            let inner = Arc::clone(&self.0);
8597                            let fut = async move {
8598                                <T as Snapshots>::delete_full(&inner, request).await
8599                            };
8600                            Box::pin(fut)
8601                        }
8602                    }
8603                    let accept_compression_encodings = self.accept_compression_encodings;
8604                    let send_compression_encodings = self.send_compression_encodings;
8605                    let max_decoding_message_size = self.max_decoding_message_size;
8606                    let max_encoding_message_size = self.max_encoding_message_size;
8607                    let inner = self.inner.clone();
8608                    let fut = async move {
8609                        let method = DeleteFullSvc(inner);
8610                        let codec = tonic::codec::ProstCodec::default();
8611                        let mut grpc = tonic::server::Grpc::new(codec)
8612                            .apply_compression_config(
8613                                accept_compression_encodings,
8614                                send_compression_encodings,
8615                            )
8616                            .apply_max_message_size_config(
8617                                max_decoding_message_size,
8618                                max_encoding_message_size,
8619                            );
8620                        let res = grpc.unary(method, req).await;
8621                        Ok(res)
8622                    };
8623                    Box::pin(fut)
8624                }
8625                _ => {
8626                    Box::pin(async move {
8627                        let mut response = http::Response::new(empty_body());
8628                        let headers = response.headers_mut();
8629                        headers
8630                            .insert(
8631                                tonic::Status::GRPC_STATUS,
8632                                (tonic::Code::Unimplemented as i32).into(),
8633                            );
8634                        headers
8635                            .insert(
8636                                http::header::CONTENT_TYPE,
8637                                tonic::metadata::GRPC_CONTENT_TYPE,
8638                            );
8639                        Ok(response)
8640                    })
8641                }
8642            }
8643        }
8644    }
8645    impl<T> Clone for SnapshotsServer<T> {
8646        fn clone(&self) -> Self {
8647            let inner = self.inner.clone();
8648            Self {
8649                inner,
8650                accept_compression_encodings: self.accept_compression_encodings,
8651                send_compression_encodings: self.send_compression_encodings,
8652                max_decoding_message_size: self.max_decoding_message_size,
8653                max_encoding_message_size: self.max_encoding_message_size,
8654            }
8655        }
8656    }
8657    /// Generated gRPC service name
8658    pub const SERVICE_NAME: &str = "qdrant.Snapshots";
8659    impl<T> tonic::server::NamedService for SnapshotsServer<T> {
8660        const NAME: &'static str = SERVICE_NAME;
8661    }
8662}
8663#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8664pub struct HealthCheckRequest {}
8665#[derive(Clone, PartialEq, ::prost::Message)]
8666pub struct HealthCheckReply {
8667    #[prost(string, tag = "1")]
8668    pub title: ::prost::alloc::string::String,
8669    #[prost(string, tag = "2")]
8670    pub version: ::prost::alloc::string::String,
8671    #[prost(string, optional, tag = "3")]
8672    pub commit: ::core::option::Option<::prost::alloc::string::String>,
8673}
8674/// Generated client implementations.
8675pub mod qdrant_client {
8676    #![allow(
8677        unused_variables,
8678        dead_code,
8679        missing_docs,
8680        clippy::wildcard_imports,
8681        clippy::let_unit_value,
8682    )]
8683    use tonic::codegen::*;
8684    use tonic::codegen::http::Uri;
8685    #[derive(Debug, Clone)]
8686    pub struct QdrantClient<T> {
8687        inner: tonic::client::Grpc<T>,
8688    }
8689    impl QdrantClient<tonic::transport::Channel> {
8690        /// Attempt to create a new client by connecting to a given endpoint.
8691        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8692        where
8693            D: TryInto<tonic::transport::Endpoint>,
8694            D::Error: Into<StdError>,
8695        {
8696            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8697            Ok(Self::new(conn))
8698        }
8699    }
8700    impl<T> QdrantClient<T>
8701    where
8702        T: tonic::client::GrpcService<tonic::body::BoxBody>,
8703        T::Error: Into<StdError>,
8704        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8705        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8706    {
8707        pub fn new(inner: T) -> Self {
8708            let inner = tonic::client::Grpc::new(inner);
8709            Self { inner }
8710        }
8711        pub fn with_origin(inner: T, origin: Uri) -> Self {
8712            let inner = tonic::client::Grpc::with_origin(inner, origin);
8713            Self { inner }
8714        }
8715        pub fn with_interceptor<F>(
8716            inner: T,
8717            interceptor: F,
8718        ) -> QdrantClient<InterceptedService<T, F>>
8719        where
8720            F: tonic::service::Interceptor,
8721            T::ResponseBody: Default,
8722            T: tonic::codegen::Service<
8723                http::Request<tonic::body::BoxBody>,
8724                Response = http::Response<
8725                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
8726                >,
8727            >,
8728            <T as tonic::codegen::Service<
8729                http::Request<tonic::body::BoxBody>,
8730            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8731        {
8732            QdrantClient::new(InterceptedService::new(inner, interceptor))
8733        }
8734        /// Compress requests with the given encoding.
8735        ///
8736        /// This requires the server to support it otherwise it might respond with an
8737        /// error.
8738        #[must_use]
8739        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8740            self.inner = self.inner.send_compressed(encoding);
8741            self
8742        }
8743        /// Enable decompressing responses.
8744        #[must_use]
8745        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8746            self.inner = self.inner.accept_compressed(encoding);
8747            self
8748        }
8749        /// Limits the maximum size of a decoded message.
8750        ///
8751        /// Default: `4MB`
8752        #[must_use]
8753        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8754            self.inner = self.inner.max_decoding_message_size(limit);
8755            self
8756        }
8757        /// Limits the maximum size of an encoded message.
8758        ///
8759        /// Default: `usize::MAX`
8760        #[must_use]
8761        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8762            self.inner = self.inner.max_encoding_message_size(limit);
8763            self
8764        }
8765        pub async fn health_check(
8766            &mut self,
8767            request: impl tonic::IntoRequest<super::HealthCheckRequest>,
8768        ) -> std::result::Result<
8769            tonic::Response<super::HealthCheckReply>,
8770            tonic::Status,
8771        > {
8772            self.inner
8773                .ready()
8774                .await
8775                .map_err(|e| {
8776                    tonic::Status::unknown(
8777                        format!("Service was not ready: {}", e.into()),
8778                    )
8779                })?;
8780            let codec = tonic::codec::ProstCodec::default();
8781            let path = http::uri::PathAndQuery::from_static(
8782                "/qdrant.Qdrant/HealthCheck",
8783            );
8784            let mut req = request.into_request();
8785            req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
8786            self.inner.unary(req, path, codec).await
8787        }
8788    }
8789}
8790/// Generated server implementations.
8791pub mod qdrant_server {
8792    #![allow(
8793        unused_variables,
8794        dead_code,
8795        missing_docs,
8796        clippy::wildcard_imports,
8797        clippy::let_unit_value,
8798    )]
8799    use tonic::codegen::*;
8800    /// Generated trait containing gRPC methods that should be implemented for use with QdrantServer.
8801    #[async_trait]
8802    pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static {
8803        async fn health_check(
8804            &self,
8805            request: tonic::Request<super::HealthCheckRequest>,
8806        ) -> std::result::Result<
8807            tonic::Response<super::HealthCheckReply>,
8808            tonic::Status,
8809        >;
8810    }
8811    #[derive(Debug)]
8812    pub struct QdrantServer<T> {
8813        inner: Arc<T>,
8814        accept_compression_encodings: EnabledCompressionEncodings,
8815        send_compression_encodings: EnabledCompressionEncodings,
8816        max_decoding_message_size: Option<usize>,
8817        max_encoding_message_size: Option<usize>,
8818    }
8819    impl<T> QdrantServer<T> {
8820        pub fn new(inner: T) -> Self {
8821            Self::from_arc(Arc::new(inner))
8822        }
8823        pub fn from_arc(inner: Arc<T>) -> Self {
8824            Self {
8825                inner,
8826                accept_compression_encodings: Default::default(),
8827                send_compression_encodings: Default::default(),
8828                max_decoding_message_size: None,
8829                max_encoding_message_size: None,
8830            }
8831        }
8832        pub fn with_interceptor<F>(
8833            inner: T,
8834            interceptor: F,
8835        ) -> InterceptedService<Self, F>
8836        where
8837            F: tonic::service::Interceptor,
8838        {
8839            InterceptedService::new(Self::new(inner), interceptor)
8840        }
8841        /// Enable decompressing requests with the given encoding.
8842        #[must_use]
8843        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8844            self.accept_compression_encodings.enable(encoding);
8845            self
8846        }
8847        /// Compress responses with the given encoding, if the client supports it.
8848        #[must_use]
8849        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8850            self.send_compression_encodings.enable(encoding);
8851            self
8852        }
8853        /// Limits the maximum size of a decoded message.
8854        ///
8855        /// Default: `4MB`
8856        #[must_use]
8857        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8858            self.max_decoding_message_size = Some(limit);
8859            self
8860        }
8861        /// Limits the maximum size of an encoded message.
8862        ///
8863        /// Default: `usize::MAX`
8864        #[must_use]
8865        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8866            self.max_encoding_message_size = Some(limit);
8867            self
8868        }
8869    }
8870    impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
8871    where
8872        T: Qdrant,
8873        B: Body + std::marker::Send + 'static,
8874        B::Error: Into<StdError> + std::marker::Send + 'static,
8875    {
8876        type Response = http::Response<tonic::body::BoxBody>;
8877        type Error = std::convert::Infallible;
8878        type Future = BoxFuture<Self::Response, Self::Error>;
8879        fn poll_ready(
8880            &mut self,
8881            _cx: &mut Context<'_>,
8882        ) -> Poll<std::result::Result<(), Self::Error>> {
8883            Poll::Ready(Ok(()))
8884        }
8885        fn call(&mut self, req: http::Request<B>) -> Self::Future {
8886            match req.uri().path() {
8887                "/qdrant.Qdrant/HealthCheck" => {
8888                    #[allow(non_camel_case_types)]
8889                    struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
8890                    impl<
8891                        T: Qdrant,
8892                    > tonic::server::UnaryService<super::HealthCheckRequest>
8893                    for HealthCheckSvc<T> {
8894                        type Response = super::HealthCheckReply;
8895                        type Future = BoxFuture<
8896                            tonic::Response<Self::Response>,
8897                            tonic::Status,
8898                        >;
8899                        fn call(
8900                            &mut self,
8901                            request: tonic::Request<super::HealthCheckRequest>,
8902                        ) -> Self::Future {
8903                            let inner = Arc::clone(&self.0);
8904                            let fut = async move {
8905                                <T as Qdrant>::health_check(&inner, request).await
8906                            };
8907                            Box::pin(fut)
8908                        }
8909                    }
8910                    let accept_compression_encodings = self.accept_compression_encodings;
8911                    let send_compression_encodings = self.send_compression_encodings;
8912                    let max_decoding_message_size = self.max_decoding_message_size;
8913                    let max_encoding_message_size = self.max_encoding_message_size;
8914                    let inner = self.inner.clone();
8915                    let fut = async move {
8916                        let method = HealthCheckSvc(inner);
8917                        let codec = tonic::codec::ProstCodec::default();
8918                        let mut grpc = tonic::server::Grpc::new(codec)
8919                            .apply_compression_config(
8920                                accept_compression_encodings,
8921                                send_compression_encodings,
8922                            )
8923                            .apply_max_message_size_config(
8924                                max_decoding_message_size,
8925                                max_encoding_message_size,
8926                            );
8927                        let res = grpc.unary(method, req).await;
8928                        Ok(res)
8929                    };
8930                    Box::pin(fut)
8931                }
8932                _ => {
8933                    Box::pin(async move {
8934                        let mut response = http::Response::new(empty_body());
8935                        let headers = response.headers_mut();
8936                        headers
8937                            .insert(
8938                                tonic::Status::GRPC_STATUS,
8939                                (tonic::Code::Unimplemented as i32).into(),
8940                            );
8941                        headers
8942                            .insert(
8943                                http::header::CONTENT_TYPE,
8944                                tonic::metadata::GRPC_CONTENT_TYPE,
8945                            );
8946                        Ok(response)
8947                    })
8948                }
8949            }
8950        }
8951    }
8952    impl<T> Clone for QdrantServer<T> {
8953        fn clone(&self) -> Self {
8954            let inner = self.inner.clone();
8955            Self {
8956                inner,
8957                accept_compression_encodings: self.accept_compression_encodings,
8958                send_compression_encodings: self.send_compression_encodings,
8959                max_decoding_message_size: self.max_decoding_message_size,
8960                max_encoding_message_size: self.max_encoding_message_size,
8961            }
8962        }
8963    }
8964    /// Generated gRPC service name
8965    pub const SERVICE_NAME: &str = "qdrant.Qdrant";
8966    impl<T> tonic::server::NamedService for QdrantServer<T> {
8967        const NAME: &'static str = SERVICE_NAME;
8968    }
8969}
8970pub use crate::manual_builder::*;
8971pub use crate::builder_types::*;
8972pub use crate::qdrant_client::builders::*;
8973pub use crate::builders::*;
8974pub use prost_types::Timestamp;