qdrant_client/
qdrant.rs

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