1#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Struct {
12 #[prost(map = "string, message", tag = "1")]
14 pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct Value {
24 #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
26 pub kind: ::core::option::Option<value::Kind>,
27}
28pub mod value {
30 #[derive(Clone, PartialEq, ::prost::Oneof)]
32 pub enum Kind {
33 #[prost(enumeration = "super::NullValue", tag = "1")]
35 NullValue(i32),
36 #[prost(double, tag = "2")]
38 DoubleValue(f64),
39 #[prost(int64, tag = "3")]
41 IntegerValue(i64),
42 #[prost(string, tag = "4")]
44 StringValue(::prost::alloc::string::String),
45 #[prost(bool, tag = "5")]
47 BoolValue(bool),
48 #[prost(message, tag = "6")]
50 StructValue(super::Struct),
51 #[prost(message, tag = "7")]
53 ListValue(super::ListValue),
54 }
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct ListValue {
61 #[prost(message, repeated, tag = "1")]
63 pub values: ::prost::alloc::vec::Vec<Value>,
64}
65#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
70#[repr(i32)]
71pub enum NullValue {
72 NullValue = 0,
74}
75impl NullValue {
76 pub fn as_str_name(&self) -> &'static str {
81 match self {
82 Self::NullValue => "NULL_VALUE",
83 }
84 }
85 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, Eq, Hash, ::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}
98pub mod point_id {
100 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
101 pub enum PointIdOptions {
102 #[prost(uint64, tag = "1")]
104 Num(u64),
105 #[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 #[prost(message, repeated, tag = "1")]
121 pub should: ::prost::alloc::vec::Vec<Condition>,
122 #[prost(message, repeated, tag = "2")]
124 pub must: ::prost::alloc::vec::Vec<Condition>,
125 #[prost(message, repeated, tag = "3")]
127 pub must_not: ::prost::alloc::vec::Vec<Condition>,
128 #[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, 8")]
142 pub condition_one_of: ::core::option::Option<condition::ConditionOneOf>,
143}
144pub 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 #[prost(message, tag = "8")]
163 Slice(super::SliceCondition),
164 }
165}
166#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
167pub struct IsEmptyCondition {
168 #[prost(string, tag = "1")]
169 pub key: ::prost::alloc::string::String,
170}
171#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
172pub struct IsNullCondition {
173 #[prost(string, tag = "1")]
174 pub key: ::prost::alloc::string::String,
175}
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct HasIdCondition {
178 #[prost(message, repeated, tag = "1")]
179 pub has_id: ::prost::alloc::vec::Vec<PointId>,
180}
181#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
182pub struct HasVectorCondition {
183 #[prost(string, tag = "1")]
184 pub has_vector: ::prost::alloc::string::String,
185}
186#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
187pub struct SliceCondition {
188 #[prost(uint32, tag = "1")]
190 pub total: u32,
191 #[prost(uint32, tag = "2")]
193 pub index: u32,
194}
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct NestedCondition {
197 #[prost(string, tag = "1")]
199 pub key: ::prost::alloc::string::String,
200 #[prost(message, optional, tag = "2")]
202 pub filter: ::core::option::Option<Filter>,
203}
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct FieldCondition {
206 #[prost(string, tag = "1")]
207 pub key: ::prost::alloc::string::String,
208 #[prost(message, optional, tag = "2")]
210 pub r#match: ::core::option::Option<Match>,
211 #[prost(message, optional, tag = "3")]
213 pub range: ::core::option::Option<Range>,
214 #[prost(message, optional, tag = "4")]
216 pub geo_bounding_box: ::core::option::Option<GeoBoundingBox>,
217 #[prost(message, optional, tag = "5")]
219 pub geo_radius: ::core::option::Option<GeoRadius>,
220 #[prost(message, optional, tag = "6")]
222 pub values_count: ::core::option::Option<ValuesCount>,
223 #[prost(message, optional, tag = "7")]
225 pub geo_polygon: ::core::option::Option<GeoPolygon>,
226 #[prost(message, optional, tag = "8")]
228 pub datetime_range: ::core::option::Option<DatetimeRange>,
229 #[prost(bool, optional, tag = "9")]
231 pub is_empty: ::core::option::Option<bool>,
232 #[prost(bool, optional, tag = "10")]
234 pub is_null: ::core::option::Option<bool>,
235}
236#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
237pub struct Match {
238 #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
239 pub match_value: ::core::option::Option<r#match::MatchValue>,
240}
241pub mod r#match {
243 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
244 pub enum MatchValue {
245 #[prost(string, tag = "1")]
247 Keyword(::prost::alloc::string::String),
248 #[prost(int64, tag = "2")]
250 Integer(i64),
251 #[prost(bool, tag = "3")]
253 Boolean(bool),
254 #[prost(string, tag = "4")]
256 Text(::prost::alloc::string::String),
257 #[prost(message, tag = "5")]
259 Keywords(super::RepeatedStrings),
260 #[prost(message, tag = "6")]
262 Integers(super::RepeatedIntegers),
263 #[prost(message, tag = "7")]
265 ExceptIntegers(super::RepeatedIntegers),
266 #[prost(message, tag = "8")]
268 ExceptKeywords(super::RepeatedStrings),
269 #[prost(string, tag = "9")]
271 Phrase(::prost::alloc::string::String),
272 #[prost(string, tag = "10")]
274 TextAny(::prost::alloc::string::String),
275 #[prost(string, tag = "11")]
277 Prefix(::prost::alloc::string::String),
278 }
279}
280#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
281pub struct RepeatedStrings {
282 #[prost(string, repeated, tag = "1")]
283 pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
284}
285#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
286pub struct RepeatedIntegers {
287 #[prost(int64, repeated, tag = "1")]
288 pub integers: ::prost::alloc::vec::Vec<i64>,
289}
290#[derive(Clone, Copy, PartialEq, ::prost::Message)]
291pub struct Range {
292 #[prost(double, optional, tag = "1")]
293 pub lt: ::core::option::Option<f64>,
294 #[prost(double, optional, tag = "2")]
295 pub gt: ::core::option::Option<f64>,
296 #[prost(double, optional, tag = "3")]
297 pub gte: ::core::option::Option<f64>,
298 #[prost(double, optional, tag = "4")]
299 pub lte: ::core::option::Option<f64>,
300}
301#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
302pub struct DatetimeRange {
303 #[prost(message, optional, tag = "1")]
304 pub lt: ::core::option::Option<::prost_types::Timestamp>,
305 #[prost(message, optional, tag = "2")]
306 pub gt: ::core::option::Option<::prost_types::Timestamp>,
307 #[prost(message, optional, tag = "3")]
308 pub gte: ::core::option::Option<::prost_types::Timestamp>,
309 #[prost(message, optional, tag = "4")]
310 pub lte: ::core::option::Option<::prost_types::Timestamp>,
311}
312#[derive(Clone, Copy, PartialEq, ::prost::Message)]
313pub struct GeoBoundingBox {
314 #[prost(message, optional, tag = "1")]
316 pub top_left: ::core::option::Option<GeoPoint>,
317 #[prost(message, optional, tag = "2")]
319 pub bottom_right: ::core::option::Option<GeoPoint>,
320}
321#[derive(Clone, Copy, PartialEq, ::prost::Message)]
322pub struct GeoRadius {
323 #[prost(message, optional, tag = "1")]
325 pub center: ::core::option::Option<GeoPoint>,
326 #[prost(float, tag = "2")]
328 pub radius: f32,
329}
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct GeoLineString {
332 #[prost(message, repeated, tag = "1")]
334 pub points: ::prost::alloc::vec::Vec<GeoPoint>,
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct GeoPolygon {
341 #[prost(message, optional, tag = "1")]
343 pub exterior: ::core::option::Option<GeoLineString>,
344 #[prost(message, repeated, tag = "2")]
346 pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
347}
348#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
349pub struct ValuesCount {
350 #[prost(uint64, optional, tag = "1")]
351 pub lt: ::core::option::Option<u64>,
352 #[prost(uint64, optional, tag = "2")]
353 pub gt: ::core::option::Option<u64>,
354 #[prost(uint64, optional, tag = "3")]
355 pub gte: ::core::option::Option<u64>,
356 #[prost(uint64, optional, tag = "4")]
357 pub lte: ::core::option::Option<u64>,
358}
359#[derive(Clone, Copy, PartialEq, ::prost::Message)]
360pub struct VectorParams {
361 #[prost(uint64, tag = "1")]
363 pub size: u64,
364 #[prost(enumeration = "Distance", tag = "2")]
366 pub distance: i32,
367 #[prost(message, optional, tag = "3")]
370 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
371 #[prost(message, optional, tag = "4")]
374 pub quantization_config: ::core::option::Option<QuantizationConfig>,
375 #[deprecated]
379 #[prost(bool, optional, tag = "5")]
380 pub on_disk: ::core::option::Option<bool>,
381 #[prost(enumeration = "Datatype", optional, tag = "6")]
383 pub datatype: ::core::option::Option<i32>,
384 #[prost(message, optional, tag = "7")]
386 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
387 #[prost(enumeration = "Memory", optional, tag = "8")]
391 pub memory: ::core::option::Option<i32>,
392}
393#[derive(Clone, Copy, PartialEq, ::prost::Message)]
394pub struct VectorParamsDiff {
395 #[prost(message, optional, tag = "1")]
398 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
399 #[prost(message, optional, tag = "2")]
401 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
402 #[deprecated]
406 #[prost(bool, optional, tag = "3")]
407 pub on_disk: ::core::option::Option<bool>,
408 #[prost(enumeration = "Memory", optional, tag = "4")]
412 pub memory: ::core::option::Option<i32>,
413}
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct VectorParamsMap {
416 #[prost(map = "string, message", tag = "1")]
417 pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
418}
419#[derive(Clone, PartialEq, ::prost::Message)]
420pub struct VectorParamsDiffMap {
421 #[prost(map = "string, message", tag = "1")]
422 pub map: ::std::collections::HashMap<
423 ::prost::alloc::string::String,
424 VectorParamsDiff,
425 >,
426}
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct VectorsConfig {
429 #[prost(oneof = "vectors_config::Config", tags = "1, 2")]
430 pub config: ::core::option::Option<vectors_config::Config>,
431}
432pub mod vectors_config {
434 #[derive(Clone, PartialEq, ::prost::Oneof)]
435 pub enum Config {
436 #[prost(message, tag = "1")]
437 Params(super::VectorParams),
438 #[prost(message, tag = "2")]
439 ParamsMap(super::VectorParamsMap),
440 }
441}
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct VectorsConfigDiff {
444 #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
445 pub config: ::core::option::Option<vectors_config_diff::Config>,
446}
447pub mod vectors_config_diff {
449 #[derive(Clone, PartialEq, ::prost::Oneof)]
450 pub enum Config {
451 #[prost(message, tag = "1")]
452 Params(super::VectorParamsDiff),
453 #[prost(message, tag = "2")]
454 ParamsMap(super::VectorParamsDiffMap),
455 }
456}
457#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
458pub struct SparseVectorParams {
459 #[prost(message, optional, tag = "1")]
461 pub index: ::core::option::Option<SparseIndexConfig>,
462 #[prost(enumeration = "Modifier", optional, tag = "2")]
464 pub modifier: ::core::option::Option<i32>,
465}
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct SparseVectorConfig {
468 #[prost(map = "string, message", tag = "1")]
469 pub map: ::std::collections::HashMap<
470 ::prost::alloc::string::String,
471 SparseVectorParams,
472 >,
473}
474#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
475pub struct MultiVectorConfig {
476 #[prost(enumeration = "MultiVectorComparator", tag = "1")]
478 pub comparator: i32,
479}
480#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
481pub struct GetCollectionInfoRequest {
482 #[prost(string, tag = "1")]
484 pub collection_name: ::prost::alloc::string::String,
485}
486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
487pub struct CollectionExistsRequest {
488 #[prost(string, tag = "1")]
489 pub collection_name: ::prost::alloc::string::String,
490}
491#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
492pub struct CollectionExists {
493 #[prost(bool, tag = "1")]
494 pub exists: bool,
495}
496#[derive(Clone, Copy, PartialEq, ::prost::Message)]
497pub struct CollectionExistsResponse {
498 #[prost(message, optional, tag = "1")]
499 pub result: ::core::option::Option<CollectionExists>,
500 #[prost(double, tag = "2")]
502 pub time: f64,
503}
504#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
505pub struct ListCollectionsRequest {}
506#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
507pub struct CollectionDescription {
508 #[prost(string, tag = "1")]
510 pub name: ::prost::alloc::string::String,
511}
512#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct GetCollectionInfoResponse {
514 #[prost(message, optional, tag = "1")]
515 pub result: ::core::option::Option<CollectionInfo>,
516 #[prost(double, tag = "2")]
518 pub time: f64,
519}
520#[derive(Clone, PartialEq, ::prost::Message)]
521pub struct ListCollectionsResponse {
522 #[prost(message, repeated, tag = "1")]
523 pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
524 #[prost(double, tag = "2")]
526 pub time: f64,
527}
528#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
529pub struct MaxOptimizationThreads {
530 #[prost(oneof = "max_optimization_threads::Variant", tags = "1, 2")]
531 pub variant: ::core::option::Option<max_optimization_threads::Variant>,
532}
533pub mod max_optimization_threads {
535 #[derive(
536 Clone,
537 Copy,
538 Debug,
539 PartialEq,
540 Eq,
541 Hash,
542 PartialOrd,
543 Ord,
544 ::prost::Enumeration
545 )]
546 #[repr(i32)]
547 pub enum Setting {
548 Auto = 0,
549 }
550 impl Setting {
551 pub fn as_str_name(&self) -> &'static str {
556 match self {
557 Self::Auto => "Auto",
558 }
559 }
560 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
562 match value {
563 "Auto" => Some(Self::Auto),
564 _ => None,
565 }
566 }
567 }
568 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
569 pub enum Variant {
570 #[prost(uint64, tag = "1")]
571 Value(u64),
572 #[prost(enumeration = "Setting", tag = "2")]
573 Setting(i32),
574 }
575}
576#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
577pub struct OptimizerStatus {
578 #[prost(bool, tag = "1")]
579 pub ok: bool,
580 #[prost(string, tag = "2")]
581 pub error: ::prost::alloc::string::String,
582}
583#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
584pub struct CollectionWarning {
585 #[prost(string, tag = "1")]
586 pub message: ::prost::alloc::string::String,
587}
588#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
589pub struct HnswConfigDiff {
590 #[prost(uint64, optional, tag = "1")]
593 pub m: ::core::option::Option<u64>,
594 #[prost(uint64, optional, tag = "2")]
597 pub ef_construct: ::core::option::Option<u64>,
598 #[prost(uint64, optional, tag = "3")]
605 pub full_scan_threshold: ::core::option::Option<u64>,
606 #[prost(uint64, optional, tag = "4")]
611 pub max_indexing_threads: ::core::option::Option<u64>,
612 #[deprecated]
615 #[prost(bool, optional, tag = "5")]
616 pub on_disk: ::core::option::Option<bool>,
617 #[prost(uint64, optional, tag = "6")]
620 pub payload_m: ::core::option::Option<u64>,
621 #[prost(bool, optional, tag = "7")]
626 pub inline_storage: ::core::option::Option<bool>,
627 #[prost(enumeration = "Memory", optional, tag = "8")]
630 pub memory: ::core::option::Option<i32>,
631}
632#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
633pub struct SparseIndexConfig {
634 #[prost(uint64, optional, tag = "1")]
637 pub full_scan_threshold: ::core::option::Option<u64>,
638 #[deprecated]
641 #[prost(bool, optional, tag = "2")]
642 pub on_disk: ::core::option::Option<bool>,
643 #[prost(enumeration = "Datatype", optional, tag = "3")]
645 pub datatype: ::core::option::Option<i32>,
646 #[prost(enumeration = "Memory", optional, tag = "4")]
649 pub memory: ::core::option::Option<i32>,
650}
651#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
652pub struct WalConfigDiff {
653 #[prost(uint64, optional, tag = "1")]
655 pub wal_capacity_mb: ::core::option::Option<u64>,
656 #[prost(uint64, optional, tag = "2")]
658 pub wal_segments_ahead: ::core::option::Option<u64>,
659 #[prost(uint64, optional, tag = "3")]
661 pub wal_retain_closed: ::core::option::Option<u64>,
662}
663#[derive(Clone, Copy, PartialEq, ::prost::Message)]
664pub struct OptimizersConfigDiff {
665 #[prost(double, optional, tag = "1")]
668 pub deleted_threshold: ::core::option::Option<f64>,
669 #[prost(uint64, optional, tag = "2")]
672 pub vacuum_min_vector_number: ::core::option::Option<u64>,
673 #[prost(uint64, optional, tag = "3")]
682 pub default_segment_number: ::core::option::Option<u64>,
683 #[prost(uint64, optional, tag = "4")]
694 pub max_segment_size: ::core::option::Option<u64>,
695 #[prost(uint64, optional, tag = "5")]
704 pub memmap_threshold: ::core::option::Option<u64>,
705 #[prost(uint64, optional, tag = "6")]
715 pub indexing_threshold: ::core::option::Option<u64>,
716 #[prost(uint64, optional, tag = "7")]
718 pub flush_interval_sec: ::core::option::Option<u64>,
719 #[prost(uint64, optional, tag = "8")]
721 pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
722 #[prost(message, optional, tag = "9")]
727 pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
728 #[prost(bool, optional, tag = "10")]
738 pub prevent_unoptimized: ::core::option::Option<bool>,
739}
740#[derive(Clone, Copy, PartialEq, ::prost::Message)]
741pub struct ScalarQuantization {
742 #[prost(enumeration = "QuantizationType", tag = "1")]
744 pub r#type: i32,
745 #[prost(float, optional, tag = "2")]
747 pub quantile: ::core::option::Option<f32>,
748 #[deprecated]
751 #[prost(bool, optional, tag = "3")]
752 pub always_ram: ::core::option::Option<bool>,
753 #[prost(enumeration = "Memory", optional, tag = "4")]
756 pub memory: ::core::option::Option<i32>,
757}
758#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
759pub struct ProductQuantization {
760 #[prost(enumeration = "CompressionRatio", tag = "1")]
762 pub compression: i32,
763 #[deprecated]
766 #[prost(bool, optional, tag = "2")]
767 pub always_ram: ::core::option::Option<bool>,
768 #[prost(enumeration = "Memory", optional, tag = "3")]
771 pub memory: ::core::option::Option<i32>,
772}
773#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
774pub struct BinaryQuantizationQueryEncoding {
775 #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
776 pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
777}
778pub mod binary_quantization_query_encoding {
780 #[derive(
781 Clone,
782 Copy,
783 Debug,
784 PartialEq,
785 Eq,
786 Hash,
787 PartialOrd,
788 Ord,
789 ::prost::Enumeration
790 )]
791 #[repr(i32)]
792 pub enum Setting {
793 Default = 0,
794 Binary = 1,
795 Scalar4Bits = 2,
796 Scalar8Bits = 3,
797 }
798 impl Setting {
799 pub fn as_str_name(&self) -> &'static str {
804 match self {
805 Self::Default => "Default",
806 Self::Binary => "Binary",
807 Self::Scalar4Bits => "Scalar4Bits",
808 Self::Scalar8Bits => "Scalar8Bits",
809 }
810 }
811 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
813 match value {
814 "Default" => Some(Self::Default),
815 "Binary" => Some(Self::Binary),
816 "Scalar4Bits" => Some(Self::Scalar4Bits),
817 "Scalar8Bits" => Some(Self::Scalar8Bits),
818 _ => None,
819 }
820 }
821 }
822 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
823 pub enum Variant {
824 #[prost(enumeration = "Setting", tag = "4")]
825 Setting(i32),
826 }
827}
828#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
829pub struct BinaryQuantization {
830 #[deprecated]
833 #[prost(bool, optional, tag = "1")]
834 pub always_ram: ::core::option::Option<bool>,
835 #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
837 pub encoding: ::core::option::Option<i32>,
838 #[prost(message, optional, tag = "3")]
842 pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
843 #[prost(enumeration = "Memory", optional, tag = "4")]
846 pub memory: ::core::option::Option<i32>,
847}
848#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
849pub struct TurboQuantization {
850 #[deprecated]
852 #[prost(bool, optional, tag = "1")]
853 pub always_ram: ::core::option::Option<bool>,
854 #[prost(enumeration = "TurboQuantBitSize", optional, tag = "2")]
855 pub bits: ::core::option::Option<i32>,
856 #[prost(enumeration = "Memory", optional, tag = "3")]
859 pub memory: ::core::option::Option<i32>,
860}
861#[derive(Clone, Copy, PartialEq, ::prost::Message)]
862pub struct QuantizationConfig {
863 #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3, 4")]
864 pub quantization: ::core::option::Option<quantization_config::Quantization>,
865}
866pub mod quantization_config {
868 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
869 pub enum Quantization {
870 #[prost(message, tag = "1")]
871 Scalar(super::ScalarQuantization),
872 #[prost(message, tag = "2")]
873 Product(super::ProductQuantization),
874 #[prost(message, tag = "3")]
875 Binary(super::BinaryQuantization),
876 #[prost(message, tag = "4")]
877 Turboquant(super::TurboQuantization),
878 }
879}
880#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
881pub struct Disabled {}
882#[derive(Clone, Copy, PartialEq, ::prost::Message)]
883pub struct QuantizationConfigDiff {
884 #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4, 5")]
885 pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
886}
887pub mod quantization_config_diff {
889 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
890 pub enum Quantization {
891 #[prost(message, tag = "1")]
892 Scalar(super::ScalarQuantization),
893 #[prost(message, tag = "2")]
894 Product(super::ProductQuantization),
895 #[prost(message, tag = "3")]
896 Disabled(super::Disabled),
897 #[prost(message, tag = "4")]
898 Binary(super::BinaryQuantization),
899 #[prost(message, tag = "5")]
900 Turboquant(super::TurboQuantization),
901 }
902}
903#[derive(Clone, PartialEq, ::prost::Message)]
904pub struct StrictModeConfig {
905 #[prost(bool, optional, tag = "1")]
907 pub enabled: ::core::option::Option<bool>,
908 #[prost(uint32, optional, tag = "2")]
910 pub max_query_limit: ::core::option::Option<u32>,
911 #[prost(uint32, optional, tag = "3")]
913 pub max_timeout: ::core::option::Option<u32>,
914 #[prost(bool, optional, tag = "4")]
916 pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
917 #[prost(bool, optional, tag = "5")]
919 pub unindexed_filtering_update: ::core::option::Option<bool>,
920 #[prost(uint32, optional, tag = "6")]
922 pub search_max_hnsw_ef: ::core::option::Option<u32>,
923 #[prost(bool, optional, tag = "7")]
925 pub search_allow_exact: ::core::option::Option<bool>,
926 #[prost(float, optional, tag = "8")]
928 pub search_max_oversampling: ::core::option::Option<f32>,
929 #[prost(uint64, optional, tag = "9")]
931 pub upsert_max_batchsize: ::core::option::Option<u64>,
932 #[prost(uint64, optional, tag = "20")]
934 pub search_max_batchsize: ::core::option::Option<u64>,
935 #[prost(uint64, optional, tag = "10")]
937 pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
938 #[prost(uint32, optional, tag = "11")]
940 pub read_rate_limit: ::core::option::Option<u32>,
941 #[prost(uint32, optional, tag = "12")]
943 pub write_rate_limit: ::core::option::Option<u32>,
944 #[prost(uint64, optional, tag = "13")]
946 pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
947 #[prost(uint64, optional, tag = "14")]
949 pub filter_max_conditions: ::core::option::Option<u64>,
950 #[prost(uint64, optional, tag = "15")]
952 pub condition_max_size: ::core::option::Option<u64>,
953 #[prost(message, optional, tag = "16")]
955 pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
956 #[prost(message, optional, tag = "17")]
958 pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
959 #[prost(uint64, optional, tag = "18")]
961 pub max_points_count: ::core::option::Option<u64>,
962 #[prost(uint64, optional, tag = "19")]
964 pub max_payload_index_count: ::core::option::Option<u64>,
965 #[deprecated]
969 #[prost(uint32, optional, tag = "21")]
970 pub max_resident_memory_percent: ::core::option::Option<u32>,
971}
972#[derive(Clone, PartialEq, ::prost::Message)]
973pub struct StrictModeSparseConfig {
974 #[prost(map = "string, message", tag = "1")]
975 pub sparse_config: ::std::collections::HashMap<
976 ::prost::alloc::string::String,
977 StrictModeSparse,
978 >,
979}
980#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
981pub struct StrictModeSparse {
982 #[prost(uint64, optional, tag = "10")]
984 pub max_length: ::core::option::Option<u64>,
985}
986#[derive(Clone, PartialEq, ::prost::Message)]
987pub struct StrictModeMultivectorConfig {
988 #[prost(map = "string, message", tag = "1")]
989 pub multivector_config: ::std::collections::HashMap<
990 ::prost::alloc::string::String,
991 StrictModeMultivector,
992 >,
993}
994#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
995pub struct StrictModeMultivector {
996 #[prost(uint64, optional, tag = "1")]
998 pub max_vectors: ::core::option::Option<u64>,
999}
1000#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1002pub struct PayloadStorageParams {
1003 #[prost(enumeration = "Memory", optional, tag = "1")]
1007 pub memory: ::core::option::Option<i32>,
1008}
1009#[derive(Clone, PartialEq, ::prost::Message)]
1010pub struct CreateCollection {
1011 #[prost(string, tag = "1")]
1013 pub collection_name: ::prost::alloc::string::String,
1014 #[prost(message, optional, tag = "4")]
1016 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1017 #[prost(message, optional, tag = "5")]
1019 pub wal_config: ::core::option::Option<WalConfigDiff>,
1020 #[prost(message, optional, tag = "6")]
1022 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
1023 #[prost(uint32, optional, tag = "7")]
1026 pub shard_number: ::core::option::Option<u32>,
1027 #[deprecated]
1030 #[prost(bool, optional, tag = "8")]
1031 pub on_disk_payload: ::core::option::Option<bool>,
1032 #[prost(uint64, optional, tag = "9")]
1035 pub timeout: ::core::option::Option<u64>,
1036 #[prost(message, optional, tag = "10")]
1038 pub vectors_config: ::core::option::Option<VectorsConfig>,
1039 #[prost(uint32, optional, tag = "11")]
1041 pub replication_factor: ::core::option::Option<u32>,
1042 #[prost(uint32, optional, tag = "12")]
1044 pub write_consistency_factor: ::core::option::Option<u32>,
1045 #[prost(message, optional, tag = "14")]
1047 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1048 #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
1050 pub sharding_method: ::core::option::Option<i32>,
1051 #[prost(message, optional, tag = "16")]
1053 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1054 #[prost(message, optional, tag = "17")]
1056 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1057 #[prost(map = "string, message", tag = "18")]
1059 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1060 #[prost(message, optional, tag = "19")]
1062 pub payload: ::core::option::Option<PayloadStorageParams>,
1063}
1064#[derive(Clone, PartialEq, ::prost::Message)]
1065pub struct UpdateCollection {
1066 #[prost(string, tag = "1")]
1068 pub collection_name: ::prost::alloc::string::String,
1069 #[prost(message, optional, tag = "2")]
1073 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
1074 #[prost(uint64, optional, tag = "3")]
1077 pub timeout: ::core::option::Option<u64>,
1078 #[prost(message, optional, tag = "4")]
1080 pub params: ::core::option::Option<CollectionParamsDiff>,
1081 #[prost(message, optional, tag = "5")]
1083 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1084 #[prost(message, optional, tag = "6")]
1086 pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
1087 #[prost(message, optional, tag = "7")]
1089 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
1090 #[prost(message, optional, tag = "8")]
1092 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1093 #[prost(message, optional, tag = "9")]
1095 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1096 #[prost(map = "string, message", tag = "10")]
1099 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1100}
1101#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1102pub struct DeleteCollection {
1103 #[prost(string, tag = "1")]
1105 pub collection_name: ::prost::alloc::string::String,
1106 #[prost(uint64, optional, tag = "2")]
1109 pub timeout: ::core::option::Option<u64>,
1110}
1111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1112pub struct CollectionOperationResponse {
1113 #[prost(bool, tag = "1")]
1115 pub result: bool,
1116 #[prost(double, tag = "2")]
1118 pub time: f64,
1119}
1120#[derive(Clone, PartialEq, ::prost::Message)]
1121pub struct CollectionParams {
1122 #[prost(uint32, tag = "3")]
1124 pub shard_number: u32,
1125 #[deprecated]
1128 #[prost(bool, tag = "4")]
1129 pub on_disk_payload: bool,
1130 #[prost(message, optional, tag = "5")]
1132 pub vectors_config: ::core::option::Option<VectorsConfig>,
1133 #[prost(uint32, optional, tag = "6")]
1135 pub replication_factor: ::core::option::Option<u32>,
1136 #[prost(uint32, optional, tag = "7")]
1138 pub write_consistency_factor: ::core::option::Option<u32>,
1139 #[prost(uint32, optional, tag = "8")]
1141 pub read_fan_out_factor: ::core::option::Option<u32>,
1142 #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
1144 pub sharding_method: ::core::option::Option<i32>,
1145 #[prost(message, optional, tag = "10")]
1147 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1148 #[prost(uint64, optional, tag = "11")]
1150 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1151 #[prost(message, optional, tag = "12")]
1153 pub payload: ::core::option::Option<PayloadStorageParams>,
1154}
1155#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1156pub struct CollectionParamsDiff {
1157 #[prost(uint32, optional, tag = "1")]
1159 pub replication_factor: ::core::option::Option<u32>,
1160 #[prost(uint32, optional, tag = "2")]
1162 pub write_consistency_factor: ::core::option::Option<u32>,
1163 #[deprecated]
1166 #[prost(bool, optional, tag = "3")]
1167 pub on_disk_payload: ::core::option::Option<bool>,
1168 #[prost(uint32, optional, tag = "4")]
1170 pub read_fan_out_factor: ::core::option::Option<u32>,
1171 #[prost(uint64, optional, tag = "5")]
1173 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1174 #[prost(message, optional, tag = "6")]
1176 pub payload: ::core::option::Option<PayloadStorageParams>,
1177}
1178#[derive(Clone, PartialEq, ::prost::Message)]
1179pub struct CollectionConfig {
1180 #[prost(message, optional, tag = "1")]
1182 pub params: ::core::option::Option<CollectionParams>,
1183 #[prost(message, optional, tag = "2")]
1185 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1186 #[prost(message, optional, tag = "3")]
1188 pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
1189 #[prost(message, optional, tag = "4")]
1191 pub wal_config: ::core::option::Option<WalConfigDiff>,
1192 #[prost(message, optional, tag = "5")]
1194 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1195 #[prost(message, optional, tag = "6")]
1197 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1198 #[prost(map = "string, message", tag = "7")]
1200 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1201}
1202#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1203pub struct KeywordIndexParams {
1204 #[prost(bool, optional, tag = "1")]
1206 pub is_tenant: ::core::option::Option<bool>,
1207 #[deprecated]
1210 #[prost(bool, optional, tag = "2")]
1211 pub on_disk: ::core::option::Option<bool>,
1212 #[prost(bool, optional, tag = "3")]
1216 pub enable_hnsw: ::core::option::Option<bool>,
1217 #[prost(message, optional, tag = "4")]
1219 pub prefix: ::core::option::Option<KeywordPrefixParams>,
1220 #[prost(enumeration = "Memory", optional, tag = "5")]
1223 pub memory: ::core::option::Option<i32>,
1224}
1225#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1228pub struct KeywordPrefixParams {}
1229#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1230pub struct IntegerIndexParams {
1231 #[prost(bool, optional, tag = "1")]
1233 pub lookup: ::core::option::Option<bool>,
1234 #[prost(bool, optional, tag = "2")]
1236 pub range: ::core::option::Option<bool>,
1237 #[prost(bool, optional, tag = "3")]
1241 pub is_principal: ::core::option::Option<bool>,
1242 #[deprecated]
1245 #[prost(bool, optional, tag = "4")]
1246 pub on_disk: ::core::option::Option<bool>,
1247 #[prost(bool, optional, tag = "5")]
1251 pub enable_hnsw: ::core::option::Option<bool>,
1252 #[prost(enumeration = "Memory", optional, tag = "6")]
1255 pub memory: ::core::option::Option<i32>,
1256}
1257#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1258pub struct FloatIndexParams {
1259 #[deprecated]
1262 #[prost(bool, optional, tag = "1")]
1263 pub on_disk: ::core::option::Option<bool>,
1264 #[prost(bool, optional, tag = "2")]
1267 pub is_principal: ::core::option::Option<bool>,
1268 #[prost(bool, optional, tag = "3")]
1272 pub enable_hnsw: ::core::option::Option<bool>,
1273 #[prost(enumeration = "Memory", optional, tag = "4")]
1276 pub memory: ::core::option::Option<i32>,
1277}
1278#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1279pub struct GeoIndexParams {
1280 #[deprecated]
1283 #[prost(bool, optional, tag = "1")]
1284 pub on_disk: ::core::option::Option<bool>,
1285 #[prost(bool, optional, tag = "2")]
1289 pub enable_hnsw: ::core::option::Option<bool>,
1290 #[prost(enumeration = "Memory", optional, tag = "3")]
1293 pub memory: ::core::option::Option<i32>,
1294}
1295#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1296pub struct StopwordsSet {
1297 #[prost(string, repeated, tag = "1")]
1299 pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1300 #[prost(string, repeated, tag = "2")]
1302 pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1303}
1304#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1305pub struct TextIndexParams {
1306 #[prost(enumeration = "TokenizerType", tag = "1")]
1308 pub tokenizer: i32,
1309 #[prost(bool, optional, tag = "2")]
1311 pub lowercase: ::core::option::Option<bool>,
1312 #[prost(uint64, optional, tag = "3")]
1314 pub min_token_len: ::core::option::Option<u64>,
1315 #[prost(uint64, optional, tag = "4")]
1317 pub max_token_len: ::core::option::Option<u64>,
1318 #[deprecated]
1321 #[prost(bool, optional, tag = "5")]
1322 pub on_disk: ::core::option::Option<bool>,
1323 #[prost(message, optional, tag = "6")]
1325 pub stopwords: ::core::option::Option<StopwordsSet>,
1326 #[prost(bool, optional, tag = "7")]
1328 pub phrase_matching: ::core::option::Option<bool>,
1329 #[prost(message, optional, tag = "8")]
1331 pub stemmer: ::core::option::Option<StemmingAlgorithm>,
1332 #[prost(bool, optional, tag = "9")]
1335 pub ascii_folding: ::core::option::Option<bool>,
1336 #[prost(bool, optional, tag = "10")]
1340 pub enable_hnsw: ::core::option::Option<bool>,
1341 #[prost(enumeration = "Memory", optional, tag = "11")]
1344 pub memory: ::core::option::Option<i32>,
1345}
1346#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1347pub struct StemmingAlgorithm {
1348 #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1, 2")]
1349 pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
1350}
1351pub mod stemming_algorithm {
1353 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1354 pub enum StemmingParams {
1355 #[prost(message, tag = "1")]
1357 Snowball(super::SnowballParams),
1358 #[prost(message, tag = "2")]
1360 Disabled(super::DisabledStemmer),
1361 }
1362}
1363#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1364pub struct SnowballParams {
1365 #[prost(string, tag = "1")]
1367 pub language: ::prost::alloc::string::String,
1368}
1369#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1371pub struct DisabledStemmer {}
1372#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1373pub struct BoolIndexParams {
1374 #[deprecated]
1377 #[prost(bool, optional, tag = "1")]
1378 pub on_disk: ::core::option::Option<bool>,
1379 #[prost(bool, optional, tag = "2")]
1383 pub enable_hnsw: ::core::option::Option<bool>,
1384 #[prost(enumeration = "Memory", optional, tag = "3")]
1387 pub memory: ::core::option::Option<i32>,
1388}
1389#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1390pub struct DatetimeIndexParams {
1391 #[deprecated]
1394 #[prost(bool, optional, tag = "1")]
1395 pub on_disk: ::core::option::Option<bool>,
1396 #[prost(bool, optional, tag = "2")]
1399 pub is_principal: ::core::option::Option<bool>,
1400 #[prost(bool, optional, tag = "3")]
1404 pub enable_hnsw: ::core::option::Option<bool>,
1405 #[prost(enumeration = "Memory", optional, tag = "4")]
1408 pub memory: ::core::option::Option<i32>,
1409}
1410#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1411pub struct UuidIndexParams {
1412 #[prost(bool, optional, tag = "1")]
1414 pub is_tenant: ::core::option::Option<bool>,
1415 #[deprecated]
1418 #[prost(bool, optional, tag = "2")]
1419 pub on_disk: ::core::option::Option<bool>,
1420 #[prost(bool, optional, tag = "3")]
1424 pub enable_hnsw: ::core::option::Option<bool>,
1425 #[prost(enumeration = "Memory", optional, tag = "4")]
1428 pub memory: ::core::option::Option<i32>,
1429}
1430#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1431pub struct PayloadIndexParams {
1432 #[prost(
1433 oneof = "payload_index_params::IndexParams",
1434 tags = "3, 2, 4, 5, 1, 6, 7, 8"
1435 )]
1436 pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
1437}
1438pub mod payload_index_params {
1440 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1441 pub enum IndexParams {
1442 #[prost(message, tag = "3")]
1444 KeywordIndexParams(super::KeywordIndexParams),
1445 #[prost(message, tag = "2")]
1447 IntegerIndexParams(super::IntegerIndexParams),
1448 #[prost(message, tag = "4")]
1450 FloatIndexParams(super::FloatIndexParams),
1451 #[prost(message, tag = "5")]
1453 GeoIndexParams(super::GeoIndexParams),
1454 #[prost(message, tag = "1")]
1456 TextIndexParams(super::TextIndexParams),
1457 #[prost(message, tag = "6")]
1459 BoolIndexParams(super::BoolIndexParams),
1460 #[prost(message, tag = "7")]
1462 DatetimeIndexParams(super::DatetimeIndexParams),
1463 #[prost(message, tag = "8")]
1465 UuidIndexParams(super::UuidIndexParams),
1466 }
1467}
1468#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1469pub struct PayloadSchemaInfo {
1470 #[prost(enumeration = "PayloadSchemaType", tag = "1")]
1472 pub data_type: i32,
1473 #[prost(message, optional, tag = "2")]
1475 pub params: ::core::option::Option<PayloadIndexParams>,
1476 #[prost(uint64, optional, tag = "3")]
1478 pub points: ::core::option::Option<u64>,
1479}
1480#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1481pub struct UpdateQueueInfo {
1482 #[prost(uint64, tag = "1")]
1484 pub length: u64,
1485 #[prost(uint64, optional, tag = "2")]
1487 pub deferred_points: ::core::option::Option<u64>,
1488}
1489#[derive(Clone, PartialEq, ::prost::Message)]
1490pub struct CollectionInfo {
1491 #[prost(enumeration = "CollectionStatus", tag = "1")]
1493 pub status: i32,
1494 #[prost(message, optional, tag = "2")]
1496 pub optimizer_status: ::core::option::Option<OptimizerStatus>,
1497 #[prost(uint64, tag = "4")]
1499 pub segments_count: u64,
1500 #[prost(message, optional, tag = "7")]
1502 pub config: ::core::option::Option<CollectionConfig>,
1503 #[prost(map = "string, message", tag = "8")]
1505 pub payload_schema: ::std::collections::HashMap<
1506 ::prost::alloc::string::String,
1507 PayloadSchemaInfo,
1508 >,
1509 #[prost(uint64, optional, tag = "9")]
1511 pub points_count: ::core::option::Option<u64>,
1512 #[prost(uint64, optional, tag = "10")]
1514 pub indexed_vectors_count: ::core::option::Option<u64>,
1515 #[prost(message, repeated, tag = "11")]
1517 pub warnings: ::prost::alloc::vec::Vec<CollectionWarning>,
1518 #[prost(message, optional, tag = "12")]
1520 pub update_queue: ::core::option::Option<UpdateQueueInfo>,
1521}
1522#[derive(Clone, PartialEq, ::prost::Message)]
1523pub struct ChangeAliases {
1524 #[prost(message, repeated, tag = "1")]
1526 pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
1527 #[prost(uint64, optional, tag = "2")]
1530 pub timeout: ::core::option::Option<u64>,
1531}
1532#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1533pub struct AliasOperations {
1534 #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
1535 pub action: ::core::option::Option<alias_operations::Action>,
1536}
1537pub mod alias_operations {
1539 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1540 pub enum Action {
1541 #[prost(message, tag = "1")]
1542 CreateAlias(super::CreateAlias),
1543 #[prost(message, tag = "2")]
1544 RenameAlias(super::RenameAlias),
1545 #[prost(message, tag = "3")]
1546 DeleteAlias(super::DeleteAlias),
1547 }
1548}
1549#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1550pub struct CreateAlias {
1551 #[prost(string, tag = "1")]
1553 pub collection_name: ::prost::alloc::string::String,
1554 #[prost(string, tag = "2")]
1556 pub alias_name: ::prost::alloc::string::String,
1557}
1558#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1559pub struct RenameAlias {
1560 #[prost(string, tag = "1")]
1562 pub old_alias_name: ::prost::alloc::string::String,
1563 #[prost(string, tag = "2")]
1565 pub new_alias_name: ::prost::alloc::string::String,
1566}
1567#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1568pub struct DeleteAlias {
1569 #[prost(string, tag = "1")]
1571 pub alias_name: ::prost::alloc::string::String,
1572}
1573#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1574pub struct ListAliasesRequest {}
1575#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1576pub struct ListCollectionAliasesRequest {
1577 #[prost(string, tag = "1")]
1579 pub collection_name: ::prost::alloc::string::String,
1580}
1581#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1582pub struct AliasDescription {
1583 #[prost(string, tag = "1")]
1585 pub alias_name: ::prost::alloc::string::String,
1586 #[prost(string, tag = "2")]
1588 pub collection_name: ::prost::alloc::string::String,
1589}
1590#[derive(Clone, PartialEq, ::prost::Message)]
1591pub struct ListAliasesResponse {
1592 #[prost(message, repeated, tag = "1")]
1593 pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
1594 #[prost(double, tag = "2")]
1596 pub time: f64,
1597}
1598#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1599pub struct CollectionClusterInfoRequest {
1600 #[prost(string, tag = "1")]
1602 pub collection_name: ::prost::alloc::string::String,
1603}
1604#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1605pub struct ShardKey {
1606 #[prost(oneof = "shard_key::Key", tags = "1, 2")]
1607 pub key: ::core::option::Option<shard_key::Key>,
1608}
1609pub mod shard_key {
1611 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1612 pub enum Key {
1613 #[prost(string, tag = "1")]
1615 Keyword(::prost::alloc::string::String),
1616 #[prost(uint64, tag = "2")]
1618 Number(u64),
1619 }
1620}
1621#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1622pub struct LocalShardInfo {
1623 #[prost(uint32, tag = "1")]
1625 pub shard_id: u32,
1626 #[prost(uint64, tag = "2")]
1628 pub points_count: u64,
1629 #[prost(enumeration = "ReplicaState", tag = "3")]
1631 pub state: i32,
1632 #[prost(message, optional, tag = "4")]
1634 pub shard_key: ::core::option::Option<ShardKey>,
1635}
1636#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1637pub struct RemoteShardInfo {
1638 #[prost(uint32, tag = "1")]
1640 pub shard_id: u32,
1641 #[prost(uint64, tag = "2")]
1643 pub peer_id: u64,
1644 #[prost(enumeration = "ReplicaState", tag = "3")]
1646 pub state: i32,
1647 #[prost(message, optional, tag = "4")]
1649 pub shard_key: ::core::option::Option<ShardKey>,
1650}
1651#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1652pub struct ShardTransferInfo {
1653 #[prost(uint32, tag = "1")]
1655 pub shard_id: u32,
1656 #[prost(uint32, optional, tag = "5")]
1657 pub to_shard_id: ::core::option::Option<u32>,
1658 #[prost(uint64, tag = "2")]
1659 pub from: u64,
1660 #[prost(uint64, tag = "3")]
1661 pub to: u64,
1662 #[prost(bool, tag = "4")]
1665 pub sync: bool,
1666}
1667#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1668pub struct ReshardingInfo {
1669 #[prost(uint32, tag = "1")]
1670 pub shard_id: u32,
1671 #[prost(uint64, tag = "2")]
1672 pub peer_id: u64,
1673 #[prost(message, optional, tag = "3")]
1674 pub shard_key: ::core::option::Option<ShardKey>,
1675 #[prost(enumeration = "ReshardingDirection", tag = "4")]
1676 pub direction: i32,
1677}
1678#[derive(Clone, PartialEq, ::prost::Message)]
1679pub struct CollectionClusterInfoResponse {
1680 #[prost(uint64, tag = "1")]
1682 pub peer_id: u64,
1683 #[prost(uint64, tag = "2")]
1685 pub shard_count: u64,
1686 #[prost(message, repeated, tag = "3")]
1688 pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1689 #[prost(message, repeated, tag = "4")]
1691 pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1692 #[prost(message, repeated, tag = "5")]
1694 pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1695 #[prost(message, repeated, tag = "6")]
1697 pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1698 #[prost(double, tag = "7")]
1700 pub time: f64,
1701}
1702#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1703pub struct MoveShard {
1704 #[prost(uint32, tag = "1")]
1706 pub shard_id: u32,
1707 #[prost(uint32, optional, tag = "5")]
1708 pub to_shard_id: ::core::option::Option<u32>,
1709 #[prost(uint64, tag = "2")]
1710 pub from_peer_id: u64,
1711 #[prost(uint64, tag = "3")]
1712 pub to_peer_id: u64,
1713 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1714 pub method: ::core::option::Option<i32>,
1715}
1716#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1717pub struct ReplicateShard {
1718 #[prost(uint32, tag = "1")]
1720 pub shard_id: u32,
1721 #[prost(uint32, optional, tag = "5")]
1722 pub to_shard_id: ::core::option::Option<u32>,
1723 #[prost(uint64, tag = "2")]
1724 pub from_peer_id: u64,
1725 #[prost(uint64, tag = "3")]
1726 pub to_peer_id: u64,
1727 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1728 pub method: ::core::option::Option<i32>,
1729}
1730#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1731pub struct AbortShardTransfer {
1732 #[prost(uint32, tag = "1")]
1734 pub shard_id: u32,
1735 #[prost(uint32, optional, tag = "4")]
1736 pub to_shard_id: ::core::option::Option<u32>,
1737 #[prost(uint64, tag = "2")]
1738 pub from_peer_id: u64,
1739 #[prost(uint64, tag = "3")]
1740 pub to_peer_id: u64,
1741}
1742#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1743pub struct RestartTransfer {
1744 #[prost(uint32, tag = "1")]
1746 pub shard_id: u32,
1747 #[prost(uint32, optional, tag = "5")]
1748 pub to_shard_id: ::core::option::Option<u32>,
1749 #[prost(uint64, tag = "2")]
1750 pub from_peer_id: u64,
1751 #[prost(uint64, tag = "3")]
1752 pub to_peer_id: u64,
1753 #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1754 pub method: i32,
1755}
1756#[derive(Clone, PartialEq, ::prost::Message)]
1757pub struct ReplicatePoints {
1758 #[prost(message, optional, tag = "1")]
1760 pub from_shard_key: ::core::option::Option<ShardKey>,
1761 #[prost(message, optional, tag = "2")]
1763 pub to_shard_key: ::core::option::Option<ShardKey>,
1764 #[prost(message, optional, tag = "3")]
1766 pub filter: ::core::option::Option<Filter>,
1767}
1768#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1769pub struct Replica {
1770 #[prost(uint32, tag = "1")]
1771 pub shard_id: u32,
1772 #[prost(uint64, tag = "2")]
1773 pub peer_id: u64,
1774}
1775#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1776pub struct CreateShardKey {
1777 #[prost(message, optional, tag = "1")]
1779 pub shard_key: ::core::option::Option<ShardKey>,
1780 #[prost(uint32, optional, tag = "2")]
1782 pub shards_number: ::core::option::Option<u32>,
1783 #[prost(uint32, optional, tag = "3")]
1785 pub replication_factor: ::core::option::Option<u32>,
1786 #[prost(uint64, repeated, tag = "4")]
1788 pub placement: ::prost::alloc::vec::Vec<u64>,
1789 #[prost(enumeration = "ReplicaState", optional, tag = "5")]
1791 pub initial_state: ::core::option::Option<i32>,
1792}
1793#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1794pub struct DeleteShardKey {
1795 #[prost(message, optional, tag = "1")]
1797 pub shard_key: ::core::option::Option<ShardKey>,
1798}
1799#[derive(Clone, PartialEq, ::prost::Message)]
1800pub struct UpdateCollectionClusterSetupRequest {
1801 #[prost(string, tag = "1")]
1803 pub collection_name: ::prost::alloc::string::String,
1804 #[prost(uint64, optional, tag = "6")]
1807 pub timeout: ::core::option::Option<u64>,
1808 #[prost(
1809 oneof = "update_collection_cluster_setup_request::Operation",
1810 tags = "2, 3, 4, 5, 7, 8, 9, 10"
1811 )]
1812 pub operation: ::core::option::Option<
1813 update_collection_cluster_setup_request::Operation,
1814 >,
1815}
1816pub mod update_collection_cluster_setup_request {
1818 #[derive(Clone, PartialEq, ::prost::Oneof)]
1819 pub enum Operation {
1820 #[prost(message, tag = "2")]
1821 MoveShard(super::MoveShard),
1822 #[prost(message, tag = "3")]
1823 ReplicateShard(super::ReplicateShard),
1824 #[prost(message, tag = "4")]
1825 AbortTransfer(super::AbortShardTransfer),
1826 #[prost(message, tag = "5")]
1827 DropReplica(super::Replica),
1828 #[prost(message, tag = "7")]
1829 CreateShardKey(super::CreateShardKey),
1830 #[prost(message, tag = "8")]
1831 DeleteShardKey(super::DeleteShardKey),
1832 #[prost(message, tag = "9")]
1833 RestartTransfer(super::RestartTransfer),
1834 #[prost(message, tag = "10")]
1835 ReplicatePoints(super::ReplicatePoints),
1836 }
1837}
1838#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1839pub struct UpdateCollectionClusterSetupResponse {
1840 #[prost(bool, tag = "1")]
1841 pub result: bool,
1842 #[prost(double, tag = "2")]
1844 pub time: f64,
1845}
1846#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1847pub struct CreateShardKeyRequest {
1848 #[prost(string, tag = "1")]
1850 pub collection_name: ::prost::alloc::string::String,
1851 #[prost(message, optional, tag = "2")]
1853 pub request: ::core::option::Option<CreateShardKey>,
1854 #[prost(uint64, optional, tag = "3")]
1857 pub timeout: ::core::option::Option<u64>,
1858}
1859#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1860pub struct DeleteShardKeyRequest {
1861 #[prost(string, tag = "1")]
1863 pub collection_name: ::prost::alloc::string::String,
1864 #[prost(message, optional, tag = "2")]
1866 pub request: ::core::option::Option<DeleteShardKey>,
1867 #[prost(uint64, optional, tag = "3")]
1870 pub timeout: ::core::option::Option<u64>,
1871}
1872#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1873pub struct ListShardKeysRequest {
1874 #[prost(string, tag = "1")]
1876 pub collection_name: ::prost::alloc::string::String,
1877}
1878#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1879pub struct CreateShardKeyResponse {
1880 #[prost(bool, tag = "1")]
1881 pub result: bool,
1882 #[prost(double, tag = "2")]
1884 pub time: f64,
1885}
1886#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1887pub struct DeleteShardKeyResponse {
1888 #[prost(bool, tag = "1")]
1889 pub result: bool,
1890 #[prost(double, tag = "2")]
1892 pub time: f64,
1893}
1894#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1895pub struct ShardKeyDescription {
1896 #[prost(message, optional, tag = "1")]
1897 pub key: ::core::option::Option<ShardKey>,
1898}
1899#[derive(Clone, PartialEq, ::prost::Message)]
1900pub struct ListShardKeysResponse {
1901 #[prost(message, repeated, tag = "1")]
1902 pub shard_keys: ::prost::alloc::vec::Vec<ShardKeyDescription>,
1903 #[prost(double, tag = "2")]
1905 pub time: f64,
1906}
1907#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1908#[repr(i32)]
1909pub enum Datatype {
1910 Default = 0,
1911 Float32 = 1,
1912 Uint8 = 2,
1913 Float16 = 3,
1914 Turbo4 = 4,
1915}
1916impl Datatype {
1917 pub fn as_str_name(&self) -> &'static str {
1922 match self {
1923 Self::Default => "Default",
1924 Self::Float32 => "Float32",
1925 Self::Uint8 => "Uint8",
1926 Self::Float16 => "Float16",
1927 Self::Turbo4 => "Turbo4",
1928 }
1929 }
1930 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1932 match value {
1933 "Default" => Some(Self::Default),
1934 "Float32" => Some(Self::Float32),
1935 "Uint8" => Some(Self::Uint8),
1936 "Float16" => Some(Self::Float16),
1937 "Turbo4" => Some(Self::Turbo4),
1938 _ => None,
1939 }
1940 }
1941}
1942#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1946#[repr(i32)]
1947pub enum Memory {
1948 Unknown = 0,
1949 Cold = 1,
1951 Cached = 2,
1953 Pinned = 3,
1955}
1956impl Memory {
1957 pub fn as_str_name(&self) -> &'static str {
1962 match self {
1963 Self::Unknown => "MemoryUnknown",
1964 Self::Cold => "Cold",
1965 Self::Cached => "Cached",
1966 Self::Pinned => "Pinned",
1967 }
1968 }
1969 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1971 match value {
1972 "MemoryUnknown" => Some(Self::Unknown),
1973 "Cold" => Some(Self::Cold),
1974 "Cached" => Some(Self::Cached),
1975 "Pinned" => Some(Self::Pinned),
1976 _ => None,
1977 }
1978 }
1979}
1980#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1981#[repr(i32)]
1982pub enum Modifier {
1983 None = 0,
1984 Idf = 1,
1986}
1987impl Modifier {
1988 pub fn as_str_name(&self) -> &'static str {
1993 match self {
1994 Self::None => "None",
1995 Self::Idf => "Idf",
1996 }
1997 }
1998 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2000 match value {
2001 "None" => Some(Self::None),
2002 "Idf" => Some(Self::Idf),
2003 _ => None,
2004 }
2005 }
2006}
2007#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2008#[repr(i32)]
2009pub enum MultiVectorComparator {
2010 MaxSim = 0,
2011}
2012impl MultiVectorComparator {
2013 pub fn as_str_name(&self) -> &'static str {
2018 match self {
2019 Self::MaxSim => "MaxSim",
2020 }
2021 }
2022 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2024 match value {
2025 "MaxSim" => Some(Self::MaxSim),
2026 _ => None,
2027 }
2028 }
2029}
2030#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2031#[repr(i32)]
2032pub enum Distance {
2033 UnknownDistance = 0,
2034 Cosine = 1,
2035 Euclid = 2,
2036 Dot = 3,
2037 Manhattan = 4,
2038}
2039impl Distance {
2040 pub fn as_str_name(&self) -> &'static str {
2045 match self {
2046 Self::UnknownDistance => "UnknownDistance",
2047 Self::Cosine => "Cosine",
2048 Self::Euclid => "Euclid",
2049 Self::Dot => "Dot",
2050 Self::Manhattan => "Manhattan",
2051 }
2052 }
2053 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2055 match value {
2056 "UnknownDistance" => Some(Self::UnknownDistance),
2057 "Cosine" => Some(Self::Cosine),
2058 "Euclid" => Some(Self::Euclid),
2059 "Dot" => Some(Self::Dot),
2060 "Manhattan" => Some(Self::Manhattan),
2061 _ => None,
2062 }
2063 }
2064}
2065#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2066#[repr(i32)]
2067pub enum CollectionStatus {
2068 UnknownCollectionStatus = 0,
2069 Green = 1,
2071 Yellow = 2,
2073 Red = 3,
2075 Grey = 4,
2077}
2078impl CollectionStatus {
2079 pub fn as_str_name(&self) -> &'static str {
2084 match self {
2085 Self::UnknownCollectionStatus => "UnknownCollectionStatus",
2086 Self::Green => "Green",
2087 Self::Yellow => "Yellow",
2088 Self::Red => "Red",
2089 Self::Grey => "Grey",
2090 }
2091 }
2092 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2094 match value {
2095 "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
2096 "Green" => Some(Self::Green),
2097 "Yellow" => Some(Self::Yellow),
2098 "Red" => Some(Self::Red),
2099 "Grey" => Some(Self::Grey),
2100 _ => None,
2101 }
2102 }
2103}
2104#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2105#[repr(i32)]
2106pub enum PayloadSchemaType {
2107 UnknownType = 0,
2108 Keyword = 1,
2109 Integer = 2,
2110 Float = 3,
2111 Geo = 4,
2112 Text = 5,
2113 Bool = 6,
2114 Datetime = 7,
2115 Uuid = 8,
2116}
2117impl PayloadSchemaType {
2118 pub fn as_str_name(&self) -> &'static str {
2123 match self {
2124 Self::UnknownType => "UnknownType",
2125 Self::Keyword => "Keyword",
2126 Self::Integer => "Integer",
2127 Self::Float => "Float",
2128 Self::Geo => "Geo",
2129 Self::Text => "Text",
2130 Self::Bool => "Bool",
2131 Self::Datetime => "Datetime",
2132 Self::Uuid => "Uuid",
2133 }
2134 }
2135 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2137 match value {
2138 "UnknownType" => Some(Self::UnknownType),
2139 "Keyword" => Some(Self::Keyword),
2140 "Integer" => Some(Self::Integer),
2141 "Float" => Some(Self::Float),
2142 "Geo" => Some(Self::Geo),
2143 "Text" => Some(Self::Text),
2144 "Bool" => Some(Self::Bool),
2145 "Datetime" => Some(Self::Datetime),
2146 "Uuid" => Some(Self::Uuid),
2147 _ => None,
2148 }
2149 }
2150}
2151#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2152#[repr(i32)]
2153pub enum QuantizationType {
2154 UnknownQuantization = 0,
2155 Int8 = 1,
2156}
2157impl QuantizationType {
2158 pub fn as_str_name(&self) -> &'static str {
2163 match self {
2164 Self::UnknownQuantization => "UnknownQuantization",
2165 Self::Int8 => "Int8",
2166 }
2167 }
2168 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2170 match value {
2171 "UnknownQuantization" => Some(Self::UnknownQuantization),
2172 "Int8" => Some(Self::Int8),
2173 _ => None,
2174 }
2175 }
2176}
2177#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2178#[repr(i32)]
2179pub enum CompressionRatio {
2180 X4 = 0,
2181 X8 = 1,
2182 X16 = 2,
2183 X32 = 3,
2184 X64 = 4,
2185}
2186impl CompressionRatio {
2187 pub fn as_str_name(&self) -> &'static str {
2192 match self {
2193 Self::X4 => "x4",
2194 Self::X8 => "x8",
2195 Self::X16 => "x16",
2196 Self::X32 => "x32",
2197 Self::X64 => "x64",
2198 }
2199 }
2200 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2202 match value {
2203 "x4" => Some(Self::X4),
2204 "x8" => Some(Self::X8),
2205 "x16" => Some(Self::X16),
2206 "x32" => Some(Self::X32),
2207 "x64" => Some(Self::X64),
2208 _ => None,
2209 }
2210 }
2211}
2212#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2213#[repr(i32)]
2214pub enum BinaryQuantizationEncoding {
2215 OneBit = 0,
2216 TwoBits = 1,
2217 OneAndHalfBits = 2,
2218}
2219impl BinaryQuantizationEncoding {
2220 pub fn as_str_name(&self) -> &'static str {
2225 match self {
2226 Self::OneBit => "OneBit",
2227 Self::TwoBits => "TwoBits",
2228 Self::OneAndHalfBits => "OneAndHalfBits",
2229 }
2230 }
2231 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2233 match value {
2234 "OneBit" => Some(Self::OneBit),
2235 "TwoBits" => Some(Self::TwoBits),
2236 "OneAndHalfBits" => Some(Self::OneAndHalfBits),
2237 _ => None,
2238 }
2239 }
2240}
2241#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2242#[repr(i32)]
2243pub enum TurboQuantBitSize {
2244 Bits1 = 0,
2245 Bits15 = 1,
2247 Bits2 = 2,
2248 Bits4 = 3,
2249}
2250impl TurboQuantBitSize {
2251 pub fn as_str_name(&self) -> &'static str {
2256 match self {
2257 Self::Bits1 => "Bits1",
2258 Self::Bits15 => "Bits1_5",
2259 Self::Bits2 => "Bits2",
2260 Self::Bits4 => "Bits4",
2261 }
2262 }
2263 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2265 match value {
2266 "Bits1" => Some(Self::Bits1),
2267 "Bits1_5" => Some(Self::Bits15),
2268 "Bits2" => Some(Self::Bits2),
2269 "Bits4" => Some(Self::Bits4),
2270 _ => None,
2271 }
2272 }
2273}
2274#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2275#[repr(i32)]
2276pub enum ShardingMethod {
2277 Auto = 0,
2279 Custom = 1,
2281}
2282impl ShardingMethod {
2283 pub fn as_str_name(&self) -> &'static str {
2288 match self {
2289 Self::Auto => "Auto",
2290 Self::Custom => "Custom",
2291 }
2292 }
2293 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2295 match value {
2296 "Auto" => Some(Self::Auto),
2297 "Custom" => Some(Self::Custom),
2298 _ => None,
2299 }
2300 }
2301}
2302#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2303#[repr(i32)]
2304pub enum TokenizerType {
2305 Unknown = 0,
2306 Prefix = 1,
2307 Whitespace = 2,
2308 Word = 3,
2309 Multilingual = 4,
2310}
2311impl TokenizerType {
2312 pub fn as_str_name(&self) -> &'static str {
2317 match self {
2318 Self::Unknown => "Unknown",
2319 Self::Prefix => "Prefix",
2320 Self::Whitespace => "Whitespace",
2321 Self::Word => "Word",
2322 Self::Multilingual => "Multilingual",
2323 }
2324 }
2325 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2327 match value {
2328 "Unknown" => Some(Self::Unknown),
2329 "Prefix" => Some(Self::Prefix),
2330 "Whitespace" => Some(Self::Whitespace),
2331 "Word" => Some(Self::Word),
2332 "Multilingual" => Some(Self::Multilingual),
2333 _ => None,
2334 }
2335 }
2336}
2337#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2338#[repr(i32)]
2339pub enum ReplicaState {
2340 Active = 0,
2342 Dead = 1,
2344 Partial = 2,
2346 Initializing = 3,
2348 Listener = 4,
2351 PartialSnapshot = 5,
2354 Recovery = 6,
2357 Resharding = 7,
2359 ReshardingScaleDown = 8,
2361 ActiveRead = 9,
2363 ManualRecovery = 10,
2370}
2371impl ReplicaState {
2372 pub fn as_str_name(&self) -> &'static str {
2377 match self {
2378 Self::Active => "Active",
2379 Self::Dead => "Dead",
2380 Self::Partial => "Partial",
2381 Self::Initializing => "Initializing",
2382 Self::Listener => "Listener",
2383 Self::PartialSnapshot => "PartialSnapshot",
2384 Self::Recovery => "Recovery",
2385 Self::Resharding => "Resharding",
2386 Self::ReshardingScaleDown => "ReshardingScaleDown",
2387 Self::ActiveRead => "ActiveRead",
2388 Self::ManualRecovery => "ManualRecovery",
2389 }
2390 }
2391 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2393 match value {
2394 "Active" => Some(Self::Active),
2395 "Dead" => Some(Self::Dead),
2396 "Partial" => Some(Self::Partial),
2397 "Initializing" => Some(Self::Initializing),
2398 "Listener" => Some(Self::Listener),
2399 "PartialSnapshot" => Some(Self::PartialSnapshot),
2400 "Recovery" => Some(Self::Recovery),
2401 "Resharding" => Some(Self::Resharding),
2402 "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
2403 "ActiveRead" => Some(Self::ActiveRead),
2404 "ManualRecovery" => Some(Self::ManualRecovery),
2405 _ => None,
2406 }
2407 }
2408}
2409#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2411#[repr(i32)]
2412pub enum ReshardingDirection {
2413 Up = 0,
2415 Down = 1,
2417}
2418impl ReshardingDirection {
2419 pub fn as_str_name(&self) -> &'static str {
2424 match self {
2425 Self::Up => "Up",
2426 Self::Down => "Down",
2427 }
2428 }
2429 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2431 match value {
2432 "Up" => Some(Self::Up),
2433 "Down" => Some(Self::Down),
2434 _ => None,
2435 }
2436 }
2437}
2438#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2439#[repr(i32)]
2440pub enum ShardTransferMethod {
2441 StreamRecords = 0,
2443 Snapshot = 1,
2445 WalDelta = 2,
2447 ReshardingStreamRecords = 3,
2449}
2450impl ShardTransferMethod {
2451 pub fn as_str_name(&self) -> &'static str {
2456 match self {
2457 Self::StreamRecords => "StreamRecords",
2458 Self::Snapshot => "Snapshot",
2459 Self::WalDelta => "WalDelta",
2460 Self::ReshardingStreamRecords => "ReshardingStreamRecords",
2461 }
2462 }
2463 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2465 match value {
2466 "StreamRecords" => Some(Self::StreamRecords),
2467 "Snapshot" => Some(Self::Snapshot),
2468 "WalDelta" => Some(Self::WalDelta),
2469 "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
2470 _ => None,
2471 }
2472 }
2473}
2474pub mod collections_client {
2476 #![allow(
2477 unused_variables,
2478 dead_code,
2479 missing_docs,
2480 clippy::wildcard_imports,
2481 clippy::let_unit_value,
2482 )]
2483 use tonic::codegen::*;
2484 use tonic::codegen::http::Uri;
2485 #[derive(Debug, Clone)]
2486 pub struct CollectionsClient<T> {
2487 inner: tonic::client::Grpc<T>,
2488 }
2489 impl CollectionsClient<tonic::transport::Channel> {
2490 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2492 where
2493 D: TryInto<tonic::transport::Endpoint>,
2494 D::Error: Into<StdError>,
2495 {
2496 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2497 Ok(Self::new(conn))
2498 }
2499 }
2500 impl<T> CollectionsClient<T>
2501 where
2502 T: tonic::client::GrpcService<tonic::body::Body>,
2503 T::Error: Into<StdError>,
2504 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2505 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2506 {
2507 pub fn new(inner: T) -> Self {
2508 let inner = tonic::client::Grpc::new(inner);
2509 Self { inner }
2510 }
2511 pub fn with_origin(inner: T, origin: Uri) -> Self {
2512 let inner = tonic::client::Grpc::with_origin(inner, origin);
2513 Self { inner }
2514 }
2515 pub fn with_interceptor<F>(
2516 inner: T,
2517 interceptor: F,
2518 ) -> CollectionsClient<InterceptedService<T, F>>
2519 where
2520 F: tonic::service::Interceptor,
2521 T::ResponseBody: Default,
2522 T: tonic::codegen::Service<
2523 http::Request<tonic::body::Body>,
2524 Response = http::Response<
2525 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2526 >,
2527 >,
2528 <T as tonic::codegen::Service<
2529 http::Request<tonic::body::Body>,
2530 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2531 {
2532 CollectionsClient::new(InterceptedService::new(inner, interceptor))
2533 }
2534 #[must_use]
2539 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2540 self.inner = self.inner.send_compressed(encoding);
2541 self
2542 }
2543 #[must_use]
2545 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2546 self.inner = self.inner.accept_compressed(encoding);
2547 self
2548 }
2549 #[must_use]
2553 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2554 self.inner = self.inner.max_decoding_message_size(limit);
2555 self
2556 }
2557 #[must_use]
2561 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2562 self.inner = self.inner.max_encoding_message_size(limit);
2563 self
2564 }
2565 pub async fn get(
2567 &mut self,
2568 request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
2569 ) -> std::result::Result<
2570 tonic::Response<super::GetCollectionInfoResponse>,
2571 tonic::Status,
2572 > {
2573 self.inner
2574 .ready()
2575 .await
2576 .map_err(|e| {
2577 tonic::Status::unknown(
2578 format!("Service was not ready: {}", e.into()),
2579 )
2580 })?;
2581 let codec = tonic_prost::ProstCodec::default();
2582 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
2583 let mut req = request.into_request();
2584 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
2585 self.inner.unary(req, path, codec).await
2586 }
2587 pub async fn list(
2589 &mut self,
2590 request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
2591 ) -> std::result::Result<
2592 tonic::Response<super::ListCollectionsResponse>,
2593 tonic::Status,
2594 > {
2595 self.inner
2596 .ready()
2597 .await
2598 .map_err(|e| {
2599 tonic::Status::unknown(
2600 format!("Service was not ready: {}", e.into()),
2601 )
2602 })?;
2603 let codec = tonic_prost::ProstCodec::default();
2604 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
2605 let mut req = request.into_request();
2606 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
2607 self.inner.unary(req, path, codec).await
2608 }
2609 pub async fn create(
2611 &mut self,
2612 request: impl tonic::IntoRequest<super::CreateCollection>,
2613 ) -> std::result::Result<
2614 tonic::Response<super::CollectionOperationResponse>,
2615 tonic::Status,
2616 > {
2617 self.inner
2618 .ready()
2619 .await
2620 .map_err(|e| {
2621 tonic::Status::unknown(
2622 format!("Service was not ready: {}", e.into()),
2623 )
2624 })?;
2625 let codec = tonic_prost::ProstCodec::default();
2626 let path = http::uri::PathAndQuery::from_static(
2627 "/qdrant.Collections/Create",
2628 );
2629 let mut req = request.into_request();
2630 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
2631 self.inner.unary(req, path, codec).await
2632 }
2633 pub async fn update(
2635 &mut self,
2636 request: impl tonic::IntoRequest<super::UpdateCollection>,
2637 ) -> std::result::Result<
2638 tonic::Response<super::CollectionOperationResponse>,
2639 tonic::Status,
2640 > {
2641 self.inner
2642 .ready()
2643 .await
2644 .map_err(|e| {
2645 tonic::Status::unknown(
2646 format!("Service was not ready: {}", e.into()),
2647 )
2648 })?;
2649 let codec = tonic_prost::ProstCodec::default();
2650 let path = http::uri::PathAndQuery::from_static(
2651 "/qdrant.Collections/Update",
2652 );
2653 let mut req = request.into_request();
2654 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
2655 self.inner.unary(req, path, codec).await
2656 }
2657 pub async fn delete(
2659 &mut self,
2660 request: impl tonic::IntoRequest<super::DeleteCollection>,
2661 ) -> std::result::Result<
2662 tonic::Response<super::CollectionOperationResponse>,
2663 tonic::Status,
2664 > {
2665 self.inner
2666 .ready()
2667 .await
2668 .map_err(|e| {
2669 tonic::Status::unknown(
2670 format!("Service was not ready: {}", e.into()),
2671 )
2672 })?;
2673 let codec = tonic_prost::ProstCodec::default();
2674 let path = http::uri::PathAndQuery::from_static(
2675 "/qdrant.Collections/Delete",
2676 );
2677 let mut req = request.into_request();
2678 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
2679 self.inner.unary(req, path, codec).await
2680 }
2681 pub async fn update_aliases(
2683 &mut self,
2684 request: impl tonic::IntoRequest<super::ChangeAliases>,
2685 ) -> std::result::Result<
2686 tonic::Response<super::CollectionOperationResponse>,
2687 tonic::Status,
2688 > {
2689 self.inner
2690 .ready()
2691 .await
2692 .map_err(|e| {
2693 tonic::Status::unknown(
2694 format!("Service was not ready: {}", e.into()),
2695 )
2696 })?;
2697 let codec = tonic_prost::ProstCodec::default();
2698 let path = http::uri::PathAndQuery::from_static(
2699 "/qdrant.Collections/UpdateAliases",
2700 );
2701 let mut req = request.into_request();
2702 req.extensions_mut()
2703 .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
2704 self.inner.unary(req, path, codec).await
2705 }
2706 pub async fn list_collection_aliases(
2708 &mut self,
2709 request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
2710 ) -> std::result::Result<
2711 tonic::Response<super::ListAliasesResponse>,
2712 tonic::Status,
2713 > {
2714 self.inner
2715 .ready()
2716 .await
2717 .map_err(|e| {
2718 tonic::Status::unknown(
2719 format!("Service was not ready: {}", e.into()),
2720 )
2721 })?;
2722 let codec = tonic_prost::ProstCodec::default();
2723 let path = http::uri::PathAndQuery::from_static(
2724 "/qdrant.Collections/ListCollectionAliases",
2725 );
2726 let mut req = request.into_request();
2727 req.extensions_mut()
2728 .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
2729 self.inner.unary(req, path, codec).await
2730 }
2731 pub async fn list_aliases(
2733 &mut self,
2734 request: impl tonic::IntoRequest<super::ListAliasesRequest>,
2735 ) -> std::result::Result<
2736 tonic::Response<super::ListAliasesResponse>,
2737 tonic::Status,
2738 > {
2739 self.inner
2740 .ready()
2741 .await
2742 .map_err(|e| {
2743 tonic::Status::unknown(
2744 format!("Service was not ready: {}", e.into()),
2745 )
2746 })?;
2747 let codec = tonic_prost::ProstCodec::default();
2748 let path = http::uri::PathAndQuery::from_static(
2749 "/qdrant.Collections/ListAliases",
2750 );
2751 let mut req = request.into_request();
2752 req.extensions_mut()
2753 .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
2754 self.inner.unary(req, path, codec).await
2755 }
2756 pub async fn collection_cluster_info(
2758 &mut self,
2759 request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
2760 ) -> std::result::Result<
2761 tonic::Response<super::CollectionClusterInfoResponse>,
2762 tonic::Status,
2763 > {
2764 self.inner
2765 .ready()
2766 .await
2767 .map_err(|e| {
2768 tonic::Status::unknown(
2769 format!("Service was not ready: {}", e.into()),
2770 )
2771 })?;
2772 let codec = tonic_prost::ProstCodec::default();
2773 let path = http::uri::PathAndQuery::from_static(
2774 "/qdrant.Collections/CollectionClusterInfo",
2775 );
2776 let mut req = request.into_request();
2777 req.extensions_mut()
2778 .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2779 self.inner.unary(req, path, codec).await
2780 }
2781 pub async fn collection_exists(
2783 &mut self,
2784 request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2785 ) -> std::result::Result<
2786 tonic::Response<super::CollectionExistsResponse>,
2787 tonic::Status,
2788 > {
2789 self.inner
2790 .ready()
2791 .await
2792 .map_err(|e| {
2793 tonic::Status::unknown(
2794 format!("Service was not ready: {}", e.into()),
2795 )
2796 })?;
2797 let codec = tonic_prost::ProstCodec::default();
2798 let path = http::uri::PathAndQuery::from_static(
2799 "/qdrant.Collections/CollectionExists",
2800 );
2801 let mut req = request.into_request();
2802 req.extensions_mut()
2803 .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2804 self.inner.unary(req, path, codec).await
2805 }
2806 pub async fn update_collection_cluster_setup(
2808 &mut self,
2809 request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2810 ) -> std::result::Result<
2811 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2812 tonic::Status,
2813 > {
2814 self.inner
2815 .ready()
2816 .await
2817 .map_err(|e| {
2818 tonic::Status::unknown(
2819 format!("Service was not ready: {}", e.into()),
2820 )
2821 })?;
2822 let codec = tonic_prost::ProstCodec::default();
2823 let path = http::uri::PathAndQuery::from_static(
2824 "/qdrant.Collections/UpdateCollectionClusterSetup",
2825 );
2826 let mut req = request.into_request();
2827 req.extensions_mut()
2828 .insert(
2829 GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2830 );
2831 self.inner.unary(req, path, codec).await
2832 }
2833 pub async fn create_shard_key(
2835 &mut self,
2836 request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2837 ) -> std::result::Result<
2838 tonic::Response<super::CreateShardKeyResponse>,
2839 tonic::Status,
2840 > {
2841 self.inner
2842 .ready()
2843 .await
2844 .map_err(|e| {
2845 tonic::Status::unknown(
2846 format!("Service was not ready: {}", e.into()),
2847 )
2848 })?;
2849 let codec = tonic_prost::ProstCodec::default();
2850 let path = http::uri::PathAndQuery::from_static(
2851 "/qdrant.Collections/CreateShardKey",
2852 );
2853 let mut req = request.into_request();
2854 req.extensions_mut()
2855 .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2856 self.inner.unary(req, path, codec).await
2857 }
2858 pub async fn delete_shard_key(
2860 &mut self,
2861 request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2862 ) -> std::result::Result<
2863 tonic::Response<super::DeleteShardKeyResponse>,
2864 tonic::Status,
2865 > {
2866 self.inner
2867 .ready()
2868 .await
2869 .map_err(|e| {
2870 tonic::Status::unknown(
2871 format!("Service was not ready: {}", e.into()),
2872 )
2873 })?;
2874 let codec = tonic_prost::ProstCodec::default();
2875 let path = http::uri::PathAndQuery::from_static(
2876 "/qdrant.Collections/DeleteShardKey",
2877 );
2878 let mut req = request.into_request();
2879 req.extensions_mut()
2880 .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2881 self.inner.unary(req, path, codec).await
2882 }
2883 pub async fn list_shard_keys(
2885 &mut self,
2886 request: impl tonic::IntoRequest<super::ListShardKeysRequest>,
2887 ) -> std::result::Result<
2888 tonic::Response<super::ListShardKeysResponse>,
2889 tonic::Status,
2890 > {
2891 self.inner
2892 .ready()
2893 .await
2894 .map_err(|e| {
2895 tonic::Status::unknown(
2896 format!("Service was not ready: {}", e.into()),
2897 )
2898 })?;
2899 let codec = tonic_prost::ProstCodec::default();
2900 let path = http::uri::PathAndQuery::from_static(
2901 "/qdrant.Collections/ListShardKeys",
2902 );
2903 let mut req = request.into_request();
2904 req.extensions_mut()
2905 .insert(GrpcMethod::new("qdrant.Collections", "ListShardKeys"));
2906 self.inner.unary(req, path, codec).await
2907 }
2908 }
2909}
2910pub mod collections_server {
2912 #![allow(
2913 unused_variables,
2914 dead_code,
2915 missing_docs,
2916 clippy::wildcard_imports,
2917 clippy::let_unit_value,
2918 )]
2919 use tonic::codegen::*;
2920 #[async_trait]
2922 pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
2923 async fn get(
2925 &self,
2926 request: tonic::Request<super::GetCollectionInfoRequest>,
2927 ) -> std::result::Result<
2928 tonic::Response<super::GetCollectionInfoResponse>,
2929 tonic::Status,
2930 >;
2931 async fn list(
2933 &self,
2934 request: tonic::Request<super::ListCollectionsRequest>,
2935 ) -> std::result::Result<
2936 tonic::Response<super::ListCollectionsResponse>,
2937 tonic::Status,
2938 >;
2939 async fn create(
2941 &self,
2942 request: tonic::Request<super::CreateCollection>,
2943 ) -> std::result::Result<
2944 tonic::Response<super::CollectionOperationResponse>,
2945 tonic::Status,
2946 >;
2947 async fn update(
2949 &self,
2950 request: tonic::Request<super::UpdateCollection>,
2951 ) -> std::result::Result<
2952 tonic::Response<super::CollectionOperationResponse>,
2953 tonic::Status,
2954 >;
2955 async fn delete(
2957 &self,
2958 request: tonic::Request<super::DeleteCollection>,
2959 ) -> std::result::Result<
2960 tonic::Response<super::CollectionOperationResponse>,
2961 tonic::Status,
2962 >;
2963 async fn update_aliases(
2965 &self,
2966 request: tonic::Request<super::ChangeAliases>,
2967 ) -> std::result::Result<
2968 tonic::Response<super::CollectionOperationResponse>,
2969 tonic::Status,
2970 >;
2971 async fn list_collection_aliases(
2973 &self,
2974 request: tonic::Request<super::ListCollectionAliasesRequest>,
2975 ) -> std::result::Result<
2976 tonic::Response<super::ListAliasesResponse>,
2977 tonic::Status,
2978 >;
2979 async fn list_aliases(
2981 &self,
2982 request: tonic::Request<super::ListAliasesRequest>,
2983 ) -> std::result::Result<
2984 tonic::Response<super::ListAliasesResponse>,
2985 tonic::Status,
2986 >;
2987 async fn collection_cluster_info(
2989 &self,
2990 request: tonic::Request<super::CollectionClusterInfoRequest>,
2991 ) -> std::result::Result<
2992 tonic::Response<super::CollectionClusterInfoResponse>,
2993 tonic::Status,
2994 >;
2995 async fn collection_exists(
2997 &self,
2998 request: tonic::Request<super::CollectionExistsRequest>,
2999 ) -> std::result::Result<
3000 tonic::Response<super::CollectionExistsResponse>,
3001 tonic::Status,
3002 >;
3003 async fn update_collection_cluster_setup(
3005 &self,
3006 request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
3007 ) -> std::result::Result<
3008 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
3009 tonic::Status,
3010 >;
3011 async fn create_shard_key(
3013 &self,
3014 request: tonic::Request<super::CreateShardKeyRequest>,
3015 ) -> std::result::Result<
3016 tonic::Response<super::CreateShardKeyResponse>,
3017 tonic::Status,
3018 >;
3019 async fn delete_shard_key(
3021 &self,
3022 request: tonic::Request<super::DeleteShardKeyRequest>,
3023 ) -> std::result::Result<
3024 tonic::Response<super::DeleteShardKeyResponse>,
3025 tonic::Status,
3026 >;
3027 async fn list_shard_keys(
3029 &self,
3030 request: tonic::Request<super::ListShardKeysRequest>,
3031 ) -> std::result::Result<
3032 tonic::Response<super::ListShardKeysResponse>,
3033 tonic::Status,
3034 >;
3035 }
3036 #[derive(Debug)]
3037 pub struct CollectionsServer<T> {
3038 inner: Arc<T>,
3039 accept_compression_encodings: EnabledCompressionEncodings,
3040 send_compression_encodings: EnabledCompressionEncodings,
3041 max_decoding_message_size: Option<usize>,
3042 max_encoding_message_size: Option<usize>,
3043 }
3044 impl<T> CollectionsServer<T> {
3045 pub fn new(inner: T) -> Self {
3046 Self::from_arc(Arc::new(inner))
3047 }
3048 pub fn from_arc(inner: Arc<T>) -> Self {
3049 Self {
3050 inner,
3051 accept_compression_encodings: Default::default(),
3052 send_compression_encodings: Default::default(),
3053 max_decoding_message_size: None,
3054 max_encoding_message_size: None,
3055 }
3056 }
3057 pub fn with_interceptor<F>(
3058 inner: T,
3059 interceptor: F,
3060 ) -> InterceptedService<Self, F>
3061 where
3062 F: tonic::service::Interceptor,
3063 {
3064 InterceptedService::new(Self::new(inner), interceptor)
3065 }
3066 #[must_use]
3068 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3069 self.accept_compression_encodings.enable(encoding);
3070 self
3071 }
3072 #[must_use]
3074 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3075 self.send_compression_encodings.enable(encoding);
3076 self
3077 }
3078 #[must_use]
3082 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3083 self.max_decoding_message_size = Some(limit);
3084 self
3085 }
3086 #[must_use]
3090 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3091 self.max_encoding_message_size = Some(limit);
3092 self
3093 }
3094 }
3095 impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
3096 where
3097 T: Collections,
3098 B: Body + std::marker::Send + 'static,
3099 B::Error: Into<StdError> + std::marker::Send + 'static,
3100 {
3101 type Response = http::Response<tonic::body::Body>;
3102 type Error = std::convert::Infallible;
3103 type Future = BoxFuture<Self::Response, Self::Error>;
3104 fn poll_ready(
3105 &mut self,
3106 _cx: &mut Context<'_>,
3107 ) -> Poll<std::result::Result<(), Self::Error>> {
3108 Poll::Ready(Ok(()))
3109 }
3110 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3111 match req.uri().path() {
3112 "/qdrant.Collections/Get" => {
3113 #[allow(non_camel_case_types)]
3114 struct GetSvc<T: Collections>(pub Arc<T>);
3115 impl<
3116 T: Collections,
3117 > tonic::server::UnaryService<super::GetCollectionInfoRequest>
3118 for GetSvc<T> {
3119 type Response = super::GetCollectionInfoResponse;
3120 type Future = BoxFuture<
3121 tonic::Response<Self::Response>,
3122 tonic::Status,
3123 >;
3124 fn call(
3125 &mut self,
3126 request: tonic::Request<super::GetCollectionInfoRequest>,
3127 ) -> Self::Future {
3128 let inner = Arc::clone(&self.0);
3129 let fut = async move {
3130 <T as Collections>::get(&inner, request).await
3131 };
3132 Box::pin(fut)
3133 }
3134 }
3135 let accept_compression_encodings = self.accept_compression_encodings;
3136 let send_compression_encodings = self.send_compression_encodings;
3137 let max_decoding_message_size = self.max_decoding_message_size;
3138 let max_encoding_message_size = self.max_encoding_message_size;
3139 let inner = self.inner.clone();
3140 let fut = async move {
3141 let method = GetSvc(inner);
3142 let codec = tonic_prost::ProstCodec::default();
3143 let mut grpc = tonic::server::Grpc::new(codec)
3144 .apply_compression_config(
3145 accept_compression_encodings,
3146 send_compression_encodings,
3147 )
3148 .apply_max_message_size_config(
3149 max_decoding_message_size,
3150 max_encoding_message_size,
3151 );
3152 let res = grpc.unary(method, req).await;
3153 Ok(res)
3154 };
3155 Box::pin(fut)
3156 }
3157 "/qdrant.Collections/List" => {
3158 #[allow(non_camel_case_types)]
3159 struct ListSvc<T: Collections>(pub Arc<T>);
3160 impl<
3161 T: Collections,
3162 > tonic::server::UnaryService<super::ListCollectionsRequest>
3163 for ListSvc<T> {
3164 type Response = super::ListCollectionsResponse;
3165 type Future = BoxFuture<
3166 tonic::Response<Self::Response>,
3167 tonic::Status,
3168 >;
3169 fn call(
3170 &mut self,
3171 request: tonic::Request<super::ListCollectionsRequest>,
3172 ) -> Self::Future {
3173 let inner = Arc::clone(&self.0);
3174 let fut = async move {
3175 <T as Collections>::list(&inner, request).await
3176 };
3177 Box::pin(fut)
3178 }
3179 }
3180 let accept_compression_encodings = self.accept_compression_encodings;
3181 let send_compression_encodings = self.send_compression_encodings;
3182 let max_decoding_message_size = self.max_decoding_message_size;
3183 let max_encoding_message_size = self.max_encoding_message_size;
3184 let inner = self.inner.clone();
3185 let fut = async move {
3186 let method = ListSvc(inner);
3187 let codec = tonic_prost::ProstCodec::default();
3188 let mut grpc = tonic::server::Grpc::new(codec)
3189 .apply_compression_config(
3190 accept_compression_encodings,
3191 send_compression_encodings,
3192 )
3193 .apply_max_message_size_config(
3194 max_decoding_message_size,
3195 max_encoding_message_size,
3196 );
3197 let res = grpc.unary(method, req).await;
3198 Ok(res)
3199 };
3200 Box::pin(fut)
3201 }
3202 "/qdrant.Collections/Create" => {
3203 #[allow(non_camel_case_types)]
3204 struct CreateSvc<T: Collections>(pub Arc<T>);
3205 impl<
3206 T: Collections,
3207 > tonic::server::UnaryService<super::CreateCollection>
3208 for CreateSvc<T> {
3209 type Response = super::CollectionOperationResponse;
3210 type Future = BoxFuture<
3211 tonic::Response<Self::Response>,
3212 tonic::Status,
3213 >;
3214 fn call(
3215 &mut self,
3216 request: tonic::Request<super::CreateCollection>,
3217 ) -> Self::Future {
3218 let inner = Arc::clone(&self.0);
3219 let fut = async move {
3220 <T as Collections>::create(&inner, request).await
3221 };
3222 Box::pin(fut)
3223 }
3224 }
3225 let accept_compression_encodings = self.accept_compression_encodings;
3226 let send_compression_encodings = self.send_compression_encodings;
3227 let max_decoding_message_size = self.max_decoding_message_size;
3228 let max_encoding_message_size = self.max_encoding_message_size;
3229 let inner = self.inner.clone();
3230 let fut = async move {
3231 let method = CreateSvc(inner);
3232 let codec = tonic_prost::ProstCodec::default();
3233 let mut grpc = tonic::server::Grpc::new(codec)
3234 .apply_compression_config(
3235 accept_compression_encodings,
3236 send_compression_encodings,
3237 )
3238 .apply_max_message_size_config(
3239 max_decoding_message_size,
3240 max_encoding_message_size,
3241 );
3242 let res = grpc.unary(method, req).await;
3243 Ok(res)
3244 };
3245 Box::pin(fut)
3246 }
3247 "/qdrant.Collections/Update" => {
3248 #[allow(non_camel_case_types)]
3249 struct UpdateSvc<T: Collections>(pub Arc<T>);
3250 impl<
3251 T: Collections,
3252 > tonic::server::UnaryService<super::UpdateCollection>
3253 for UpdateSvc<T> {
3254 type Response = super::CollectionOperationResponse;
3255 type Future = BoxFuture<
3256 tonic::Response<Self::Response>,
3257 tonic::Status,
3258 >;
3259 fn call(
3260 &mut self,
3261 request: tonic::Request<super::UpdateCollection>,
3262 ) -> Self::Future {
3263 let inner = Arc::clone(&self.0);
3264 let fut = async move {
3265 <T as Collections>::update(&inner, request).await
3266 };
3267 Box::pin(fut)
3268 }
3269 }
3270 let accept_compression_encodings = self.accept_compression_encodings;
3271 let send_compression_encodings = self.send_compression_encodings;
3272 let max_decoding_message_size = self.max_decoding_message_size;
3273 let max_encoding_message_size = self.max_encoding_message_size;
3274 let inner = self.inner.clone();
3275 let fut = async move {
3276 let method = UpdateSvc(inner);
3277 let codec = tonic_prost::ProstCodec::default();
3278 let mut grpc = tonic::server::Grpc::new(codec)
3279 .apply_compression_config(
3280 accept_compression_encodings,
3281 send_compression_encodings,
3282 )
3283 .apply_max_message_size_config(
3284 max_decoding_message_size,
3285 max_encoding_message_size,
3286 );
3287 let res = grpc.unary(method, req).await;
3288 Ok(res)
3289 };
3290 Box::pin(fut)
3291 }
3292 "/qdrant.Collections/Delete" => {
3293 #[allow(non_camel_case_types)]
3294 struct DeleteSvc<T: Collections>(pub Arc<T>);
3295 impl<
3296 T: Collections,
3297 > tonic::server::UnaryService<super::DeleteCollection>
3298 for DeleteSvc<T> {
3299 type Response = super::CollectionOperationResponse;
3300 type Future = BoxFuture<
3301 tonic::Response<Self::Response>,
3302 tonic::Status,
3303 >;
3304 fn call(
3305 &mut self,
3306 request: tonic::Request<super::DeleteCollection>,
3307 ) -> Self::Future {
3308 let inner = Arc::clone(&self.0);
3309 let fut = async move {
3310 <T as Collections>::delete(&inner, request).await
3311 };
3312 Box::pin(fut)
3313 }
3314 }
3315 let accept_compression_encodings = self.accept_compression_encodings;
3316 let send_compression_encodings = self.send_compression_encodings;
3317 let max_decoding_message_size = self.max_decoding_message_size;
3318 let max_encoding_message_size = self.max_encoding_message_size;
3319 let inner = self.inner.clone();
3320 let fut = async move {
3321 let method = DeleteSvc(inner);
3322 let codec = tonic_prost::ProstCodec::default();
3323 let mut grpc = tonic::server::Grpc::new(codec)
3324 .apply_compression_config(
3325 accept_compression_encodings,
3326 send_compression_encodings,
3327 )
3328 .apply_max_message_size_config(
3329 max_decoding_message_size,
3330 max_encoding_message_size,
3331 );
3332 let res = grpc.unary(method, req).await;
3333 Ok(res)
3334 };
3335 Box::pin(fut)
3336 }
3337 "/qdrant.Collections/UpdateAliases" => {
3338 #[allow(non_camel_case_types)]
3339 struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
3340 impl<
3341 T: Collections,
3342 > tonic::server::UnaryService<super::ChangeAliases>
3343 for UpdateAliasesSvc<T> {
3344 type Response = super::CollectionOperationResponse;
3345 type Future = BoxFuture<
3346 tonic::Response<Self::Response>,
3347 tonic::Status,
3348 >;
3349 fn call(
3350 &mut self,
3351 request: tonic::Request<super::ChangeAliases>,
3352 ) -> Self::Future {
3353 let inner = Arc::clone(&self.0);
3354 let fut = async move {
3355 <T as Collections>::update_aliases(&inner, request).await
3356 };
3357 Box::pin(fut)
3358 }
3359 }
3360 let accept_compression_encodings = self.accept_compression_encodings;
3361 let send_compression_encodings = self.send_compression_encodings;
3362 let max_decoding_message_size = self.max_decoding_message_size;
3363 let max_encoding_message_size = self.max_encoding_message_size;
3364 let inner = self.inner.clone();
3365 let fut = async move {
3366 let method = UpdateAliasesSvc(inner);
3367 let codec = tonic_prost::ProstCodec::default();
3368 let mut grpc = tonic::server::Grpc::new(codec)
3369 .apply_compression_config(
3370 accept_compression_encodings,
3371 send_compression_encodings,
3372 )
3373 .apply_max_message_size_config(
3374 max_decoding_message_size,
3375 max_encoding_message_size,
3376 );
3377 let res = grpc.unary(method, req).await;
3378 Ok(res)
3379 };
3380 Box::pin(fut)
3381 }
3382 "/qdrant.Collections/ListCollectionAliases" => {
3383 #[allow(non_camel_case_types)]
3384 struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
3385 impl<
3386 T: Collections,
3387 > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
3388 for ListCollectionAliasesSvc<T> {
3389 type Response = super::ListAliasesResponse;
3390 type Future = BoxFuture<
3391 tonic::Response<Self::Response>,
3392 tonic::Status,
3393 >;
3394 fn call(
3395 &mut self,
3396 request: tonic::Request<super::ListCollectionAliasesRequest>,
3397 ) -> Self::Future {
3398 let inner = Arc::clone(&self.0);
3399 let fut = async move {
3400 <T as Collections>::list_collection_aliases(&inner, request)
3401 .await
3402 };
3403 Box::pin(fut)
3404 }
3405 }
3406 let accept_compression_encodings = self.accept_compression_encodings;
3407 let send_compression_encodings = self.send_compression_encodings;
3408 let max_decoding_message_size = self.max_decoding_message_size;
3409 let max_encoding_message_size = self.max_encoding_message_size;
3410 let inner = self.inner.clone();
3411 let fut = async move {
3412 let method = ListCollectionAliasesSvc(inner);
3413 let codec = tonic_prost::ProstCodec::default();
3414 let mut grpc = tonic::server::Grpc::new(codec)
3415 .apply_compression_config(
3416 accept_compression_encodings,
3417 send_compression_encodings,
3418 )
3419 .apply_max_message_size_config(
3420 max_decoding_message_size,
3421 max_encoding_message_size,
3422 );
3423 let res = grpc.unary(method, req).await;
3424 Ok(res)
3425 };
3426 Box::pin(fut)
3427 }
3428 "/qdrant.Collections/ListAliases" => {
3429 #[allow(non_camel_case_types)]
3430 struct ListAliasesSvc<T: Collections>(pub Arc<T>);
3431 impl<
3432 T: Collections,
3433 > tonic::server::UnaryService<super::ListAliasesRequest>
3434 for ListAliasesSvc<T> {
3435 type Response = super::ListAliasesResponse;
3436 type Future = BoxFuture<
3437 tonic::Response<Self::Response>,
3438 tonic::Status,
3439 >;
3440 fn call(
3441 &mut self,
3442 request: tonic::Request<super::ListAliasesRequest>,
3443 ) -> Self::Future {
3444 let inner = Arc::clone(&self.0);
3445 let fut = async move {
3446 <T as Collections>::list_aliases(&inner, request).await
3447 };
3448 Box::pin(fut)
3449 }
3450 }
3451 let accept_compression_encodings = self.accept_compression_encodings;
3452 let send_compression_encodings = self.send_compression_encodings;
3453 let max_decoding_message_size = self.max_decoding_message_size;
3454 let max_encoding_message_size = self.max_encoding_message_size;
3455 let inner = self.inner.clone();
3456 let fut = async move {
3457 let method = ListAliasesSvc(inner);
3458 let codec = tonic_prost::ProstCodec::default();
3459 let mut grpc = tonic::server::Grpc::new(codec)
3460 .apply_compression_config(
3461 accept_compression_encodings,
3462 send_compression_encodings,
3463 )
3464 .apply_max_message_size_config(
3465 max_decoding_message_size,
3466 max_encoding_message_size,
3467 );
3468 let res = grpc.unary(method, req).await;
3469 Ok(res)
3470 };
3471 Box::pin(fut)
3472 }
3473 "/qdrant.Collections/CollectionClusterInfo" => {
3474 #[allow(non_camel_case_types)]
3475 struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
3476 impl<
3477 T: Collections,
3478 > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
3479 for CollectionClusterInfoSvc<T> {
3480 type Response = super::CollectionClusterInfoResponse;
3481 type Future = BoxFuture<
3482 tonic::Response<Self::Response>,
3483 tonic::Status,
3484 >;
3485 fn call(
3486 &mut self,
3487 request: tonic::Request<super::CollectionClusterInfoRequest>,
3488 ) -> Self::Future {
3489 let inner = Arc::clone(&self.0);
3490 let fut = async move {
3491 <T as Collections>::collection_cluster_info(&inner, request)
3492 .await
3493 };
3494 Box::pin(fut)
3495 }
3496 }
3497 let accept_compression_encodings = self.accept_compression_encodings;
3498 let send_compression_encodings = self.send_compression_encodings;
3499 let max_decoding_message_size = self.max_decoding_message_size;
3500 let max_encoding_message_size = self.max_encoding_message_size;
3501 let inner = self.inner.clone();
3502 let fut = async move {
3503 let method = CollectionClusterInfoSvc(inner);
3504 let codec = tonic_prost::ProstCodec::default();
3505 let mut grpc = tonic::server::Grpc::new(codec)
3506 .apply_compression_config(
3507 accept_compression_encodings,
3508 send_compression_encodings,
3509 )
3510 .apply_max_message_size_config(
3511 max_decoding_message_size,
3512 max_encoding_message_size,
3513 );
3514 let res = grpc.unary(method, req).await;
3515 Ok(res)
3516 };
3517 Box::pin(fut)
3518 }
3519 "/qdrant.Collections/CollectionExists" => {
3520 #[allow(non_camel_case_types)]
3521 struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
3522 impl<
3523 T: Collections,
3524 > tonic::server::UnaryService<super::CollectionExistsRequest>
3525 for CollectionExistsSvc<T> {
3526 type Response = super::CollectionExistsResponse;
3527 type Future = BoxFuture<
3528 tonic::Response<Self::Response>,
3529 tonic::Status,
3530 >;
3531 fn call(
3532 &mut self,
3533 request: tonic::Request<super::CollectionExistsRequest>,
3534 ) -> Self::Future {
3535 let inner = Arc::clone(&self.0);
3536 let fut = async move {
3537 <T as Collections>::collection_exists(&inner, request).await
3538 };
3539 Box::pin(fut)
3540 }
3541 }
3542 let accept_compression_encodings = self.accept_compression_encodings;
3543 let send_compression_encodings = self.send_compression_encodings;
3544 let max_decoding_message_size = self.max_decoding_message_size;
3545 let max_encoding_message_size = self.max_encoding_message_size;
3546 let inner = self.inner.clone();
3547 let fut = async move {
3548 let method = CollectionExistsSvc(inner);
3549 let codec = tonic_prost::ProstCodec::default();
3550 let mut grpc = tonic::server::Grpc::new(codec)
3551 .apply_compression_config(
3552 accept_compression_encodings,
3553 send_compression_encodings,
3554 )
3555 .apply_max_message_size_config(
3556 max_decoding_message_size,
3557 max_encoding_message_size,
3558 );
3559 let res = grpc.unary(method, req).await;
3560 Ok(res)
3561 };
3562 Box::pin(fut)
3563 }
3564 "/qdrant.Collections/UpdateCollectionClusterSetup" => {
3565 #[allow(non_camel_case_types)]
3566 struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
3567 impl<
3568 T: Collections,
3569 > tonic::server::UnaryService<
3570 super::UpdateCollectionClusterSetupRequest,
3571 > for UpdateCollectionClusterSetupSvc<T> {
3572 type Response = super::UpdateCollectionClusterSetupResponse;
3573 type Future = BoxFuture<
3574 tonic::Response<Self::Response>,
3575 tonic::Status,
3576 >;
3577 fn call(
3578 &mut self,
3579 request: tonic::Request<
3580 super::UpdateCollectionClusterSetupRequest,
3581 >,
3582 ) -> Self::Future {
3583 let inner = Arc::clone(&self.0);
3584 let fut = async move {
3585 <T as Collections>::update_collection_cluster_setup(
3586 &inner,
3587 request,
3588 )
3589 .await
3590 };
3591 Box::pin(fut)
3592 }
3593 }
3594 let accept_compression_encodings = self.accept_compression_encodings;
3595 let send_compression_encodings = self.send_compression_encodings;
3596 let max_decoding_message_size = self.max_decoding_message_size;
3597 let max_encoding_message_size = self.max_encoding_message_size;
3598 let inner = self.inner.clone();
3599 let fut = async move {
3600 let method = UpdateCollectionClusterSetupSvc(inner);
3601 let codec = tonic_prost::ProstCodec::default();
3602 let mut grpc = tonic::server::Grpc::new(codec)
3603 .apply_compression_config(
3604 accept_compression_encodings,
3605 send_compression_encodings,
3606 )
3607 .apply_max_message_size_config(
3608 max_decoding_message_size,
3609 max_encoding_message_size,
3610 );
3611 let res = grpc.unary(method, req).await;
3612 Ok(res)
3613 };
3614 Box::pin(fut)
3615 }
3616 "/qdrant.Collections/CreateShardKey" => {
3617 #[allow(non_camel_case_types)]
3618 struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
3619 impl<
3620 T: Collections,
3621 > tonic::server::UnaryService<super::CreateShardKeyRequest>
3622 for CreateShardKeySvc<T> {
3623 type Response = super::CreateShardKeyResponse;
3624 type Future = BoxFuture<
3625 tonic::Response<Self::Response>,
3626 tonic::Status,
3627 >;
3628 fn call(
3629 &mut self,
3630 request: tonic::Request<super::CreateShardKeyRequest>,
3631 ) -> Self::Future {
3632 let inner = Arc::clone(&self.0);
3633 let fut = async move {
3634 <T as Collections>::create_shard_key(&inner, request).await
3635 };
3636 Box::pin(fut)
3637 }
3638 }
3639 let accept_compression_encodings = self.accept_compression_encodings;
3640 let send_compression_encodings = self.send_compression_encodings;
3641 let max_decoding_message_size = self.max_decoding_message_size;
3642 let max_encoding_message_size = self.max_encoding_message_size;
3643 let inner = self.inner.clone();
3644 let fut = async move {
3645 let method = CreateShardKeySvc(inner);
3646 let codec = tonic_prost::ProstCodec::default();
3647 let mut grpc = tonic::server::Grpc::new(codec)
3648 .apply_compression_config(
3649 accept_compression_encodings,
3650 send_compression_encodings,
3651 )
3652 .apply_max_message_size_config(
3653 max_decoding_message_size,
3654 max_encoding_message_size,
3655 );
3656 let res = grpc.unary(method, req).await;
3657 Ok(res)
3658 };
3659 Box::pin(fut)
3660 }
3661 "/qdrant.Collections/DeleteShardKey" => {
3662 #[allow(non_camel_case_types)]
3663 struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
3664 impl<
3665 T: Collections,
3666 > tonic::server::UnaryService<super::DeleteShardKeyRequest>
3667 for DeleteShardKeySvc<T> {
3668 type Response = super::DeleteShardKeyResponse;
3669 type Future = BoxFuture<
3670 tonic::Response<Self::Response>,
3671 tonic::Status,
3672 >;
3673 fn call(
3674 &mut self,
3675 request: tonic::Request<super::DeleteShardKeyRequest>,
3676 ) -> Self::Future {
3677 let inner = Arc::clone(&self.0);
3678 let fut = async move {
3679 <T as Collections>::delete_shard_key(&inner, request).await
3680 };
3681 Box::pin(fut)
3682 }
3683 }
3684 let accept_compression_encodings = self.accept_compression_encodings;
3685 let send_compression_encodings = self.send_compression_encodings;
3686 let max_decoding_message_size = self.max_decoding_message_size;
3687 let max_encoding_message_size = self.max_encoding_message_size;
3688 let inner = self.inner.clone();
3689 let fut = async move {
3690 let method = DeleteShardKeySvc(inner);
3691 let codec = tonic_prost::ProstCodec::default();
3692 let mut grpc = tonic::server::Grpc::new(codec)
3693 .apply_compression_config(
3694 accept_compression_encodings,
3695 send_compression_encodings,
3696 )
3697 .apply_max_message_size_config(
3698 max_decoding_message_size,
3699 max_encoding_message_size,
3700 );
3701 let res = grpc.unary(method, req).await;
3702 Ok(res)
3703 };
3704 Box::pin(fut)
3705 }
3706 "/qdrant.Collections/ListShardKeys" => {
3707 #[allow(non_camel_case_types)]
3708 struct ListShardKeysSvc<T: Collections>(pub Arc<T>);
3709 impl<
3710 T: Collections,
3711 > tonic::server::UnaryService<super::ListShardKeysRequest>
3712 for ListShardKeysSvc<T> {
3713 type Response = super::ListShardKeysResponse;
3714 type Future = BoxFuture<
3715 tonic::Response<Self::Response>,
3716 tonic::Status,
3717 >;
3718 fn call(
3719 &mut self,
3720 request: tonic::Request<super::ListShardKeysRequest>,
3721 ) -> Self::Future {
3722 let inner = Arc::clone(&self.0);
3723 let fut = async move {
3724 <T as Collections>::list_shard_keys(&inner, request).await
3725 };
3726 Box::pin(fut)
3727 }
3728 }
3729 let accept_compression_encodings = self.accept_compression_encodings;
3730 let send_compression_encodings = self.send_compression_encodings;
3731 let max_decoding_message_size = self.max_decoding_message_size;
3732 let max_encoding_message_size = self.max_encoding_message_size;
3733 let inner = self.inner.clone();
3734 let fut = async move {
3735 let method = ListShardKeysSvc(inner);
3736 let codec = tonic_prost::ProstCodec::default();
3737 let mut grpc = tonic::server::Grpc::new(codec)
3738 .apply_compression_config(
3739 accept_compression_encodings,
3740 send_compression_encodings,
3741 )
3742 .apply_max_message_size_config(
3743 max_decoding_message_size,
3744 max_encoding_message_size,
3745 );
3746 let res = grpc.unary(method, req).await;
3747 Ok(res)
3748 };
3749 Box::pin(fut)
3750 }
3751 _ => {
3752 Box::pin(async move {
3753 let mut response = http::Response::new(
3754 tonic::body::Body::default(),
3755 );
3756 let headers = response.headers_mut();
3757 headers
3758 .insert(
3759 tonic::Status::GRPC_STATUS,
3760 (tonic::Code::Unimplemented as i32).into(),
3761 );
3762 headers
3763 .insert(
3764 http::header::CONTENT_TYPE,
3765 tonic::metadata::GRPC_CONTENT_TYPE,
3766 );
3767 Ok(response)
3768 })
3769 }
3770 }
3771 }
3772 }
3773 impl<T> Clone for CollectionsServer<T> {
3774 fn clone(&self) -> Self {
3775 let inner = self.inner.clone();
3776 Self {
3777 inner,
3778 accept_compression_encodings: self.accept_compression_encodings,
3779 send_compression_encodings: self.send_compression_encodings,
3780 max_decoding_message_size: self.max_decoding_message_size,
3781 max_encoding_message_size: self.max_encoding_message_size,
3782 }
3783 }
3784 }
3785 pub const SERVICE_NAME: &str = "qdrant.Collections";
3787 impl<T> tonic::server::NamedService for CollectionsServer<T> {
3788 const NAME: &'static str = SERVICE_NAME;
3789 }
3790}
3791#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3792pub struct WriteOrdering {
3793 #[prost(enumeration = "WriteOrderingType", tag = "1")]
3795 pub r#type: i32,
3796}
3797#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3798pub struct ReadConsistency {
3799 #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3800 pub value: ::core::option::Option<read_consistency::Value>,
3801}
3802pub mod read_consistency {
3804 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
3805 pub enum Value {
3806 #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3808 Type(i32),
3809 #[prost(uint64, tag = "2")]
3812 Factor(u64),
3813 }
3814}
3815#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3816pub struct SparseIndices {
3817 #[prost(uint32, repeated, tag = "1")]
3818 pub data: ::prost::alloc::vec::Vec<u32>,
3819}
3820#[derive(Clone, PartialEq, ::prost::Message)]
3821pub struct Document {
3822 #[prost(string, tag = "1")]
3824 pub text: ::prost::alloc::string::String,
3825 #[prost(string, tag = "3")]
3827 pub model: ::prost::alloc::string::String,
3828 #[prost(map = "string, message", tag = "4")]
3830 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3831}
3832#[derive(Clone, PartialEq, ::prost::Message)]
3833pub struct Image {
3834 #[prost(message, optional, tag = "1")]
3836 pub image: ::core::option::Option<Value>,
3837 #[prost(string, tag = "2")]
3839 pub model: ::prost::alloc::string::String,
3840 #[prost(map = "string, message", tag = "3")]
3842 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3843}
3844#[derive(Clone, PartialEq, ::prost::Message)]
3845pub struct InferenceObject {
3846 #[prost(message, optional, tag = "1")]
3848 pub object: ::core::option::Option<Value>,
3849 #[prost(string, tag = "2")]
3851 pub model: ::prost::alloc::string::String,
3852 #[prost(map = "string, message", tag = "3")]
3854 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3855}
3856#[derive(Clone, PartialEq, ::prost::Message)]
3857pub struct Vector {
3858 #[deprecated]
3860 #[prost(float, repeated, packed = "false", tag = "1")]
3861 pub data: ::prost::alloc::vec::Vec<f32>,
3865 #[deprecated]
3867 #[prost(message, optional, tag = "2")]
3868 pub indices: ::core::option::Option<SparseIndices>,
3872 #[deprecated]
3874 #[prost(uint32, optional, tag = "3")]
3875 pub vectors_count: ::core::option::Option<u32>,
3879 #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3880 pub vector: ::core::option::Option<vector::Vector>,
3881}
3882pub mod vector {
3884 #[derive(Clone, PartialEq, ::prost::Oneof)]
3885 pub enum Vector {
3886 #[prost(message, tag = "101")]
3888 Dense(super::DenseVector),
3889 #[prost(message, tag = "102")]
3891 Sparse(super::SparseVector),
3892 #[prost(message, tag = "103")]
3894 MultiDense(super::MultiDenseVector),
3895 #[prost(message, tag = "104")]
3896 Document(super::Document),
3897 #[prost(message, tag = "105")]
3898 Image(super::Image),
3899 #[prost(message, tag = "106")]
3900 Object(super::InferenceObject),
3901 }
3902}
3903#[derive(Clone, PartialEq, ::prost::Message)]
3904pub struct VectorOutput {
3905 #[deprecated]
3907 #[prost(float, repeated, packed = "false", tag = "1")]
3908 pub data: ::prost::alloc::vec::Vec<f32>,
3912 #[deprecated]
3914 #[prost(message, optional, tag = "2")]
3915 pub indices: ::core::option::Option<SparseIndices>,
3919 #[deprecated]
3921 #[prost(uint32, optional, tag = "3")]
3922 pub vectors_count: ::core::option::Option<u32>,
3926 #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
3927 pub vector: ::core::option::Option<vector_output::Vector>,
3928}
3929pub mod vector_output {
3931 #[derive(Clone, PartialEq, ::prost::Oneof)]
3932 pub enum Vector {
3933 #[prost(message, tag = "101")]
3935 Dense(super::DenseVector),
3936 #[prost(message, tag = "102")]
3938 Sparse(super::SparseVector),
3939 #[prost(message, tag = "103")]
3941 MultiDense(super::MultiDenseVector),
3942 }
3943}
3944#[derive(Clone, PartialEq, ::prost::Message)]
3945pub struct DenseVector {
3946 #[prost(float, repeated, tag = "1")]
3947 pub data: ::prost::alloc::vec::Vec<f32>,
3948}
3949#[derive(Clone, PartialEq, ::prost::Message)]
3950pub struct SparseVector {
3951 #[prost(float, repeated, tag = "1")]
3952 pub values: ::prost::alloc::vec::Vec<f32>,
3953 #[prost(uint32, repeated, tag = "2")]
3954 pub indices: ::prost::alloc::vec::Vec<u32>,
3955}
3956#[derive(Clone, PartialEq, ::prost::Message)]
3957pub struct MultiDenseVector {
3958 #[prost(message, repeated, tag = "1")]
3959 pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
3960}
3961#[derive(Clone, PartialEq, ::prost::Message)]
3964pub struct VectorInput {
3965 #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
3966 pub variant: ::core::option::Option<vector_input::Variant>,
3967}
3968pub mod vector_input {
3970 #[derive(Clone, PartialEq, ::prost::Oneof)]
3971 pub enum Variant {
3972 #[prost(message, tag = "1")]
3973 Id(super::PointId),
3974 #[prost(message, tag = "2")]
3975 Dense(super::DenseVector),
3976 #[prost(message, tag = "3")]
3977 Sparse(super::SparseVector),
3978 #[prost(message, tag = "4")]
3979 MultiDense(super::MultiDenseVector),
3980 #[prost(message, tag = "5")]
3981 Document(super::Document),
3982 #[prost(message, tag = "6")]
3983 Image(super::Image),
3984 #[prost(message, tag = "7")]
3985 Object(super::InferenceObject),
3986 }
3987}
3988#[derive(Clone, PartialEq, ::prost::Message)]
3989pub struct ShardKeySelector {
3990 #[prost(message, repeated, tag = "1")]
3992 pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
3993 #[prost(message, optional, tag = "2")]
3994 pub fallback: ::core::option::Option<ShardKey>,
3995}
3996#[derive(Clone, PartialEq, ::prost::Message)]
3997pub struct UpsertPoints {
3998 #[prost(string, tag = "1")]
4000 pub collection_name: ::prost::alloc::string::String,
4001 #[prost(bool, optional, tag = "2")]
4003 pub wait: ::core::option::Option<bool>,
4004 #[prost(message, repeated, tag = "3")]
4005 pub points: ::prost::alloc::vec::Vec<PointStruct>,
4006 #[prost(message, optional, tag = "4")]
4008 pub ordering: ::core::option::Option<WriteOrdering>,
4009 #[prost(message, optional, tag = "5")]
4011 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4012 #[prost(message, optional, tag = "6")]
4015 pub update_filter: ::core::option::Option<Filter>,
4016 #[prost(uint64, optional, tag = "7")]
4018 pub timeout: ::core::option::Option<u64>,
4019 #[prost(enumeration = "UpdateMode", optional, tag = "8")]
4021 pub update_mode: ::core::option::Option<i32>,
4022}
4023#[derive(Clone, PartialEq, ::prost::Message)]
4024pub struct DeletePoints {
4025 #[prost(string, tag = "1")]
4027 pub collection_name: ::prost::alloc::string::String,
4028 #[prost(bool, optional, tag = "2")]
4030 pub wait: ::core::option::Option<bool>,
4031 #[prost(message, optional, tag = "3")]
4033 pub points: ::core::option::Option<PointsSelector>,
4034 #[prost(message, optional, tag = "4")]
4036 pub ordering: ::core::option::Option<WriteOrdering>,
4037 #[prost(message, optional, tag = "5")]
4039 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4040 #[prost(uint64, optional, tag = "6")]
4042 pub timeout: ::core::option::Option<u64>,
4043}
4044#[derive(Clone, PartialEq, ::prost::Message)]
4045pub struct GetPoints {
4046 #[prost(string, tag = "1")]
4048 pub collection_name: ::prost::alloc::string::String,
4049 #[prost(message, repeated, tag = "2")]
4051 pub ids: ::prost::alloc::vec::Vec<PointId>,
4052 #[prost(message, optional, tag = "4")]
4054 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4055 #[prost(message, optional, tag = "5")]
4057 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4058 #[prost(message, optional, tag = "6")]
4060 pub read_consistency: ::core::option::Option<ReadConsistency>,
4061 #[prost(message, optional, tag = "7")]
4063 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4064 #[prost(uint64, optional, tag = "8")]
4066 pub timeout: ::core::option::Option<u64>,
4067}
4068#[derive(Clone, PartialEq, ::prost::Message)]
4069pub struct UpdatePointVectors {
4070 #[prost(string, tag = "1")]
4072 pub collection_name: ::prost::alloc::string::String,
4073 #[prost(bool, optional, tag = "2")]
4075 pub wait: ::core::option::Option<bool>,
4076 #[prost(message, repeated, tag = "3")]
4078 pub points: ::prost::alloc::vec::Vec<PointVectors>,
4079 #[prost(message, optional, tag = "4")]
4081 pub ordering: ::core::option::Option<WriteOrdering>,
4082 #[prost(message, optional, tag = "5")]
4084 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4085 #[prost(message, optional, tag = "6")]
4087 pub update_filter: ::core::option::Option<Filter>,
4088 #[prost(uint64, optional, tag = "7")]
4090 pub timeout: ::core::option::Option<u64>,
4091}
4092#[derive(Clone, PartialEq, ::prost::Message)]
4093pub struct PointVectors {
4094 #[prost(message, optional, tag = "1")]
4096 pub id: ::core::option::Option<PointId>,
4097 #[prost(message, optional, tag = "2")]
4099 pub vectors: ::core::option::Option<Vectors>,
4100}
4101#[derive(Clone, PartialEq, ::prost::Message)]
4102pub struct DeletePointVectors {
4103 #[prost(string, tag = "1")]
4105 pub collection_name: ::prost::alloc::string::String,
4106 #[prost(bool, optional, tag = "2")]
4108 pub wait: ::core::option::Option<bool>,
4109 #[prost(message, optional, tag = "3")]
4111 pub points_selector: ::core::option::Option<PointsSelector>,
4112 #[prost(message, optional, tag = "4")]
4114 pub vectors: ::core::option::Option<VectorsSelector>,
4115 #[prost(message, optional, tag = "5")]
4117 pub ordering: ::core::option::Option<WriteOrdering>,
4118 #[prost(message, optional, tag = "6")]
4120 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4121 #[prost(uint64, optional, tag = "7")]
4123 pub timeout: ::core::option::Option<u64>,
4124}
4125#[derive(Clone, PartialEq, ::prost::Message)]
4126pub struct SetPayloadPoints {
4127 #[prost(string, tag = "1")]
4129 pub collection_name: ::prost::alloc::string::String,
4130 #[prost(bool, optional, tag = "2")]
4132 pub wait: ::core::option::Option<bool>,
4133 #[prost(map = "string, message", tag = "3")]
4135 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4136 #[prost(message, optional, tag = "5")]
4138 pub points_selector: ::core::option::Option<PointsSelector>,
4139 #[prost(message, optional, tag = "6")]
4141 pub ordering: ::core::option::Option<WriteOrdering>,
4142 #[prost(message, optional, tag = "7")]
4144 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4145 #[prost(string, optional, tag = "8")]
4147 pub key: ::core::option::Option<::prost::alloc::string::String>,
4148 #[prost(uint64, optional, tag = "9")]
4150 pub timeout: ::core::option::Option<u64>,
4151}
4152#[derive(Clone, PartialEq, ::prost::Message)]
4153pub struct DeletePayloadPoints {
4154 #[prost(string, tag = "1")]
4156 pub collection_name: ::prost::alloc::string::String,
4157 #[prost(bool, optional, tag = "2")]
4159 pub wait: ::core::option::Option<bool>,
4160 #[prost(string, repeated, tag = "3")]
4162 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4163 #[prost(message, optional, tag = "5")]
4165 pub points_selector: ::core::option::Option<PointsSelector>,
4166 #[prost(message, optional, tag = "6")]
4168 pub ordering: ::core::option::Option<WriteOrdering>,
4169 #[prost(message, optional, tag = "7")]
4171 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4172 #[prost(uint64, optional, tag = "8")]
4174 pub timeout: ::core::option::Option<u64>,
4175}
4176#[derive(Clone, PartialEq, ::prost::Message)]
4177pub struct ClearPayloadPoints {
4178 #[prost(string, tag = "1")]
4180 pub collection_name: ::prost::alloc::string::String,
4181 #[prost(bool, optional, tag = "2")]
4183 pub wait: ::core::option::Option<bool>,
4184 #[prost(message, optional, tag = "3")]
4186 pub points: ::core::option::Option<PointsSelector>,
4187 #[prost(message, optional, tag = "4")]
4189 pub ordering: ::core::option::Option<WriteOrdering>,
4190 #[prost(message, optional, tag = "5")]
4192 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4193 #[prost(uint64, optional, tag = "6")]
4195 pub timeout: ::core::option::Option<u64>,
4196}
4197#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4198pub struct CreateFieldIndexCollection {
4199 #[prost(string, tag = "1")]
4201 pub collection_name: ::prost::alloc::string::String,
4202 #[prost(bool, optional, tag = "2")]
4204 pub wait: ::core::option::Option<bool>,
4205 #[prost(string, tag = "3")]
4207 pub field_name: ::prost::alloc::string::String,
4208 #[prost(enumeration = "FieldType", optional, tag = "4")]
4210 pub field_type: ::core::option::Option<i32>,
4211 #[prost(message, optional, tag = "5")]
4213 pub field_index_params: ::core::option::Option<PayloadIndexParams>,
4214 #[prost(message, optional, tag = "6")]
4216 pub ordering: ::core::option::Option<WriteOrdering>,
4217 #[prost(uint64, optional, tag = "7")]
4219 pub timeout: ::core::option::Option<u64>,
4220}
4221#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4222pub struct DeleteFieldIndexCollection {
4223 #[prost(string, tag = "1")]
4225 pub collection_name: ::prost::alloc::string::String,
4226 #[prost(bool, optional, tag = "2")]
4228 pub wait: ::core::option::Option<bool>,
4229 #[prost(string, tag = "3")]
4231 pub field_name: ::prost::alloc::string::String,
4232 #[prost(message, optional, tag = "4")]
4234 pub ordering: ::core::option::Option<WriteOrdering>,
4235 #[prost(uint64, optional, tag = "5")]
4237 pub timeout: ::core::option::Option<u64>,
4238}
4239#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4243pub struct DenseVectorCreationConfig {
4244 #[prost(uint64, tag = "1")]
4246 pub size: u64,
4247 #[prost(enumeration = "Distance", tag = "2")]
4249 pub distance: i32,
4250 #[prost(message, optional, tag = "3")]
4252 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
4253 #[prost(enumeration = "Datatype", optional, tag = "4")]
4255 pub datatype: ::core::option::Option<i32>,
4256}
4257#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4260pub struct SparseVectorCreationConfig {
4261 #[prost(enumeration = "Modifier", optional, tag = "1")]
4263 pub modifier: ::core::option::Option<i32>,
4264 #[prost(enumeration = "Datatype", optional, tag = "2")]
4266 pub datatype: ::core::option::Option<i32>,
4267}
4268#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4269pub struct CreateVectorNameRequest {
4270 #[prost(string, tag = "1")]
4272 pub collection_name: ::prost::alloc::string::String,
4273 #[prost(bool, optional, tag = "2")]
4275 pub wait: ::core::option::Option<bool>,
4276 #[prost(string, tag = "3")]
4278 pub vector_name: ::prost::alloc::string::String,
4279 #[prost(uint64, optional, tag = "6")]
4281 pub timeout: ::core::option::Option<u64>,
4282 #[prost(message, optional, tag = "7")]
4284 pub ordering: ::core::option::Option<WriteOrdering>,
4285 #[prost(oneof = "create_vector_name_request::VectorConfig", tags = "4, 5")]
4287 pub vector_config: ::core::option::Option<create_vector_name_request::VectorConfig>,
4288}
4289pub mod create_vector_name_request {
4291 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
4293 pub enum VectorConfig {
4294 #[prost(message, tag = "4")]
4296 DenseConfig(super::DenseVectorCreationConfig),
4297 #[prost(message, tag = "5")]
4299 SparseConfig(super::SparseVectorCreationConfig),
4300 }
4301}
4302#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4303pub struct DeleteVectorNameRequest {
4304 #[prost(string, tag = "1")]
4306 pub collection_name: ::prost::alloc::string::String,
4307 #[prost(bool, optional, tag = "2")]
4309 pub wait: ::core::option::Option<bool>,
4310 #[prost(string, tag = "3")]
4312 pub vector_name: ::prost::alloc::string::String,
4313 #[prost(uint64, optional, tag = "4")]
4315 pub timeout: ::core::option::Option<u64>,
4316 #[prost(message, optional, tag = "5")]
4318 pub ordering: ::core::option::Option<WriteOrdering>,
4319}
4320#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4321pub struct PayloadIncludeSelector {
4322 #[prost(string, repeated, tag = "1")]
4324 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4325}
4326#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4327pub struct PayloadExcludeSelector {
4328 #[prost(string, repeated, tag = "1")]
4330 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4331}
4332#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4333pub struct WithPayloadSelector {
4334 #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
4335 pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
4336}
4337pub mod with_payload_selector {
4339 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
4340 pub enum SelectorOptions {
4341 #[prost(bool, tag = "1")]
4343 Enable(bool),
4344 #[prost(message, tag = "2")]
4345 Include(super::PayloadIncludeSelector),
4346 #[prost(message, tag = "3")]
4347 Exclude(super::PayloadExcludeSelector),
4348 }
4349}
4350#[derive(Clone, PartialEq, ::prost::Message)]
4351pub struct NamedVectors {
4352 #[prost(map = "string, message", tag = "1")]
4353 pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
4354}
4355#[derive(Clone, PartialEq, ::prost::Message)]
4356pub struct NamedVectorsOutput {
4357 #[prost(map = "string, message", tag = "1")]
4358 pub vectors: ::std::collections::HashMap<
4359 ::prost::alloc::string::String,
4360 VectorOutput,
4361 >,
4362}
4363#[derive(Clone, PartialEq, ::prost::Message)]
4364pub struct Vectors {
4365 #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
4366 pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
4367}
4368pub mod vectors {
4370 #[derive(Clone, PartialEq, ::prost::Oneof)]
4371 pub enum VectorsOptions {
4372 #[prost(message, tag = "1")]
4373 Vector(super::Vector),
4374 #[prost(message, tag = "2")]
4375 Vectors(super::NamedVectors),
4376 }
4377}
4378#[derive(Clone, PartialEq, ::prost::Message)]
4379pub struct VectorsOutput {
4380 #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
4381 pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
4382}
4383pub mod vectors_output {
4385 #[derive(Clone, PartialEq, ::prost::Oneof)]
4386 pub enum VectorsOptions {
4387 #[prost(message, tag = "1")]
4388 Vector(super::VectorOutput),
4389 #[prost(message, tag = "2")]
4390 Vectors(super::NamedVectorsOutput),
4391 }
4392}
4393#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4394pub struct VectorsSelector {
4395 #[prost(string, repeated, tag = "1")]
4397 pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4398}
4399#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4400pub struct WithVectorsSelector {
4401 #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
4402 pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
4403}
4404pub mod with_vectors_selector {
4406 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
4407 pub enum SelectorOptions {
4408 #[prost(bool, tag = "1")]
4410 Enable(bool),
4411 #[prost(message, tag = "2")]
4413 Include(super::VectorsSelector),
4414 }
4415}
4416#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4417pub struct QuantizationSearchParams {
4418 #[prost(bool, optional, tag = "1")]
4420 pub ignore: ::core::option::Option<bool>,
4421 #[prost(bool, optional, tag = "2")]
4424 pub rescore: ::core::option::Option<bool>,
4425 #[prost(double, optional, tag = "3")]
4434 pub oversampling: ::core::option::Option<f64>,
4435}
4436#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4437pub struct AcornSearchParams {
4438 #[prost(bool, optional, tag = "1")]
4444 pub enable: ::core::option::Option<bool>,
4445 #[prost(double, optional, tag = "2")]
4453 pub max_selectivity: ::core::option::Option<f64>,
4454}
4455#[derive(Clone, PartialEq, ::prost::Message)]
4458pub struct IdfParams {
4459 #[prost(message, optional, tag = "1")]
4462 pub corpus: ::core::option::Option<Filter>,
4463}
4464#[derive(Clone, PartialEq, ::prost::Message)]
4465pub struct SearchParams {
4466 #[prost(uint64, optional, tag = "1")]
4469 pub hnsw_ef: ::core::option::Option<u64>,
4470 #[prost(bool, optional, tag = "2")]
4472 pub exact: ::core::option::Option<bool>,
4473 #[prost(message, optional, tag = "3")]
4475 pub quantization: ::core::option::Option<QuantizationSearchParams>,
4476 #[prost(bool, optional, tag = "4")]
4480 pub indexed_only: ::core::option::Option<bool>,
4481 #[prost(message, optional, tag = "5")]
4483 pub acorn: ::core::option::Option<AcornSearchParams>,
4484 #[prost(message, optional, tag = "6")]
4487 pub idf: ::core::option::Option<IdfParams>,
4488}
4489#[derive(Clone, PartialEq, ::prost::Message)]
4490pub struct SearchPoints {
4491 #[prost(string, tag = "1")]
4493 pub collection_name: ::prost::alloc::string::String,
4494 #[prost(float, repeated, tag = "2")]
4496 pub vector: ::prost::alloc::vec::Vec<f32>,
4497 #[prost(message, optional, tag = "3")]
4499 pub filter: ::core::option::Option<Filter>,
4500 #[prost(uint64, tag = "4")]
4502 pub limit: u64,
4503 #[prost(message, optional, tag = "6")]
4505 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4506 #[prost(message, optional, tag = "7")]
4508 pub params: ::core::option::Option<SearchParams>,
4509 #[prost(float, optional, tag = "8")]
4511 pub score_threshold: ::core::option::Option<f32>,
4512 #[prost(uint64, optional, tag = "9")]
4514 pub offset: ::core::option::Option<u64>,
4515 #[prost(string, optional, tag = "10")]
4517 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4518 #[prost(message, optional, tag = "11")]
4520 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4521 #[prost(message, optional, tag = "12")]
4523 pub read_consistency: ::core::option::Option<ReadConsistency>,
4524 #[prost(uint64, optional, tag = "13")]
4526 pub timeout: ::core::option::Option<u64>,
4527 #[prost(message, optional, tag = "14")]
4529 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4530 #[prost(message, optional, tag = "15")]
4531 pub sparse_indices: ::core::option::Option<SparseIndices>,
4532}
4533#[derive(Clone, PartialEq, ::prost::Message)]
4534pub struct SearchBatchPoints {
4535 #[prost(string, tag = "1")]
4537 pub collection_name: ::prost::alloc::string::String,
4538 #[prost(message, repeated, tag = "2")]
4539 pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
4540 #[prost(message, optional, tag = "3")]
4542 pub read_consistency: ::core::option::Option<ReadConsistency>,
4543 #[prost(uint64, optional, tag = "4")]
4545 pub timeout: ::core::option::Option<u64>,
4546}
4547#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4548pub struct WithLookup {
4549 #[prost(string, tag = "1")]
4551 pub collection: ::prost::alloc::string::String,
4552 #[prost(message, optional, tag = "2")]
4554 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4555 #[prost(message, optional, tag = "3")]
4557 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4558}
4559#[derive(Clone, PartialEq, ::prost::Message)]
4560pub struct SearchPointGroups {
4561 #[prost(string, tag = "1")]
4563 pub collection_name: ::prost::alloc::string::String,
4564 #[prost(float, repeated, tag = "2")]
4566 pub vector: ::prost::alloc::vec::Vec<f32>,
4567 #[prost(message, optional, tag = "3")]
4569 pub filter: ::core::option::Option<Filter>,
4570 #[prost(uint32, tag = "4")]
4572 pub limit: u32,
4573 #[prost(message, optional, tag = "5")]
4575 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4576 #[prost(message, optional, tag = "6")]
4578 pub params: ::core::option::Option<SearchParams>,
4579 #[prost(float, optional, tag = "7")]
4581 pub score_threshold: ::core::option::Option<f32>,
4582 #[prost(string, optional, tag = "8")]
4584 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4585 #[prost(message, optional, tag = "9")]
4587 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4588 #[prost(string, tag = "10")]
4592 pub group_by: ::prost::alloc::string::String,
4593 #[prost(uint32, tag = "11")]
4595 pub group_size: u32,
4596 #[prost(message, optional, tag = "12")]
4598 pub read_consistency: ::core::option::Option<ReadConsistency>,
4599 #[prost(message, optional, tag = "13")]
4601 pub with_lookup: ::core::option::Option<WithLookup>,
4602 #[prost(uint64, optional, tag = "14")]
4604 pub timeout: ::core::option::Option<u64>,
4605 #[prost(message, optional, tag = "15")]
4607 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4608 #[prost(message, optional, tag = "16")]
4609 pub sparse_indices: ::core::option::Option<SparseIndices>,
4610}
4611#[derive(Clone, PartialEq, ::prost::Message)]
4612pub struct StartFrom {
4613 #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
4614 pub value: ::core::option::Option<start_from::Value>,
4615}
4616pub mod start_from {
4618 #[derive(Clone, PartialEq, ::prost::Oneof)]
4619 pub enum Value {
4620 #[prost(double, tag = "1")]
4621 Float(f64),
4622 #[prost(int64, tag = "2")]
4623 Integer(i64),
4624 #[prost(message, tag = "3")]
4625 Timestamp(::prost_types::Timestamp),
4626 #[prost(string, tag = "4")]
4627 Datetime(::prost::alloc::string::String),
4628 }
4629}
4630#[derive(Clone, PartialEq, ::prost::Message)]
4631pub struct OrderBy {
4632 #[prost(string, tag = "1")]
4634 pub key: ::prost::alloc::string::String,
4635 #[prost(enumeration = "Direction", optional, tag = "2")]
4637 pub direction: ::core::option::Option<i32>,
4638 #[prost(message, optional, tag = "3")]
4640 pub start_from: ::core::option::Option<StartFrom>,
4641}
4642#[derive(Clone, PartialEq, ::prost::Message)]
4643pub struct ScrollPoints {
4644 #[prost(string, tag = "1")]
4645 pub collection_name: ::prost::alloc::string::String,
4646 #[prost(message, optional, tag = "2")]
4648 pub filter: ::core::option::Option<Filter>,
4649 #[prost(message, optional, tag = "3")]
4651 pub offset: ::core::option::Option<PointId>,
4652 #[prost(uint32, optional, tag = "4")]
4654 pub limit: ::core::option::Option<u32>,
4655 #[prost(message, optional, tag = "6")]
4657 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4658 #[prost(message, optional, tag = "7")]
4660 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4661 #[prost(message, optional, tag = "8")]
4663 pub read_consistency: ::core::option::Option<ReadConsistency>,
4664 #[prost(message, optional, tag = "9")]
4666 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4667 #[prost(message, optional, tag = "10")]
4669 pub order_by: ::core::option::Option<OrderBy>,
4670 #[prost(uint64, optional, tag = "11")]
4672 pub timeout: ::core::option::Option<u64>,
4673}
4674#[derive(Clone, PartialEq, ::prost::Message)]
4675pub struct LookupLocation {
4676 #[prost(string, tag = "1")]
4677 pub collection_name: ::prost::alloc::string::String,
4678 #[prost(string, optional, tag = "2")]
4680 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4681 #[prost(message, optional, tag = "3")]
4683 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4684}
4685#[derive(Clone, PartialEq, ::prost::Message)]
4686pub struct RecommendPoints {
4687 #[prost(string, tag = "1")]
4689 pub collection_name: ::prost::alloc::string::String,
4690 #[prost(message, repeated, tag = "2")]
4692 pub positive: ::prost::alloc::vec::Vec<PointId>,
4693 #[prost(message, repeated, tag = "3")]
4695 pub negative: ::prost::alloc::vec::Vec<PointId>,
4696 #[prost(message, optional, tag = "4")]
4698 pub filter: ::core::option::Option<Filter>,
4699 #[prost(uint64, tag = "5")]
4701 pub limit: u64,
4702 #[prost(message, optional, tag = "7")]
4704 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4705 #[prost(message, optional, tag = "8")]
4707 pub params: ::core::option::Option<SearchParams>,
4708 #[prost(float, optional, tag = "9")]
4710 pub score_threshold: ::core::option::Option<f32>,
4711 #[prost(uint64, optional, tag = "10")]
4713 pub offset: ::core::option::Option<u64>,
4714 #[prost(string, optional, tag = "11")]
4716 pub using: ::core::option::Option<::prost::alloc::string::String>,
4717 #[prost(message, optional, tag = "12")]
4719 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4720 #[prost(message, optional, tag = "13")]
4722 pub lookup_from: ::core::option::Option<LookupLocation>,
4723 #[prost(message, optional, tag = "14")]
4725 pub read_consistency: ::core::option::Option<ReadConsistency>,
4726 #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
4728 pub strategy: ::core::option::Option<i32>,
4729 #[prost(message, repeated, tag = "17")]
4731 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4732 #[prost(message, repeated, tag = "18")]
4734 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4735 #[prost(uint64, optional, tag = "19")]
4737 pub timeout: ::core::option::Option<u64>,
4738 #[prost(message, optional, tag = "20")]
4740 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4741}
4742#[derive(Clone, PartialEq, ::prost::Message)]
4743pub struct RecommendBatchPoints {
4744 #[prost(string, tag = "1")]
4746 pub collection_name: ::prost::alloc::string::String,
4747 #[prost(message, repeated, tag = "2")]
4748 pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
4749 #[prost(message, optional, tag = "3")]
4751 pub read_consistency: ::core::option::Option<ReadConsistency>,
4752 #[prost(uint64, optional, tag = "4")]
4754 pub timeout: ::core::option::Option<u64>,
4755}
4756#[derive(Clone, PartialEq, ::prost::Message)]
4757pub struct RecommendPointGroups {
4758 #[prost(string, tag = "1")]
4760 pub collection_name: ::prost::alloc::string::String,
4761 #[prost(message, repeated, tag = "2")]
4763 pub positive: ::prost::alloc::vec::Vec<PointId>,
4764 #[prost(message, repeated, tag = "3")]
4766 pub negative: ::prost::alloc::vec::Vec<PointId>,
4767 #[prost(message, optional, tag = "4")]
4769 pub filter: ::core::option::Option<Filter>,
4770 #[prost(uint32, tag = "5")]
4772 pub limit: u32,
4773 #[prost(message, optional, tag = "6")]
4775 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4776 #[prost(message, optional, tag = "7")]
4778 pub params: ::core::option::Option<SearchParams>,
4779 #[prost(float, optional, tag = "8")]
4781 pub score_threshold: ::core::option::Option<f32>,
4782 #[prost(string, optional, tag = "9")]
4784 pub using: ::core::option::Option<::prost::alloc::string::String>,
4785 #[prost(message, optional, tag = "10")]
4787 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4788 #[prost(message, optional, tag = "11")]
4790 pub lookup_from: ::core::option::Option<LookupLocation>,
4791 #[prost(string, tag = "12")]
4795 pub group_by: ::prost::alloc::string::String,
4796 #[prost(uint32, tag = "13")]
4798 pub group_size: u32,
4799 #[prost(message, optional, tag = "14")]
4801 pub read_consistency: ::core::option::Option<ReadConsistency>,
4802 #[prost(message, optional, tag = "15")]
4804 pub with_lookup: ::core::option::Option<WithLookup>,
4805 #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
4807 pub strategy: ::core::option::Option<i32>,
4808 #[prost(message, repeated, tag = "18")]
4810 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4811 #[prost(message, repeated, tag = "19")]
4813 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4814 #[prost(uint64, optional, tag = "20")]
4816 pub timeout: ::core::option::Option<u64>,
4817 #[prost(message, optional, tag = "21")]
4819 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4820}
4821#[derive(Clone, PartialEq, ::prost::Message)]
4822pub struct TargetVector {
4823 #[prost(oneof = "target_vector::Target", tags = "1")]
4824 pub target: ::core::option::Option<target_vector::Target>,
4825}
4826pub mod target_vector {
4828 #[derive(Clone, PartialEq, ::prost::Oneof)]
4829 pub enum Target {
4830 #[prost(message, tag = "1")]
4831 Single(super::VectorExample),
4832 }
4833}
4834#[derive(Clone, PartialEq, ::prost::Message)]
4835pub struct VectorExample {
4836 #[prost(oneof = "vector_example::Example", tags = "1, 2")]
4837 pub example: ::core::option::Option<vector_example::Example>,
4838}
4839pub mod vector_example {
4841 #[derive(Clone, PartialEq, ::prost::Oneof)]
4842 pub enum Example {
4843 #[prost(message, tag = "1")]
4844 Id(super::PointId),
4845 #[prost(message, tag = "2")]
4846 Vector(super::Vector),
4847 }
4848}
4849#[derive(Clone, PartialEq, ::prost::Message)]
4850pub struct ContextExamplePair {
4851 #[prost(message, optional, tag = "1")]
4852 pub positive: ::core::option::Option<VectorExample>,
4853 #[prost(message, optional, tag = "2")]
4854 pub negative: ::core::option::Option<VectorExample>,
4855}
4856#[derive(Clone, PartialEq, ::prost::Message)]
4857pub struct DiscoverPoints {
4858 #[prost(string, tag = "1")]
4860 pub collection_name: ::prost::alloc::string::String,
4861 #[prost(message, optional, tag = "2")]
4863 pub target: ::core::option::Option<TargetVector>,
4864 #[prost(message, repeated, tag = "3")]
4866 pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
4867 #[prost(message, optional, tag = "4")]
4869 pub filter: ::core::option::Option<Filter>,
4870 #[prost(uint64, tag = "5")]
4872 pub limit: u64,
4873 #[prost(message, optional, tag = "6")]
4875 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4876 #[prost(message, optional, tag = "7")]
4878 pub params: ::core::option::Option<SearchParams>,
4879 #[prost(uint64, optional, tag = "8")]
4881 pub offset: ::core::option::Option<u64>,
4882 #[prost(string, optional, tag = "9")]
4884 pub using: ::core::option::Option<::prost::alloc::string::String>,
4885 #[prost(message, optional, tag = "10")]
4887 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4888 #[prost(message, optional, tag = "11")]
4890 pub lookup_from: ::core::option::Option<LookupLocation>,
4891 #[prost(message, optional, tag = "12")]
4893 pub read_consistency: ::core::option::Option<ReadConsistency>,
4894 #[prost(uint64, optional, tag = "13")]
4896 pub timeout: ::core::option::Option<u64>,
4897 #[prost(message, optional, tag = "14")]
4899 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4900}
4901#[derive(Clone, PartialEq, ::prost::Message)]
4902pub struct DiscoverBatchPoints {
4903 #[prost(string, tag = "1")]
4905 pub collection_name: ::prost::alloc::string::String,
4906 #[prost(message, repeated, tag = "2")]
4907 pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
4908 #[prost(message, optional, tag = "3")]
4910 pub read_consistency: ::core::option::Option<ReadConsistency>,
4911 #[prost(uint64, optional, tag = "4")]
4913 pub timeout: ::core::option::Option<u64>,
4914}
4915#[derive(Clone, PartialEq, ::prost::Message)]
4916pub struct CountPoints {
4917 #[prost(string, tag = "1")]
4919 pub collection_name: ::prost::alloc::string::String,
4920 #[prost(message, optional, tag = "2")]
4922 pub filter: ::core::option::Option<Filter>,
4923 #[prost(bool, optional, tag = "3")]
4925 pub exact: ::core::option::Option<bool>,
4926 #[prost(message, optional, tag = "4")]
4928 pub read_consistency: ::core::option::Option<ReadConsistency>,
4929 #[prost(message, optional, tag = "5")]
4931 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4932 #[prost(uint64, optional, tag = "6")]
4934 pub timeout: ::core::option::Option<u64>,
4935}
4936#[derive(Clone, PartialEq, ::prost::Message)]
4937pub struct RecommendInput {
4938 #[prost(message, repeated, tag = "1")]
4940 pub positive: ::prost::alloc::vec::Vec<VectorInput>,
4941 #[prost(message, repeated, tag = "2")]
4943 pub negative: ::prost::alloc::vec::Vec<VectorInput>,
4944 #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
4946 pub strategy: ::core::option::Option<i32>,
4947}
4948#[derive(Clone, PartialEq, ::prost::Message)]
4949pub struct ContextInputPair {
4950 #[prost(message, optional, tag = "1")]
4952 pub positive: ::core::option::Option<VectorInput>,
4953 #[prost(message, optional, tag = "2")]
4955 pub negative: ::core::option::Option<VectorInput>,
4956}
4957#[derive(Clone, PartialEq, ::prost::Message)]
4958pub struct DiscoverInput {
4959 #[prost(message, optional, tag = "1")]
4961 pub target: ::core::option::Option<VectorInput>,
4962 #[prost(message, optional, tag = "2")]
4964 pub context: ::core::option::Option<ContextInput>,
4965}
4966#[derive(Clone, PartialEq, ::prost::Message)]
4967pub struct ContextInput {
4968 #[prost(message, repeated, tag = "1")]
4970 pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
4971}
4972#[derive(Clone, PartialEq, ::prost::Message)]
4973pub struct RelevanceFeedbackInput {
4974 #[prost(message, optional, tag = "1")]
4976 pub target: ::core::option::Option<VectorInput>,
4977 #[prost(message, repeated, tag = "2")]
4979 pub feedback: ::prost::alloc::vec::Vec<FeedbackItem>,
4980 #[prost(message, optional, tag = "3")]
4982 pub strategy: ::core::option::Option<FeedbackStrategy>,
4983}
4984#[derive(Clone, PartialEq, ::prost::Message)]
4985pub struct FeedbackItem {
4986 #[prost(message, optional, tag = "1")]
4988 pub example: ::core::option::Option<VectorInput>,
4989 #[prost(float, tag = "2")]
4991 pub score: f32,
4992}
4993#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4994pub struct FeedbackStrategy {
4995 #[prost(oneof = "feedback_strategy::Variant", tags = "1")]
4996 pub variant: ::core::option::Option<feedback_strategy::Variant>,
4997}
4998pub mod feedback_strategy {
5000 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5001 pub enum Variant {
5002 #[prost(message, tag = "1")]
5004 Naive(super::NaiveFeedbackStrategy),
5005 }
5006}
5007#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5008pub struct NaiveFeedbackStrategy {
5009 #[prost(float, tag = "1")]
5010 pub a: f32,
5011 #[prost(float, tag = "2")]
5012 pub b: f32,
5013 #[prost(float, tag = "3")]
5014 pub c: f32,
5015}
5016#[derive(Clone, PartialEq, ::prost::Message)]
5017pub struct Formula {
5018 #[prost(message, optional, tag = "1")]
5019 pub expression: ::core::option::Option<Expression>,
5020 #[prost(map = "string, message", tag = "2")]
5021 pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5022}
5023#[derive(Clone, PartialEq, ::prost::Message)]
5024pub struct Expression {
5025 #[prost(
5026 oneof = "expression::Variant",
5027 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
5028 )]
5029 pub variant: ::core::option::Option<expression::Variant>,
5030}
5031pub mod expression {
5033 #[derive(Clone, PartialEq, ::prost::Oneof)]
5034 pub enum Variant {
5035 #[prost(float, tag = "1")]
5036 Constant(f32),
5037 #[prost(string, tag = "2")]
5039 Variable(::prost::alloc::string::String),
5040 #[prost(message, tag = "3")]
5042 Condition(super::Condition),
5043 #[prost(message, tag = "4")]
5045 GeoDistance(super::GeoDistance),
5046 #[prost(string, tag = "5")]
5048 Datetime(::prost::alloc::string::String),
5049 #[prost(string, tag = "6")]
5051 DatetimeKey(::prost::alloc::string::String),
5052 #[prost(message, tag = "7")]
5054 Mult(super::MultExpression),
5055 #[prost(message, tag = "8")]
5057 Sum(super::SumExpression),
5058 #[prost(message, tag = "9")]
5060 Div(::prost::alloc::boxed::Box<super::DivExpression>),
5061 #[prost(message, tag = "10")]
5063 Neg(::prost::alloc::boxed::Box<super::Expression>),
5064 #[prost(message, tag = "11")]
5066 Abs(::prost::alloc::boxed::Box<super::Expression>),
5067 #[prost(message, tag = "12")]
5069 Sqrt(::prost::alloc::boxed::Box<super::Expression>),
5070 #[prost(message, tag = "13")]
5072 Pow(::prost::alloc::boxed::Box<super::PowExpression>),
5073 #[prost(message, tag = "14")]
5075 Exp(::prost::alloc::boxed::Box<super::Expression>),
5076 #[prost(message, tag = "15")]
5078 Log10(::prost::alloc::boxed::Box<super::Expression>),
5079 #[prost(message, tag = "16")]
5081 Ln(::prost::alloc::boxed::Box<super::Expression>),
5082 #[prost(message, tag = "17")]
5084 ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5085 #[prost(message, tag = "18")]
5087 GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5088 #[prost(message, tag = "19")]
5090 LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5091 }
5092}
5093#[derive(Clone, PartialEq, ::prost::Message)]
5094pub struct GeoDistance {
5095 #[prost(message, optional, tag = "1")]
5096 pub origin: ::core::option::Option<GeoPoint>,
5097 #[prost(string, tag = "2")]
5098 pub to: ::prost::alloc::string::String,
5099}
5100#[derive(Clone, PartialEq, ::prost::Message)]
5101pub struct MultExpression {
5102 #[prost(message, repeated, tag = "1")]
5103 pub mult: ::prost::alloc::vec::Vec<Expression>,
5104}
5105#[derive(Clone, PartialEq, ::prost::Message)]
5106pub struct SumExpression {
5107 #[prost(message, repeated, tag = "1")]
5108 pub sum: ::prost::alloc::vec::Vec<Expression>,
5109}
5110#[derive(Clone, PartialEq, ::prost::Message)]
5111pub struct DivExpression {
5112 #[prost(message, optional, boxed, tag = "1")]
5113 pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5114 #[prost(message, optional, boxed, tag = "2")]
5115 pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5116 #[prost(float, optional, tag = "3")]
5117 pub by_zero_default: ::core::option::Option<f32>,
5118}
5119#[derive(Clone, PartialEq, ::prost::Message)]
5120pub struct PowExpression {
5121 #[prost(message, optional, boxed, tag = "1")]
5122 pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5123 #[prost(message, optional, boxed, tag = "2")]
5124 pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5125}
5126#[derive(Clone, PartialEq, ::prost::Message)]
5127pub struct DecayParamsExpression {
5128 #[prost(message, optional, boxed, tag = "1")]
5130 pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5131 #[prost(message, optional, boxed, tag = "2")]
5133 pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5134 #[prost(float, optional, tag = "3")]
5137 pub scale: ::core::option::Option<f32>,
5138 #[prost(float, optional, tag = "4")]
5142 pub midpoint: ::core::option::Option<f32>,
5143}
5144#[derive(Clone, PartialEq, ::prost::Message)]
5145pub struct NearestInputWithMmr {
5146 #[prost(message, optional, tag = "1")]
5148 pub nearest: ::core::option::Option<VectorInput>,
5149 #[prost(message, optional, tag = "2")]
5152 pub mmr: ::core::option::Option<Mmr>,
5153}
5154#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5156pub struct Mmr {
5157 #[prost(float, optional, tag = "2")]
5166 pub diversity: ::core::option::Option<f32>,
5167 #[prost(uint32, optional, tag = "3")]
5171 pub candidates_limit: ::core::option::Option<u32>,
5172}
5173#[derive(Clone, PartialEq, ::prost::Message)]
5175pub struct Rrf {
5176 #[prost(uint32, optional, tag = "1")]
5178 pub k: ::core::option::Option<u32>,
5179 #[prost(float, repeated, tag = "2")]
5184 pub weights: ::prost::alloc::vec::Vec<f32>,
5185}
5186#[derive(Clone, PartialEq, ::prost::Message)]
5187pub struct Query {
5188 #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
5189 pub variant: ::core::option::Option<query::Variant>,
5190}
5191pub mod query {
5193 #[derive(Clone, PartialEq, ::prost::Oneof)]
5194 pub enum Variant {
5195 #[prost(message, tag = "1")]
5197 Nearest(super::VectorInput),
5198 #[prost(message, tag = "2")]
5200 Recommend(super::RecommendInput),
5201 #[prost(message, tag = "3")]
5203 Discover(super::DiscoverInput),
5204 #[prost(message, tag = "4")]
5206 Context(super::ContextInput),
5207 #[prost(message, tag = "5")]
5209 OrderBy(super::OrderBy),
5210 #[prost(enumeration = "super::Fusion", tag = "6")]
5212 Fusion(i32),
5213 #[prost(enumeration = "super::Sample", tag = "7")]
5215 Sample(i32),
5216 #[prost(message, tag = "8")]
5218 Formula(super::Formula),
5219 #[prost(message, tag = "9")]
5221 NearestWithMmr(super::NearestInputWithMmr),
5222 #[prost(message, tag = "10")]
5224 Rrf(super::Rrf),
5225 #[prost(message, tag = "11")]
5227 RelevanceFeedback(super::RelevanceFeedbackInput),
5228 }
5229}
5230#[derive(Clone, PartialEq, ::prost::Message)]
5231pub struct PrefetchQuery {
5232 #[prost(message, repeated, tag = "1")]
5235 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5236 #[prost(message, optional, tag = "2")]
5239 pub query: ::core::option::Option<Query>,
5240 #[prost(string, optional, tag = "3")]
5243 pub using: ::core::option::Option<::prost::alloc::string::String>,
5244 #[prost(message, optional, tag = "4")]
5246 pub filter: ::core::option::Option<Filter>,
5247 #[prost(message, optional, tag = "5")]
5249 pub params: ::core::option::Option<SearchParams>,
5250 #[prost(float, optional, tag = "6")]
5252 pub score_threshold: ::core::option::Option<f32>,
5253 #[prost(uint64, optional, tag = "7")]
5255 pub limit: ::core::option::Option<u64>,
5256 #[prost(message, optional, tag = "8")]
5259 pub lookup_from: ::core::option::Option<LookupLocation>,
5260}
5261#[derive(Clone, PartialEq, ::prost::Message)]
5262pub struct QueryPoints {
5263 #[prost(string, tag = "1")]
5265 pub collection_name: ::prost::alloc::string::String,
5266 #[prost(message, repeated, tag = "2")]
5269 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5270 #[prost(message, optional, tag = "3")]
5272 pub query: ::core::option::Option<Query>,
5273 #[prost(string, optional, tag = "4")]
5276 pub using: ::core::option::Option<::prost::alloc::string::String>,
5277 #[prost(message, optional, tag = "5")]
5279 pub filter: ::core::option::Option<Filter>,
5280 #[prost(message, optional, tag = "6")]
5282 pub params: ::core::option::Option<SearchParams>,
5283 #[prost(float, optional, tag = "7")]
5285 pub score_threshold: ::core::option::Option<f32>,
5286 #[prost(uint64, optional, tag = "8")]
5288 pub limit: ::core::option::Option<u64>,
5289 #[prost(uint64, optional, tag = "9")]
5291 pub offset: ::core::option::Option<u64>,
5292 #[prost(message, optional, tag = "10")]
5294 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
5295 #[prost(message, optional, tag = "11")]
5297 pub with_payload: ::core::option::Option<WithPayloadSelector>,
5298 #[prost(message, optional, tag = "12")]
5300 pub read_consistency: ::core::option::Option<ReadConsistency>,
5301 #[prost(message, optional, tag = "13")]
5304 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5305 #[prost(message, optional, tag = "14")]
5308 pub lookup_from: ::core::option::Option<LookupLocation>,
5309 #[prost(uint64, optional, tag = "15")]
5311 pub timeout: ::core::option::Option<u64>,
5312}
5313#[derive(Clone, PartialEq, ::prost::Message)]
5314pub struct QueryBatchPoints {
5315 #[prost(string, tag = "1")]
5316 pub collection_name: ::prost::alloc::string::String,
5317 #[prost(message, repeated, tag = "2")]
5318 pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
5319 #[prost(message, optional, tag = "3")]
5321 pub read_consistency: ::core::option::Option<ReadConsistency>,
5322 #[prost(uint64, optional, tag = "4")]
5324 pub timeout: ::core::option::Option<u64>,
5325}
5326#[derive(Clone, PartialEq, ::prost::Message)]
5327pub struct QueryPointGroups {
5328 #[prost(string, tag = "1")]
5330 pub collection_name: ::prost::alloc::string::String,
5331 #[prost(message, repeated, tag = "2")]
5334 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5335 #[prost(message, optional, tag = "3")]
5337 pub query: ::core::option::Option<Query>,
5338 #[prost(string, optional, tag = "4")]
5341 pub using: ::core::option::Option<::prost::alloc::string::String>,
5342 #[prost(message, optional, tag = "5")]
5344 pub filter: ::core::option::Option<Filter>,
5345 #[prost(message, optional, tag = "6")]
5347 pub params: ::core::option::Option<SearchParams>,
5348 #[prost(float, optional, tag = "7")]
5350 pub score_threshold: ::core::option::Option<f32>,
5351 #[prost(message, optional, tag = "8")]
5353 pub with_payload: ::core::option::Option<WithPayloadSelector>,
5354 #[prost(message, optional, tag = "9")]
5356 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
5357 #[prost(message, optional, tag = "10")]
5360 pub lookup_from: ::core::option::Option<LookupLocation>,
5361 #[prost(uint64, optional, tag = "11")]
5363 pub limit: ::core::option::Option<u64>,
5364 #[prost(uint64, optional, tag = "12")]
5366 pub group_size: ::core::option::Option<u64>,
5367 #[prost(string, tag = "13")]
5371 pub group_by: ::prost::alloc::string::String,
5372 #[prost(message, optional, tag = "14")]
5374 pub read_consistency: ::core::option::Option<ReadConsistency>,
5375 #[prost(message, optional, tag = "15")]
5377 pub with_lookup: ::core::option::Option<WithLookup>,
5378 #[prost(uint64, optional, tag = "16")]
5380 pub timeout: ::core::option::Option<u64>,
5381 #[prost(message, optional, tag = "17")]
5383 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5384}
5385#[derive(Clone, PartialEq, ::prost::Message)]
5386pub struct FacetCounts {
5387 #[prost(string, tag = "1")]
5389 pub collection_name: ::prost::alloc::string::String,
5390 #[prost(string, tag = "2")]
5392 pub key: ::prost::alloc::string::String,
5393 #[prost(message, optional, tag = "3")]
5395 pub filter: ::core::option::Option<Filter>,
5396 #[prost(uint64, optional, tag = "4")]
5398 pub limit: ::core::option::Option<u64>,
5399 #[prost(bool, optional, tag = "5")]
5401 pub exact: ::core::option::Option<bool>,
5402 #[prost(uint64, optional, tag = "6")]
5404 pub timeout: ::core::option::Option<u64>,
5405 #[prost(message, optional, tag = "7")]
5407 pub read_consistency: ::core::option::Option<ReadConsistency>,
5408 #[prost(message, optional, tag = "8")]
5410 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5411}
5412#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5413pub struct FacetValue {
5414 #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
5415 pub variant: ::core::option::Option<facet_value::Variant>,
5416}
5417pub mod facet_value {
5419 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
5420 pub enum Variant {
5421 #[prost(string, tag = "1")]
5423 StringValue(::prost::alloc::string::String),
5424 #[prost(int64, tag = "2")]
5426 IntegerValue(i64),
5427 #[prost(bool, tag = "3")]
5429 BoolValue(bool),
5430 }
5431}
5432#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5433pub struct FacetHit {
5434 #[prost(message, optional, tag = "1")]
5436 pub value: ::core::option::Option<FacetValue>,
5437 #[prost(uint64, tag = "2")]
5439 pub count: u64,
5440}
5441#[derive(Clone, PartialEq, ::prost::Message)]
5442pub struct SearchMatrixPoints {
5443 #[prost(string, tag = "1")]
5445 pub collection_name: ::prost::alloc::string::String,
5446 #[prost(message, optional, tag = "2")]
5448 pub filter: ::core::option::Option<Filter>,
5449 #[prost(uint64, optional, tag = "3")]
5451 pub sample: ::core::option::Option<u64>,
5452 #[prost(uint64, optional, tag = "4")]
5454 pub limit: ::core::option::Option<u64>,
5455 #[prost(string, optional, tag = "5")]
5457 pub using: ::core::option::Option<::prost::alloc::string::String>,
5458 #[prost(uint64, optional, tag = "6")]
5460 pub timeout: ::core::option::Option<u64>,
5461 #[prost(message, optional, tag = "7")]
5463 pub read_consistency: ::core::option::Option<ReadConsistency>,
5464 #[prost(message, optional, tag = "8")]
5466 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5467}
5468#[derive(Clone, PartialEq, ::prost::Message)]
5469pub struct SearchMatrixPairs {
5470 #[prost(message, repeated, tag = "1")]
5472 pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
5473}
5474#[derive(Clone, PartialEq, ::prost::Message)]
5475pub struct SearchMatrixPair {
5476 #[prost(message, optional, tag = "1")]
5478 pub a: ::core::option::Option<PointId>,
5479 #[prost(message, optional, tag = "2")]
5481 pub b: ::core::option::Option<PointId>,
5482 #[prost(float, tag = "3")]
5484 pub score: f32,
5485}
5486#[derive(Clone, PartialEq, ::prost::Message)]
5487pub struct SearchMatrixOffsets {
5488 #[prost(uint64, repeated, tag = "1")]
5490 pub offsets_row: ::prost::alloc::vec::Vec<u64>,
5491 #[prost(uint64, repeated, tag = "2")]
5493 pub offsets_col: ::prost::alloc::vec::Vec<u64>,
5494 #[prost(float, repeated, tag = "3")]
5496 pub scores: ::prost::alloc::vec::Vec<f32>,
5497 #[prost(message, repeated, tag = "4")]
5499 pub ids: ::prost::alloc::vec::Vec<PointId>,
5500}
5501#[derive(Clone, PartialEq, ::prost::Message)]
5502pub struct PointsUpdateOperation {
5503 #[prost(
5504 oneof = "points_update_operation::Operation",
5505 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
5506 )]
5507 pub operation: ::core::option::Option<points_update_operation::Operation>,
5508}
5509pub mod points_update_operation {
5511 #[derive(Clone, PartialEq, ::prost::Message)]
5512 pub struct PointStructList {
5513 #[prost(message, repeated, tag = "1")]
5514 pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
5515 #[prost(message, optional, tag = "2")]
5517 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5518 #[prost(message, optional, tag = "3")]
5521 pub update_filter: ::core::option::Option<super::Filter>,
5522 #[prost(enumeration = "super::UpdateMode", optional, tag = "4")]
5524 pub update_mode: ::core::option::Option<i32>,
5525 }
5526 #[derive(Clone, PartialEq, ::prost::Message)]
5527 pub struct SetPayload {
5528 #[prost(map = "string, message", tag = "1")]
5529 pub payload: ::std::collections::HashMap<
5530 ::prost::alloc::string::String,
5531 super::Value,
5532 >,
5533 #[prost(message, optional, tag = "2")]
5535 pub points_selector: ::core::option::Option<super::PointsSelector>,
5536 #[prost(message, optional, tag = "3")]
5538 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5539 #[prost(string, optional, tag = "4")]
5541 pub key: ::core::option::Option<::prost::alloc::string::String>,
5542 }
5543 #[derive(Clone, PartialEq, ::prost::Message)]
5544 pub struct OverwritePayload {
5545 #[prost(map = "string, message", tag = "1")]
5546 pub payload: ::std::collections::HashMap<
5547 ::prost::alloc::string::String,
5548 super::Value,
5549 >,
5550 #[prost(message, optional, tag = "2")]
5552 pub points_selector: ::core::option::Option<super::PointsSelector>,
5553 #[prost(message, optional, tag = "3")]
5555 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5556 #[prost(string, optional, tag = "4")]
5558 pub key: ::core::option::Option<::prost::alloc::string::String>,
5559 }
5560 #[derive(Clone, PartialEq, ::prost::Message)]
5561 pub struct DeletePayload {
5562 #[prost(string, repeated, tag = "1")]
5563 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5564 #[prost(message, optional, tag = "2")]
5566 pub points_selector: ::core::option::Option<super::PointsSelector>,
5567 #[prost(message, optional, tag = "3")]
5569 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5570 }
5571 #[derive(Clone, PartialEq, ::prost::Message)]
5572 pub struct UpdateVectors {
5573 #[prost(message, repeated, tag = "1")]
5575 pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
5576 #[prost(message, optional, tag = "2")]
5578 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5579 #[prost(message, optional, tag = "3")]
5581 pub update_filter: ::core::option::Option<super::Filter>,
5582 }
5583 #[derive(Clone, PartialEq, ::prost::Message)]
5584 pub struct DeleteVectors {
5585 #[prost(message, optional, tag = "1")]
5587 pub points_selector: ::core::option::Option<super::PointsSelector>,
5588 #[prost(message, optional, tag = "2")]
5590 pub vectors: ::core::option::Option<super::VectorsSelector>,
5591 #[prost(message, optional, tag = "3")]
5593 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5594 }
5595 #[derive(Clone, PartialEq, ::prost::Message)]
5596 pub struct DeletePoints {
5597 #[prost(message, optional, tag = "1")]
5599 pub points: ::core::option::Option<super::PointsSelector>,
5600 #[prost(message, optional, tag = "2")]
5602 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5603 }
5604 #[derive(Clone, PartialEq, ::prost::Message)]
5605 pub struct ClearPayload {
5606 #[prost(message, optional, tag = "1")]
5608 pub points: ::core::option::Option<super::PointsSelector>,
5609 #[prost(message, optional, tag = "2")]
5611 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5612 }
5613 #[derive(Clone, PartialEq, ::prost::Oneof)]
5614 pub enum Operation {
5615 #[prost(message, tag = "1")]
5616 Upsert(PointStructList),
5617 #[deprecated]
5618 #[prost(message, tag = "2")]
5619 DeleteDeprecated(super::PointsSelector),
5620 #[prost(message, tag = "3")]
5621 SetPayload(SetPayload),
5622 #[prost(message, tag = "4")]
5623 OverwritePayload(OverwritePayload),
5624 #[prost(message, tag = "5")]
5625 DeletePayload(DeletePayload),
5626 #[deprecated]
5627 #[prost(message, tag = "6")]
5628 ClearPayloadDeprecated(super::PointsSelector),
5629 #[prost(message, tag = "7")]
5630 UpdateVectors(UpdateVectors),
5631 #[prost(message, tag = "8")]
5632 DeleteVectors(DeleteVectors),
5633 #[prost(message, tag = "9")]
5634 DeletePoints(DeletePoints),
5635 #[prost(message, tag = "10")]
5636 ClearPayload(ClearPayload),
5637 }
5638}
5639#[derive(Clone, PartialEq, ::prost::Message)]
5640pub struct UpdateBatchPoints {
5641 #[prost(string, tag = "1")]
5643 pub collection_name: ::prost::alloc::string::String,
5644 #[prost(bool, optional, tag = "2")]
5646 pub wait: ::core::option::Option<bool>,
5647 #[prost(message, repeated, tag = "3")]
5648 pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
5649 #[prost(message, optional, tag = "4")]
5651 pub ordering: ::core::option::Option<WriteOrdering>,
5652 #[prost(uint64, optional, tag = "5")]
5654 pub timeout: ::core::option::Option<u64>,
5655}
5656#[derive(Clone, PartialEq, ::prost::Message)]
5657pub struct PointsOperationResponse {
5658 #[prost(message, optional, tag = "1")]
5659 pub result: ::core::option::Option<UpdateResult>,
5660 #[prost(double, tag = "2")]
5662 pub time: f64,
5663 #[prost(message, optional, tag = "3")]
5664 pub usage: ::core::option::Option<Usage>,
5665}
5666#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5667pub struct UpdateResult {
5668 #[prost(uint64, optional, tag = "1")]
5670 pub operation_id: ::core::option::Option<u64>,
5671 #[prost(enumeration = "UpdateStatus", tag = "2")]
5673 pub status: i32,
5674}
5675#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5676pub struct OrderValue {
5677 #[prost(oneof = "order_value::Variant", tags = "1, 2")]
5678 pub variant: ::core::option::Option<order_value::Variant>,
5679}
5680pub mod order_value {
5682 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5683 pub enum Variant {
5684 #[prost(int64, tag = "1")]
5685 Int(i64),
5686 #[prost(double, tag = "2")]
5687 Float(f64),
5688 }
5689}
5690#[derive(Clone, PartialEq, ::prost::Message)]
5691pub struct ScoredPoint {
5692 #[prost(message, optional, tag = "1")]
5694 pub id: ::core::option::Option<PointId>,
5695 #[prost(map = "string, message", tag = "2")]
5697 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5698 #[prost(float, tag = "3")]
5700 pub score: f32,
5701 #[prost(uint64, tag = "5")]
5703 pub version: u64,
5704 #[prost(message, optional, tag = "6")]
5706 pub vectors: ::core::option::Option<VectorsOutput>,
5707 #[prost(message, optional, tag = "7")]
5709 pub shard_key: ::core::option::Option<ShardKey>,
5710 #[prost(message, optional, tag = "8")]
5712 pub order_value: ::core::option::Option<OrderValue>,
5713}
5714#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5715pub struct GroupId {
5716 #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
5717 pub kind: ::core::option::Option<group_id::Kind>,
5718}
5719pub mod group_id {
5721 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
5722 pub enum Kind {
5723 #[prost(uint64, tag = "1")]
5725 UnsignedValue(u64),
5726 #[prost(int64, tag = "2")]
5728 IntegerValue(i64),
5729 #[prost(string, tag = "3")]
5731 StringValue(::prost::alloc::string::String),
5732 }
5733}
5734#[derive(Clone, PartialEq, ::prost::Message)]
5735pub struct PointGroup {
5736 #[prost(message, optional, tag = "1")]
5738 pub id: ::core::option::Option<GroupId>,
5739 #[prost(message, repeated, tag = "2")]
5741 pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
5742 #[prost(message, optional, tag = "3")]
5744 pub lookup: ::core::option::Option<RetrievedPoint>,
5745}
5746#[derive(Clone, PartialEq, ::prost::Message)]
5747pub struct GroupsResult {
5748 #[prost(message, repeated, tag = "1")]
5750 pub groups: ::prost::alloc::vec::Vec<PointGroup>,
5751}
5752#[derive(Clone, PartialEq, ::prost::Message)]
5753pub struct SearchResponse {
5754 #[prost(message, repeated, tag = "1")]
5755 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5756 #[prost(double, tag = "2")]
5758 pub time: f64,
5759 #[prost(message, optional, tag = "3")]
5760 pub usage: ::core::option::Option<Usage>,
5761}
5762#[derive(Clone, PartialEq, ::prost::Message)]
5763pub struct QueryResponse {
5764 #[prost(message, repeated, tag = "1")]
5765 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5766 #[prost(double, tag = "2")]
5768 pub time: f64,
5769 #[prost(message, optional, tag = "3")]
5770 pub usage: ::core::option::Option<Usage>,
5771}
5772#[derive(Clone, PartialEq, ::prost::Message)]
5773pub struct QueryBatchResponse {
5774 #[prost(message, repeated, tag = "1")]
5775 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5776 #[prost(double, tag = "2")]
5778 pub time: f64,
5779 #[prost(message, optional, tag = "3")]
5780 pub usage: ::core::option::Option<Usage>,
5781}
5782#[derive(Clone, PartialEq, ::prost::Message)]
5783pub struct QueryGroupsResponse {
5784 #[prost(message, optional, tag = "1")]
5785 pub result: ::core::option::Option<GroupsResult>,
5786 #[prost(double, tag = "2")]
5788 pub time: f64,
5789 #[prost(message, optional, tag = "3")]
5790 pub usage: ::core::option::Option<Usage>,
5791}
5792#[derive(Clone, PartialEq, ::prost::Message)]
5793pub struct BatchResult {
5794 #[prost(message, repeated, tag = "1")]
5795 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5796}
5797#[derive(Clone, PartialEq, ::prost::Message)]
5798pub struct SearchBatchResponse {
5799 #[prost(message, repeated, tag = "1")]
5800 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5801 #[prost(double, tag = "2")]
5803 pub time: f64,
5804 #[prost(message, optional, tag = "3")]
5805 pub usage: ::core::option::Option<Usage>,
5806}
5807#[derive(Clone, PartialEq, ::prost::Message)]
5808pub struct SearchGroupsResponse {
5809 #[prost(message, optional, tag = "1")]
5810 pub result: ::core::option::Option<GroupsResult>,
5811 #[prost(double, tag = "2")]
5813 pub time: f64,
5814 #[prost(message, optional, tag = "3")]
5815 pub usage: ::core::option::Option<Usage>,
5816}
5817#[derive(Clone, PartialEq, ::prost::Message)]
5818pub struct CountResponse {
5819 #[prost(message, optional, tag = "1")]
5820 pub result: ::core::option::Option<CountResult>,
5821 #[prost(double, tag = "2")]
5823 pub time: f64,
5824 #[prost(message, optional, tag = "3")]
5825 pub usage: ::core::option::Option<Usage>,
5826}
5827#[derive(Clone, PartialEq, ::prost::Message)]
5828pub struct ScrollResponse {
5829 #[prost(message, optional, tag = "1")]
5831 pub next_page_offset: ::core::option::Option<PointId>,
5832 #[prost(message, repeated, tag = "2")]
5833 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5834 #[prost(double, tag = "3")]
5836 pub time: f64,
5837 #[prost(message, optional, tag = "4")]
5838 pub usage: ::core::option::Option<Usage>,
5839}
5840#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5841pub struct CountResult {
5842 #[prost(uint64, tag = "1")]
5843 pub count: u64,
5844}
5845#[derive(Clone, PartialEq, ::prost::Message)]
5846pub struct RetrievedPoint {
5847 #[prost(message, optional, tag = "1")]
5848 pub id: ::core::option::Option<PointId>,
5849 #[prost(map = "string, message", tag = "2")]
5850 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5851 #[prost(message, optional, tag = "4")]
5852 pub vectors: ::core::option::Option<VectorsOutput>,
5853 #[prost(message, optional, tag = "5")]
5855 pub shard_key: ::core::option::Option<ShardKey>,
5856 #[prost(message, optional, tag = "6")]
5858 pub order_value: ::core::option::Option<OrderValue>,
5859}
5860#[derive(Clone, PartialEq, ::prost::Message)]
5861pub struct GetResponse {
5862 #[prost(message, repeated, tag = "1")]
5863 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5864 #[prost(double, tag = "2")]
5866 pub time: f64,
5867 #[prost(message, optional, tag = "3")]
5868 pub usage: ::core::option::Option<Usage>,
5869}
5870#[derive(Clone, PartialEq, ::prost::Message)]
5871pub struct RecommendResponse {
5872 #[prost(message, repeated, tag = "1")]
5873 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5874 #[prost(double, tag = "2")]
5876 pub time: f64,
5877 #[prost(message, optional, tag = "3")]
5878 pub usage: ::core::option::Option<Usage>,
5879}
5880#[derive(Clone, PartialEq, ::prost::Message)]
5881pub struct RecommendBatchResponse {
5882 #[prost(message, repeated, tag = "1")]
5883 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5884 #[prost(double, tag = "2")]
5886 pub time: f64,
5887 #[prost(message, optional, tag = "3")]
5888 pub usage: ::core::option::Option<Usage>,
5889}
5890#[derive(Clone, PartialEq, ::prost::Message)]
5891pub struct DiscoverResponse {
5892 #[prost(message, repeated, tag = "1")]
5893 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5894 #[prost(double, tag = "2")]
5896 pub time: f64,
5897 #[prost(message, optional, tag = "3")]
5898 pub usage: ::core::option::Option<Usage>,
5899}
5900#[derive(Clone, PartialEq, ::prost::Message)]
5901pub struct DiscoverBatchResponse {
5902 #[prost(message, repeated, tag = "1")]
5903 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5904 #[prost(double, tag = "2")]
5906 pub time: f64,
5907 #[prost(message, optional, tag = "3")]
5908 pub usage: ::core::option::Option<Usage>,
5909}
5910#[derive(Clone, PartialEq, ::prost::Message)]
5911pub struct RecommendGroupsResponse {
5912 #[prost(message, optional, tag = "1")]
5913 pub result: ::core::option::Option<GroupsResult>,
5914 #[prost(double, tag = "2")]
5916 pub time: f64,
5917 #[prost(message, optional, tag = "3")]
5918 pub usage: ::core::option::Option<Usage>,
5919}
5920#[derive(Clone, PartialEq, ::prost::Message)]
5921pub struct UpdateBatchResponse {
5922 #[prost(message, repeated, tag = "1")]
5923 pub result: ::prost::alloc::vec::Vec<UpdateResult>,
5924 #[prost(double, tag = "2")]
5926 pub time: f64,
5927 #[prost(message, optional, tag = "3")]
5928 pub usage: ::core::option::Option<Usage>,
5929}
5930#[derive(Clone, PartialEq, ::prost::Message)]
5931pub struct FacetResponse {
5932 #[prost(message, repeated, tag = "1")]
5933 pub hits: ::prost::alloc::vec::Vec<FacetHit>,
5934 #[prost(double, tag = "2")]
5936 pub time: f64,
5937 #[prost(message, optional, tag = "3")]
5938 pub usage: ::core::option::Option<Usage>,
5939}
5940#[derive(Clone, PartialEq, ::prost::Message)]
5941pub struct SearchMatrixPairsResponse {
5942 #[prost(message, optional, tag = "1")]
5943 pub result: ::core::option::Option<SearchMatrixPairs>,
5944 #[prost(double, tag = "2")]
5946 pub time: f64,
5947 #[prost(message, optional, tag = "3")]
5948 pub usage: ::core::option::Option<Usage>,
5949}
5950#[derive(Clone, PartialEq, ::prost::Message)]
5951pub struct SearchMatrixOffsetsResponse {
5952 #[prost(message, optional, tag = "1")]
5953 pub result: ::core::option::Option<SearchMatrixOffsets>,
5954 #[prost(double, tag = "2")]
5956 pub time: f64,
5957 #[prost(message, optional, tag = "3")]
5958 pub usage: ::core::option::Option<Usage>,
5959}
5960#[derive(Clone, PartialEq, ::prost::Message)]
5961pub struct PointsSelector {
5962 #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
5963 pub points_selector_one_of: ::core::option::Option<
5964 points_selector::PointsSelectorOneOf,
5965 >,
5966}
5967pub mod points_selector {
5969 #[derive(Clone, PartialEq, ::prost::Oneof)]
5970 pub enum PointsSelectorOneOf {
5971 #[prost(message, tag = "1")]
5972 Points(super::PointsIdsList),
5973 #[prost(message, tag = "2")]
5974 Filter(super::Filter),
5975 }
5976}
5977#[derive(Clone, PartialEq, ::prost::Message)]
5978pub struct PointsIdsList {
5979 #[prost(message, repeated, tag = "1")]
5980 pub ids: ::prost::alloc::vec::Vec<PointId>,
5981}
5982#[derive(Clone, PartialEq, ::prost::Message)]
5983pub struct PointStruct {
5984 #[prost(message, optional, tag = "1")]
5985 pub id: ::core::option::Option<PointId>,
5986 #[prost(map = "string, message", tag = "3")]
5987 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5988 #[prost(message, optional, tag = "4")]
5989 pub vectors: ::core::option::Option<Vectors>,
5990}
5991#[derive(Clone, PartialEq, ::prost::Message)]
5995pub struct Usage {
5996 #[prost(message, optional, tag = "1")]
5997 pub hardware: ::core::option::Option<HardwareUsage>,
5998 #[prost(message, optional, tag = "2")]
5999 pub inference: ::core::option::Option<InferenceUsage>,
6000}
6001#[derive(Clone, PartialEq, ::prost::Message)]
6002pub struct InferenceUsage {
6003 #[prost(map = "string, message", tag = "1")]
6004 pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
6005}
6006#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6007pub struct ModelUsage {
6008 #[prost(uint64, tag = "1")]
6009 pub tokens: u64,
6010}
6011#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6012pub struct HardwareUsage {
6013 #[prost(uint64, tag = "1")]
6014 pub cpu: u64,
6015 #[prost(uint64, tag = "2")]
6016 pub payload_io_read: u64,
6017 #[prost(uint64, tag = "3")]
6018 pub payload_io_write: u64,
6019 #[prost(uint64, tag = "4")]
6020 pub payload_index_io_read: u64,
6021 #[prost(uint64, tag = "5")]
6022 pub payload_index_io_write: u64,
6023 #[prost(uint64, tag = "6")]
6024 pub vector_io_read: u64,
6025 #[prost(uint64, tag = "7")]
6026 pub vector_io_write: u64,
6027}
6028#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6029#[repr(i32)]
6030pub enum WriteOrderingType {
6031 Weak = 0,
6033 Medium = 1,
6036 Strong = 2,
6039}
6040impl WriteOrderingType {
6041 pub fn as_str_name(&self) -> &'static str {
6046 match self {
6047 Self::Weak => "Weak",
6048 Self::Medium => "Medium",
6049 Self::Strong => "Strong",
6050 }
6051 }
6052 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6054 match value {
6055 "Weak" => Some(Self::Weak),
6056 "Medium" => Some(Self::Medium),
6057 "Strong" => Some(Self::Strong),
6058 _ => None,
6059 }
6060 }
6061}
6062#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6064#[repr(i32)]
6065pub enum UpdateMode {
6066 Upsert = 0,
6068 InsertOnly = 1,
6070 UpdateOnly = 2,
6072}
6073impl UpdateMode {
6074 pub fn as_str_name(&self) -> &'static str {
6079 match self {
6080 Self::Upsert => "Upsert",
6081 Self::InsertOnly => "InsertOnly",
6082 Self::UpdateOnly => "UpdateOnly",
6083 }
6084 }
6085 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6087 match value {
6088 "Upsert" => Some(Self::Upsert),
6089 "InsertOnly" => Some(Self::InsertOnly),
6090 "UpdateOnly" => Some(Self::UpdateOnly),
6091 _ => None,
6092 }
6093 }
6094}
6095#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6096#[repr(i32)]
6097pub enum ReadConsistencyType {
6098 All = 0,
6100 Majority = 1,
6102 Quorum = 2,
6104}
6105impl ReadConsistencyType {
6106 pub fn as_str_name(&self) -> &'static str {
6111 match self {
6112 Self::All => "All",
6113 Self::Majority => "Majority",
6114 Self::Quorum => "Quorum",
6115 }
6116 }
6117 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6119 match value {
6120 "All" => Some(Self::All),
6121 "Majority" => Some(Self::Majority),
6122 "Quorum" => Some(Self::Quorum),
6123 _ => None,
6124 }
6125 }
6126}
6127#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6128#[repr(i32)]
6129pub enum FieldType {
6130 Keyword = 0,
6131 Integer = 1,
6132 Float = 2,
6133 Geo = 3,
6134 Text = 4,
6135 Bool = 5,
6136 Datetime = 6,
6137 Uuid = 7,
6138}
6139impl FieldType {
6140 pub fn as_str_name(&self) -> &'static str {
6145 match self {
6146 Self::Keyword => "FieldTypeKeyword",
6147 Self::Integer => "FieldTypeInteger",
6148 Self::Float => "FieldTypeFloat",
6149 Self::Geo => "FieldTypeGeo",
6150 Self::Text => "FieldTypeText",
6151 Self::Bool => "FieldTypeBool",
6152 Self::Datetime => "FieldTypeDatetime",
6153 Self::Uuid => "FieldTypeUuid",
6154 }
6155 }
6156 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6158 match value {
6159 "FieldTypeKeyword" => Some(Self::Keyword),
6160 "FieldTypeInteger" => Some(Self::Integer),
6161 "FieldTypeFloat" => Some(Self::Float),
6162 "FieldTypeGeo" => Some(Self::Geo),
6163 "FieldTypeText" => Some(Self::Text),
6164 "FieldTypeBool" => Some(Self::Bool),
6165 "FieldTypeDatetime" => Some(Self::Datetime),
6166 "FieldTypeUuid" => Some(Self::Uuid),
6167 _ => None,
6168 }
6169 }
6170}
6171#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6172#[repr(i32)]
6173pub enum Direction {
6174 Asc = 0,
6175 Desc = 1,
6176}
6177impl Direction {
6178 pub fn as_str_name(&self) -> &'static str {
6183 match self {
6184 Self::Asc => "Asc",
6185 Self::Desc => "Desc",
6186 }
6187 }
6188 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6190 match value {
6191 "Asc" => Some(Self::Asc),
6192 "Desc" => Some(Self::Desc),
6193 _ => None,
6194 }
6195 }
6196}
6197#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6199#[repr(i32)]
6200pub enum RecommendStrategy {
6201 AverageVector = 0,
6204 BestScore = 1,
6208 SumScores = 2,
6211}
6212impl RecommendStrategy {
6213 pub fn as_str_name(&self) -> &'static str {
6218 match self {
6219 Self::AverageVector => "AverageVector",
6220 Self::BestScore => "BestScore",
6221 Self::SumScores => "SumScores",
6222 }
6223 }
6224 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6226 match value {
6227 "AverageVector" => Some(Self::AverageVector),
6228 "BestScore" => Some(Self::BestScore),
6229 "SumScores" => Some(Self::SumScores),
6230 _ => None,
6231 }
6232 }
6233}
6234#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6235#[repr(i32)]
6236pub enum Fusion {
6237 Rrf = 0,
6239 Dbsf = 1,
6241}
6242impl Fusion {
6243 pub fn as_str_name(&self) -> &'static str {
6248 match self {
6249 Self::Rrf => "RRF",
6250 Self::Dbsf => "DBSF",
6251 }
6252 }
6253 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6255 match value {
6256 "RRF" => Some(Self::Rrf),
6257 "DBSF" => Some(Self::Dbsf),
6258 _ => None,
6259 }
6260 }
6261}
6262#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6268#[repr(i32)]
6269pub enum Sample {
6270 Random = 0,
6271}
6272impl Sample {
6273 pub fn as_str_name(&self) -> &'static str {
6278 match self {
6279 Self::Random => "Random",
6280 }
6281 }
6282 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6284 match value {
6285 "Random" => Some(Self::Random),
6286 _ => None,
6287 }
6288 }
6289}
6290#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6291#[repr(i32)]
6292pub enum UpdateStatus {
6293 UnknownUpdateStatus = 0,
6294 Acknowledged = 1,
6296 Completed = 2,
6298 ClockRejected = 3,
6300 WaitTimeout = 4,
6302}
6303impl UpdateStatus {
6304 pub fn as_str_name(&self) -> &'static str {
6309 match self {
6310 Self::UnknownUpdateStatus => "UnknownUpdateStatus",
6311 Self::Acknowledged => "Acknowledged",
6312 Self::Completed => "Completed",
6313 Self::ClockRejected => "ClockRejected",
6314 Self::WaitTimeout => "WaitTimeout",
6315 }
6316 }
6317 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6319 match value {
6320 "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
6321 "Acknowledged" => Some(Self::Acknowledged),
6322 "Completed" => Some(Self::Completed),
6323 "ClockRejected" => Some(Self::ClockRejected),
6324 "WaitTimeout" => Some(Self::WaitTimeout),
6325 _ => None,
6326 }
6327 }
6328}
6329pub mod points_client {
6331 #![allow(
6332 unused_variables,
6333 dead_code,
6334 missing_docs,
6335 clippy::wildcard_imports,
6336 clippy::let_unit_value,
6337 )]
6338 use tonic::codegen::*;
6339 use tonic::codegen::http::Uri;
6340 #[derive(Debug, Clone)]
6341 pub struct PointsClient<T> {
6342 inner: tonic::client::Grpc<T>,
6343 }
6344 impl PointsClient<tonic::transport::Channel> {
6345 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
6347 where
6348 D: TryInto<tonic::transport::Endpoint>,
6349 D::Error: Into<StdError>,
6350 {
6351 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
6352 Ok(Self::new(conn))
6353 }
6354 }
6355 impl<T> PointsClient<T>
6356 where
6357 T: tonic::client::GrpcService<tonic::body::Body>,
6358 T::Error: Into<StdError>,
6359 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6360 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6361 {
6362 pub fn new(inner: T) -> Self {
6363 let inner = tonic::client::Grpc::new(inner);
6364 Self { inner }
6365 }
6366 pub fn with_origin(inner: T, origin: Uri) -> Self {
6367 let inner = tonic::client::Grpc::with_origin(inner, origin);
6368 Self { inner }
6369 }
6370 pub fn with_interceptor<F>(
6371 inner: T,
6372 interceptor: F,
6373 ) -> PointsClient<InterceptedService<T, F>>
6374 where
6375 F: tonic::service::Interceptor,
6376 T::ResponseBody: Default,
6377 T: tonic::codegen::Service<
6378 http::Request<tonic::body::Body>,
6379 Response = http::Response<
6380 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
6381 >,
6382 >,
6383 <T as tonic::codegen::Service<
6384 http::Request<tonic::body::Body>,
6385 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6386 {
6387 PointsClient::new(InterceptedService::new(inner, interceptor))
6388 }
6389 #[must_use]
6394 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6395 self.inner = self.inner.send_compressed(encoding);
6396 self
6397 }
6398 #[must_use]
6400 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6401 self.inner = self.inner.accept_compressed(encoding);
6402 self
6403 }
6404 #[must_use]
6408 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6409 self.inner = self.inner.max_decoding_message_size(limit);
6410 self
6411 }
6412 #[must_use]
6416 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6417 self.inner = self.inner.max_encoding_message_size(limit);
6418 self
6419 }
6420 pub async fn upsert(
6423 &mut self,
6424 request: impl tonic::IntoRequest<super::UpsertPoints>,
6425 ) -> std::result::Result<
6426 tonic::Response<super::PointsOperationResponse>,
6427 tonic::Status,
6428 > {
6429 self.inner
6430 .ready()
6431 .await
6432 .map_err(|e| {
6433 tonic::Status::unknown(
6434 format!("Service was not ready: {}", e.into()),
6435 )
6436 })?;
6437 let codec = tonic_prost::ProstCodec::default();
6438 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
6439 let mut req = request.into_request();
6440 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
6441 self.inner.unary(req, path, codec).await
6442 }
6443 pub async fn delete(
6445 &mut self,
6446 request: impl tonic::IntoRequest<super::DeletePoints>,
6447 ) -> std::result::Result<
6448 tonic::Response<super::PointsOperationResponse>,
6449 tonic::Status,
6450 > {
6451 self.inner
6452 .ready()
6453 .await
6454 .map_err(|e| {
6455 tonic::Status::unknown(
6456 format!("Service was not ready: {}", e.into()),
6457 )
6458 })?;
6459 let codec = tonic_prost::ProstCodec::default();
6460 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
6461 let mut req = request.into_request();
6462 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
6463 self.inner.unary(req, path, codec).await
6464 }
6465 pub async fn get(
6467 &mut self,
6468 request: impl tonic::IntoRequest<super::GetPoints>,
6469 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
6470 self.inner
6471 .ready()
6472 .await
6473 .map_err(|e| {
6474 tonic::Status::unknown(
6475 format!("Service was not ready: {}", e.into()),
6476 )
6477 })?;
6478 let codec = tonic_prost::ProstCodec::default();
6479 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
6480 let mut req = request.into_request();
6481 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
6482 self.inner.unary(req, path, codec).await
6483 }
6484 pub async fn update_vectors(
6486 &mut self,
6487 request: impl tonic::IntoRequest<super::UpdatePointVectors>,
6488 ) -> std::result::Result<
6489 tonic::Response<super::PointsOperationResponse>,
6490 tonic::Status,
6491 > {
6492 self.inner
6493 .ready()
6494 .await
6495 .map_err(|e| {
6496 tonic::Status::unknown(
6497 format!("Service was not ready: {}", e.into()),
6498 )
6499 })?;
6500 let codec = tonic_prost::ProstCodec::default();
6501 let path = http::uri::PathAndQuery::from_static(
6502 "/qdrant.Points/UpdateVectors",
6503 );
6504 let mut req = request.into_request();
6505 req.extensions_mut()
6506 .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
6507 self.inner.unary(req, path, codec).await
6508 }
6509 pub async fn delete_vectors(
6511 &mut self,
6512 request: impl tonic::IntoRequest<super::DeletePointVectors>,
6513 ) -> std::result::Result<
6514 tonic::Response<super::PointsOperationResponse>,
6515 tonic::Status,
6516 > {
6517 self.inner
6518 .ready()
6519 .await
6520 .map_err(|e| {
6521 tonic::Status::unknown(
6522 format!("Service was not ready: {}", e.into()),
6523 )
6524 })?;
6525 let codec = tonic_prost::ProstCodec::default();
6526 let path = http::uri::PathAndQuery::from_static(
6527 "/qdrant.Points/DeleteVectors",
6528 );
6529 let mut req = request.into_request();
6530 req.extensions_mut()
6531 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
6532 self.inner.unary(req, path, codec).await
6533 }
6534 pub async fn set_payload(
6536 &mut self,
6537 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6538 ) -> std::result::Result<
6539 tonic::Response<super::PointsOperationResponse>,
6540 tonic::Status,
6541 > {
6542 self.inner
6543 .ready()
6544 .await
6545 .map_err(|e| {
6546 tonic::Status::unknown(
6547 format!("Service was not ready: {}", e.into()),
6548 )
6549 })?;
6550 let codec = tonic_prost::ProstCodec::default();
6551 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
6552 let mut req = request.into_request();
6553 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
6554 self.inner.unary(req, path, codec).await
6555 }
6556 pub async fn overwrite_payload(
6558 &mut self,
6559 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6560 ) -> std::result::Result<
6561 tonic::Response<super::PointsOperationResponse>,
6562 tonic::Status,
6563 > {
6564 self.inner
6565 .ready()
6566 .await
6567 .map_err(|e| {
6568 tonic::Status::unknown(
6569 format!("Service was not ready: {}", e.into()),
6570 )
6571 })?;
6572 let codec = tonic_prost::ProstCodec::default();
6573 let path = http::uri::PathAndQuery::from_static(
6574 "/qdrant.Points/OverwritePayload",
6575 );
6576 let mut req = request.into_request();
6577 req.extensions_mut()
6578 .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
6579 self.inner.unary(req, path, codec).await
6580 }
6581 pub async fn delete_payload(
6583 &mut self,
6584 request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
6585 ) -> std::result::Result<
6586 tonic::Response<super::PointsOperationResponse>,
6587 tonic::Status,
6588 > {
6589 self.inner
6590 .ready()
6591 .await
6592 .map_err(|e| {
6593 tonic::Status::unknown(
6594 format!("Service was not ready: {}", e.into()),
6595 )
6596 })?;
6597 let codec = tonic_prost::ProstCodec::default();
6598 let path = http::uri::PathAndQuery::from_static(
6599 "/qdrant.Points/DeletePayload",
6600 );
6601 let mut req = request.into_request();
6602 req.extensions_mut()
6603 .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
6604 self.inner.unary(req, path, codec).await
6605 }
6606 pub async fn clear_payload(
6608 &mut self,
6609 request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
6610 ) -> std::result::Result<
6611 tonic::Response<super::PointsOperationResponse>,
6612 tonic::Status,
6613 > {
6614 self.inner
6615 .ready()
6616 .await
6617 .map_err(|e| {
6618 tonic::Status::unknown(
6619 format!("Service was not ready: {}", e.into()),
6620 )
6621 })?;
6622 let codec = tonic_prost::ProstCodec::default();
6623 let path = http::uri::PathAndQuery::from_static(
6624 "/qdrant.Points/ClearPayload",
6625 );
6626 let mut req = request.into_request();
6627 req.extensions_mut()
6628 .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
6629 self.inner.unary(req, path, codec).await
6630 }
6631 pub async fn create_field_index(
6633 &mut self,
6634 request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
6635 ) -> std::result::Result<
6636 tonic::Response<super::PointsOperationResponse>,
6637 tonic::Status,
6638 > {
6639 self.inner
6640 .ready()
6641 .await
6642 .map_err(|e| {
6643 tonic::Status::unknown(
6644 format!("Service was not ready: {}", e.into()),
6645 )
6646 })?;
6647 let codec = tonic_prost::ProstCodec::default();
6648 let path = http::uri::PathAndQuery::from_static(
6649 "/qdrant.Points/CreateFieldIndex",
6650 );
6651 let mut req = request.into_request();
6652 req.extensions_mut()
6653 .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
6654 self.inner.unary(req, path, codec).await
6655 }
6656 pub async fn delete_field_index(
6658 &mut self,
6659 request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
6660 ) -> std::result::Result<
6661 tonic::Response<super::PointsOperationResponse>,
6662 tonic::Status,
6663 > {
6664 self.inner
6665 .ready()
6666 .await
6667 .map_err(|e| {
6668 tonic::Status::unknown(
6669 format!("Service was not ready: {}", e.into()),
6670 )
6671 })?;
6672 let codec = tonic_prost::ProstCodec::default();
6673 let path = http::uri::PathAndQuery::from_static(
6674 "/qdrant.Points/DeleteFieldIndex",
6675 );
6676 let mut req = request.into_request();
6677 req.extensions_mut()
6678 .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
6679 self.inner.unary(req, path, codec).await
6680 }
6681 pub async fn create_vector_name(
6683 &mut self,
6684 request: impl tonic::IntoRequest<super::CreateVectorNameRequest>,
6685 ) -> std::result::Result<
6686 tonic::Response<super::PointsOperationResponse>,
6687 tonic::Status,
6688 > {
6689 self.inner
6690 .ready()
6691 .await
6692 .map_err(|e| {
6693 tonic::Status::unknown(
6694 format!("Service was not ready: {}", e.into()),
6695 )
6696 })?;
6697 let codec = tonic_prost::ProstCodec::default();
6698 let path = http::uri::PathAndQuery::from_static(
6699 "/qdrant.Points/CreateVectorName",
6700 );
6701 let mut req = request.into_request();
6702 req.extensions_mut()
6703 .insert(GrpcMethod::new("qdrant.Points", "CreateVectorName"));
6704 self.inner.unary(req, path, codec).await
6705 }
6706 pub async fn delete_vector_name(
6708 &mut self,
6709 request: impl tonic::IntoRequest<super::DeleteVectorNameRequest>,
6710 ) -> std::result::Result<
6711 tonic::Response<super::PointsOperationResponse>,
6712 tonic::Status,
6713 > {
6714 self.inner
6715 .ready()
6716 .await
6717 .map_err(|e| {
6718 tonic::Status::unknown(
6719 format!("Service was not ready: {}", e.into()),
6720 )
6721 })?;
6722 let codec = tonic_prost::ProstCodec::default();
6723 let path = http::uri::PathAndQuery::from_static(
6724 "/qdrant.Points/DeleteVectorName",
6725 );
6726 let mut req = request.into_request();
6727 req.extensions_mut()
6728 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectorName"));
6729 self.inner.unary(req, path, codec).await
6730 }
6731 #[deprecated]
6736 pub async fn search(
6737 &mut self,
6738 request: impl tonic::IntoRequest<super::SearchPoints>,
6739 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
6740 self.inner
6741 .ready()
6742 .await
6743 .map_err(|e| {
6744 tonic::Status::unknown(
6745 format!("Service was not ready: {}", e.into()),
6746 )
6747 })?;
6748 let codec = tonic_prost::ProstCodec::default();
6749 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
6750 let mut req = request.into_request();
6751 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
6752 self.inner.unary(req, path, codec).await
6753 }
6754 #[deprecated]
6759 pub async fn search_batch(
6760 &mut self,
6761 request: impl tonic::IntoRequest<super::SearchBatchPoints>,
6762 ) -> std::result::Result<
6763 tonic::Response<super::SearchBatchResponse>,
6764 tonic::Status,
6765 > {
6766 self.inner
6767 .ready()
6768 .await
6769 .map_err(|e| {
6770 tonic::Status::unknown(
6771 format!("Service was not ready: {}", e.into()),
6772 )
6773 })?;
6774 let codec = tonic_prost::ProstCodec::default();
6775 let path = http::uri::PathAndQuery::from_static(
6776 "/qdrant.Points/SearchBatch",
6777 );
6778 let mut req = request.into_request();
6779 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
6780 self.inner.unary(req, path, codec).await
6781 }
6782 #[deprecated]
6787 pub async fn search_groups(
6788 &mut self,
6789 request: impl tonic::IntoRequest<super::SearchPointGroups>,
6790 ) -> std::result::Result<
6791 tonic::Response<super::SearchGroupsResponse>,
6792 tonic::Status,
6793 > {
6794 self.inner
6795 .ready()
6796 .await
6797 .map_err(|e| {
6798 tonic::Status::unknown(
6799 format!("Service was not ready: {}", e.into()),
6800 )
6801 })?;
6802 let codec = tonic_prost::ProstCodec::default();
6803 let path = http::uri::PathAndQuery::from_static(
6804 "/qdrant.Points/SearchGroups",
6805 );
6806 let mut req = request.into_request();
6807 req.extensions_mut()
6808 .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
6809 self.inner.unary(req, path, codec).await
6810 }
6811 pub async fn scroll(
6813 &mut self,
6814 request: impl tonic::IntoRequest<super::ScrollPoints>,
6815 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
6816 self.inner
6817 .ready()
6818 .await
6819 .map_err(|e| {
6820 tonic::Status::unknown(
6821 format!("Service was not ready: {}", e.into()),
6822 )
6823 })?;
6824 let codec = tonic_prost::ProstCodec::default();
6825 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
6826 let mut req = request.into_request();
6827 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
6828 self.inner.unary(req, path, codec).await
6829 }
6830 #[deprecated]
6835 pub async fn recommend(
6836 &mut self,
6837 request: impl tonic::IntoRequest<super::RecommendPoints>,
6838 ) -> std::result::Result<
6839 tonic::Response<super::RecommendResponse>,
6840 tonic::Status,
6841 > {
6842 self.inner
6843 .ready()
6844 .await
6845 .map_err(|e| {
6846 tonic::Status::unknown(
6847 format!("Service was not ready: {}", e.into()),
6848 )
6849 })?;
6850 let codec = tonic_prost::ProstCodec::default();
6851 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
6852 let mut req = request.into_request();
6853 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
6854 self.inner.unary(req, path, codec).await
6855 }
6856 #[deprecated]
6861 pub async fn recommend_batch(
6862 &mut self,
6863 request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
6864 ) -> std::result::Result<
6865 tonic::Response<super::RecommendBatchResponse>,
6866 tonic::Status,
6867 > {
6868 self.inner
6869 .ready()
6870 .await
6871 .map_err(|e| {
6872 tonic::Status::unknown(
6873 format!("Service was not ready: {}", e.into()),
6874 )
6875 })?;
6876 let codec = tonic_prost::ProstCodec::default();
6877 let path = http::uri::PathAndQuery::from_static(
6878 "/qdrant.Points/RecommendBatch",
6879 );
6880 let mut req = request.into_request();
6881 req.extensions_mut()
6882 .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
6883 self.inner.unary(req, path, codec).await
6884 }
6885 #[deprecated]
6890 pub async fn recommend_groups(
6891 &mut self,
6892 request: impl tonic::IntoRequest<super::RecommendPointGroups>,
6893 ) -> std::result::Result<
6894 tonic::Response<super::RecommendGroupsResponse>,
6895 tonic::Status,
6896 > {
6897 self.inner
6898 .ready()
6899 .await
6900 .map_err(|e| {
6901 tonic::Status::unknown(
6902 format!("Service was not ready: {}", e.into()),
6903 )
6904 })?;
6905 let codec = tonic_prost::ProstCodec::default();
6906 let path = http::uri::PathAndQuery::from_static(
6907 "/qdrant.Points/RecommendGroups",
6908 );
6909 let mut req = request.into_request();
6910 req.extensions_mut()
6911 .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
6912 self.inner.unary(req, path, codec).await
6913 }
6914 #[deprecated]
6936 pub async fn discover(
6937 &mut self,
6938 request: impl tonic::IntoRequest<super::DiscoverPoints>,
6939 ) -> std::result::Result<
6940 tonic::Response<super::DiscoverResponse>,
6941 tonic::Status,
6942 > {
6943 self.inner
6944 .ready()
6945 .await
6946 .map_err(|e| {
6947 tonic::Status::unknown(
6948 format!("Service was not ready: {}", e.into()),
6949 )
6950 })?;
6951 let codec = tonic_prost::ProstCodec::default();
6952 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
6953 let mut req = request.into_request();
6954 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
6955 self.inner.unary(req, path, codec).await
6956 }
6957 #[deprecated]
6961 pub async fn discover_batch(
6962 &mut self,
6963 request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
6964 ) -> std::result::Result<
6965 tonic::Response<super::DiscoverBatchResponse>,
6966 tonic::Status,
6967 > {
6968 self.inner
6969 .ready()
6970 .await
6971 .map_err(|e| {
6972 tonic::Status::unknown(
6973 format!("Service was not ready: {}", e.into()),
6974 )
6975 })?;
6976 let codec = tonic_prost::ProstCodec::default();
6977 let path = http::uri::PathAndQuery::from_static(
6978 "/qdrant.Points/DiscoverBatch",
6979 );
6980 let mut req = request.into_request();
6981 req.extensions_mut()
6982 .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
6983 self.inner.unary(req, path, codec).await
6984 }
6985 pub async fn count(
6987 &mut self,
6988 request: impl tonic::IntoRequest<super::CountPoints>,
6989 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
6990 self.inner
6991 .ready()
6992 .await
6993 .map_err(|e| {
6994 tonic::Status::unknown(
6995 format!("Service was not ready: {}", e.into()),
6996 )
6997 })?;
6998 let codec = tonic_prost::ProstCodec::default();
6999 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
7000 let mut req = request.into_request();
7001 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
7002 self.inner.unary(req, path, codec).await
7003 }
7004 pub async fn update_batch(
7006 &mut self,
7007 request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
7008 ) -> std::result::Result<
7009 tonic::Response<super::UpdateBatchResponse>,
7010 tonic::Status,
7011 > {
7012 self.inner
7013 .ready()
7014 .await
7015 .map_err(|e| {
7016 tonic::Status::unknown(
7017 format!("Service was not ready: {}", e.into()),
7018 )
7019 })?;
7020 let codec = tonic_prost::ProstCodec::default();
7021 let path = http::uri::PathAndQuery::from_static(
7022 "/qdrant.Points/UpdateBatch",
7023 );
7024 let mut req = request.into_request();
7025 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
7026 self.inner.unary(req, path, codec).await
7027 }
7028 pub async fn query(
7032 &mut self,
7033 request: impl tonic::IntoRequest<super::QueryPoints>,
7034 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
7035 self.inner
7036 .ready()
7037 .await
7038 .map_err(|e| {
7039 tonic::Status::unknown(
7040 format!("Service was not ready: {}", e.into()),
7041 )
7042 })?;
7043 let codec = tonic_prost::ProstCodec::default();
7044 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
7045 let mut req = request.into_request();
7046 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
7047 self.inner.unary(req, path, codec).await
7048 }
7049 pub async fn query_batch(
7053 &mut self,
7054 request: impl tonic::IntoRequest<super::QueryBatchPoints>,
7055 ) -> std::result::Result<
7056 tonic::Response<super::QueryBatchResponse>,
7057 tonic::Status,
7058 > {
7059 self.inner
7060 .ready()
7061 .await
7062 .map_err(|e| {
7063 tonic::Status::unknown(
7064 format!("Service was not ready: {}", e.into()),
7065 )
7066 })?;
7067 let codec = tonic_prost::ProstCodec::default();
7068 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
7069 let mut req = request.into_request();
7070 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
7071 self.inner.unary(req, path, codec).await
7072 }
7073 pub async fn query_groups(
7077 &mut self,
7078 request: impl tonic::IntoRequest<super::QueryPointGroups>,
7079 ) -> std::result::Result<
7080 tonic::Response<super::QueryGroupsResponse>,
7081 tonic::Status,
7082 > {
7083 self.inner
7084 .ready()
7085 .await
7086 .map_err(|e| {
7087 tonic::Status::unknown(
7088 format!("Service was not ready: {}", e.into()),
7089 )
7090 })?;
7091 let codec = tonic_prost::ProstCodec::default();
7092 let path = http::uri::PathAndQuery::from_static(
7093 "/qdrant.Points/QueryGroups",
7094 );
7095 let mut req = request.into_request();
7096 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
7097 self.inner.unary(req, path, codec).await
7098 }
7099 pub async fn facet(
7103 &mut self,
7104 request: impl tonic::IntoRequest<super::FacetCounts>,
7105 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
7106 self.inner
7107 .ready()
7108 .await
7109 .map_err(|e| {
7110 tonic::Status::unknown(
7111 format!("Service was not ready: {}", e.into()),
7112 )
7113 })?;
7114 let codec = tonic_prost::ProstCodec::default();
7115 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
7116 let mut req = request.into_request();
7117 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
7118 self.inner.unary(req, path, codec).await
7119 }
7120 pub async fn search_matrix_pairs(
7122 &mut self,
7123 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
7124 ) -> std::result::Result<
7125 tonic::Response<super::SearchMatrixPairsResponse>,
7126 tonic::Status,
7127 > {
7128 self.inner
7129 .ready()
7130 .await
7131 .map_err(|e| {
7132 tonic::Status::unknown(
7133 format!("Service was not ready: {}", e.into()),
7134 )
7135 })?;
7136 let codec = tonic_prost::ProstCodec::default();
7137 let path = http::uri::PathAndQuery::from_static(
7138 "/qdrant.Points/SearchMatrixPairs",
7139 );
7140 let mut req = request.into_request();
7141 req.extensions_mut()
7142 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
7143 self.inner.unary(req, path, codec).await
7144 }
7145 pub async fn search_matrix_offsets(
7147 &mut self,
7148 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
7149 ) -> std::result::Result<
7150 tonic::Response<super::SearchMatrixOffsetsResponse>,
7151 tonic::Status,
7152 > {
7153 self.inner
7154 .ready()
7155 .await
7156 .map_err(|e| {
7157 tonic::Status::unknown(
7158 format!("Service was not ready: {}", e.into()),
7159 )
7160 })?;
7161 let codec = tonic_prost::ProstCodec::default();
7162 let path = http::uri::PathAndQuery::from_static(
7163 "/qdrant.Points/SearchMatrixOffsets",
7164 );
7165 let mut req = request.into_request();
7166 req.extensions_mut()
7167 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
7168 self.inner.unary(req, path, codec).await
7169 }
7170 }
7171}
7172pub mod points_server {
7174 #![allow(
7175 unused_variables,
7176 dead_code,
7177 missing_docs,
7178 clippy::wildcard_imports,
7179 clippy::let_unit_value,
7180 )]
7181 use tonic::codegen::*;
7182 #[async_trait]
7184 pub trait Points: std::marker::Send + std::marker::Sync + 'static {
7185 async fn upsert(
7188 &self,
7189 request: tonic::Request<super::UpsertPoints>,
7190 ) -> std::result::Result<
7191 tonic::Response<super::PointsOperationResponse>,
7192 tonic::Status,
7193 >;
7194 async fn delete(
7196 &self,
7197 request: tonic::Request<super::DeletePoints>,
7198 ) -> std::result::Result<
7199 tonic::Response<super::PointsOperationResponse>,
7200 tonic::Status,
7201 >;
7202 async fn get(
7204 &self,
7205 request: tonic::Request<super::GetPoints>,
7206 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
7207 async fn update_vectors(
7209 &self,
7210 request: tonic::Request<super::UpdatePointVectors>,
7211 ) -> std::result::Result<
7212 tonic::Response<super::PointsOperationResponse>,
7213 tonic::Status,
7214 >;
7215 async fn delete_vectors(
7217 &self,
7218 request: tonic::Request<super::DeletePointVectors>,
7219 ) -> std::result::Result<
7220 tonic::Response<super::PointsOperationResponse>,
7221 tonic::Status,
7222 >;
7223 async fn set_payload(
7225 &self,
7226 request: tonic::Request<super::SetPayloadPoints>,
7227 ) -> std::result::Result<
7228 tonic::Response<super::PointsOperationResponse>,
7229 tonic::Status,
7230 >;
7231 async fn overwrite_payload(
7233 &self,
7234 request: tonic::Request<super::SetPayloadPoints>,
7235 ) -> std::result::Result<
7236 tonic::Response<super::PointsOperationResponse>,
7237 tonic::Status,
7238 >;
7239 async fn delete_payload(
7241 &self,
7242 request: tonic::Request<super::DeletePayloadPoints>,
7243 ) -> std::result::Result<
7244 tonic::Response<super::PointsOperationResponse>,
7245 tonic::Status,
7246 >;
7247 async fn clear_payload(
7249 &self,
7250 request: tonic::Request<super::ClearPayloadPoints>,
7251 ) -> std::result::Result<
7252 tonic::Response<super::PointsOperationResponse>,
7253 tonic::Status,
7254 >;
7255 async fn create_field_index(
7257 &self,
7258 request: tonic::Request<super::CreateFieldIndexCollection>,
7259 ) -> std::result::Result<
7260 tonic::Response<super::PointsOperationResponse>,
7261 tonic::Status,
7262 >;
7263 async fn delete_field_index(
7265 &self,
7266 request: tonic::Request<super::DeleteFieldIndexCollection>,
7267 ) -> std::result::Result<
7268 tonic::Response<super::PointsOperationResponse>,
7269 tonic::Status,
7270 >;
7271 async fn create_vector_name(
7273 &self,
7274 request: tonic::Request<super::CreateVectorNameRequest>,
7275 ) -> std::result::Result<
7276 tonic::Response<super::PointsOperationResponse>,
7277 tonic::Status,
7278 >;
7279 async fn delete_vector_name(
7281 &self,
7282 request: tonic::Request<super::DeleteVectorNameRequest>,
7283 ) -> std::result::Result<
7284 tonic::Response<super::PointsOperationResponse>,
7285 tonic::Status,
7286 >;
7287 async fn search(
7292 &self,
7293 request: tonic::Request<super::SearchPoints>,
7294 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
7295 async fn search_batch(
7300 &self,
7301 request: tonic::Request<super::SearchBatchPoints>,
7302 ) -> std::result::Result<
7303 tonic::Response<super::SearchBatchResponse>,
7304 tonic::Status,
7305 >;
7306 async fn search_groups(
7311 &self,
7312 request: tonic::Request<super::SearchPointGroups>,
7313 ) -> std::result::Result<
7314 tonic::Response<super::SearchGroupsResponse>,
7315 tonic::Status,
7316 >;
7317 async fn scroll(
7319 &self,
7320 request: tonic::Request<super::ScrollPoints>,
7321 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
7322 async fn recommend(
7327 &self,
7328 request: tonic::Request<super::RecommendPoints>,
7329 ) -> std::result::Result<
7330 tonic::Response<super::RecommendResponse>,
7331 tonic::Status,
7332 >;
7333 async fn recommend_batch(
7338 &self,
7339 request: tonic::Request<super::RecommendBatchPoints>,
7340 ) -> std::result::Result<
7341 tonic::Response<super::RecommendBatchResponse>,
7342 tonic::Status,
7343 >;
7344 async fn recommend_groups(
7349 &self,
7350 request: tonic::Request<super::RecommendPointGroups>,
7351 ) -> std::result::Result<
7352 tonic::Response<super::RecommendGroupsResponse>,
7353 tonic::Status,
7354 >;
7355 async fn discover(
7377 &self,
7378 request: tonic::Request<super::DiscoverPoints>,
7379 ) -> std::result::Result<
7380 tonic::Response<super::DiscoverResponse>,
7381 tonic::Status,
7382 >;
7383 async fn discover_batch(
7387 &self,
7388 request: tonic::Request<super::DiscoverBatchPoints>,
7389 ) -> std::result::Result<
7390 tonic::Response<super::DiscoverBatchResponse>,
7391 tonic::Status,
7392 >;
7393 async fn count(
7395 &self,
7396 request: tonic::Request<super::CountPoints>,
7397 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
7398 async fn update_batch(
7400 &self,
7401 request: tonic::Request<super::UpdateBatchPoints>,
7402 ) -> std::result::Result<
7403 tonic::Response<super::UpdateBatchResponse>,
7404 tonic::Status,
7405 >;
7406 async fn query(
7410 &self,
7411 request: tonic::Request<super::QueryPoints>,
7412 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
7413 async fn query_batch(
7417 &self,
7418 request: tonic::Request<super::QueryBatchPoints>,
7419 ) -> std::result::Result<
7420 tonic::Response<super::QueryBatchResponse>,
7421 tonic::Status,
7422 >;
7423 async fn query_groups(
7427 &self,
7428 request: tonic::Request<super::QueryPointGroups>,
7429 ) -> std::result::Result<
7430 tonic::Response<super::QueryGroupsResponse>,
7431 tonic::Status,
7432 >;
7433 async fn facet(
7437 &self,
7438 request: tonic::Request<super::FacetCounts>,
7439 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
7440 async fn search_matrix_pairs(
7442 &self,
7443 request: tonic::Request<super::SearchMatrixPoints>,
7444 ) -> std::result::Result<
7445 tonic::Response<super::SearchMatrixPairsResponse>,
7446 tonic::Status,
7447 >;
7448 async fn search_matrix_offsets(
7450 &self,
7451 request: tonic::Request<super::SearchMatrixPoints>,
7452 ) -> std::result::Result<
7453 tonic::Response<super::SearchMatrixOffsetsResponse>,
7454 tonic::Status,
7455 >;
7456 }
7457 #[derive(Debug)]
7458 pub struct PointsServer<T> {
7459 inner: Arc<T>,
7460 accept_compression_encodings: EnabledCompressionEncodings,
7461 send_compression_encodings: EnabledCompressionEncodings,
7462 max_decoding_message_size: Option<usize>,
7463 max_encoding_message_size: Option<usize>,
7464 }
7465 impl<T> PointsServer<T> {
7466 pub fn new(inner: T) -> Self {
7467 Self::from_arc(Arc::new(inner))
7468 }
7469 pub fn from_arc(inner: Arc<T>) -> Self {
7470 Self {
7471 inner,
7472 accept_compression_encodings: Default::default(),
7473 send_compression_encodings: Default::default(),
7474 max_decoding_message_size: None,
7475 max_encoding_message_size: None,
7476 }
7477 }
7478 pub fn with_interceptor<F>(
7479 inner: T,
7480 interceptor: F,
7481 ) -> InterceptedService<Self, F>
7482 where
7483 F: tonic::service::Interceptor,
7484 {
7485 InterceptedService::new(Self::new(inner), interceptor)
7486 }
7487 #[must_use]
7489 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7490 self.accept_compression_encodings.enable(encoding);
7491 self
7492 }
7493 #[must_use]
7495 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7496 self.send_compression_encodings.enable(encoding);
7497 self
7498 }
7499 #[must_use]
7503 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7504 self.max_decoding_message_size = Some(limit);
7505 self
7506 }
7507 #[must_use]
7511 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7512 self.max_encoding_message_size = Some(limit);
7513 self
7514 }
7515 }
7516 impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
7517 where
7518 T: Points,
7519 B: Body + std::marker::Send + 'static,
7520 B::Error: Into<StdError> + std::marker::Send + 'static,
7521 {
7522 type Response = http::Response<tonic::body::Body>;
7523 type Error = std::convert::Infallible;
7524 type Future = BoxFuture<Self::Response, Self::Error>;
7525 fn poll_ready(
7526 &mut self,
7527 _cx: &mut Context<'_>,
7528 ) -> Poll<std::result::Result<(), Self::Error>> {
7529 Poll::Ready(Ok(()))
7530 }
7531 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7532 match req.uri().path() {
7533 "/qdrant.Points/Upsert" => {
7534 #[allow(non_camel_case_types)]
7535 struct UpsertSvc<T: Points>(pub Arc<T>);
7536 impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
7537 for UpsertSvc<T> {
7538 type Response = super::PointsOperationResponse;
7539 type Future = BoxFuture<
7540 tonic::Response<Self::Response>,
7541 tonic::Status,
7542 >;
7543 fn call(
7544 &mut self,
7545 request: tonic::Request<super::UpsertPoints>,
7546 ) -> Self::Future {
7547 let inner = Arc::clone(&self.0);
7548 let fut = async move {
7549 <T as Points>::upsert(&inner, request).await
7550 };
7551 Box::pin(fut)
7552 }
7553 }
7554 let accept_compression_encodings = self.accept_compression_encodings;
7555 let send_compression_encodings = self.send_compression_encodings;
7556 let max_decoding_message_size = self.max_decoding_message_size;
7557 let max_encoding_message_size = self.max_encoding_message_size;
7558 let inner = self.inner.clone();
7559 let fut = async move {
7560 let method = UpsertSvc(inner);
7561 let codec = tonic_prost::ProstCodec::default();
7562 let mut grpc = tonic::server::Grpc::new(codec)
7563 .apply_compression_config(
7564 accept_compression_encodings,
7565 send_compression_encodings,
7566 )
7567 .apply_max_message_size_config(
7568 max_decoding_message_size,
7569 max_encoding_message_size,
7570 );
7571 let res = grpc.unary(method, req).await;
7572 Ok(res)
7573 };
7574 Box::pin(fut)
7575 }
7576 "/qdrant.Points/Delete" => {
7577 #[allow(non_camel_case_types)]
7578 struct DeleteSvc<T: Points>(pub Arc<T>);
7579 impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
7580 for DeleteSvc<T> {
7581 type Response = super::PointsOperationResponse;
7582 type Future = BoxFuture<
7583 tonic::Response<Self::Response>,
7584 tonic::Status,
7585 >;
7586 fn call(
7587 &mut self,
7588 request: tonic::Request<super::DeletePoints>,
7589 ) -> Self::Future {
7590 let inner = Arc::clone(&self.0);
7591 let fut = async move {
7592 <T as Points>::delete(&inner, request).await
7593 };
7594 Box::pin(fut)
7595 }
7596 }
7597 let accept_compression_encodings = self.accept_compression_encodings;
7598 let send_compression_encodings = self.send_compression_encodings;
7599 let max_decoding_message_size = self.max_decoding_message_size;
7600 let max_encoding_message_size = self.max_encoding_message_size;
7601 let inner = self.inner.clone();
7602 let fut = async move {
7603 let method = DeleteSvc(inner);
7604 let codec = tonic_prost::ProstCodec::default();
7605 let mut grpc = tonic::server::Grpc::new(codec)
7606 .apply_compression_config(
7607 accept_compression_encodings,
7608 send_compression_encodings,
7609 )
7610 .apply_max_message_size_config(
7611 max_decoding_message_size,
7612 max_encoding_message_size,
7613 );
7614 let res = grpc.unary(method, req).await;
7615 Ok(res)
7616 };
7617 Box::pin(fut)
7618 }
7619 "/qdrant.Points/Get" => {
7620 #[allow(non_camel_case_types)]
7621 struct GetSvc<T: Points>(pub Arc<T>);
7622 impl<T: Points> tonic::server::UnaryService<super::GetPoints>
7623 for GetSvc<T> {
7624 type Response = super::GetResponse;
7625 type Future = BoxFuture<
7626 tonic::Response<Self::Response>,
7627 tonic::Status,
7628 >;
7629 fn call(
7630 &mut self,
7631 request: tonic::Request<super::GetPoints>,
7632 ) -> Self::Future {
7633 let inner = Arc::clone(&self.0);
7634 let fut = async move {
7635 <T as Points>::get(&inner, request).await
7636 };
7637 Box::pin(fut)
7638 }
7639 }
7640 let accept_compression_encodings = self.accept_compression_encodings;
7641 let send_compression_encodings = self.send_compression_encodings;
7642 let max_decoding_message_size = self.max_decoding_message_size;
7643 let max_encoding_message_size = self.max_encoding_message_size;
7644 let inner = self.inner.clone();
7645 let fut = async move {
7646 let method = GetSvc(inner);
7647 let codec = tonic_prost::ProstCodec::default();
7648 let mut grpc = tonic::server::Grpc::new(codec)
7649 .apply_compression_config(
7650 accept_compression_encodings,
7651 send_compression_encodings,
7652 )
7653 .apply_max_message_size_config(
7654 max_decoding_message_size,
7655 max_encoding_message_size,
7656 );
7657 let res = grpc.unary(method, req).await;
7658 Ok(res)
7659 };
7660 Box::pin(fut)
7661 }
7662 "/qdrant.Points/UpdateVectors" => {
7663 #[allow(non_camel_case_types)]
7664 struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
7665 impl<
7666 T: Points,
7667 > tonic::server::UnaryService<super::UpdatePointVectors>
7668 for UpdateVectorsSvc<T> {
7669 type Response = super::PointsOperationResponse;
7670 type Future = BoxFuture<
7671 tonic::Response<Self::Response>,
7672 tonic::Status,
7673 >;
7674 fn call(
7675 &mut self,
7676 request: tonic::Request<super::UpdatePointVectors>,
7677 ) -> Self::Future {
7678 let inner = Arc::clone(&self.0);
7679 let fut = async move {
7680 <T as Points>::update_vectors(&inner, request).await
7681 };
7682 Box::pin(fut)
7683 }
7684 }
7685 let accept_compression_encodings = self.accept_compression_encodings;
7686 let send_compression_encodings = self.send_compression_encodings;
7687 let max_decoding_message_size = self.max_decoding_message_size;
7688 let max_encoding_message_size = self.max_encoding_message_size;
7689 let inner = self.inner.clone();
7690 let fut = async move {
7691 let method = UpdateVectorsSvc(inner);
7692 let codec = tonic_prost::ProstCodec::default();
7693 let mut grpc = tonic::server::Grpc::new(codec)
7694 .apply_compression_config(
7695 accept_compression_encodings,
7696 send_compression_encodings,
7697 )
7698 .apply_max_message_size_config(
7699 max_decoding_message_size,
7700 max_encoding_message_size,
7701 );
7702 let res = grpc.unary(method, req).await;
7703 Ok(res)
7704 };
7705 Box::pin(fut)
7706 }
7707 "/qdrant.Points/DeleteVectors" => {
7708 #[allow(non_camel_case_types)]
7709 struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
7710 impl<
7711 T: Points,
7712 > tonic::server::UnaryService<super::DeletePointVectors>
7713 for DeleteVectorsSvc<T> {
7714 type Response = super::PointsOperationResponse;
7715 type Future = BoxFuture<
7716 tonic::Response<Self::Response>,
7717 tonic::Status,
7718 >;
7719 fn call(
7720 &mut self,
7721 request: tonic::Request<super::DeletePointVectors>,
7722 ) -> Self::Future {
7723 let inner = Arc::clone(&self.0);
7724 let fut = async move {
7725 <T as Points>::delete_vectors(&inner, request).await
7726 };
7727 Box::pin(fut)
7728 }
7729 }
7730 let accept_compression_encodings = self.accept_compression_encodings;
7731 let send_compression_encodings = self.send_compression_encodings;
7732 let max_decoding_message_size = self.max_decoding_message_size;
7733 let max_encoding_message_size = self.max_encoding_message_size;
7734 let inner = self.inner.clone();
7735 let fut = async move {
7736 let method = DeleteVectorsSvc(inner);
7737 let codec = tonic_prost::ProstCodec::default();
7738 let mut grpc = tonic::server::Grpc::new(codec)
7739 .apply_compression_config(
7740 accept_compression_encodings,
7741 send_compression_encodings,
7742 )
7743 .apply_max_message_size_config(
7744 max_decoding_message_size,
7745 max_encoding_message_size,
7746 );
7747 let res = grpc.unary(method, req).await;
7748 Ok(res)
7749 };
7750 Box::pin(fut)
7751 }
7752 "/qdrant.Points/SetPayload" => {
7753 #[allow(non_camel_case_types)]
7754 struct SetPayloadSvc<T: Points>(pub Arc<T>);
7755 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7756 for SetPayloadSvc<T> {
7757 type Response = super::PointsOperationResponse;
7758 type Future = BoxFuture<
7759 tonic::Response<Self::Response>,
7760 tonic::Status,
7761 >;
7762 fn call(
7763 &mut self,
7764 request: tonic::Request<super::SetPayloadPoints>,
7765 ) -> Self::Future {
7766 let inner = Arc::clone(&self.0);
7767 let fut = async move {
7768 <T as Points>::set_payload(&inner, request).await
7769 };
7770 Box::pin(fut)
7771 }
7772 }
7773 let accept_compression_encodings = self.accept_compression_encodings;
7774 let send_compression_encodings = self.send_compression_encodings;
7775 let max_decoding_message_size = self.max_decoding_message_size;
7776 let max_encoding_message_size = self.max_encoding_message_size;
7777 let inner = self.inner.clone();
7778 let fut = async move {
7779 let method = SetPayloadSvc(inner);
7780 let codec = tonic_prost::ProstCodec::default();
7781 let mut grpc = tonic::server::Grpc::new(codec)
7782 .apply_compression_config(
7783 accept_compression_encodings,
7784 send_compression_encodings,
7785 )
7786 .apply_max_message_size_config(
7787 max_decoding_message_size,
7788 max_encoding_message_size,
7789 );
7790 let res = grpc.unary(method, req).await;
7791 Ok(res)
7792 };
7793 Box::pin(fut)
7794 }
7795 "/qdrant.Points/OverwritePayload" => {
7796 #[allow(non_camel_case_types)]
7797 struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
7798 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7799 for OverwritePayloadSvc<T> {
7800 type Response = super::PointsOperationResponse;
7801 type Future = BoxFuture<
7802 tonic::Response<Self::Response>,
7803 tonic::Status,
7804 >;
7805 fn call(
7806 &mut self,
7807 request: tonic::Request<super::SetPayloadPoints>,
7808 ) -> Self::Future {
7809 let inner = Arc::clone(&self.0);
7810 let fut = async move {
7811 <T as Points>::overwrite_payload(&inner, request).await
7812 };
7813 Box::pin(fut)
7814 }
7815 }
7816 let accept_compression_encodings = self.accept_compression_encodings;
7817 let send_compression_encodings = self.send_compression_encodings;
7818 let max_decoding_message_size = self.max_decoding_message_size;
7819 let max_encoding_message_size = self.max_encoding_message_size;
7820 let inner = self.inner.clone();
7821 let fut = async move {
7822 let method = OverwritePayloadSvc(inner);
7823 let codec = tonic_prost::ProstCodec::default();
7824 let mut grpc = tonic::server::Grpc::new(codec)
7825 .apply_compression_config(
7826 accept_compression_encodings,
7827 send_compression_encodings,
7828 )
7829 .apply_max_message_size_config(
7830 max_decoding_message_size,
7831 max_encoding_message_size,
7832 );
7833 let res = grpc.unary(method, req).await;
7834 Ok(res)
7835 };
7836 Box::pin(fut)
7837 }
7838 "/qdrant.Points/DeletePayload" => {
7839 #[allow(non_camel_case_types)]
7840 struct DeletePayloadSvc<T: Points>(pub Arc<T>);
7841 impl<
7842 T: Points,
7843 > tonic::server::UnaryService<super::DeletePayloadPoints>
7844 for DeletePayloadSvc<T> {
7845 type Response = super::PointsOperationResponse;
7846 type Future = BoxFuture<
7847 tonic::Response<Self::Response>,
7848 tonic::Status,
7849 >;
7850 fn call(
7851 &mut self,
7852 request: tonic::Request<super::DeletePayloadPoints>,
7853 ) -> Self::Future {
7854 let inner = Arc::clone(&self.0);
7855 let fut = async move {
7856 <T as Points>::delete_payload(&inner, request).await
7857 };
7858 Box::pin(fut)
7859 }
7860 }
7861 let accept_compression_encodings = self.accept_compression_encodings;
7862 let send_compression_encodings = self.send_compression_encodings;
7863 let max_decoding_message_size = self.max_decoding_message_size;
7864 let max_encoding_message_size = self.max_encoding_message_size;
7865 let inner = self.inner.clone();
7866 let fut = async move {
7867 let method = DeletePayloadSvc(inner);
7868 let codec = tonic_prost::ProstCodec::default();
7869 let mut grpc = tonic::server::Grpc::new(codec)
7870 .apply_compression_config(
7871 accept_compression_encodings,
7872 send_compression_encodings,
7873 )
7874 .apply_max_message_size_config(
7875 max_decoding_message_size,
7876 max_encoding_message_size,
7877 );
7878 let res = grpc.unary(method, req).await;
7879 Ok(res)
7880 };
7881 Box::pin(fut)
7882 }
7883 "/qdrant.Points/ClearPayload" => {
7884 #[allow(non_camel_case_types)]
7885 struct ClearPayloadSvc<T: Points>(pub Arc<T>);
7886 impl<
7887 T: Points,
7888 > tonic::server::UnaryService<super::ClearPayloadPoints>
7889 for ClearPayloadSvc<T> {
7890 type Response = super::PointsOperationResponse;
7891 type Future = BoxFuture<
7892 tonic::Response<Self::Response>,
7893 tonic::Status,
7894 >;
7895 fn call(
7896 &mut self,
7897 request: tonic::Request<super::ClearPayloadPoints>,
7898 ) -> Self::Future {
7899 let inner = Arc::clone(&self.0);
7900 let fut = async move {
7901 <T as Points>::clear_payload(&inner, request).await
7902 };
7903 Box::pin(fut)
7904 }
7905 }
7906 let accept_compression_encodings = self.accept_compression_encodings;
7907 let send_compression_encodings = self.send_compression_encodings;
7908 let max_decoding_message_size = self.max_decoding_message_size;
7909 let max_encoding_message_size = self.max_encoding_message_size;
7910 let inner = self.inner.clone();
7911 let fut = async move {
7912 let method = ClearPayloadSvc(inner);
7913 let codec = tonic_prost::ProstCodec::default();
7914 let mut grpc = tonic::server::Grpc::new(codec)
7915 .apply_compression_config(
7916 accept_compression_encodings,
7917 send_compression_encodings,
7918 )
7919 .apply_max_message_size_config(
7920 max_decoding_message_size,
7921 max_encoding_message_size,
7922 );
7923 let res = grpc.unary(method, req).await;
7924 Ok(res)
7925 };
7926 Box::pin(fut)
7927 }
7928 "/qdrant.Points/CreateFieldIndex" => {
7929 #[allow(non_camel_case_types)]
7930 struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
7931 impl<
7932 T: Points,
7933 > tonic::server::UnaryService<super::CreateFieldIndexCollection>
7934 for CreateFieldIndexSvc<T> {
7935 type Response = super::PointsOperationResponse;
7936 type Future = BoxFuture<
7937 tonic::Response<Self::Response>,
7938 tonic::Status,
7939 >;
7940 fn call(
7941 &mut self,
7942 request: tonic::Request<super::CreateFieldIndexCollection>,
7943 ) -> Self::Future {
7944 let inner = Arc::clone(&self.0);
7945 let fut = async move {
7946 <T as Points>::create_field_index(&inner, request).await
7947 };
7948 Box::pin(fut)
7949 }
7950 }
7951 let accept_compression_encodings = self.accept_compression_encodings;
7952 let send_compression_encodings = self.send_compression_encodings;
7953 let max_decoding_message_size = self.max_decoding_message_size;
7954 let max_encoding_message_size = self.max_encoding_message_size;
7955 let inner = self.inner.clone();
7956 let fut = async move {
7957 let method = CreateFieldIndexSvc(inner);
7958 let codec = tonic_prost::ProstCodec::default();
7959 let mut grpc = tonic::server::Grpc::new(codec)
7960 .apply_compression_config(
7961 accept_compression_encodings,
7962 send_compression_encodings,
7963 )
7964 .apply_max_message_size_config(
7965 max_decoding_message_size,
7966 max_encoding_message_size,
7967 );
7968 let res = grpc.unary(method, req).await;
7969 Ok(res)
7970 };
7971 Box::pin(fut)
7972 }
7973 "/qdrant.Points/DeleteFieldIndex" => {
7974 #[allow(non_camel_case_types)]
7975 struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
7976 impl<
7977 T: Points,
7978 > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
7979 for DeleteFieldIndexSvc<T> {
7980 type Response = super::PointsOperationResponse;
7981 type Future = BoxFuture<
7982 tonic::Response<Self::Response>,
7983 tonic::Status,
7984 >;
7985 fn call(
7986 &mut self,
7987 request: tonic::Request<super::DeleteFieldIndexCollection>,
7988 ) -> Self::Future {
7989 let inner = Arc::clone(&self.0);
7990 let fut = async move {
7991 <T as Points>::delete_field_index(&inner, request).await
7992 };
7993 Box::pin(fut)
7994 }
7995 }
7996 let accept_compression_encodings = self.accept_compression_encodings;
7997 let send_compression_encodings = self.send_compression_encodings;
7998 let max_decoding_message_size = self.max_decoding_message_size;
7999 let max_encoding_message_size = self.max_encoding_message_size;
8000 let inner = self.inner.clone();
8001 let fut = async move {
8002 let method = DeleteFieldIndexSvc(inner);
8003 let codec = tonic_prost::ProstCodec::default();
8004 let mut grpc = tonic::server::Grpc::new(codec)
8005 .apply_compression_config(
8006 accept_compression_encodings,
8007 send_compression_encodings,
8008 )
8009 .apply_max_message_size_config(
8010 max_decoding_message_size,
8011 max_encoding_message_size,
8012 );
8013 let res = grpc.unary(method, req).await;
8014 Ok(res)
8015 };
8016 Box::pin(fut)
8017 }
8018 "/qdrant.Points/CreateVectorName" => {
8019 #[allow(non_camel_case_types)]
8020 struct CreateVectorNameSvc<T: Points>(pub Arc<T>);
8021 impl<
8022 T: Points,
8023 > tonic::server::UnaryService<super::CreateVectorNameRequest>
8024 for CreateVectorNameSvc<T> {
8025 type Response = super::PointsOperationResponse;
8026 type Future = BoxFuture<
8027 tonic::Response<Self::Response>,
8028 tonic::Status,
8029 >;
8030 fn call(
8031 &mut self,
8032 request: tonic::Request<super::CreateVectorNameRequest>,
8033 ) -> Self::Future {
8034 let inner = Arc::clone(&self.0);
8035 let fut = async move {
8036 <T as Points>::create_vector_name(&inner, request).await
8037 };
8038 Box::pin(fut)
8039 }
8040 }
8041 let accept_compression_encodings = self.accept_compression_encodings;
8042 let send_compression_encodings = self.send_compression_encodings;
8043 let max_decoding_message_size = self.max_decoding_message_size;
8044 let max_encoding_message_size = self.max_encoding_message_size;
8045 let inner = self.inner.clone();
8046 let fut = async move {
8047 let method = CreateVectorNameSvc(inner);
8048 let codec = tonic_prost::ProstCodec::default();
8049 let mut grpc = tonic::server::Grpc::new(codec)
8050 .apply_compression_config(
8051 accept_compression_encodings,
8052 send_compression_encodings,
8053 )
8054 .apply_max_message_size_config(
8055 max_decoding_message_size,
8056 max_encoding_message_size,
8057 );
8058 let res = grpc.unary(method, req).await;
8059 Ok(res)
8060 };
8061 Box::pin(fut)
8062 }
8063 "/qdrant.Points/DeleteVectorName" => {
8064 #[allow(non_camel_case_types)]
8065 struct DeleteVectorNameSvc<T: Points>(pub Arc<T>);
8066 impl<
8067 T: Points,
8068 > tonic::server::UnaryService<super::DeleteVectorNameRequest>
8069 for DeleteVectorNameSvc<T> {
8070 type Response = super::PointsOperationResponse;
8071 type Future = BoxFuture<
8072 tonic::Response<Self::Response>,
8073 tonic::Status,
8074 >;
8075 fn call(
8076 &mut self,
8077 request: tonic::Request<super::DeleteVectorNameRequest>,
8078 ) -> Self::Future {
8079 let inner = Arc::clone(&self.0);
8080 let fut = async move {
8081 <T as Points>::delete_vector_name(&inner, request).await
8082 };
8083 Box::pin(fut)
8084 }
8085 }
8086 let accept_compression_encodings = self.accept_compression_encodings;
8087 let send_compression_encodings = self.send_compression_encodings;
8088 let max_decoding_message_size = self.max_decoding_message_size;
8089 let max_encoding_message_size = self.max_encoding_message_size;
8090 let inner = self.inner.clone();
8091 let fut = async move {
8092 let method = DeleteVectorNameSvc(inner);
8093 let codec = tonic_prost::ProstCodec::default();
8094 let mut grpc = tonic::server::Grpc::new(codec)
8095 .apply_compression_config(
8096 accept_compression_encodings,
8097 send_compression_encodings,
8098 )
8099 .apply_max_message_size_config(
8100 max_decoding_message_size,
8101 max_encoding_message_size,
8102 );
8103 let res = grpc.unary(method, req).await;
8104 Ok(res)
8105 };
8106 Box::pin(fut)
8107 }
8108 "/qdrant.Points/Search" => {
8109 #[allow(non_camel_case_types)]
8110 struct SearchSvc<T: Points>(pub Arc<T>);
8111 impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
8112 for SearchSvc<T> {
8113 type Response = super::SearchResponse;
8114 type Future = BoxFuture<
8115 tonic::Response<Self::Response>,
8116 tonic::Status,
8117 >;
8118 fn call(
8119 &mut self,
8120 request: tonic::Request<super::SearchPoints>,
8121 ) -> Self::Future {
8122 let inner = Arc::clone(&self.0);
8123 let fut = async move {
8124 <T as Points>::search(&inner, request).await
8125 };
8126 Box::pin(fut)
8127 }
8128 }
8129 let accept_compression_encodings = self.accept_compression_encodings;
8130 let send_compression_encodings = self.send_compression_encodings;
8131 let max_decoding_message_size = self.max_decoding_message_size;
8132 let max_encoding_message_size = self.max_encoding_message_size;
8133 let inner = self.inner.clone();
8134 let fut = async move {
8135 let method = SearchSvc(inner);
8136 let codec = tonic_prost::ProstCodec::default();
8137 let mut grpc = tonic::server::Grpc::new(codec)
8138 .apply_compression_config(
8139 accept_compression_encodings,
8140 send_compression_encodings,
8141 )
8142 .apply_max_message_size_config(
8143 max_decoding_message_size,
8144 max_encoding_message_size,
8145 );
8146 let res = grpc.unary(method, req).await;
8147 Ok(res)
8148 };
8149 Box::pin(fut)
8150 }
8151 "/qdrant.Points/SearchBatch" => {
8152 #[allow(non_camel_case_types)]
8153 struct SearchBatchSvc<T: Points>(pub Arc<T>);
8154 impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
8155 for SearchBatchSvc<T> {
8156 type Response = super::SearchBatchResponse;
8157 type Future = BoxFuture<
8158 tonic::Response<Self::Response>,
8159 tonic::Status,
8160 >;
8161 fn call(
8162 &mut self,
8163 request: tonic::Request<super::SearchBatchPoints>,
8164 ) -> Self::Future {
8165 let inner = Arc::clone(&self.0);
8166 let fut = async move {
8167 <T as Points>::search_batch(&inner, request).await
8168 };
8169 Box::pin(fut)
8170 }
8171 }
8172 let accept_compression_encodings = self.accept_compression_encodings;
8173 let send_compression_encodings = self.send_compression_encodings;
8174 let max_decoding_message_size = self.max_decoding_message_size;
8175 let max_encoding_message_size = self.max_encoding_message_size;
8176 let inner = self.inner.clone();
8177 let fut = async move {
8178 let method = SearchBatchSvc(inner);
8179 let codec = tonic_prost::ProstCodec::default();
8180 let mut grpc = tonic::server::Grpc::new(codec)
8181 .apply_compression_config(
8182 accept_compression_encodings,
8183 send_compression_encodings,
8184 )
8185 .apply_max_message_size_config(
8186 max_decoding_message_size,
8187 max_encoding_message_size,
8188 );
8189 let res = grpc.unary(method, req).await;
8190 Ok(res)
8191 };
8192 Box::pin(fut)
8193 }
8194 "/qdrant.Points/SearchGroups" => {
8195 #[allow(non_camel_case_types)]
8196 struct SearchGroupsSvc<T: Points>(pub Arc<T>);
8197 impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
8198 for SearchGroupsSvc<T> {
8199 type Response = super::SearchGroupsResponse;
8200 type Future = BoxFuture<
8201 tonic::Response<Self::Response>,
8202 tonic::Status,
8203 >;
8204 fn call(
8205 &mut self,
8206 request: tonic::Request<super::SearchPointGroups>,
8207 ) -> Self::Future {
8208 let inner = Arc::clone(&self.0);
8209 let fut = async move {
8210 <T as Points>::search_groups(&inner, request).await
8211 };
8212 Box::pin(fut)
8213 }
8214 }
8215 let accept_compression_encodings = self.accept_compression_encodings;
8216 let send_compression_encodings = self.send_compression_encodings;
8217 let max_decoding_message_size = self.max_decoding_message_size;
8218 let max_encoding_message_size = self.max_encoding_message_size;
8219 let inner = self.inner.clone();
8220 let fut = async move {
8221 let method = SearchGroupsSvc(inner);
8222 let codec = tonic_prost::ProstCodec::default();
8223 let mut grpc = tonic::server::Grpc::new(codec)
8224 .apply_compression_config(
8225 accept_compression_encodings,
8226 send_compression_encodings,
8227 )
8228 .apply_max_message_size_config(
8229 max_decoding_message_size,
8230 max_encoding_message_size,
8231 );
8232 let res = grpc.unary(method, req).await;
8233 Ok(res)
8234 };
8235 Box::pin(fut)
8236 }
8237 "/qdrant.Points/Scroll" => {
8238 #[allow(non_camel_case_types)]
8239 struct ScrollSvc<T: Points>(pub Arc<T>);
8240 impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
8241 for ScrollSvc<T> {
8242 type Response = super::ScrollResponse;
8243 type Future = BoxFuture<
8244 tonic::Response<Self::Response>,
8245 tonic::Status,
8246 >;
8247 fn call(
8248 &mut self,
8249 request: tonic::Request<super::ScrollPoints>,
8250 ) -> Self::Future {
8251 let inner = Arc::clone(&self.0);
8252 let fut = async move {
8253 <T as Points>::scroll(&inner, request).await
8254 };
8255 Box::pin(fut)
8256 }
8257 }
8258 let accept_compression_encodings = self.accept_compression_encodings;
8259 let send_compression_encodings = self.send_compression_encodings;
8260 let max_decoding_message_size = self.max_decoding_message_size;
8261 let max_encoding_message_size = self.max_encoding_message_size;
8262 let inner = self.inner.clone();
8263 let fut = async move {
8264 let method = ScrollSvc(inner);
8265 let codec = tonic_prost::ProstCodec::default();
8266 let mut grpc = tonic::server::Grpc::new(codec)
8267 .apply_compression_config(
8268 accept_compression_encodings,
8269 send_compression_encodings,
8270 )
8271 .apply_max_message_size_config(
8272 max_decoding_message_size,
8273 max_encoding_message_size,
8274 );
8275 let res = grpc.unary(method, req).await;
8276 Ok(res)
8277 };
8278 Box::pin(fut)
8279 }
8280 "/qdrant.Points/Recommend" => {
8281 #[allow(non_camel_case_types)]
8282 struct RecommendSvc<T: Points>(pub Arc<T>);
8283 impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
8284 for RecommendSvc<T> {
8285 type Response = super::RecommendResponse;
8286 type Future = BoxFuture<
8287 tonic::Response<Self::Response>,
8288 tonic::Status,
8289 >;
8290 fn call(
8291 &mut self,
8292 request: tonic::Request<super::RecommendPoints>,
8293 ) -> Self::Future {
8294 let inner = Arc::clone(&self.0);
8295 let fut = async move {
8296 <T as Points>::recommend(&inner, request).await
8297 };
8298 Box::pin(fut)
8299 }
8300 }
8301 let accept_compression_encodings = self.accept_compression_encodings;
8302 let send_compression_encodings = self.send_compression_encodings;
8303 let max_decoding_message_size = self.max_decoding_message_size;
8304 let max_encoding_message_size = self.max_encoding_message_size;
8305 let inner = self.inner.clone();
8306 let fut = async move {
8307 let method = RecommendSvc(inner);
8308 let codec = tonic_prost::ProstCodec::default();
8309 let mut grpc = tonic::server::Grpc::new(codec)
8310 .apply_compression_config(
8311 accept_compression_encodings,
8312 send_compression_encodings,
8313 )
8314 .apply_max_message_size_config(
8315 max_decoding_message_size,
8316 max_encoding_message_size,
8317 );
8318 let res = grpc.unary(method, req).await;
8319 Ok(res)
8320 };
8321 Box::pin(fut)
8322 }
8323 "/qdrant.Points/RecommendBatch" => {
8324 #[allow(non_camel_case_types)]
8325 struct RecommendBatchSvc<T: Points>(pub Arc<T>);
8326 impl<
8327 T: Points,
8328 > tonic::server::UnaryService<super::RecommendBatchPoints>
8329 for RecommendBatchSvc<T> {
8330 type Response = super::RecommendBatchResponse;
8331 type Future = BoxFuture<
8332 tonic::Response<Self::Response>,
8333 tonic::Status,
8334 >;
8335 fn call(
8336 &mut self,
8337 request: tonic::Request<super::RecommendBatchPoints>,
8338 ) -> Self::Future {
8339 let inner = Arc::clone(&self.0);
8340 let fut = async move {
8341 <T as Points>::recommend_batch(&inner, request).await
8342 };
8343 Box::pin(fut)
8344 }
8345 }
8346 let accept_compression_encodings = self.accept_compression_encodings;
8347 let send_compression_encodings = self.send_compression_encodings;
8348 let max_decoding_message_size = self.max_decoding_message_size;
8349 let max_encoding_message_size = self.max_encoding_message_size;
8350 let inner = self.inner.clone();
8351 let fut = async move {
8352 let method = RecommendBatchSvc(inner);
8353 let codec = tonic_prost::ProstCodec::default();
8354 let mut grpc = tonic::server::Grpc::new(codec)
8355 .apply_compression_config(
8356 accept_compression_encodings,
8357 send_compression_encodings,
8358 )
8359 .apply_max_message_size_config(
8360 max_decoding_message_size,
8361 max_encoding_message_size,
8362 );
8363 let res = grpc.unary(method, req).await;
8364 Ok(res)
8365 };
8366 Box::pin(fut)
8367 }
8368 "/qdrant.Points/RecommendGroups" => {
8369 #[allow(non_camel_case_types)]
8370 struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
8371 impl<
8372 T: Points,
8373 > tonic::server::UnaryService<super::RecommendPointGroups>
8374 for RecommendGroupsSvc<T> {
8375 type Response = super::RecommendGroupsResponse;
8376 type Future = BoxFuture<
8377 tonic::Response<Self::Response>,
8378 tonic::Status,
8379 >;
8380 fn call(
8381 &mut self,
8382 request: tonic::Request<super::RecommendPointGroups>,
8383 ) -> Self::Future {
8384 let inner = Arc::clone(&self.0);
8385 let fut = async move {
8386 <T as Points>::recommend_groups(&inner, request).await
8387 };
8388 Box::pin(fut)
8389 }
8390 }
8391 let accept_compression_encodings = self.accept_compression_encodings;
8392 let send_compression_encodings = self.send_compression_encodings;
8393 let max_decoding_message_size = self.max_decoding_message_size;
8394 let max_encoding_message_size = self.max_encoding_message_size;
8395 let inner = self.inner.clone();
8396 let fut = async move {
8397 let method = RecommendGroupsSvc(inner);
8398 let codec = tonic_prost::ProstCodec::default();
8399 let mut grpc = tonic::server::Grpc::new(codec)
8400 .apply_compression_config(
8401 accept_compression_encodings,
8402 send_compression_encodings,
8403 )
8404 .apply_max_message_size_config(
8405 max_decoding_message_size,
8406 max_encoding_message_size,
8407 );
8408 let res = grpc.unary(method, req).await;
8409 Ok(res)
8410 };
8411 Box::pin(fut)
8412 }
8413 "/qdrant.Points/Discover" => {
8414 #[allow(non_camel_case_types)]
8415 struct DiscoverSvc<T: Points>(pub Arc<T>);
8416 impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
8417 for DiscoverSvc<T> {
8418 type Response = super::DiscoverResponse;
8419 type Future = BoxFuture<
8420 tonic::Response<Self::Response>,
8421 tonic::Status,
8422 >;
8423 fn call(
8424 &mut self,
8425 request: tonic::Request<super::DiscoverPoints>,
8426 ) -> Self::Future {
8427 let inner = Arc::clone(&self.0);
8428 let fut = async move {
8429 <T as Points>::discover(&inner, request).await
8430 };
8431 Box::pin(fut)
8432 }
8433 }
8434 let accept_compression_encodings = self.accept_compression_encodings;
8435 let send_compression_encodings = self.send_compression_encodings;
8436 let max_decoding_message_size = self.max_decoding_message_size;
8437 let max_encoding_message_size = self.max_encoding_message_size;
8438 let inner = self.inner.clone();
8439 let fut = async move {
8440 let method = DiscoverSvc(inner);
8441 let codec = tonic_prost::ProstCodec::default();
8442 let mut grpc = tonic::server::Grpc::new(codec)
8443 .apply_compression_config(
8444 accept_compression_encodings,
8445 send_compression_encodings,
8446 )
8447 .apply_max_message_size_config(
8448 max_decoding_message_size,
8449 max_encoding_message_size,
8450 );
8451 let res = grpc.unary(method, req).await;
8452 Ok(res)
8453 };
8454 Box::pin(fut)
8455 }
8456 "/qdrant.Points/DiscoverBatch" => {
8457 #[allow(non_camel_case_types)]
8458 struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
8459 impl<
8460 T: Points,
8461 > tonic::server::UnaryService<super::DiscoverBatchPoints>
8462 for DiscoverBatchSvc<T> {
8463 type Response = super::DiscoverBatchResponse;
8464 type Future = BoxFuture<
8465 tonic::Response<Self::Response>,
8466 tonic::Status,
8467 >;
8468 fn call(
8469 &mut self,
8470 request: tonic::Request<super::DiscoverBatchPoints>,
8471 ) -> Self::Future {
8472 let inner = Arc::clone(&self.0);
8473 let fut = async move {
8474 <T as Points>::discover_batch(&inner, request).await
8475 };
8476 Box::pin(fut)
8477 }
8478 }
8479 let accept_compression_encodings = self.accept_compression_encodings;
8480 let send_compression_encodings = self.send_compression_encodings;
8481 let max_decoding_message_size = self.max_decoding_message_size;
8482 let max_encoding_message_size = self.max_encoding_message_size;
8483 let inner = self.inner.clone();
8484 let fut = async move {
8485 let method = DiscoverBatchSvc(inner);
8486 let codec = tonic_prost::ProstCodec::default();
8487 let mut grpc = tonic::server::Grpc::new(codec)
8488 .apply_compression_config(
8489 accept_compression_encodings,
8490 send_compression_encodings,
8491 )
8492 .apply_max_message_size_config(
8493 max_decoding_message_size,
8494 max_encoding_message_size,
8495 );
8496 let res = grpc.unary(method, req).await;
8497 Ok(res)
8498 };
8499 Box::pin(fut)
8500 }
8501 "/qdrant.Points/Count" => {
8502 #[allow(non_camel_case_types)]
8503 struct CountSvc<T: Points>(pub Arc<T>);
8504 impl<T: Points> tonic::server::UnaryService<super::CountPoints>
8505 for CountSvc<T> {
8506 type Response = super::CountResponse;
8507 type Future = BoxFuture<
8508 tonic::Response<Self::Response>,
8509 tonic::Status,
8510 >;
8511 fn call(
8512 &mut self,
8513 request: tonic::Request<super::CountPoints>,
8514 ) -> Self::Future {
8515 let inner = Arc::clone(&self.0);
8516 let fut = async move {
8517 <T as Points>::count(&inner, request).await
8518 };
8519 Box::pin(fut)
8520 }
8521 }
8522 let accept_compression_encodings = self.accept_compression_encodings;
8523 let send_compression_encodings = self.send_compression_encodings;
8524 let max_decoding_message_size = self.max_decoding_message_size;
8525 let max_encoding_message_size = self.max_encoding_message_size;
8526 let inner = self.inner.clone();
8527 let fut = async move {
8528 let method = CountSvc(inner);
8529 let codec = tonic_prost::ProstCodec::default();
8530 let mut grpc = tonic::server::Grpc::new(codec)
8531 .apply_compression_config(
8532 accept_compression_encodings,
8533 send_compression_encodings,
8534 )
8535 .apply_max_message_size_config(
8536 max_decoding_message_size,
8537 max_encoding_message_size,
8538 );
8539 let res = grpc.unary(method, req).await;
8540 Ok(res)
8541 };
8542 Box::pin(fut)
8543 }
8544 "/qdrant.Points/UpdateBatch" => {
8545 #[allow(non_camel_case_types)]
8546 struct UpdateBatchSvc<T: Points>(pub Arc<T>);
8547 impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
8548 for UpdateBatchSvc<T> {
8549 type Response = super::UpdateBatchResponse;
8550 type Future = BoxFuture<
8551 tonic::Response<Self::Response>,
8552 tonic::Status,
8553 >;
8554 fn call(
8555 &mut self,
8556 request: tonic::Request<super::UpdateBatchPoints>,
8557 ) -> Self::Future {
8558 let inner = Arc::clone(&self.0);
8559 let fut = async move {
8560 <T as Points>::update_batch(&inner, request).await
8561 };
8562 Box::pin(fut)
8563 }
8564 }
8565 let accept_compression_encodings = self.accept_compression_encodings;
8566 let send_compression_encodings = self.send_compression_encodings;
8567 let max_decoding_message_size = self.max_decoding_message_size;
8568 let max_encoding_message_size = self.max_encoding_message_size;
8569 let inner = self.inner.clone();
8570 let fut = async move {
8571 let method = UpdateBatchSvc(inner);
8572 let codec = tonic_prost::ProstCodec::default();
8573 let mut grpc = tonic::server::Grpc::new(codec)
8574 .apply_compression_config(
8575 accept_compression_encodings,
8576 send_compression_encodings,
8577 )
8578 .apply_max_message_size_config(
8579 max_decoding_message_size,
8580 max_encoding_message_size,
8581 );
8582 let res = grpc.unary(method, req).await;
8583 Ok(res)
8584 };
8585 Box::pin(fut)
8586 }
8587 "/qdrant.Points/Query" => {
8588 #[allow(non_camel_case_types)]
8589 struct QuerySvc<T: Points>(pub Arc<T>);
8590 impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
8591 for QuerySvc<T> {
8592 type Response = super::QueryResponse;
8593 type Future = BoxFuture<
8594 tonic::Response<Self::Response>,
8595 tonic::Status,
8596 >;
8597 fn call(
8598 &mut self,
8599 request: tonic::Request<super::QueryPoints>,
8600 ) -> Self::Future {
8601 let inner = Arc::clone(&self.0);
8602 let fut = async move {
8603 <T as Points>::query(&inner, request).await
8604 };
8605 Box::pin(fut)
8606 }
8607 }
8608 let accept_compression_encodings = self.accept_compression_encodings;
8609 let send_compression_encodings = self.send_compression_encodings;
8610 let max_decoding_message_size = self.max_decoding_message_size;
8611 let max_encoding_message_size = self.max_encoding_message_size;
8612 let inner = self.inner.clone();
8613 let fut = async move {
8614 let method = QuerySvc(inner);
8615 let codec = tonic_prost::ProstCodec::default();
8616 let mut grpc = tonic::server::Grpc::new(codec)
8617 .apply_compression_config(
8618 accept_compression_encodings,
8619 send_compression_encodings,
8620 )
8621 .apply_max_message_size_config(
8622 max_decoding_message_size,
8623 max_encoding_message_size,
8624 );
8625 let res = grpc.unary(method, req).await;
8626 Ok(res)
8627 };
8628 Box::pin(fut)
8629 }
8630 "/qdrant.Points/QueryBatch" => {
8631 #[allow(non_camel_case_types)]
8632 struct QueryBatchSvc<T: Points>(pub Arc<T>);
8633 impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
8634 for QueryBatchSvc<T> {
8635 type Response = super::QueryBatchResponse;
8636 type Future = BoxFuture<
8637 tonic::Response<Self::Response>,
8638 tonic::Status,
8639 >;
8640 fn call(
8641 &mut self,
8642 request: tonic::Request<super::QueryBatchPoints>,
8643 ) -> Self::Future {
8644 let inner = Arc::clone(&self.0);
8645 let fut = async move {
8646 <T as Points>::query_batch(&inner, request).await
8647 };
8648 Box::pin(fut)
8649 }
8650 }
8651 let accept_compression_encodings = self.accept_compression_encodings;
8652 let send_compression_encodings = self.send_compression_encodings;
8653 let max_decoding_message_size = self.max_decoding_message_size;
8654 let max_encoding_message_size = self.max_encoding_message_size;
8655 let inner = self.inner.clone();
8656 let fut = async move {
8657 let method = QueryBatchSvc(inner);
8658 let codec = tonic_prost::ProstCodec::default();
8659 let mut grpc = tonic::server::Grpc::new(codec)
8660 .apply_compression_config(
8661 accept_compression_encodings,
8662 send_compression_encodings,
8663 )
8664 .apply_max_message_size_config(
8665 max_decoding_message_size,
8666 max_encoding_message_size,
8667 );
8668 let res = grpc.unary(method, req).await;
8669 Ok(res)
8670 };
8671 Box::pin(fut)
8672 }
8673 "/qdrant.Points/QueryGroups" => {
8674 #[allow(non_camel_case_types)]
8675 struct QueryGroupsSvc<T: Points>(pub Arc<T>);
8676 impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
8677 for QueryGroupsSvc<T> {
8678 type Response = super::QueryGroupsResponse;
8679 type Future = BoxFuture<
8680 tonic::Response<Self::Response>,
8681 tonic::Status,
8682 >;
8683 fn call(
8684 &mut self,
8685 request: tonic::Request<super::QueryPointGroups>,
8686 ) -> Self::Future {
8687 let inner = Arc::clone(&self.0);
8688 let fut = async move {
8689 <T as Points>::query_groups(&inner, request).await
8690 };
8691 Box::pin(fut)
8692 }
8693 }
8694 let accept_compression_encodings = self.accept_compression_encodings;
8695 let send_compression_encodings = self.send_compression_encodings;
8696 let max_decoding_message_size = self.max_decoding_message_size;
8697 let max_encoding_message_size = self.max_encoding_message_size;
8698 let inner = self.inner.clone();
8699 let fut = async move {
8700 let method = QueryGroupsSvc(inner);
8701 let codec = tonic_prost::ProstCodec::default();
8702 let mut grpc = tonic::server::Grpc::new(codec)
8703 .apply_compression_config(
8704 accept_compression_encodings,
8705 send_compression_encodings,
8706 )
8707 .apply_max_message_size_config(
8708 max_decoding_message_size,
8709 max_encoding_message_size,
8710 );
8711 let res = grpc.unary(method, req).await;
8712 Ok(res)
8713 };
8714 Box::pin(fut)
8715 }
8716 "/qdrant.Points/Facet" => {
8717 #[allow(non_camel_case_types)]
8718 struct FacetSvc<T: Points>(pub Arc<T>);
8719 impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
8720 for FacetSvc<T> {
8721 type Response = super::FacetResponse;
8722 type Future = BoxFuture<
8723 tonic::Response<Self::Response>,
8724 tonic::Status,
8725 >;
8726 fn call(
8727 &mut self,
8728 request: tonic::Request<super::FacetCounts>,
8729 ) -> Self::Future {
8730 let inner = Arc::clone(&self.0);
8731 let fut = async move {
8732 <T as Points>::facet(&inner, request).await
8733 };
8734 Box::pin(fut)
8735 }
8736 }
8737 let accept_compression_encodings = self.accept_compression_encodings;
8738 let send_compression_encodings = self.send_compression_encodings;
8739 let max_decoding_message_size = self.max_decoding_message_size;
8740 let max_encoding_message_size = self.max_encoding_message_size;
8741 let inner = self.inner.clone();
8742 let fut = async move {
8743 let method = FacetSvc(inner);
8744 let codec = tonic_prost::ProstCodec::default();
8745 let mut grpc = tonic::server::Grpc::new(codec)
8746 .apply_compression_config(
8747 accept_compression_encodings,
8748 send_compression_encodings,
8749 )
8750 .apply_max_message_size_config(
8751 max_decoding_message_size,
8752 max_encoding_message_size,
8753 );
8754 let res = grpc.unary(method, req).await;
8755 Ok(res)
8756 };
8757 Box::pin(fut)
8758 }
8759 "/qdrant.Points/SearchMatrixPairs" => {
8760 #[allow(non_camel_case_types)]
8761 struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
8762 impl<
8763 T: Points,
8764 > tonic::server::UnaryService<super::SearchMatrixPoints>
8765 for SearchMatrixPairsSvc<T> {
8766 type Response = super::SearchMatrixPairsResponse;
8767 type Future = BoxFuture<
8768 tonic::Response<Self::Response>,
8769 tonic::Status,
8770 >;
8771 fn call(
8772 &mut self,
8773 request: tonic::Request<super::SearchMatrixPoints>,
8774 ) -> Self::Future {
8775 let inner = Arc::clone(&self.0);
8776 let fut = async move {
8777 <T as Points>::search_matrix_pairs(&inner, request).await
8778 };
8779 Box::pin(fut)
8780 }
8781 }
8782 let accept_compression_encodings = self.accept_compression_encodings;
8783 let send_compression_encodings = self.send_compression_encodings;
8784 let max_decoding_message_size = self.max_decoding_message_size;
8785 let max_encoding_message_size = self.max_encoding_message_size;
8786 let inner = self.inner.clone();
8787 let fut = async move {
8788 let method = SearchMatrixPairsSvc(inner);
8789 let codec = tonic_prost::ProstCodec::default();
8790 let mut grpc = tonic::server::Grpc::new(codec)
8791 .apply_compression_config(
8792 accept_compression_encodings,
8793 send_compression_encodings,
8794 )
8795 .apply_max_message_size_config(
8796 max_decoding_message_size,
8797 max_encoding_message_size,
8798 );
8799 let res = grpc.unary(method, req).await;
8800 Ok(res)
8801 };
8802 Box::pin(fut)
8803 }
8804 "/qdrant.Points/SearchMatrixOffsets" => {
8805 #[allow(non_camel_case_types)]
8806 struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
8807 impl<
8808 T: Points,
8809 > tonic::server::UnaryService<super::SearchMatrixPoints>
8810 for SearchMatrixOffsetsSvc<T> {
8811 type Response = super::SearchMatrixOffsetsResponse;
8812 type Future = BoxFuture<
8813 tonic::Response<Self::Response>,
8814 tonic::Status,
8815 >;
8816 fn call(
8817 &mut self,
8818 request: tonic::Request<super::SearchMatrixPoints>,
8819 ) -> Self::Future {
8820 let inner = Arc::clone(&self.0);
8821 let fut = async move {
8822 <T as Points>::search_matrix_offsets(&inner, request).await
8823 };
8824 Box::pin(fut)
8825 }
8826 }
8827 let accept_compression_encodings = self.accept_compression_encodings;
8828 let send_compression_encodings = self.send_compression_encodings;
8829 let max_decoding_message_size = self.max_decoding_message_size;
8830 let max_encoding_message_size = self.max_encoding_message_size;
8831 let inner = self.inner.clone();
8832 let fut = async move {
8833 let method = SearchMatrixOffsetsSvc(inner);
8834 let codec = tonic_prost::ProstCodec::default();
8835 let mut grpc = tonic::server::Grpc::new(codec)
8836 .apply_compression_config(
8837 accept_compression_encodings,
8838 send_compression_encodings,
8839 )
8840 .apply_max_message_size_config(
8841 max_decoding_message_size,
8842 max_encoding_message_size,
8843 );
8844 let res = grpc.unary(method, req).await;
8845 Ok(res)
8846 };
8847 Box::pin(fut)
8848 }
8849 _ => {
8850 Box::pin(async move {
8851 let mut response = http::Response::new(
8852 tonic::body::Body::default(),
8853 );
8854 let headers = response.headers_mut();
8855 headers
8856 .insert(
8857 tonic::Status::GRPC_STATUS,
8858 (tonic::Code::Unimplemented as i32).into(),
8859 );
8860 headers
8861 .insert(
8862 http::header::CONTENT_TYPE,
8863 tonic::metadata::GRPC_CONTENT_TYPE,
8864 );
8865 Ok(response)
8866 })
8867 }
8868 }
8869 }
8870 }
8871 impl<T> Clone for PointsServer<T> {
8872 fn clone(&self) -> Self {
8873 let inner = self.inner.clone();
8874 Self {
8875 inner,
8876 accept_compression_encodings: self.accept_compression_encodings,
8877 send_compression_encodings: self.send_compression_encodings,
8878 max_decoding_message_size: self.max_decoding_message_size,
8879 max_encoding_message_size: self.max_encoding_message_size,
8880 }
8881 }
8882 }
8883 pub const SERVICE_NAME: &str = "qdrant.Points";
8885 impl<T> tonic::server::NamedService for PointsServer<T> {
8886 const NAME: &'static str = SERVICE_NAME;
8887 }
8888}
8889#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
8890pub struct CreateFullSnapshotRequest {}
8891#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
8892pub struct ListFullSnapshotsRequest {}
8893#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8894pub struct DeleteFullSnapshotRequest {
8895 #[prost(string, tag = "1")]
8897 pub snapshot_name: ::prost::alloc::string::String,
8898}
8899#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8900pub struct CreateSnapshotRequest {
8901 #[prost(string, tag = "1")]
8903 pub collection_name: ::prost::alloc::string::String,
8904}
8905#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8906pub struct ListSnapshotsRequest {
8907 #[prost(string, tag = "1")]
8909 pub collection_name: ::prost::alloc::string::String,
8910}
8911#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8912pub struct DeleteSnapshotRequest {
8913 #[prost(string, tag = "1")]
8915 pub collection_name: ::prost::alloc::string::String,
8916 #[prost(string, tag = "2")]
8918 pub snapshot_name: ::prost::alloc::string::String,
8919}
8920#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8921pub struct SnapshotDescription {
8922 #[prost(string, tag = "1")]
8924 pub name: ::prost::alloc::string::String,
8925 #[prost(message, optional, tag = "2")]
8927 pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
8928 #[prost(int64, tag = "3")]
8930 pub size: i64,
8931 #[prost(string, optional, tag = "4")]
8933 pub checksum: ::core::option::Option<::prost::alloc::string::String>,
8934}
8935#[derive(Clone, PartialEq, ::prost::Message)]
8936pub struct CreateSnapshotResponse {
8937 #[prost(message, optional, tag = "1")]
8938 pub snapshot_description: ::core::option::Option<SnapshotDescription>,
8939 #[prost(double, tag = "2")]
8941 pub time: f64,
8942}
8943#[derive(Clone, PartialEq, ::prost::Message)]
8944pub struct ListSnapshotsResponse {
8945 #[prost(message, repeated, tag = "1")]
8946 pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
8947 #[prost(double, tag = "2")]
8949 pub time: f64,
8950}
8951#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8952pub struct DeleteSnapshotResponse {
8953 #[prost(double, tag = "1")]
8955 pub time: f64,
8956}
8957pub mod snapshots_client {
8959 #![allow(
8960 unused_variables,
8961 dead_code,
8962 missing_docs,
8963 clippy::wildcard_imports,
8964 clippy::let_unit_value,
8965 )]
8966 use tonic::codegen::*;
8967 use tonic::codegen::http::Uri;
8968 #[derive(Debug, Clone)]
8969 pub struct SnapshotsClient<T> {
8970 inner: tonic::client::Grpc<T>,
8971 }
8972 impl SnapshotsClient<tonic::transport::Channel> {
8973 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8975 where
8976 D: TryInto<tonic::transport::Endpoint>,
8977 D::Error: Into<StdError>,
8978 {
8979 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8980 Ok(Self::new(conn))
8981 }
8982 }
8983 impl<T> SnapshotsClient<T>
8984 where
8985 T: tonic::client::GrpcService<tonic::body::Body>,
8986 T::Error: Into<StdError>,
8987 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8988 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8989 {
8990 pub fn new(inner: T) -> Self {
8991 let inner = tonic::client::Grpc::new(inner);
8992 Self { inner }
8993 }
8994 pub fn with_origin(inner: T, origin: Uri) -> Self {
8995 let inner = tonic::client::Grpc::with_origin(inner, origin);
8996 Self { inner }
8997 }
8998 pub fn with_interceptor<F>(
8999 inner: T,
9000 interceptor: F,
9001 ) -> SnapshotsClient<InterceptedService<T, F>>
9002 where
9003 F: tonic::service::Interceptor,
9004 T::ResponseBody: Default,
9005 T: tonic::codegen::Service<
9006 http::Request<tonic::body::Body>,
9007 Response = http::Response<
9008 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9009 >,
9010 >,
9011 <T as tonic::codegen::Service<
9012 http::Request<tonic::body::Body>,
9013 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9014 {
9015 SnapshotsClient::new(InterceptedService::new(inner, interceptor))
9016 }
9017 #[must_use]
9022 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9023 self.inner = self.inner.send_compressed(encoding);
9024 self
9025 }
9026 #[must_use]
9028 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9029 self.inner = self.inner.accept_compressed(encoding);
9030 self
9031 }
9032 #[must_use]
9036 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9037 self.inner = self.inner.max_decoding_message_size(limit);
9038 self
9039 }
9040 #[must_use]
9044 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9045 self.inner = self.inner.max_encoding_message_size(limit);
9046 self
9047 }
9048 pub async fn create(
9050 &mut self,
9051 request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
9052 ) -> std::result::Result<
9053 tonic::Response<super::CreateSnapshotResponse>,
9054 tonic::Status,
9055 > {
9056 self.inner
9057 .ready()
9058 .await
9059 .map_err(|e| {
9060 tonic::Status::unknown(
9061 format!("Service was not ready: {}", e.into()),
9062 )
9063 })?;
9064 let codec = tonic_prost::ProstCodec::default();
9065 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
9066 let mut req = request.into_request();
9067 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
9068 self.inner.unary(req, path, codec).await
9069 }
9070 pub async fn list(
9072 &mut self,
9073 request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
9074 ) -> std::result::Result<
9075 tonic::Response<super::ListSnapshotsResponse>,
9076 tonic::Status,
9077 > {
9078 self.inner
9079 .ready()
9080 .await
9081 .map_err(|e| {
9082 tonic::Status::unknown(
9083 format!("Service was not ready: {}", e.into()),
9084 )
9085 })?;
9086 let codec = tonic_prost::ProstCodec::default();
9087 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
9088 let mut req = request.into_request();
9089 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
9090 self.inner.unary(req, path, codec).await
9091 }
9092 pub async fn delete(
9094 &mut self,
9095 request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
9096 ) -> std::result::Result<
9097 tonic::Response<super::DeleteSnapshotResponse>,
9098 tonic::Status,
9099 > {
9100 self.inner
9101 .ready()
9102 .await
9103 .map_err(|e| {
9104 tonic::Status::unknown(
9105 format!("Service was not ready: {}", e.into()),
9106 )
9107 })?;
9108 let codec = tonic_prost::ProstCodec::default();
9109 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
9110 let mut req = request.into_request();
9111 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
9112 self.inner.unary(req, path, codec).await
9113 }
9114 pub async fn create_full(
9116 &mut self,
9117 request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
9118 ) -> std::result::Result<
9119 tonic::Response<super::CreateSnapshotResponse>,
9120 tonic::Status,
9121 > {
9122 self.inner
9123 .ready()
9124 .await
9125 .map_err(|e| {
9126 tonic::Status::unknown(
9127 format!("Service was not ready: {}", e.into()),
9128 )
9129 })?;
9130 let codec = tonic_prost::ProstCodec::default();
9131 let path = http::uri::PathAndQuery::from_static(
9132 "/qdrant.Snapshots/CreateFull",
9133 );
9134 let mut req = request.into_request();
9135 req.extensions_mut()
9136 .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
9137 self.inner.unary(req, path, codec).await
9138 }
9139 pub async fn list_full(
9141 &mut self,
9142 request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
9143 ) -> std::result::Result<
9144 tonic::Response<super::ListSnapshotsResponse>,
9145 tonic::Status,
9146 > {
9147 self.inner
9148 .ready()
9149 .await
9150 .map_err(|e| {
9151 tonic::Status::unknown(
9152 format!("Service was not ready: {}", e.into()),
9153 )
9154 })?;
9155 let codec = tonic_prost::ProstCodec::default();
9156 let path = http::uri::PathAndQuery::from_static(
9157 "/qdrant.Snapshots/ListFull",
9158 );
9159 let mut req = request.into_request();
9160 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
9161 self.inner.unary(req, path, codec).await
9162 }
9163 pub async fn delete_full(
9165 &mut self,
9166 request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
9167 ) -> std::result::Result<
9168 tonic::Response<super::DeleteSnapshotResponse>,
9169 tonic::Status,
9170 > {
9171 self.inner
9172 .ready()
9173 .await
9174 .map_err(|e| {
9175 tonic::Status::unknown(
9176 format!("Service was not ready: {}", e.into()),
9177 )
9178 })?;
9179 let codec = tonic_prost::ProstCodec::default();
9180 let path = http::uri::PathAndQuery::from_static(
9181 "/qdrant.Snapshots/DeleteFull",
9182 );
9183 let mut req = request.into_request();
9184 req.extensions_mut()
9185 .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
9186 self.inner.unary(req, path, codec).await
9187 }
9188 }
9189}
9190pub mod snapshots_server {
9192 #![allow(
9193 unused_variables,
9194 dead_code,
9195 missing_docs,
9196 clippy::wildcard_imports,
9197 clippy::let_unit_value,
9198 )]
9199 use tonic::codegen::*;
9200 #[async_trait]
9202 pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
9203 async fn create(
9205 &self,
9206 request: tonic::Request<super::CreateSnapshotRequest>,
9207 ) -> std::result::Result<
9208 tonic::Response<super::CreateSnapshotResponse>,
9209 tonic::Status,
9210 >;
9211 async fn list(
9213 &self,
9214 request: tonic::Request<super::ListSnapshotsRequest>,
9215 ) -> std::result::Result<
9216 tonic::Response<super::ListSnapshotsResponse>,
9217 tonic::Status,
9218 >;
9219 async fn delete(
9221 &self,
9222 request: tonic::Request<super::DeleteSnapshotRequest>,
9223 ) -> std::result::Result<
9224 tonic::Response<super::DeleteSnapshotResponse>,
9225 tonic::Status,
9226 >;
9227 async fn create_full(
9229 &self,
9230 request: tonic::Request<super::CreateFullSnapshotRequest>,
9231 ) -> std::result::Result<
9232 tonic::Response<super::CreateSnapshotResponse>,
9233 tonic::Status,
9234 >;
9235 async fn list_full(
9237 &self,
9238 request: tonic::Request<super::ListFullSnapshotsRequest>,
9239 ) -> std::result::Result<
9240 tonic::Response<super::ListSnapshotsResponse>,
9241 tonic::Status,
9242 >;
9243 async fn delete_full(
9245 &self,
9246 request: tonic::Request<super::DeleteFullSnapshotRequest>,
9247 ) -> std::result::Result<
9248 tonic::Response<super::DeleteSnapshotResponse>,
9249 tonic::Status,
9250 >;
9251 }
9252 #[derive(Debug)]
9253 pub struct SnapshotsServer<T> {
9254 inner: Arc<T>,
9255 accept_compression_encodings: EnabledCompressionEncodings,
9256 send_compression_encodings: EnabledCompressionEncodings,
9257 max_decoding_message_size: Option<usize>,
9258 max_encoding_message_size: Option<usize>,
9259 }
9260 impl<T> SnapshotsServer<T> {
9261 pub fn new(inner: T) -> Self {
9262 Self::from_arc(Arc::new(inner))
9263 }
9264 pub fn from_arc(inner: Arc<T>) -> Self {
9265 Self {
9266 inner,
9267 accept_compression_encodings: Default::default(),
9268 send_compression_encodings: Default::default(),
9269 max_decoding_message_size: None,
9270 max_encoding_message_size: None,
9271 }
9272 }
9273 pub fn with_interceptor<F>(
9274 inner: T,
9275 interceptor: F,
9276 ) -> InterceptedService<Self, F>
9277 where
9278 F: tonic::service::Interceptor,
9279 {
9280 InterceptedService::new(Self::new(inner), interceptor)
9281 }
9282 #[must_use]
9284 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9285 self.accept_compression_encodings.enable(encoding);
9286 self
9287 }
9288 #[must_use]
9290 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9291 self.send_compression_encodings.enable(encoding);
9292 self
9293 }
9294 #[must_use]
9298 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9299 self.max_decoding_message_size = Some(limit);
9300 self
9301 }
9302 #[must_use]
9306 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9307 self.max_encoding_message_size = Some(limit);
9308 self
9309 }
9310 }
9311 impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
9312 where
9313 T: Snapshots,
9314 B: Body + std::marker::Send + 'static,
9315 B::Error: Into<StdError> + std::marker::Send + 'static,
9316 {
9317 type Response = http::Response<tonic::body::Body>;
9318 type Error = std::convert::Infallible;
9319 type Future = BoxFuture<Self::Response, Self::Error>;
9320 fn poll_ready(
9321 &mut self,
9322 _cx: &mut Context<'_>,
9323 ) -> Poll<std::result::Result<(), Self::Error>> {
9324 Poll::Ready(Ok(()))
9325 }
9326 fn call(&mut self, req: http::Request<B>) -> Self::Future {
9327 match req.uri().path() {
9328 "/qdrant.Snapshots/Create" => {
9329 #[allow(non_camel_case_types)]
9330 struct CreateSvc<T: Snapshots>(pub Arc<T>);
9331 impl<
9332 T: Snapshots,
9333 > tonic::server::UnaryService<super::CreateSnapshotRequest>
9334 for CreateSvc<T> {
9335 type Response = super::CreateSnapshotResponse;
9336 type Future = BoxFuture<
9337 tonic::Response<Self::Response>,
9338 tonic::Status,
9339 >;
9340 fn call(
9341 &mut self,
9342 request: tonic::Request<super::CreateSnapshotRequest>,
9343 ) -> Self::Future {
9344 let inner = Arc::clone(&self.0);
9345 let fut = async move {
9346 <T as Snapshots>::create(&inner, request).await
9347 };
9348 Box::pin(fut)
9349 }
9350 }
9351 let accept_compression_encodings = self.accept_compression_encodings;
9352 let send_compression_encodings = self.send_compression_encodings;
9353 let max_decoding_message_size = self.max_decoding_message_size;
9354 let max_encoding_message_size = self.max_encoding_message_size;
9355 let inner = self.inner.clone();
9356 let fut = async move {
9357 let method = CreateSvc(inner);
9358 let codec = tonic_prost::ProstCodec::default();
9359 let mut grpc = tonic::server::Grpc::new(codec)
9360 .apply_compression_config(
9361 accept_compression_encodings,
9362 send_compression_encodings,
9363 )
9364 .apply_max_message_size_config(
9365 max_decoding_message_size,
9366 max_encoding_message_size,
9367 );
9368 let res = grpc.unary(method, req).await;
9369 Ok(res)
9370 };
9371 Box::pin(fut)
9372 }
9373 "/qdrant.Snapshots/List" => {
9374 #[allow(non_camel_case_types)]
9375 struct ListSvc<T: Snapshots>(pub Arc<T>);
9376 impl<
9377 T: Snapshots,
9378 > tonic::server::UnaryService<super::ListSnapshotsRequest>
9379 for ListSvc<T> {
9380 type Response = super::ListSnapshotsResponse;
9381 type Future = BoxFuture<
9382 tonic::Response<Self::Response>,
9383 tonic::Status,
9384 >;
9385 fn call(
9386 &mut self,
9387 request: tonic::Request<super::ListSnapshotsRequest>,
9388 ) -> Self::Future {
9389 let inner = Arc::clone(&self.0);
9390 let fut = async move {
9391 <T as Snapshots>::list(&inner, request).await
9392 };
9393 Box::pin(fut)
9394 }
9395 }
9396 let accept_compression_encodings = self.accept_compression_encodings;
9397 let send_compression_encodings = self.send_compression_encodings;
9398 let max_decoding_message_size = self.max_decoding_message_size;
9399 let max_encoding_message_size = self.max_encoding_message_size;
9400 let inner = self.inner.clone();
9401 let fut = async move {
9402 let method = ListSvc(inner);
9403 let codec = tonic_prost::ProstCodec::default();
9404 let mut grpc = tonic::server::Grpc::new(codec)
9405 .apply_compression_config(
9406 accept_compression_encodings,
9407 send_compression_encodings,
9408 )
9409 .apply_max_message_size_config(
9410 max_decoding_message_size,
9411 max_encoding_message_size,
9412 );
9413 let res = grpc.unary(method, req).await;
9414 Ok(res)
9415 };
9416 Box::pin(fut)
9417 }
9418 "/qdrant.Snapshots/Delete" => {
9419 #[allow(non_camel_case_types)]
9420 struct DeleteSvc<T: Snapshots>(pub Arc<T>);
9421 impl<
9422 T: Snapshots,
9423 > tonic::server::UnaryService<super::DeleteSnapshotRequest>
9424 for DeleteSvc<T> {
9425 type Response = super::DeleteSnapshotResponse;
9426 type Future = BoxFuture<
9427 tonic::Response<Self::Response>,
9428 tonic::Status,
9429 >;
9430 fn call(
9431 &mut self,
9432 request: tonic::Request<super::DeleteSnapshotRequest>,
9433 ) -> Self::Future {
9434 let inner = Arc::clone(&self.0);
9435 let fut = async move {
9436 <T as Snapshots>::delete(&inner, request).await
9437 };
9438 Box::pin(fut)
9439 }
9440 }
9441 let accept_compression_encodings = self.accept_compression_encodings;
9442 let send_compression_encodings = self.send_compression_encodings;
9443 let max_decoding_message_size = self.max_decoding_message_size;
9444 let max_encoding_message_size = self.max_encoding_message_size;
9445 let inner = self.inner.clone();
9446 let fut = async move {
9447 let method = DeleteSvc(inner);
9448 let codec = tonic_prost::ProstCodec::default();
9449 let mut grpc = tonic::server::Grpc::new(codec)
9450 .apply_compression_config(
9451 accept_compression_encodings,
9452 send_compression_encodings,
9453 )
9454 .apply_max_message_size_config(
9455 max_decoding_message_size,
9456 max_encoding_message_size,
9457 );
9458 let res = grpc.unary(method, req).await;
9459 Ok(res)
9460 };
9461 Box::pin(fut)
9462 }
9463 "/qdrant.Snapshots/CreateFull" => {
9464 #[allow(non_camel_case_types)]
9465 struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
9466 impl<
9467 T: Snapshots,
9468 > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
9469 for CreateFullSvc<T> {
9470 type Response = super::CreateSnapshotResponse;
9471 type Future = BoxFuture<
9472 tonic::Response<Self::Response>,
9473 tonic::Status,
9474 >;
9475 fn call(
9476 &mut self,
9477 request: tonic::Request<super::CreateFullSnapshotRequest>,
9478 ) -> Self::Future {
9479 let inner = Arc::clone(&self.0);
9480 let fut = async move {
9481 <T as Snapshots>::create_full(&inner, request).await
9482 };
9483 Box::pin(fut)
9484 }
9485 }
9486 let accept_compression_encodings = self.accept_compression_encodings;
9487 let send_compression_encodings = self.send_compression_encodings;
9488 let max_decoding_message_size = self.max_decoding_message_size;
9489 let max_encoding_message_size = self.max_encoding_message_size;
9490 let inner = self.inner.clone();
9491 let fut = async move {
9492 let method = CreateFullSvc(inner);
9493 let codec = tonic_prost::ProstCodec::default();
9494 let mut grpc = tonic::server::Grpc::new(codec)
9495 .apply_compression_config(
9496 accept_compression_encodings,
9497 send_compression_encodings,
9498 )
9499 .apply_max_message_size_config(
9500 max_decoding_message_size,
9501 max_encoding_message_size,
9502 );
9503 let res = grpc.unary(method, req).await;
9504 Ok(res)
9505 };
9506 Box::pin(fut)
9507 }
9508 "/qdrant.Snapshots/ListFull" => {
9509 #[allow(non_camel_case_types)]
9510 struct ListFullSvc<T: Snapshots>(pub Arc<T>);
9511 impl<
9512 T: Snapshots,
9513 > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
9514 for ListFullSvc<T> {
9515 type Response = super::ListSnapshotsResponse;
9516 type Future = BoxFuture<
9517 tonic::Response<Self::Response>,
9518 tonic::Status,
9519 >;
9520 fn call(
9521 &mut self,
9522 request: tonic::Request<super::ListFullSnapshotsRequest>,
9523 ) -> Self::Future {
9524 let inner = Arc::clone(&self.0);
9525 let fut = async move {
9526 <T as Snapshots>::list_full(&inner, request).await
9527 };
9528 Box::pin(fut)
9529 }
9530 }
9531 let accept_compression_encodings = self.accept_compression_encodings;
9532 let send_compression_encodings = self.send_compression_encodings;
9533 let max_decoding_message_size = self.max_decoding_message_size;
9534 let max_encoding_message_size = self.max_encoding_message_size;
9535 let inner = self.inner.clone();
9536 let fut = async move {
9537 let method = ListFullSvc(inner);
9538 let codec = tonic_prost::ProstCodec::default();
9539 let mut grpc = tonic::server::Grpc::new(codec)
9540 .apply_compression_config(
9541 accept_compression_encodings,
9542 send_compression_encodings,
9543 )
9544 .apply_max_message_size_config(
9545 max_decoding_message_size,
9546 max_encoding_message_size,
9547 );
9548 let res = grpc.unary(method, req).await;
9549 Ok(res)
9550 };
9551 Box::pin(fut)
9552 }
9553 "/qdrant.Snapshots/DeleteFull" => {
9554 #[allow(non_camel_case_types)]
9555 struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
9556 impl<
9557 T: Snapshots,
9558 > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
9559 for DeleteFullSvc<T> {
9560 type Response = super::DeleteSnapshotResponse;
9561 type Future = BoxFuture<
9562 tonic::Response<Self::Response>,
9563 tonic::Status,
9564 >;
9565 fn call(
9566 &mut self,
9567 request: tonic::Request<super::DeleteFullSnapshotRequest>,
9568 ) -> Self::Future {
9569 let inner = Arc::clone(&self.0);
9570 let fut = async move {
9571 <T as Snapshots>::delete_full(&inner, request).await
9572 };
9573 Box::pin(fut)
9574 }
9575 }
9576 let accept_compression_encodings = self.accept_compression_encodings;
9577 let send_compression_encodings = self.send_compression_encodings;
9578 let max_decoding_message_size = self.max_decoding_message_size;
9579 let max_encoding_message_size = self.max_encoding_message_size;
9580 let inner = self.inner.clone();
9581 let fut = async move {
9582 let method = DeleteFullSvc(inner);
9583 let codec = tonic_prost::ProstCodec::default();
9584 let mut grpc = tonic::server::Grpc::new(codec)
9585 .apply_compression_config(
9586 accept_compression_encodings,
9587 send_compression_encodings,
9588 )
9589 .apply_max_message_size_config(
9590 max_decoding_message_size,
9591 max_encoding_message_size,
9592 );
9593 let res = grpc.unary(method, req).await;
9594 Ok(res)
9595 };
9596 Box::pin(fut)
9597 }
9598 _ => {
9599 Box::pin(async move {
9600 let mut response = http::Response::new(
9601 tonic::body::Body::default(),
9602 );
9603 let headers = response.headers_mut();
9604 headers
9605 .insert(
9606 tonic::Status::GRPC_STATUS,
9607 (tonic::Code::Unimplemented as i32).into(),
9608 );
9609 headers
9610 .insert(
9611 http::header::CONTENT_TYPE,
9612 tonic::metadata::GRPC_CONTENT_TYPE,
9613 );
9614 Ok(response)
9615 })
9616 }
9617 }
9618 }
9619 }
9620 impl<T> Clone for SnapshotsServer<T> {
9621 fn clone(&self) -> Self {
9622 let inner = self.inner.clone();
9623 Self {
9624 inner,
9625 accept_compression_encodings: self.accept_compression_encodings,
9626 send_compression_encodings: self.send_compression_encodings,
9627 max_decoding_message_size: self.max_decoding_message_size,
9628 max_encoding_message_size: self.max_encoding_message_size,
9629 }
9630 }
9631 }
9632 pub const SERVICE_NAME: &str = "qdrant.Snapshots";
9634 impl<T> tonic::server::NamedService for SnapshotsServer<T> {
9635 const NAME: &'static str = SERVICE_NAME;
9636 }
9637}
9638#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9639pub struct HealthCheckRequest {}
9640#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9641pub struct HealthCheckReply {
9642 #[prost(string, tag = "1")]
9643 pub title: ::prost::alloc::string::String,
9644 #[prost(string, tag = "2")]
9645 pub version: ::prost::alloc::string::String,
9646 #[prost(string, optional, tag = "3")]
9647 pub commit: ::core::option::Option<::prost::alloc::string::String>,
9648}
9649pub mod qdrant_client {
9651 #![allow(
9652 unused_variables,
9653 dead_code,
9654 missing_docs,
9655 clippy::wildcard_imports,
9656 clippy::let_unit_value,
9657 )]
9658 use tonic::codegen::*;
9659 use tonic::codegen::http::Uri;
9660 #[derive(Debug, Clone)]
9661 pub struct QdrantClient<T> {
9662 inner: tonic::client::Grpc<T>,
9663 }
9664 impl QdrantClient<tonic::transport::Channel> {
9665 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9667 where
9668 D: TryInto<tonic::transport::Endpoint>,
9669 D::Error: Into<StdError>,
9670 {
9671 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
9672 Ok(Self::new(conn))
9673 }
9674 }
9675 impl<T> QdrantClient<T>
9676 where
9677 T: tonic::client::GrpcService<tonic::body::Body>,
9678 T::Error: Into<StdError>,
9679 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9680 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9681 {
9682 pub fn new(inner: T) -> Self {
9683 let inner = tonic::client::Grpc::new(inner);
9684 Self { inner }
9685 }
9686 pub fn with_origin(inner: T, origin: Uri) -> Self {
9687 let inner = tonic::client::Grpc::with_origin(inner, origin);
9688 Self { inner }
9689 }
9690 pub fn with_interceptor<F>(
9691 inner: T,
9692 interceptor: F,
9693 ) -> QdrantClient<InterceptedService<T, F>>
9694 where
9695 F: tonic::service::Interceptor,
9696 T::ResponseBody: Default,
9697 T: tonic::codegen::Service<
9698 http::Request<tonic::body::Body>,
9699 Response = http::Response<
9700 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9701 >,
9702 >,
9703 <T as tonic::codegen::Service<
9704 http::Request<tonic::body::Body>,
9705 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9706 {
9707 QdrantClient::new(InterceptedService::new(inner, interceptor))
9708 }
9709 #[must_use]
9714 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9715 self.inner = self.inner.send_compressed(encoding);
9716 self
9717 }
9718 #[must_use]
9720 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9721 self.inner = self.inner.accept_compressed(encoding);
9722 self
9723 }
9724 #[must_use]
9728 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9729 self.inner = self.inner.max_decoding_message_size(limit);
9730 self
9731 }
9732 #[must_use]
9736 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9737 self.inner = self.inner.max_encoding_message_size(limit);
9738 self
9739 }
9740 pub async fn health_check(
9741 &mut self,
9742 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
9743 ) -> std::result::Result<
9744 tonic::Response<super::HealthCheckReply>,
9745 tonic::Status,
9746 > {
9747 self.inner
9748 .ready()
9749 .await
9750 .map_err(|e| {
9751 tonic::Status::unknown(
9752 format!("Service was not ready: {}", e.into()),
9753 )
9754 })?;
9755 let codec = tonic_prost::ProstCodec::default();
9756 let path = http::uri::PathAndQuery::from_static(
9757 "/qdrant.Qdrant/HealthCheck",
9758 );
9759 let mut req = request.into_request();
9760 req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
9761 self.inner.unary(req, path, codec).await
9762 }
9763 }
9764}
9765pub mod qdrant_server {
9767 #![allow(
9768 unused_variables,
9769 dead_code,
9770 missing_docs,
9771 clippy::wildcard_imports,
9772 clippy::let_unit_value,
9773 )]
9774 use tonic::codegen::*;
9775 #[async_trait]
9777 pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static {
9778 async fn health_check(
9779 &self,
9780 request: tonic::Request<super::HealthCheckRequest>,
9781 ) -> std::result::Result<
9782 tonic::Response<super::HealthCheckReply>,
9783 tonic::Status,
9784 >;
9785 }
9786 #[derive(Debug)]
9787 pub struct QdrantServer<T> {
9788 inner: Arc<T>,
9789 accept_compression_encodings: EnabledCompressionEncodings,
9790 send_compression_encodings: EnabledCompressionEncodings,
9791 max_decoding_message_size: Option<usize>,
9792 max_encoding_message_size: Option<usize>,
9793 }
9794 impl<T> QdrantServer<T> {
9795 pub fn new(inner: T) -> Self {
9796 Self::from_arc(Arc::new(inner))
9797 }
9798 pub fn from_arc(inner: Arc<T>) -> Self {
9799 Self {
9800 inner,
9801 accept_compression_encodings: Default::default(),
9802 send_compression_encodings: Default::default(),
9803 max_decoding_message_size: None,
9804 max_encoding_message_size: None,
9805 }
9806 }
9807 pub fn with_interceptor<F>(
9808 inner: T,
9809 interceptor: F,
9810 ) -> InterceptedService<Self, F>
9811 where
9812 F: tonic::service::Interceptor,
9813 {
9814 InterceptedService::new(Self::new(inner), interceptor)
9815 }
9816 #[must_use]
9818 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9819 self.accept_compression_encodings.enable(encoding);
9820 self
9821 }
9822 #[must_use]
9824 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9825 self.send_compression_encodings.enable(encoding);
9826 self
9827 }
9828 #[must_use]
9832 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9833 self.max_decoding_message_size = Some(limit);
9834 self
9835 }
9836 #[must_use]
9840 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9841 self.max_encoding_message_size = Some(limit);
9842 self
9843 }
9844 }
9845 impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
9846 where
9847 T: Qdrant,
9848 B: Body + std::marker::Send + 'static,
9849 B::Error: Into<StdError> + std::marker::Send + 'static,
9850 {
9851 type Response = http::Response<tonic::body::Body>;
9852 type Error = std::convert::Infallible;
9853 type Future = BoxFuture<Self::Response, Self::Error>;
9854 fn poll_ready(
9855 &mut self,
9856 _cx: &mut Context<'_>,
9857 ) -> Poll<std::result::Result<(), Self::Error>> {
9858 Poll::Ready(Ok(()))
9859 }
9860 fn call(&mut self, req: http::Request<B>) -> Self::Future {
9861 match req.uri().path() {
9862 "/qdrant.Qdrant/HealthCheck" => {
9863 #[allow(non_camel_case_types)]
9864 struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
9865 impl<
9866 T: Qdrant,
9867 > tonic::server::UnaryService<super::HealthCheckRequest>
9868 for HealthCheckSvc<T> {
9869 type Response = super::HealthCheckReply;
9870 type Future = BoxFuture<
9871 tonic::Response<Self::Response>,
9872 tonic::Status,
9873 >;
9874 fn call(
9875 &mut self,
9876 request: tonic::Request<super::HealthCheckRequest>,
9877 ) -> Self::Future {
9878 let inner = Arc::clone(&self.0);
9879 let fut = async move {
9880 <T as Qdrant>::health_check(&inner, request).await
9881 };
9882 Box::pin(fut)
9883 }
9884 }
9885 let accept_compression_encodings = self.accept_compression_encodings;
9886 let send_compression_encodings = self.send_compression_encodings;
9887 let max_decoding_message_size = self.max_decoding_message_size;
9888 let max_encoding_message_size = self.max_encoding_message_size;
9889 let inner = self.inner.clone();
9890 let fut = async move {
9891 let method = HealthCheckSvc(inner);
9892 let codec = tonic_prost::ProstCodec::default();
9893 let mut grpc = tonic::server::Grpc::new(codec)
9894 .apply_compression_config(
9895 accept_compression_encodings,
9896 send_compression_encodings,
9897 )
9898 .apply_max_message_size_config(
9899 max_decoding_message_size,
9900 max_encoding_message_size,
9901 );
9902 let res = grpc.unary(method, req).await;
9903 Ok(res)
9904 };
9905 Box::pin(fut)
9906 }
9907 _ => {
9908 Box::pin(async move {
9909 let mut response = http::Response::new(
9910 tonic::body::Body::default(),
9911 );
9912 let headers = response.headers_mut();
9913 headers
9914 .insert(
9915 tonic::Status::GRPC_STATUS,
9916 (tonic::Code::Unimplemented as i32).into(),
9917 );
9918 headers
9919 .insert(
9920 http::header::CONTENT_TYPE,
9921 tonic::metadata::GRPC_CONTENT_TYPE,
9922 );
9923 Ok(response)
9924 })
9925 }
9926 }
9927 }
9928 }
9929 impl<T> Clone for QdrantServer<T> {
9930 fn clone(&self) -> Self {
9931 let inner = self.inner.clone();
9932 Self {
9933 inner,
9934 accept_compression_encodings: self.accept_compression_encodings,
9935 send_compression_encodings: self.send_compression_encodings,
9936 max_decoding_message_size: self.max_decoding_message_size,
9937 max_encoding_message_size: self.max_encoding_message_size,
9938 }
9939 }
9940 }
9941 pub const SERVICE_NAME: &str = "qdrant.Qdrant";
9943 impl<T> tonic::server::NamedService for QdrantServer<T> {
9944 const NAME: &'static str = SERVICE_NAME;
9945 }
9946}
9947pub use crate::manual_builder::*;
9948pub use crate::builder_types::*;
9949pub use crate::qdrant_client::builders::*;
9950pub use crate::builders::*;
9951pub use prost_types::Timestamp;