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(
239 oneof = "r#match::MatchValue",
240 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
241 )]
242 pub match_value: ::core::option::Option<r#match::MatchValue>,
243}
244pub mod r#match {
246 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
247 pub enum MatchValue {
248 #[prost(string, tag = "1")]
250 Keyword(::prost::alloc::string::String),
251 #[prost(int64, tag = "2")]
253 Integer(i64),
254 #[prost(bool, tag = "3")]
256 Boolean(bool),
257 #[prost(string, tag = "4")]
259 Text(::prost::alloc::string::String),
260 #[prost(message, tag = "5")]
262 Keywords(super::RepeatedStrings),
263 #[prost(message, tag = "6")]
265 Integers(super::RepeatedIntegers),
266 #[prost(message, tag = "7")]
268 ExceptIntegers(super::RepeatedIntegers),
269 #[prost(message, tag = "8")]
271 ExceptKeywords(super::RepeatedStrings),
272 #[prost(string, tag = "9")]
274 Phrase(::prost::alloc::string::String),
275 #[prost(string, tag = "10")]
277 TextAny(::prost::alloc::string::String),
278 #[prost(string, tag = "11")]
280 Prefix(::prost::alloc::string::String),
281 #[prost(string, tag = "12")]
283 Substring(::prost::alloc::string::String),
284 }
285}
286#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
287pub struct RepeatedStrings {
288 #[prost(string, repeated, tag = "1")]
289 pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
290}
291#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
292pub struct RepeatedIntegers {
293 #[prost(int64, repeated, tag = "1")]
294 pub integers: ::prost::alloc::vec::Vec<i64>,
295}
296#[derive(Clone, Copy, PartialEq, ::prost::Message)]
297pub struct Range {
298 #[prost(double, optional, tag = "1")]
299 pub lt: ::core::option::Option<f64>,
300 #[prost(double, optional, tag = "2")]
301 pub gt: ::core::option::Option<f64>,
302 #[prost(double, optional, tag = "3")]
303 pub gte: ::core::option::Option<f64>,
304 #[prost(double, optional, tag = "4")]
305 pub lte: ::core::option::Option<f64>,
306}
307#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
308pub struct DatetimeRange {
309 #[prost(message, optional, tag = "1")]
310 pub lt: ::core::option::Option<::prost_types::Timestamp>,
311 #[prost(message, optional, tag = "2")]
312 pub gt: ::core::option::Option<::prost_types::Timestamp>,
313 #[prost(message, optional, tag = "3")]
314 pub gte: ::core::option::Option<::prost_types::Timestamp>,
315 #[prost(message, optional, tag = "4")]
316 pub lte: ::core::option::Option<::prost_types::Timestamp>,
317}
318#[derive(Clone, Copy, PartialEq, ::prost::Message)]
319pub struct GeoBoundingBox {
320 #[prost(message, optional, tag = "1")]
322 pub top_left: ::core::option::Option<GeoPoint>,
323 #[prost(message, optional, tag = "2")]
325 pub bottom_right: ::core::option::Option<GeoPoint>,
326}
327#[derive(Clone, Copy, PartialEq, ::prost::Message)]
328pub struct GeoRadius {
329 #[prost(message, optional, tag = "1")]
331 pub center: ::core::option::Option<GeoPoint>,
332 #[prost(float, tag = "2")]
334 pub radius: f32,
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
337pub struct GeoLineString {
338 #[prost(message, repeated, tag = "1")]
340 pub points: ::prost::alloc::vec::Vec<GeoPoint>,
341}
342#[derive(Clone, PartialEq, ::prost::Message)]
346pub struct GeoPolygon {
347 #[prost(message, optional, tag = "1")]
349 pub exterior: ::core::option::Option<GeoLineString>,
350 #[prost(message, repeated, tag = "2")]
352 pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
353}
354#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
355pub struct ValuesCount {
356 #[prost(uint64, optional, tag = "1")]
357 pub lt: ::core::option::Option<u64>,
358 #[prost(uint64, optional, tag = "2")]
359 pub gt: ::core::option::Option<u64>,
360 #[prost(uint64, optional, tag = "3")]
361 pub gte: ::core::option::Option<u64>,
362 #[prost(uint64, optional, tag = "4")]
363 pub lte: ::core::option::Option<u64>,
364}
365#[derive(Clone, Copy, PartialEq, ::prost::Message)]
366pub struct VectorParams {
367 #[prost(uint64, tag = "1")]
369 pub size: u64,
370 #[prost(enumeration = "Distance", tag = "2")]
372 pub distance: i32,
373 #[prost(message, optional, tag = "3")]
376 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
377 #[prost(message, optional, tag = "4")]
380 pub quantization_config: ::core::option::Option<QuantizationConfig>,
381 #[deprecated]
385 #[prost(bool, optional, tag = "5")]
386 pub on_disk: ::core::option::Option<bool>,
387 #[prost(enumeration = "Datatype", optional, tag = "6")]
389 pub datatype: ::core::option::Option<i32>,
390 #[prost(message, optional, tag = "7")]
392 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
393 #[prost(enumeration = "Memory", optional, tag = "8")]
397 pub memory: ::core::option::Option<i32>,
398}
399#[derive(Clone, Copy, PartialEq, ::prost::Message)]
400pub struct VectorParamsDiff {
401 #[prost(message, optional, tag = "1")]
404 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
405 #[prost(message, optional, tag = "2")]
407 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
408 #[deprecated]
412 #[prost(bool, optional, tag = "3")]
413 pub on_disk: ::core::option::Option<bool>,
414 #[prost(enumeration = "Memory", optional, tag = "4")]
418 pub memory: ::core::option::Option<i32>,
419}
420#[derive(Clone, PartialEq, ::prost::Message)]
421pub struct VectorParamsMap {
422 #[prost(map = "string, message", tag = "1")]
423 pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
424}
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct VectorParamsDiffMap {
427 #[prost(map = "string, message", tag = "1")]
428 pub map: ::std::collections::HashMap<
429 ::prost::alloc::string::String,
430 VectorParamsDiff,
431 >,
432}
433#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct VectorsConfig {
435 #[prost(oneof = "vectors_config::Config", tags = "1, 2")]
436 pub config: ::core::option::Option<vectors_config::Config>,
437}
438pub mod vectors_config {
440 #[derive(Clone, PartialEq, ::prost::Oneof)]
441 pub enum Config {
442 #[prost(message, tag = "1")]
443 Params(super::VectorParams),
444 #[prost(message, tag = "2")]
445 ParamsMap(super::VectorParamsMap),
446 }
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct VectorsConfigDiff {
450 #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
451 pub config: ::core::option::Option<vectors_config_diff::Config>,
452}
453pub mod vectors_config_diff {
455 #[derive(Clone, PartialEq, ::prost::Oneof)]
456 pub enum Config {
457 #[prost(message, tag = "1")]
458 Params(super::VectorParamsDiff),
459 #[prost(message, tag = "2")]
460 ParamsMap(super::VectorParamsDiffMap),
461 }
462}
463#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
464pub struct SparseVectorParams {
465 #[prost(message, optional, tag = "1")]
467 pub index: ::core::option::Option<SparseIndexConfig>,
468 #[prost(enumeration = "Modifier", optional, tag = "2")]
470 pub modifier: ::core::option::Option<i32>,
471}
472#[derive(Clone, PartialEq, ::prost::Message)]
473pub struct SparseVectorConfig {
474 #[prost(map = "string, message", tag = "1")]
475 pub map: ::std::collections::HashMap<
476 ::prost::alloc::string::String,
477 SparseVectorParams,
478 >,
479}
480#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
481pub struct MultiVectorConfig {
482 #[prost(enumeration = "MultiVectorComparator", tag = "1")]
484 pub comparator: i32,
485}
486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
487pub struct GetCollectionInfoRequest {
488 #[prost(string, tag = "1")]
490 pub collection_name: ::prost::alloc::string::String,
491}
492#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
493pub struct CollectionExistsRequest {
494 #[prost(string, tag = "1")]
495 pub collection_name: ::prost::alloc::string::String,
496}
497#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
498pub struct CollectionExists {
499 #[prost(bool, tag = "1")]
500 pub exists: bool,
501}
502#[derive(Clone, Copy, PartialEq, ::prost::Message)]
503pub struct CollectionExistsResponse {
504 #[prost(message, optional, tag = "1")]
505 pub result: ::core::option::Option<CollectionExists>,
506 #[prost(double, tag = "2")]
508 pub time: f64,
509}
510#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
511pub struct ListCollectionsRequest {}
512#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
513pub struct CollectionDescription {
514 #[prost(string, tag = "1")]
516 pub name: ::prost::alloc::string::String,
517}
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct GetCollectionInfoResponse {
520 #[prost(message, optional, tag = "1")]
521 pub result: ::core::option::Option<CollectionInfo>,
522 #[prost(double, tag = "2")]
524 pub time: f64,
525}
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct ListCollectionsResponse {
528 #[prost(message, repeated, tag = "1")]
529 pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
530 #[prost(double, tag = "2")]
532 pub time: f64,
533}
534#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
535pub struct MaxOptimizationThreads {
536 #[prost(oneof = "max_optimization_threads::Variant", tags = "1, 2")]
537 pub variant: ::core::option::Option<max_optimization_threads::Variant>,
538}
539pub mod max_optimization_threads {
541 #[derive(
542 Clone,
543 Copy,
544 Debug,
545 PartialEq,
546 Eq,
547 Hash,
548 PartialOrd,
549 Ord,
550 ::prost::Enumeration
551 )]
552 #[repr(i32)]
553 pub enum Setting {
554 Auto = 0,
555 }
556 impl Setting {
557 pub fn as_str_name(&self) -> &'static str {
562 match self {
563 Self::Auto => "Auto",
564 }
565 }
566 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
568 match value {
569 "Auto" => Some(Self::Auto),
570 _ => None,
571 }
572 }
573 }
574 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
575 pub enum Variant {
576 #[prost(uint64, tag = "1")]
577 Value(u64),
578 #[prost(enumeration = "Setting", tag = "2")]
579 Setting(i32),
580 }
581}
582#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
583pub struct OptimizerStatus {
584 #[prost(bool, tag = "1")]
585 pub ok: bool,
586 #[prost(string, tag = "2")]
587 pub error: ::prost::alloc::string::String,
588}
589#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
590pub struct CollectionWarning {
591 #[prost(string, tag = "1")]
592 pub message: ::prost::alloc::string::String,
593}
594#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
595pub struct HnswConfigDiff {
596 #[prost(uint64, optional, tag = "1")]
602 pub m: ::core::option::Option<u64>,
603 #[prost(uint64, optional, tag = "2")]
606 pub ef_construct: ::core::option::Option<u64>,
607 #[prost(uint64, optional, tag = "3")]
614 pub full_scan_threshold: ::core::option::Option<u64>,
615 #[prost(uint64, optional, tag = "4")]
620 pub max_indexing_threads: ::core::option::Option<u64>,
621 #[deprecated]
624 #[prost(bool, optional, tag = "5")]
625 pub on_disk: ::core::option::Option<bool>,
626 #[prost(uint64, optional, tag = "6")]
630 pub payload_m: ::core::option::Option<u64>,
631 #[prost(bool, optional, tag = "7")]
636 pub inline_storage: ::core::option::Option<bool>,
637 #[prost(enumeration = "Memory", optional, tag = "8")]
640 pub memory: ::core::option::Option<i32>,
641}
642#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
643pub struct SparseIndexConfig {
644 #[prost(uint64, optional, tag = "1")]
647 pub full_scan_threshold: ::core::option::Option<u64>,
648 #[deprecated]
651 #[prost(bool, optional, tag = "2")]
652 pub on_disk: ::core::option::Option<bool>,
653 #[prost(enumeration = "Datatype", optional, tag = "3")]
655 pub datatype: ::core::option::Option<i32>,
656 #[prost(enumeration = "Memory", optional, tag = "4")]
659 pub memory: ::core::option::Option<i32>,
660}
661#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
662pub struct WalConfigDiff {
663 #[prost(uint64, optional, tag = "1")]
665 pub wal_capacity_mb: ::core::option::Option<u64>,
666 #[prost(uint64, optional, tag = "2")]
668 pub wal_segments_ahead: ::core::option::Option<u64>,
669 #[prost(uint64, optional, tag = "3")]
671 pub wal_retain_closed: ::core::option::Option<u64>,
672}
673#[derive(Clone, Copy, PartialEq, ::prost::Message)]
674pub struct OptimizersConfigDiff {
675 #[prost(double, optional, tag = "1")]
678 pub deleted_threshold: ::core::option::Option<f64>,
679 #[prost(uint64, optional, tag = "2")]
682 pub vacuum_min_vector_number: ::core::option::Option<u64>,
683 #[prost(uint64, optional, tag = "3")]
692 pub default_segment_number: ::core::option::Option<u64>,
693 #[prost(uint64, optional, tag = "4")]
704 pub max_segment_size: ::core::option::Option<u64>,
705 #[prost(uint64, optional, tag = "5")]
714 pub memmap_threshold: ::core::option::Option<u64>,
715 #[prost(uint64, optional, tag = "6")]
725 pub indexing_threshold: ::core::option::Option<u64>,
726 #[prost(uint64, optional, tag = "7")]
728 pub flush_interval_sec: ::core::option::Option<u64>,
729 #[prost(uint64, optional, tag = "8")]
731 pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
732 #[prost(message, optional, tag = "9")]
737 pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
738 #[prost(bool, optional, tag = "10")]
748 pub prevent_unoptimized: ::core::option::Option<bool>,
749}
750#[derive(Clone, Copy, PartialEq, ::prost::Message)]
751pub struct ScalarQuantization {
752 #[prost(enumeration = "QuantizationType", tag = "1")]
754 pub r#type: i32,
755 #[prost(float, optional, tag = "2")]
757 pub quantile: ::core::option::Option<f32>,
758 #[deprecated]
761 #[prost(bool, optional, tag = "3")]
762 pub always_ram: ::core::option::Option<bool>,
763 #[prost(enumeration = "Memory", optional, tag = "4")]
766 pub memory: ::core::option::Option<i32>,
767}
768#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
769pub struct ProductQuantization {
770 #[prost(enumeration = "CompressionRatio", tag = "1")]
772 pub compression: i32,
773 #[deprecated]
776 #[prost(bool, optional, tag = "2")]
777 pub always_ram: ::core::option::Option<bool>,
778 #[prost(enumeration = "Memory", optional, tag = "3")]
781 pub memory: ::core::option::Option<i32>,
782}
783#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
784pub struct BinaryQuantizationQueryEncoding {
785 #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
786 pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
787}
788pub mod binary_quantization_query_encoding {
790 #[derive(
791 Clone,
792 Copy,
793 Debug,
794 PartialEq,
795 Eq,
796 Hash,
797 PartialOrd,
798 Ord,
799 ::prost::Enumeration
800 )]
801 #[repr(i32)]
802 pub enum Setting {
803 Default = 0,
804 Binary = 1,
805 Scalar4Bits = 2,
806 Scalar8Bits = 3,
807 }
808 impl Setting {
809 pub fn as_str_name(&self) -> &'static str {
814 match self {
815 Self::Default => "Default",
816 Self::Binary => "Binary",
817 Self::Scalar4Bits => "Scalar4Bits",
818 Self::Scalar8Bits => "Scalar8Bits",
819 }
820 }
821 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
823 match value {
824 "Default" => Some(Self::Default),
825 "Binary" => Some(Self::Binary),
826 "Scalar4Bits" => Some(Self::Scalar4Bits),
827 "Scalar8Bits" => Some(Self::Scalar8Bits),
828 _ => None,
829 }
830 }
831 }
832 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
833 pub enum Variant {
834 #[prost(enumeration = "Setting", tag = "4")]
835 Setting(i32),
836 }
837}
838#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
839pub struct BinaryQuantization {
840 #[deprecated]
843 #[prost(bool, optional, tag = "1")]
844 pub always_ram: ::core::option::Option<bool>,
845 #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
847 pub encoding: ::core::option::Option<i32>,
848 #[prost(message, optional, tag = "3")]
852 pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
853 #[prost(enumeration = "Memory", optional, tag = "4")]
856 pub memory: ::core::option::Option<i32>,
857}
858#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
859pub struct TurboQuantization {
860 #[deprecated]
862 #[prost(bool, optional, tag = "1")]
863 pub always_ram: ::core::option::Option<bool>,
864 #[prost(enumeration = "TurboQuantBitSize", optional, tag = "2")]
865 pub bits: ::core::option::Option<i32>,
866 #[prost(enumeration = "Memory", optional, tag = "3")]
869 pub memory: ::core::option::Option<i32>,
870}
871#[derive(Clone, Copy, PartialEq, ::prost::Message)]
872pub struct QuantizationConfig {
873 #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3, 4")]
874 pub quantization: ::core::option::Option<quantization_config::Quantization>,
875}
876pub mod quantization_config {
878 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
879 pub enum Quantization {
880 #[prost(message, tag = "1")]
881 Scalar(super::ScalarQuantization),
882 #[prost(message, tag = "2")]
883 Product(super::ProductQuantization),
884 #[prost(message, tag = "3")]
885 Binary(super::BinaryQuantization),
886 #[prost(message, tag = "4")]
887 Turboquant(super::TurboQuantization),
888 }
889}
890#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
891pub struct Disabled {}
892#[derive(Clone, Copy, PartialEq, ::prost::Message)]
893pub struct QuantizationConfigDiff {
894 #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4, 5")]
895 pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
896}
897pub mod quantization_config_diff {
899 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
900 pub enum Quantization {
901 #[prost(message, tag = "1")]
902 Scalar(super::ScalarQuantization),
903 #[prost(message, tag = "2")]
904 Product(super::ProductQuantization),
905 #[prost(message, tag = "3")]
906 Disabled(super::Disabled),
907 #[prost(message, tag = "4")]
908 Binary(super::BinaryQuantization),
909 #[prost(message, tag = "5")]
910 Turboquant(super::TurboQuantization),
911 }
912}
913#[derive(Clone, PartialEq, ::prost::Message)]
914pub struct StrictModeConfig {
915 #[prost(bool, optional, tag = "1")]
917 pub enabled: ::core::option::Option<bool>,
918 #[prost(uint32, optional, tag = "2")]
920 pub max_query_limit: ::core::option::Option<u32>,
921 #[prost(uint32, optional, tag = "3")]
923 pub max_timeout: ::core::option::Option<u32>,
924 #[prost(bool, optional, tag = "4")]
926 pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
927 #[prost(bool, optional, tag = "5")]
929 pub unindexed_filtering_update: ::core::option::Option<bool>,
930 #[prost(uint32, optional, tag = "6")]
932 pub search_max_hnsw_ef: ::core::option::Option<u32>,
933 #[prost(bool, optional, tag = "7")]
935 pub search_allow_exact: ::core::option::Option<bool>,
936 #[prost(float, optional, tag = "8")]
938 pub search_max_oversampling: ::core::option::Option<f32>,
939 #[prost(uint64, optional, tag = "9")]
941 pub upsert_max_batchsize: ::core::option::Option<u64>,
942 #[prost(uint64, optional, tag = "20")]
944 pub search_max_batchsize: ::core::option::Option<u64>,
945 #[prost(uint64, optional, tag = "10")]
947 pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
948 #[prost(uint32, optional, tag = "11")]
950 pub read_rate_limit: ::core::option::Option<u32>,
951 #[prost(uint32, optional, tag = "12")]
953 pub write_rate_limit: ::core::option::Option<u32>,
954 #[prost(uint64, optional, tag = "13")]
956 pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
957 #[prost(uint64, optional, tag = "14")]
959 pub filter_max_conditions: ::core::option::Option<u64>,
960 #[prost(uint64, optional, tag = "15")]
962 pub condition_max_size: ::core::option::Option<u64>,
963 #[prost(message, optional, tag = "16")]
965 pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
966 #[prost(message, optional, tag = "17")]
968 pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
969 #[prost(uint64, optional, tag = "18")]
971 pub max_points_count: ::core::option::Option<u64>,
972 #[prost(uint64, optional, tag = "19")]
974 pub max_payload_index_count: ::core::option::Option<u64>,
975 #[deprecated]
979 #[prost(uint32, optional, tag = "21")]
980 pub max_resident_memory_percent: ::core::option::Option<u32>,
981}
982#[derive(Clone, PartialEq, ::prost::Message)]
983pub struct StrictModeSparseConfig {
984 #[prost(map = "string, message", tag = "1")]
985 pub sparse_config: ::std::collections::HashMap<
986 ::prost::alloc::string::String,
987 StrictModeSparse,
988 >,
989}
990#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
991pub struct StrictModeSparse {
992 #[prost(uint64, optional, tag = "10")]
994 pub max_length: ::core::option::Option<u64>,
995}
996#[derive(Clone, PartialEq, ::prost::Message)]
997pub struct StrictModeMultivectorConfig {
998 #[prost(map = "string, message", tag = "1")]
999 pub multivector_config: ::std::collections::HashMap<
1000 ::prost::alloc::string::String,
1001 StrictModeMultivector,
1002 >,
1003}
1004#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1005pub struct StrictModeMultivector {
1006 #[prost(uint64, optional, tag = "1")]
1008 pub max_vectors: ::core::option::Option<u64>,
1009}
1010#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1012pub struct PayloadStorageParams {
1013 #[prost(enumeration = "Memory", optional, tag = "1")]
1017 pub memory: ::core::option::Option<i32>,
1018}
1019#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1020pub struct IdTrackerParams {
1021 #[prost(enumeration = "Memory", optional, tag = "1")]
1025 pub memory: ::core::option::Option<i32>,
1026}
1027#[derive(Clone, PartialEq, ::prost::Message)]
1028pub struct CreateCollection {
1029 #[prost(string, tag = "1")]
1031 pub collection_name: ::prost::alloc::string::String,
1032 #[prost(message, optional, tag = "4")]
1034 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1035 #[prost(message, optional, tag = "5")]
1037 pub wal_config: ::core::option::Option<WalConfigDiff>,
1038 #[prost(message, optional, tag = "6")]
1040 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
1041 #[prost(uint32, optional, tag = "7")]
1044 pub shard_number: ::core::option::Option<u32>,
1045 #[deprecated]
1048 #[prost(bool, optional, tag = "8")]
1049 pub on_disk_payload: ::core::option::Option<bool>,
1050 #[prost(uint64, optional, tag = "9")]
1053 pub timeout: ::core::option::Option<u64>,
1054 #[prost(message, optional, tag = "10")]
1056 pub vectors_config: ::core::option::Option<VectorsConfig>,
1057 #[prost(uint32, optional, tag = "11")]
1059 pub replication_factor: ::core::option::Option<u32>,
1060 #[prost(uint32, optional, tag = "12")]
1062 pub write_consistency_factor: ::core::option::Option<u32>,
1063 #[prost(message, optional, tag = "14")]
1065 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1066 #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
1068 pub sharding_method: ::core::option::Option<i32>,
1069 #[prost(message, optional, tag = "16")]
1071 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1072 #[prost(message, optional, tag = "17")]
1074 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1075 #[prost(map = "string, message", tag = "18")]
1077 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1078 #[prost(message, optional, tag = "19")]
1080 pub payload: ::core::option::Option<PayloadStorageParams>,
1081 #[prost(message, optional, tag = "20")]
1083 pub id_tracker: ::core::option::Option<IdTrackerParams>,
1084}
1085#[derive(Clone, PartialEq, ::prost::Message)]
1086pub struct UpdateCollection {
1087 #[prost(string, tag = "1")]
1089 pub collection_name: ::prost::alloc::string::String,
1090 #[prost(message, optional, tag = "2")]
1094 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
1095 #[prost(uint64, optional, tag = "3")]
1098 pub timeout: ::core::option::Option<u64>,
1099 #[prost(message, optional, tag = "4")]
1101 pub params: ::core::option::Option<CollectionParamsDiff>,
1102 #[prost(message, optional, tag = "5")]
1104 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1105 #[prost(message, optional, tag = "6")]
1107 pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
1108 #[prost(message, optional, tag = "7")]
1110 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
1111 #[prost(message, optional, tag = "8")]
1113 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1114 #[prost(message, optional, tag = "9")]
1116 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1117 #[prost(map = "string, message", tag = "10")]
1120 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1121}
1122#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1123pub struct DeleteCollection {
1124 #[prost(string, tag = "1")]
1126 pub collection_name: ::prost::alloc::string::String,
1127 #[prost(uint64, optional, tag = "2")]
1130 pub timeout: ::core::option::Option<u64>,
1131}
1132#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1133pub struct CollectionOperationResponse {
1134 #[prost(bool, tag = "1")]
1136 pub result: bool,
1137 #[prost(double, tag = "2")]
1139 pub time: f64,
1140}
1141#[derive(Clone, PartialEq, ::prost::Message)]
1142pub struct CollectionParams {
1143 #[prost(uint32, tag = "3")]
1145 pub shard_number: u32,
1146 #[deprecated]
1149 #[prost(bool, tag = "4")]
1150 pub on_disk_payload: bool,
1151 #[prost(message, optional, tag = "5")]
1153 pub vectors_config: ::core::option::Option<VectorsConfig>,
1154 #[prost(uint32, optional, tag = "6")]
1156 pub replication_factor: ::core::option::Option<u32>,
1157 #[prost(uint32, optional, tag = "7")]
1159 pub write_consistency_factor: ::core::option::Option<u32>,
1160 #[prost(uint32, optional, tag = "8")]
1162 pub read_fan_out_factor: ::core::option::Option<u32>,
1163 #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
1165 pub sharding_method: ::core::option::Option<i32>,
1166 #[prost(message, optional, tag = "10")]
1168 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1169 #[prost(uint64, optional, tag = "11")]
1171 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1172 #[prost(message, optional, tag = "12")]
1174 pub payload: ::core::option::Option<PayloadStorageParams>,
1175 #[prost(message, optional, tag = "13")]
1177 pub id_tracker: ::core::option::Option<IdTrackerParams>,
1178}
1179#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1180pub struct CollectionParamsDiff {
1181 #[prost(uint32, optional, tag = "1")]
1183 pub replication_factor: ::core::option::Option<u32>,
1184 #[prost(uint32, optional, tag = "2")]
1186 pub write_consistency_factor: ::core::option::Option<u32>,
1187 #[deprecated]
1190 #[prost(bool, optional, tag = "3")]
1191 pub on_disk_payload: ::core::option::Option<bool>,
1192 #[prost(uint32, optional, tag = "4")]
1194 pub read_fan_out_factor: ::core::option::Option<u32>,
1195 #[prost(uint64, optional, tag = "5")]
1197 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1198 #[prost(message, optional, tag = "6")]
1200 pub payload: ::core::option::Option<PayloadStorageParams>,
1201 #[prost(message, optional, tag = "7")]
1203 pub id_tracker: ::core::option::Option<IdTrackerParams>,
1204}
1205#[derive(Clone, PartialEq, ::prost::Message)]
1206pub struct CollectionConfig {
1207 #[prost(message, optional, tag = "1")]
1209 pub params: ::core::option::Option<CollectionParams>,
1210 #[prost(message, optional, tag = "2")]
1212 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1213 #[prost(message, optional, tag = "3")]
1215 pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
1216 #[prost(message, optional, tag = "4")]
1218 pub wal_config: ::core::option::Option<WalConfigDiff>,
1219 #[prost(message, optional, tag = "5")]
1221 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1222 #[prost(message, optional, tag = "6")]
1224 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1225 #[prost(map = "string, message", tag = "7")]
1227 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1228}
1229#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1230pub struct KeywordIndexParams {
1231 #[prost(bool, optional, tag = "1")]
1233 pub is_tenant: ::core::option::Option<bool>,
1234 #[deprecated]
1237 #[prost(bool, optional, tag = "2")]
1238 pub on_disk: ::core::option::Option<bool>,
1239 #[prost(bool, optional, tag = "3")]
1243 pub enable_hnsw: ::core::option::Option<bool>,
1244 #[prost(message, optional, tag = "4")]
1246 pub prefix: ::core::option::Option<KeywordPrefixParams>,
1247 #[prost(enumeration = "Memory", optional, tag = "5")]
1250 pub memory: ::core::option::Option<i32>,
1251 #[prost(string, optional, tag = "6")]
1255 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1256}
1257#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1260pub struct KeywordPrefixParams {}
1261#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1262pub struct IntegerIndexParams {
1263 #[prost(bool, optional, tag = "1")]
1265 pub lookup: ::core::option::Option<bool>,
1266 #[prost(bool, optional, tag = "2")]
1268 pub range: ::core::option::Option<bool>,
1269 #[prost(bool, optional, tag = "3")]
1273 pub is_principal: ::core::option::Option<bool>,
1274 #[deprecated]
1277 #[prost(bool, optional, tag = "4")]
1278 pub on_disk: ::core::option::Option<bool>,
1279 #[prost(bool, optional, tag = "5")]
1283 pub enable_hnsw: ::core::option::Option<bool>,
1284 #[prost(enumeration = "Memory", optional, tag = "6")]
1287 pub memory: ::core::option::Option<i32>,
1288 #[prost(string, optional, tag = "7")]
1292 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1293}
1294#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1295pub struct FloatIndexParams {
1296 #[deprecated]
1299 #[prost(bool, optional, tag = "1")]
1300 pub on_disk: ::core::option::Option<bool>,
1301 #[prost(bool, optional, tag = "2")]
1304 pub is_principal: ::core::option::Option<bool>,
1305 #[prost(bool, optional, tag = "3")]
1309 pub enable_hnsw: ::core::option::Option<bool>,
1310 #[prost(enumeration = "Memory", optional, tag = "4")]
1313 pub memory: ::core::option::Option<i32>,
1314 #[prost(string, optional, tag = "5")]
1318 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1319}
1320#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1321pub struct GeoIndexParams {
1322 #[deprecated]
1325 #[prost(bool, optional, tag = "1")]
1326 pub on_disk: ::core::option::Option<bool>,
1327 #[prost(bool, optional, tag = "2")]
1331 pub enable_hnsw: ::core::option::Option<bool>,
1332 #[prost(enumeration = "Memory", optional, tag = "3")]
1335 pub memory: ::core::option::Option<i32>,
1336 #[prost(string, optional, tag = "4")]
1340 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1341}
1342#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1343pub struct StopwordsSet {
1344 #[prost(string, repeated, tag = "1")]
1346 pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1347 #[prost(string, repeated, tag = "2")]
1349 pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1350}
1351#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1352pub struct TextIndexParams {
1353 #[prost(enumeration = "TokenizerType", tag = "1")]
1355 pub tokenizer: i32,
1356 #[prost(bool, optional, tag = "2")]
1358 pub lowercase: ::core::option::Option<bool>,
1359 #[prost(uint64, optional, tag = "3")]
1361 pub min_token_len: ::core::option::Option<u64>,
1362 #[prost(uint64, optional, tag = "4")]
1364 pub max_token_len: ::core::option::Option<u64>,
1365 #[deprecated]
1368 #[prost(bool, optional, tag = "5")]
1369 pub on_disk: ::core::option::Option<bool>,
1370 #[prost(message, optional, tag = "6")]
1372 pub stopwords: ::core::option::Option<StopwordsSet>,
1373 #[prost(bool, optional, tag = "7")]
1375 pub phrase_matching: ::core::option::Option<bool>,
1376 #[prost(message, optional, tag = "8")]
1378 pub stemmer: ::core::option::Option<StemmingAlgorithm>,
1379 #[prost(bool, optional, tag = "9")]
1382 pub ascii_folding: ::core::option::Option<bool>,
1383 #[prost(bool, optional, tag = "10")]
1387 pub enable_hnsw: ::core::option::Option<bool>,
1388 #[prost(enumeration = "Memory", optional, tag = "11")]
1391 pub memory: ::core::option::Option<i32>,
1392 #[prost(message, optional, tag = "12")]
1396 pub scoring: ::core::option::Option<TextScoringParams>,
1397 #[prost(string, optional, tag = "13")]
1403 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1404}
1405#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1406pub struct TextScoringParams {
1407 #[prost(enumeration = "TextScoringType", tag = "1")]
1409 pub r#type: i32,
1410}
1411#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1412pub struct StemmingAlgorithm {
1413 #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1, 2")]
1414 pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
1415}
1416pub mod stemming_algorithm {
1418 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1419 pub enum StemmingParams {
1420 #[prost(message, tag = "1")]
1422 Snowball(super::SnowballParams),
1423 #[prost(message, tag = "2")]
1425 Disabled(super::DisabledStemmer),
1426 }
1427}
1428#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1429pub struct SnowballParams {
1430 #[prost(string, tag = "1")]
1432 pub language: ::prost::alloc::string::String,
1433}
1434#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1436pub struct DisabledStemmer {}
1437#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1438pub struct BoolIndexParams {
1439 #[deprecated]
1442 #[prost(bool, optional, tag = "1")]
1443 pub on_disk: ::core::option::Option<bool>,
1444 #[prost(bool, optional, tag = "2")]
1448 pub enable_hnsw: ::core::option::Option<bool>,
1449 #[prost(enumeration = "Memory", optional, tag = "3")]
1452 pub memory: ::core::option::Option<i32>,
1453 #[prost(string, optional, tag = "4")]
1457 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1458}
1459#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1460pub struct DatetimeIndexParams {
1461 #[deprecated]
1464 #[prost(bool, optional, tag = "1")]
1465 pub on_disk: ::core::option::Option<bool>,
1466 #[prost(bool, optional, tag = "2")]
1469 pub is_principal: ::core::option::Option<bool>,
1470 #[prost(bool, optional, tag = "3")]
1474 pub enable_hnsw: ::core::option::Option<bool>,
1475 #[prost(enumeration = "Memory", optional, tag = "4")]
1478 pub memory: ::core::option::Option<i32>,
1479 #[prost(string, optional, tag = "5")]
1483 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1484}
1485#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1486pub struct UuidIndexParams {
1487 #[prost(bool, optional, tag = "1")]
1489 pub is_tenant: ::core::option::Option<bool>,
1490 #[deprecated]
1493 #[prost(bool, optional, tag = "2")]
1494 pub on_disk: ::core::option::Option<bool>,
1495 #[prost(bool, optional, tag = "3")]
1499 pub enable_hnsw: ::core::option::Option<bool>,
1500 #[prost(enumeration = "Memory", optional, tag = "4")]
1503 pub memory: ::core::option::Option<i32>,
1504 #[prost(string, optional, tag = "5")]
1508 pub nested: ::core::option::Option<::prost::alloc::string::String>,
1509}
1510#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1511pub struct PayloadIndexParams {
1512 #[prost(
1513 oneof = "payload_index_params::IndexParams",
1514 tags = "3, 2, 4, 5, 1, 6, 7, 8"
1515 )]
1516 pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
1517}
1518pub mod payload_index_params {
1520 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1521 pub enum IndexParams {
1522 #[prost(message, tag = "3")]
1524 KeywordIndexParams(super::KeywordIndexParams),
1525 #[prost(message, tag = "2")]
1527 IntegerIndexParams(super::IntegerIndexParams),
1528 #[prost(message, tag = "4")]
1530 FloatIndexParams(super::FloatIndexParams),
1531 #[prost(message, tag = "5")]
1533 GeoIndexParams(super::GeoIndexParams),
1534 #[prost(message, tag = "1")]
1536 TextIndexParams(super::TextIndexParams),
1537 #[prost(message, tag = "6")]
1539 BoolIndexParams(super::BoolIndexParams),
1540 #[prost(message, tag = "7")]
1542 DatetimeIndexParams(super::DatetimeIndexParams),
1543 #[prost(message, tag = "8")]
1545 UuidIndexParams(super::UuidIndexParams),
1546 }
1547}
1548#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1549pub struct PayloadSchemaInfo {
1550 #[prost(enumeration = "PayloadSchemaType", tag = "1")]
1552 pub data_type: i32,
1553 #[prost(message, optional, tag = "2")]
1555 pub params: ::core::option::Option<PayloadIndexParams>,
1556 #[prost(uint64, optional, tag = "3")]
1558 pub points: ::core::option::Option<u64>,
1559}
1560#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1561pub struct UpdateQueueInfo {
1562 #[prost(uint64, tag = "1")]
1564 pub length: u64,
1565 #[prost(uint64, optional, tag = "2")]
1567 pub deferred_points: ::core::option::Option<u64>,
1568}
1569#[derive(Clone, PartialEq, ::prost::Message)]
1570pub struct CollectionInfo {
1571 #[prost(enumeration = "CollectionStatus", tag = "1")]
1573 pub status: i32,
1574 #[prost(message, optional, tag = "2")]
1576 pub optimizer_status: ::core::option::Option<OptimizerStatus>,
1577 #[prost(uint64, tag = "4")]
1579 pub segments_count: u64,
1580 #[prost(message, optional, tag = "7")]
1582 pub config: ::core::option::Option<CollectionConfig>,
1583 #[prost(map = "string, message", tag = "8")]
1585 pub payload_schema: ::std::collections::HashMap<
1586 ::prost::alloc::string::String,
1587 PayloadSchemaInfo,
1588 >,
1589 #[prost(uint64, optional, tag = "9")]
1591 pub points_count: ::core::option::Option<u64>,
1592 #[prost(uint64, optional, tag = "10")]
1594 pub indexed_vectors_count: ::core::option::Option<u64>,
1595 #[prost(message, repeated, tag = "11")]
1597 pub warnings: ::prost::alloc::vec::Vec<CollectionWarning>,
1598 #[prost(message, optional, tag = "12")]
1600 pub update_queue: ::core::option::Option<UpdateQueueInfo>,
1601 #[prost(message, optional, tag = "13")]
1603 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1604}
1605#[derive(Clone, PartialEq, ::prost::Message)]
1606pub struct ChangeAliases {
1607 #[prost(message, repeated, tag = "1")]
1609 pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
1610 #[prost(uint64, optional, tag = "2")]
1613 pub timeout: ::core::option::Option<u64>,
1614}
1615#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1616pub struct AliasOperations {
1617 #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
1618 pub action: ::core::option::Option<alias_operations::Action>,
1619}
1620pub mod alias_operations {
1622 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1623 pub enum Action {
1624 #[prost(message, tag = "1")]
1625 CreateAlias(super::CreateAlias),
1626 #[prost(message, tag = "2")]
1627 RenameAlias(super::RenameAlias),
1628 #[prost(message, tag = "3")]
1629 DeleteAlias(super::DeleteAlias),
1630 }
1631}
1632#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1633pub struct CreateAlias {
1634 #[prost(string, tag = "1")]
1636 pub collection_name: ::prost::alloc::string::String,
1637 #[prost(string, tag = "2")]
1639 pub alias_name: ::prost::alloc::string::String,
1640}
1641#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1642pub struct RenameAlias {
1643 #[prost(string, tag = "1")]
1645 pub old_alias_name: ::prost::alloc::string::String,
1646 #[prost(string, tag = "2")]
1648 pub new_alias_name: ::prost::alloc::string::String,
1649}
1650#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1651pub struct DeleteAlias {
1652 #[prost(string, tag = "1")]
1654 pub alias_name: ::prost::alloc::string::String,
1655}
1656#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1657pub struct ListAliasesRequest {}
1658#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1659pub struct ListCollectionAliasesRequest {
1660 #[prost(string, tag = "1")]
1662 pub collection_name: ::prost::alloc::string::String,
1663}
1664#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1665pub struct AliasDescription {
1666 #[prost(string, tag = "1")]
1668 pub alias_name: ::prost::alloc::string::String,
1669 #[prost(string, tag = "2")]
1671 pub collection_name: ::prost::alloc::string::String,
1672}
1673#[derive(Clone, PartialEq, ::prost::Message)]
1674pub struct ListAliasesResponse {
1675 #[prost(message, repeated, tag = "1")]
1676 pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
1677 #[prost(double, tag = "2")]
1679 pub time: f64,
1680}
1681#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1682pub struct CollectionClusterInfoRequest {
1683 #[prost(string, tag = "1")]
1685 pub collection_name: ::prost::alloc::string::String,
1686}
1687#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1688pub struct ShardKey {
1689 #[prost(oneof = "shard_key::Key", tags = "1, 2")]
1690 pub key: ::core::option::Option<shard_key::Key>,
1691}
1692pub mod shard_key {
1694 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1695 pub enum Key {
1696 #[prost(string, tag = "1")]
1698 Keyword(::prost::alloc::string::String),
1699 #[prost(uint64, tag = "2")]
1701 Number(u64),
1702 }
1703}
1704#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1705pub struct LocalShardInfo {
1706 #[prost(uint32, tag = "1")]
1708 pub shard_id: u32,
1709 #[prost(uint64, tag = "2")]
1711 pub points_count: u64,
1712 #[prost(enumeration = "ReplicaState", tag = "3")]
1714 pub state: i32,
1715 #[prost(message, optional, tag = "4")]
1717 pub shard_key: ::core::option::Option<ShardKey>,
1718}
1719#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1720pub struct RemoteShardInfo {
1721 #[prost(uint32, tag = "1")]
1723 pub shard_id: u32,
1724 #[prost(uint64, tag = "2")]
1726 pub peer_id: u64,
1727 #[prost(enumeration = "ReplicaState", tag = "3")]
1729 pub state: i32,
1730 #[prost(message, optional, tag = "4")]
1732 pub shard_key: ::core::option::Option<ShardKey>,
1733}
1734#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1735pub struct ShardTransferInfo {
1736 #[prost(uint32, tag = "1")]
1738 pub shard_id: u32,
1739 #[prost(uint32, optional, tag = "5")]
1740 pub to_shard_id: ::core::option::Option<u32>,
1741 #[prost(uint64, tag = "2")]
1742 pub from: u64,
1743 #[prost(uint64, tag = "3")]
1744 pub to: u64,
1745 #[prost(bool, tag = "4")]
1748 pub sync: bool,
1749}
1750#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1751pub struct ReshardingInfo {
1752 #[prost(uint32, tag = "1")]
1753 pub shard_id: u32,
1754 #[prost(uint64, tag = "2")]
1755 pub peer_id: u64,
1756 #[prost(message, optional, tag = "3")]
1757 pub shard_key: ::core::option::Option<ShardKey>,
1758 #[prost(enumeration = "ReshardingDirection", tag = "4")]
1759 pub direction: i32,
1760}
1761#[derive(Clone, PartialEq, ::prost::Message)]
1762pub struct CollectionClusterInfoResponse {
1763 #[prost(uint64, tag = "1")]
1765 pub peer_id: u64,
1766 #[prost(uint64, tag = "2")]
1768 pub shard_count: u64,
1769 #[prost(message, repeated, tag = "3")]
1771 pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1772 #[prost(message, repeated, tag = "4")]
1774 pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1775 #[prost(message, repeated, tag = "5")]
1777 pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1778 #[prost(message, repeated, tag = "6")]
1780 pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1781 #[prost(double, tag = "7")]
1783 pub time: f64,
1784}
1785#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1786pub struct MoveShard {
1787 #[prost(uint32, tag = "1")]
1789 pub shard_id: u32,
1790 #[prost(uint32, optional, tag = "5")]
1791 pub to_shard_id: ::core::option::Option<u32>,
1792 #[prost(uint64, tag = "2")]
1793 pub from_peer_id: u64,
1794 #[prost(uint64, tag = "3")]
1795 pub to_peer_id: u64,
1796 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1797 pub method: ::core::option::Option<i32>,
1798}
1799#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1800pub struct ReplicateShard {
1801 #[prost(uint32, tag = "1")]
1803 pub shard_id: u32,
1804 #[prost(uint32, optional, tag = "5")]
1805 pub to_shard_id: ::core::option::Option<u32>,
1806 #[prost(uint64, tag = "2")]
1807 pub from_peer_id: u64,
1808 #[prost(uint64, tag = "3")]
1809 pub to_peer_id: u64,
1810 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1811 pub method: ::core::option::Option<i32>,
1812}
1813#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1814pub struct AbortShardTransfer {
1815 #[prost(uint32, tag = "1")]
1817 pub shard_id: u32,
1818 #[prost(uint32, optional, tag = "4")]
1819 pub to_shard_id: ::core::option::Option<u32>,
1820 #[prost(uint64, tag = "2")]
1821 pub from_peer_id: u64,
1822 #[prost(uint64, tag = "3")]
1823 pub to_peer_id: u64,
1824}
1825#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1826pub struct RestartTransfer {
1827 #[prost(uint32, tag = "1")]
1829 pub shard_id: u32,
1830 #[prost(uint32, optional, tag = "5")]
1831 pub to_shard_id: ::core::option::Option<u32>,
1832 #[prost(uint64, tag = "2")]
1833 pub from_peer_id: u64,
1834 #[prost(uint64, tag = "3")]
1835 pub to_peer_id: u64,
1836 #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1837 pub method: i32,
1838}
1839#[derive(Clone, PartialEq, ::prost::Message)]
1840pub struct ReplicatePoints {
1841 #[prost(message, optional, tag = "1")]
1843 pub from_shard_key: ::core::option::Option<ShardKey>,
1844 #[prost(message, optional, tag = "2")]
1846 pub to_shard_key: ::core::option::Option<ShardKey>,
1847 #[prost(message, optional, tag = "3")]
1849 pub filter: ::core::option::Option<Filter>,
1850}
1851#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1852pub struct Replica {
1853 #[prost(uint32, tag = "1")]
1854 pub shard_id: u32,
1855 #[prost(uint64, tag = "2")]
1856 pub peer_id: u64,
1857}
1858#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1859pub struct CreateShardKey {
1860 #[prost(message, optional, tag = "1")]
1862 pub shard_key: ::core::option::Option<ShardKey>,
1863 #[prost(uint32, optional, tag = "2")]
1865 pub shards_number: ::core::option::Option<u32>,
1866 #[prost(uint32, optional, tag = "3")]
1868 pub replication_factor: ::core::option::Option<u32>,
1869 #[prost(uint64, repeated, tag = "4")]
1871 pub placement: ::prost::alloc::vec::Vec<u64>,
1872 #[prost(enumeration = "ReplicaState", optional, tag = "5")]
1874 pub initial_state: ::core::option::Option<i32>,
1875}
1876#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1877pub struct DeleteShardKey {
1878 #[prost(message, optional, tag = "1")]
1880 pub shard_key: ::core::option::Option<ShardKey>,
1881}
1882#[derive(Clone, PartialEq, ::prost::Message)]
1883pub struct UpdateCollectionClusterSetupRequest {
1884 #[prost(string, tag = "1")]
1886 pub collection_name: ::prost::alloc::string::String,
1887 #[prost(uint64, optional, tag = "6")]
1890 pub timeout: ::core::option::Option<u64>,
1891 #[prost(
1892 oneof = "update_collection_cluster_setup_request::Operation",
1893 tags = "2, 3, 4, 5, 7, 8, 9, 10"
1894 )]
1895 pub operation: ::core::option::Option<
1896 update_collection_cluster_setup_request::Operation,
1897 >,
1898}
1899pub mod update_collection_cluster_setup_request {
1901 #[derive(Clone, PartialEq, ::prost::Oneof)]
1902 pub enum Operation {
1903 #[prost(message, tag = "2")]
1904 MoveShard(super::MoveShard),
1905 #[prost(message, tag = "3")]
1906 ReplicateShard(super::ReplicateShard),
1907 #[prost(message, tag = "4")]
1908 AbortTransfer(super::AbortShardTransfer),
1909 #[prost(message, tag = "5")]
1910 DropReplica(super::Replica),
1911 #[prost(message, tag = "7")]
1912 CreateShardKey(super::CreateShardKey),
1913 #[prost(message, tag = "8")]
1914 DeleteShardKey(super::DeleteShardKey),
1915 #[prost(message, tag = "9")]
1916 RestartTransfer(super::RestartTransfer),
1917 #[prost(message, tag = "10")]
1918 ReplicatePoints(super::ReplicatePoints),
1919 }
1920}
1921#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1922pub struct UpdateCollectionClusterSetupResponse {
1923 #[prost(bool, tag = "1")]
1924 pub result: bool,
1925 #[prost(double, tag = "2")]
1927 pub time: f64,
1928}
1929#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1930pub struct CreateShardKeyRequest {
1931 #[prost(string, tag = "1")]
1933 pub collection_name: ::prost::alloc::string::String,
1934 #[prost(message, optional, tag = "2")]
1936 pub request: ::core::option::Option<CreateShardKey>,
1937 #[prost(uint64, optional, tag = "3")]
1940 pub timeout: ::core::option::Option<u64>,
1941}
1942#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1943pub struct DeleteShardKeyRequest {
1944 #[prost(string, tag = "1")]
1946 pub collection_name: ::prost::alloc::string::String,
1947 #[prost(message, optional, tag = "2")]
1949 pub request: ::core::option::Option<DeleteShardKey>,
1950 #[prost(uint64, optional, tag = "3")]
1953 pub timeout: ::core::option::Option<u64>,
1954}
1955#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1956pub struct ListShardKeysRequest {
1957 #[prost(string, tag = "1")]
1959 pub collection_name: ::prost::alloc::string::String,
1960}
1961#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1962pub struct CreateShardKeyResponse {
1963 #[prost(bool, tag = "1")]
1964 pub result: bool,
1965 #[prost(double, tag = "2")]
1967 pub time: f64,
1968}
1969#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1970pub struct DeleteShardKeyResponse {
1971 #[prost(bool, tag = "1")]
1972 pub result: bool,
1973 #[prost(double, tag = "2")]
1975 pub time: f64,
1976}
1977#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1978pub struct ShardKeyDescription {
1979 #[prost(message, optional, tag = "1")]
1980 pub key: ::core::option::Option<ShardKey>,
1981}
1982#[derive(Clone, PartialEq, ::prost::Message)]
1983pub struct ListShardKeysResponse {
1984 #[prost(message, repeated, tag = "1")]
1985 pub shard_keys: ::prost::alloc::vec::Vec<ShardKeyDescription>,
1986 #[prost(double, tag = "2")]
1988 pub time: f64,
1989}
1990#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1991#[repr(i32)]
1992pub enum Datatype {
1993 Default = 0,
1994 Float32 = 1,
1995 Uint8 = 2,
1996 Float16 = 3,
1997 Turbo4 = 4,
1998 Turbo8 = 5,
1999 Turbo16 = 6,
2000}
2001impl Datatype {
2002 pub fn as_str_name(&self) -> &'static str {
2007 match self {
2008 Self::Default => "Default",
2009 Self::Float32 => "Float32",
2010 Self::Uint8 => "Uint8",
2011 Self::Float16 => "Float16",
2012 Self::Turbo4 => "Turbo4",
2013 Self::Turbo8 => "Turbo8",
2014 Self::Turbo16 => "Turbo16",
2015 }
2016 }
2017 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2019 match value {
2020 "Default" => Some(Self::Default),
2021 "Float32" => Some(Self::Float32),
2022 "Uint8" => Some(Self::Uint8),
2023 "Float16" => Some(Self::Float16),
2024 "Turbo4" => Some(Self::Turbo4),
2025 "Turbo8" => Some(Self::Turbo8),
2026 "Turbo16" => Some(Self::Turbo16),
2027 _ => None,
2028 }
2029 }
2030}
2031#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2035#[repr(i32)]
2036pub enum Memory {
2037 Unknown = 0,
2038 Cold = 1,
2040 Cached = 2,
2042 Pinned = 3,
2044}
2045impl Memory {
2046 pub fn as_str_name(&self) -> &'static str {
2051 match self {
2052 Self::Unknown => "MemoryUnknown",
2053 Self::Cold => "Cold",
2054 Self::Cached => "Cached",
2055 Self::Pinned => "Pinned",
2056 }
2057 }
2058 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2060 match value {
2061 "MemoryUnknown" => Some(Self::Unknown),
2062 "Cold" => Some(Self::Cold),
2063 "Cached" => Some(Self::Cached),
2064 "Pinned" => Some(Self::Pinned),
2065 _ => None,
2066 }
2067 }
2068}
2069#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2070#[repr(i32)]
2071pub enum Modifier {
2072 None = 0,
2073 Idf = 1,
2075}
2076impl Modifier {
2077 pub fn as_str_name(&self) -> &'static str {
2082 match self {
2083 Self::None => "None",
2084 Self::Idf => "Idf",
2085 }
2086 }
2087 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2089 match value {
2090 "None" => Some(Self::None),
2091 "Idf" => Some(Self::Idf),
2092 _ => None,
2093 }
2094 }
2095}
2096#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2097#[repr(i32)]
2098pub enum MultiVectorComparator {
2099 MaxSim = 0,
2100}
2101impl MultiVectorComparator {
2102 pub fn as_str_name(&self) -> &'static str {
2107 match self {
2108 Self::MaxSim => "MaxSim",
2109 }
2110 }
2111 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2113 match value {
2114 "MaxSim" => Some(Self::MaxSim),
2115 _ => None,
2116 }
2117 }
2118}
2119#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2120#[repr(i32)]
2121pub enum Distance {
2122 UnknownDistance = 0,
2123 Cosine = 1,
2124 Euclid = 2,
2125 Dot = 3,
2126 Manhattan = 4,
2127}
2128impl Distance {
2129 pub fn as_str_name(&self) -> &'static str {
2134 match self {
2135 Self::UnknownDistance => "UnknownDistance",
2136 Self::Cosine => "Cosine",
2137 Self::Euclid => "Euclid",
2138 Self::Dot => "Dot",
2139 Self::Manhattan => "Manhattan",
2140 }
2141 }
2142 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2144 match value {
2145 "UnknownDistance" => Some(Self::UnknownDistance),
2146 "Cosine" => Some(Self::Cosine),
2147 "Euclid" => Some(Self::Euclid),
2148 "Dot" => Some(Self::Dot),
2149 "Manhattan" => Some(Self::Manhattan),
2150 _ => None,
2151 }
2152 }
2153}
2154#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2155#[repr(i32)]
2156pub enum CollectionStatus {
2157 UnknownCollectionStatus = 0,
2158 Green = 1,
2160 Yellow = 2,
2162 Red = 3,
2164 Grey = 4,
2166}
2167impl CollectionStatus {
2168 pub fn as_str_name(&self) -> &'static str {
2173 match self {
2174 Self::UnknownCollectionStatus => "UnknownCollectionStatus",
2175 Self::Green => "Green",
2176 Self::Yellow => "Yellow",
2177 Self::Red => "Red",
2178 Self::Grey => "Grey",
2179 }
2180 }
2181 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2183 match value {
2184 "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
2185 "Green" => Some(Self::Green),
2186 "Yellow" => Some(Self::Yellow),
2187 "Red" => Some(Self::Red),
2188 "Grey" => Some(Self::Grey),
2189 _ => None,
2190 }
2191 }
2192}
2193#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2194#[repr(i32)]
2195pub enum PayloadSchemaType {
2196 UnknownType = 0,
2197 Keyword = 1,
2198 Integer = 2,
2199 Float = 3,
2200 Geo = 4,
2201 Text = 5,
2202 Bool = 6,
2203 Datetime = 7,
2204 Uuid = 8,
2205}
2206impl PayloadSchemaType {
2207 pub fn as_str_name(&self) -> &'static str {
2212 match self {
2213 Self::UnknownType => "UnknownType",
2214 Self::Keyword => "Keyword",
2215 Self::Integer => "Integer",
2216 Self::Float => "Float",
2217 Self::Geo => "Geo",
2218 Self::Text => "Text",
2219 Self::Bool => "Bool",
2220 Self::Datetime => "Datetime",
2221 Self::Uuid => "Uuid",
2222 }
2223 }
2224 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2226 match value {
2227 "UnknownType" => Some(Self::UnknownType),
2228 "Keyword" => Some(Self::Keyword),
2229 "Integer" => Some(Self::Integer),
2230 "Float" => Some(Self::Float),
2231 "Geo" => Some(Self::Geo),
2232 "Text" => Some(Self::Text),
2233 "Bool" => Some(Self::Bool),
2234 "Datetime" => Some(Self::Datetime),
2235 "Uuid" => Some(Self::Uuid),
2236 _ => None,
2237 }
2238 }
2239}
2240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2241#[repr(i32)]
2242pub enum QuantizationType {
2243 UnknownQuantization = 0,
2244 Int8 = 1,
2245}
2246impl QuantizationType {
2247 pub fn as_str_name(&self) -> &'static str {
2252 match self {
2253 Self::UnknownQuantization => "UnknownQuantization",
2254 Self::Int8 => "Int8",
2255 }
2256 }
2257 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2259 match value {
2260 "UnknownQuantization" => Some(Self::UnknownQuantization),
2261 "Int8" => Some(Self::Int8),
2262 _ => None,
2263 }
2264 }
2265}
2266#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2267#[repr(i32)]
2268pub enum CompressionRatio {
2269 X4 = 0,
2270 X8 = 1,
2271 X16 = 2,
2272 X32 = 3,
2273 X64 = 4,
2274}
2275impl CompressionRatio {
2276 pub fn as_str_name(&self) -> &'static str {
2281 match self {
2282 Self::X4 => "x4",
2283 Self::X8 => "x8",
2284 Self::X16 => "x16",
2285 Self::X32 => "x32",
2286 Self::X64 => "x64",
2287 }
2288 }
2289 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2291 match value {
2292 "x4" => Some(Self::X4),
2293 "x8" => Some(Self::X8),
2294 "x16" => Some(Self::X16),
2295 "x32" => Some(Self::X32),
2296 "x64" => Some(Self::X64),
2297 _ => None,
2298 }
2299 }
2300}
2301#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2302#[repr(i32)]
2303pub enum BinaryQuantizationEncoding {
2304 OneBit = 0,
2305 TwoBits = 1,
2306 OneAndHalfBits = 2,
2307}
2308impl BinaryQuantizationEncoding {
2309 pub fn as_str_name(&self) -> &'static str {
2314 match self {
2315 Self::OneBit => "OneBit",
2316 Self::TwoBits => "TwoBits",
2317 Self::OneAndHalfBits => "OneAndHalfBits",
2318 }
2319 }
2320 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2322 match value {
2323 "OneBit" => Some(Self::OneBit),
2324 "TwoBits" => Some(Self::TwoBits),
2325 "OneAndHalfBits" => Some(Self::OneAndHalfBits),
2326 _ => None,
2327 }
2328 }
2329}
2330#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2331#[repr(i32)]
2332pub enum TurboQuantBitSize {
2333 Bits1 = 0,
2334 Bits15 = 1,
2336 Bits2 = 2,
2337 Bits4 = 3,
2338 Bits8 = 4,
2339}
2340impl TurboQuantBitSize {
2341 pub fn as_str_name(&self) -> &'static str {
2346 match self {
2347 Self::Bits1 => "Bits1",
2348 Self::Bits15 => "Bits1_5",
2349 Self::Bits2 => "Bits2",
2350 Self::Bits4 => "Bits4",
2351 Self::Bits8 => "Bits8",
2352 }
2353 }
2354 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2356 match value {
2357 "Bits1" => Some(Self::Bits1),
2358 "Bits1_5" => Some(Self::Bits15),
2359 "Bits2" => Some(Self::Bits2),
2360 "Bits4" => Some(Self::Bits4),
2361 "Bits8" => Some(Self::Bits8),
2362 _ => None,
2363 }
2364 }
2365}
2366#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2367#[repr(i32)]
2368pub enum ShardingMethod {
2369 Auto = 0,
2371 Custom = 1,
2373}
2374impl ShardingMethod {
2375 pub fn as_str_name(&self) -> &'static str {
2380 match self {
2381 Self::Auto => "Auto",
2382 Self::Custom => "Custom",
2383 }
2384 }
2385 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2387 match value {
2388 "Auto" => Some(Self::Auto),
2389 "Custom" => Some(Self::Custom),
2390 _ => None,
2391 }
2392 }
2393}
2394#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2395#[repr(i32)]
2396pub enum TokenizerType {
2397 Unknown = 0,
2398 Prefix = 1,
2399 Whitespace = 2,
2400 Word = 3,
2401 Multilingual = 4,
2402 Code = 5,
2403}
2404impl TokenizerType {
2405 pub fn as_str_name(&self) -> &'static str {
2410 match self {
2411 Self::Unknown => "Unknown",
2412 Self::Prefix => "Prefix",
2413 Self::Whitespace => "Whitespace",
2414 Self::Word => "Word",
2415 Self::Multilingual => "Multilingual",
2416 Self::Code => "Code",
2417 }
2418 }
2419 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2421 match value {
2422 "Unknown" => Some(Self::Unknown),
2423 "Prefix" => Some(Self::Prefix),
2424 "Whitespace" => Some(Self::Whitespace),
2425 "Word" => Some(Self::Word),
2426 "Multilingual" => Some(Self::Multilingual),
2427 "Code" => Some(Self::Code),
2428 _ => None,
2429 }
2430 }
2431}
2432#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2433#[repr(i32)]
2434pub enum TextScoringType {
2435 Bm25 = 0,
2436}
2437impl TextScoringType {
2438 pub fn as_str_name(&self) -> &'static str {
2443 match self {
2444 Self::Bm25 => "Bm25",
2445 }
2446 }
2447 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2449 match value {
2450 "Bm25" => Some(Self::Bm25),
2451 _ => None,
2452 }
2453 }
2454}
2455#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2456#[repr(i32)]
2457pub enum ReplicaState {
2458 Active = 0,
2460 Dead = 1,
2462 Partial = 2,
2464 Initializing = 3,
2466 Listener = 4,
2469 PartialSnapshot = 5,
2472 Recovery = 6,
2475 Resharding = 7,
2477 ReshardingScaleDown = 8,
2479 ActiveRead = 9,
2481 ManualRecovery = 10,
2488}
2489impl ReplicaState {
2490 pub fn as_str_name(&self) -> &'static str {
2495 match self {
2496 Self::Active => "Active",
2497 Self::Dead => "Dead",
2498 Self::Partial => "Partial",
2499 Self::Initializing => "Initializing",
2500 Self::Listener => "Listener",
2501 Self::PartialSnapshot => "PartialSnapshot",
2502 Self::Recovery => "Recovery",
2503 Self::Resharding => "Resharding",
2504 Self::ReshardingScaleDown => "ReshardingScaleDown",
2505 Self::ActiveRead => "ActiveRead",
2506 Self::ManualRecovery => "ManualRecovery",
2507 }
2508 }
2509 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2511 match value {
2512 "Active" => Some(Self::Active),
2513 "Dead" => Some(Self::Dead),
2514 "Partial" => Some(Self::Partial),
2515 "Initializing" => Some(Self::Initializing),
2516 "Listener" => Some(Self::Listener),
2517 "PartialSnapshot" => Some(Self::PartialSnapshot),
2518 "Recovery" => Some(Self::Recovery),
2519 "Resharding" => Some(Self::Resharding),
2520 "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
2521 "ActiveRead" => Some(Self::ActiveRead),
2522 "ManualRecovery" => Some(Self::ManualRecovery),
2523 _ => None,
2524 }
2525 }
2526}
2527#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2529#[repr(i32)]
2530pub enum ReshardingDirection {
2531 Up = 0,
2533 Down = 1,
2535}
2536impl ReshardingDirection {
2537 pub fn as_str_name(&self) -> &'static str {
2542 match self {
2543 Self::Up => "Up",
2544 Self::Down => "Down",
2545 }
2546 }
2547 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2549 match value {
2550 "Up" => Some(Self::Up),
2551 "Down" => Some(Self::Down),
2552 _ => None,
2553 }
2554 }
2555}
2556#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2557#[repr(i32)]
2558pub enum ShardTransferMethod {
2559 StreamRecords = 0,
2561 Snapshot = 1,
2563 WalDelta = 2,
2565 ReshardingStreamRecords = 3,
2567}
2568impl ShardTransferMethod {
2569 pub fn as_str_name(&self) -> &'static str {
2574 match self {
2575 Self::StreamRecords => "StreamRecords",
2576 Self::Snapshot => "Snapshot",
2577 Self::WalDelta => "WalDelta",
2578 Self::ReshardingStreamRecords => "ReshardingStreamRecords",
2579 }
2580 }
2581 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2583 match value {
2584 "StreamRecords" => Some(Self::StreamRecords),
2585 "Snapshot" => Some(Self::Snapshot),
2586 "WalDelta" => Some(Self::WalDelta),
2587 "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
2588 _ => None,
2589 }
2590 }
2591}
2592pub mod collections_client {
2594 #![allow(
2595 unused_variables,
2596 dead_code,
2597 missing_docs,
2598 clippy::wildcard_imports,
2599 clippy::let_unit_value,
2600 )]
2601 use tonic::codegen::*;
2602 use tonic::codegen::http::Uri;
2603 #[derive(Debug, Clone)]
2604 pub struct CollectionsClient<T> {
2605 inner: tonic::client::Grpc<T>,
2606 }
2607 impl CollectionsClient<tonic::transport::Channel> {
2608 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2610 where
2611 D: TryInto<tonic::transport::Endpoint>,
2612 D::Error: Into<StdError>,
2613 {
2614 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2615 Ok(Self::new(conn))
2616 }
2617 }
2618 impl<T> CollectionsClient<T>
2619 where
2620 T: tonic::client::GrpcService<tonic::body::Body>,
2621 T::Error: Into<StdError>,
2622 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2623 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2624 {
2625 pub fn new(inner: T) -> Self {
2626 let inner = tonic::client::Grpc::new(inner);
2627 Self { inner }
2628 }
2629 pub fn with_origin(inner: T, origin: Uri) -> Self {
2630 let inner = tonic::client::Grpc::with_origin(inner, origin);
2631 Self { inner }
2632 }
2633 pub fn with_interceptor<F>(
2634 inner: T,
2635 interceptor: F,
2636 ) -> CollectionsClient<InterceptedService<T, F>>
2637 where
2638 F: tonic::service::Interceptor,
2639 T::ResponseBody: Default,
2640 T: tonic::codegen::Service<
2641 http::Request<tonic::body::Body>,
2642 Response = http::Response<
2643 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2644 >,
2645 >,
2646 <T as tonic::codegen::Service<
2647 http::Request<tonic::body::Body>,
2648 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2649 {
2650 CollectionsClient::new(InterceptedService::new(inner, interceptor))
2651 }
2652 #[must_use]
2657 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2658 self.inner = self.inner.send_compressed(encoding);
2659 self
2660 }
2661 #[must_use]
2663 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2664 self.inner = self.inner.accept_compressed(encoding);
2665 self
2666 }
2667 #[must_use]
2671 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2672 self.inner = self.inner.max_decoding_message_size(limit);
2673 self
2674 }
2675 #[must_use]
2679 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2680 self.inner = self.inner.max_encoding_message_size(limit);
2681 self
2682 }
2683 pub async fn get(
2685 &mut self,
2686 request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
2687 ) -> std::result::Result<
2688 tonic::Response<super::GetCollectionInfoResponse>,
2689 tonic::Status,
2690 > {
2691 self.inner
2692 .ready()
2693 .await
2694 .map_err(|e| {
2695 tonic::Status::unknown(
2696 format!("Service was not ready: {}", e.into()),
2697 )
2698 })?;
2699 let codec = tonic_prost::ProstCodec::default();
2700 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
2701 let mut req = request.into_request();
2702 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
2703 self.inner.unary(req, path, codec).await
2704 }
2705 pub async fn list(
2707 &mut self,
2708 request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
2709 ) -> std::result::Result<
2710 tonic::Response<super::ListCollectionsResponse>,
2711 tonic::Status,
2712 > {
2713 self.inner
2714 .ready()
2715 .await
2716 .map_err(|e| {
2717 tonic::Status::unknown(
2718 format!("Service was not ready: {}", e.into()),
2719 )
2720 })?;
2721 let codec = tonic_prost::ProstCodec::default();
2722 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
2723 let mut req = request.into_request();
2724 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
2725 self.inner.unary(req, path, codec).await
2726 }
2727 pub async fn create(
2729 &mut self,
2730 request: impl tonic::IntoRequest<super::CreateCollection>,
2731 ) -> std::result::Result<
2732 tonic::Response<super::CollectionOperationResponse>,
2733 tonic::Status,
2734 > {
2735 self.inner
2736 .ready()
2737 .await
2738 .map_err(|e| {
2739 tonic::Status::unknown(
2740 format!("Service was not ready: {}", e.into()),
2741 )
2742 })?;
2743 let codec = tonic_prost::ProstCodec::default();
2744 let path = http::uri::PathAndQuery::from_static(
2745 "/qdrant.Collections/Create",
2746 );
2747 let mut req = request.into_request();
2748 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
2749 self.inner.unary(req, path, codec).await
2750 }
2751 pub async fn update(
2753 &mut self,
2754 request: impl tonic::IntoRequest<super::UpdateCollection>,
2755 ) -> std::result::Result<
2756 tonic::Response<super::CollectionOperationResponse>,
2757 tonic::Status,
2758 > {
2759 self.inner
2760 .ready()
2761 .await
2762 .map_err(|e| {
2763 tonic::Status::unknown(
2764 format!("Service was not ready: {}", e.into()),
2765 )
2766 })?;
2767 let codec = tonic_prost::ProstCodec::default();
2768 let path = http::uri::PathAndQuery::from_static(
2769 "/qdrant.Collections/Update",
2770 );
2771 let mut req = request.into_request();
2772 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
2773 self.inner.unary(req, path, codec).await
2774 }
2775 pub async fn delete(
2777 &mut self,
2778 request: impl tonic::IntoRequest<super::DeleteCollection>,
2779 ) -> std::result::Result<
2780 tonic::Response<super::CollectionOperationResponse>,
2781 tonic::Status,
2782 > {
2783 self.inner
2784 .ready()
2785 .await
2786 .map_err(|e| {
2787 tonic::Status::unknown(
2788 format!("Service was not ready: {}", e.into()),
2789 )
2790 })?;
2791 let codec = tonic_prost::ProstCodec::default();
2792 let path = http::uri::PathAndQuery::from_static(
2793 "/qdrant.Collections/Delete",
2794 );
2795 let mut req = request.into_request();
2796 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
2797 self.inner.unary(req, path, codec).await
2798 }
2799 pub async fn update_aliases(
2801 &mut self,
2802 request: impl tonic::IntoRequest<super::ChangeAliases>,
2803 ) -> std::result::Result<
2804 tonic::Response<super::CollectionOperationResponse>,
2805 tonic::Status,
2806 > {
2807 self.inner
2808 .ready()
2809 .await
2810 .map_err(|e| {
2811 tonic::Status::unknown(
2812 format!("Service was not ready: {}", e.into()),
2813 )
2814 })?;
2815 let codec = tonic_prost::ProstCodec::default();
2816 let path = http::uri::PathAndQuery::from_static(
2817 "/qdrant.Collections/UpdateAliases",
2818 );
2819 let mut req = request.into_request();
2820 req.extensions_mut()
2821 .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
2822 self.inner.unary(req, path, codec).await
2823 }
2824 pub async fn list_collection_aliases(
2826 &mut self,
2827 request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
2828 ) -> std::result::Result<
2829 tonic::Response<super::ListAliasesResponse>,
2830 tonic::Status,
2831 > {
2832 self.inner
2833 .ready()
2834 .await
2835 .map_err(|e| {
2836 tonic::Status::unknown(
2837 format!("Service was not ready: {}", e.into()),
2838 )
2839 })?;
2840 let codec = tonic_prost::ProstCodec::default();
2841 let path = http::uri::PathAndQuery::from_static(
2842 "/qdrant.Collections/ListCollectionAliases",
2843 );
2844 let mut req = request.into_request();
2845 req.extensions_mut()
2846 .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
2847 self.inner.unary(req, path, codec).await
2848 }
2849 pub async fn list_aliases(
2851 &mut self,
2852 request: impl tonic::IntoRequest<super::ListAliasesRequest>,
2853 ) -> std::result::Result<
2854 tonic::Response<super::ListAliasesResponse>,
2855 tonic::Status,
2856 > {
2857 self.inner
2858 .ready()
2859 .await
2860 .map_err(|e| {
2861 tonic::Status::unknown(
2862 format!("Service was not ready: {}", e.into()),
2863 )
2864 })?;
2865 let codec = tonic_prost::ProstCodec::default();
2866 let path = http::uri::PathAndQuery::from_static(
2867 "/qdrant.Collections/ListAliases",
2868 );
2869 let mut req = request.into_request();
2870 req.extensions_mut()
2871 .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
2872 self.inner.unary(req, path, codec).await
2873 }
2874 pub async fn collection_cluster_info(
2876 &mut self,
2877 request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
2878 ) -> std::result::Result<
2879 tonic::Response<super::CollectionClusterInfoResponse>,
2880 tonic::Status,
2881 > {
2882 self.inner
2883 .ready()
2884 .await
2885 .map_err(|e| {
2886 tonic::Status::unknown(
2887 format!("Service was not ready: {}", e.into()),
2888 )
2889 })?;
2890 let codec = tonic_prost::ProstCodec::default();
2891 let path = http::uri::PathAndQuery::from_static(
2892 "/qdrant.Collections/CollectionClusterInfo",
2893 );
2894 let mut req = request.into_request();
2895 req.extensions_mut()
2896 .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2897 self.inner.unary(req, path, codec).await
2898 }
2899 pub async fn collection_exists(
2901 &mut self,
2902 request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2903 ) -> std::result::Result<
2904 tonic::Response<super::CollectionExistsResponse>,
2905 tonic::Status,
2906 > {
2907 self.inner
2908 .ready()
2909 .await
2910 .map_err(|e| {
2911 tonic::Status::unknown(
2912 format!("Service was not ready: {}", e.into()),
2913 )
2914 })?;
2915 let codec = tonic_prost::ProstCodec::default();
2916 let path = http::uri::PathAndQuery::from_static(
2917 "/qdrant.Collections/CollectionExists",
2918 );
2919 let mut req = request.into_request();
2920 req.extensions_mut()
2921 .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2922 self.inner.unary(req, path, codec).await
2923 }
2924 pub async fn update_collection_cluster_setup(
2926 &mut self,
2927 request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2928 ) -> std::result::Result<
2929 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2930 tonic::Status,
2931 > {
2932 self.inner
2933 .ready()
2934 .await
2935 .map_err(|e| {
2936 tonic::Status::unknown(
2937 format!("Service was not ready: {}", e.into()),
2938 )
2939 })?;
2940 let codec = tonic_prost::ProstCodec::default();
2941 let path = http::uri::PathAndQuery::from_static(
2942 "/qdrant.Collections/UpdateCollectionClusterSetup",
2943 );
2944 let mut req = request.into_request();
2945 req.extensions_mut()
2946 .insert(
2947 GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2948 );
2949 self.inner.unary(req, path, codec).await
2950 }
2951 pub async fn create_shard_key(
2953 &mut self,
2954 request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2955 ) -> std::result::Result<
2956 tonic::Response<super::CreateShardKeyResponse>,
2957 tonic::Status,
2958 > {
2959 self.inner
2960 .ready()
2961 .await
2962 .map_err(|e| {
2963 tonic::Status::unknown(
2964 format!("Service was not ready: {}", e.into()),
2965 )
2966 })?;
2967 let codec = tonic_prost::ProstCodec::default();
2968 let path = http::uri::PathAndQuery::from_static(
2969 "/qdrant.Collections/CreateShardKey",
2970 );
2971 let mut req = request.into_request();
2972 req.extensions_mut()
2973 .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2974 self.inner.unary(req, path, codec).await
2975 }
2976 pub async fn delete_shard_key(
2978 &mut self,
2979 request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2980 ) -> std::result::Result<
2981 tonic::Response<super::DeleteShardKeyResponse>,
2982 tonic::Status,
2983 > {
2984 self.inner
2985 .ready()
2986 .await
2987 .map_err(|e| {
2988 tonic::Status::unknown(
2989 format!("Service was not ready: {}", e.into()),
2990 )
2991 })?;
2992 let codec = tonic_prost::ProstCodec::default();
2993 let path = http::uri::PathAndQuery::from_static(
2994 "/qdrant.Collections/DeleteShardKey",
2995 );
2996 let mut req = request.into_request();
2997 req.extensions_mut()
2998 .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2999 self.inner.unary(req, path, codec).await
3000 }
3001 pub async fn list_shard_keys(
3003 &mut self,
3004 request: impl tonic::IntoRequest<super::ListShardKeysRequest>,
3005 ) -> std::result::Result<
3006 tonic::Response<super::ListShardKeysResponse>,
3007 tonic::Status,
3008 > {
3009 self.inner
3010 .ready()
3011 .await
3012 .map_err(|e| {
3013 tonic::Status::unknown(
3014 format!("Service was not ready: {}", e.into()),
3015 )
3016 })?;
3017 let codec = tonic_prost::ProstCodec::default();
3018 let path = http::uri::PathAndQuery::from_static(
3019 "/qdrant.Collections/ListShardKeys",
3020 );
3021 let mut req = request.into_request();
3022 req.extensions_mut()
3023 .insert(GrpcMethod::new("qdrant.Collections", "ListShardKeys"));
3024 self.inner.unary(req, path, codec).await
3025 }
3026 }
3027}
3028pub mod collections_server {
3030 #![allow(
3031 unused_variables,
3032 dead_code,
3033 missing_docs,
3034 clippy::wildcard_imports,
3035 clippy::let_unit_value,
3036 )]
3037 use tonic::codegen::*;
3038 #[async_trait]
3040 pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
3041 async fn get(
3043 &self,
3044 request: tonic::Request<super::GetCollectionInfoRequest>,
3045 ) -> std::result::Result<
3046 tonic::Response<super::GetCollectionInfoResponse>,
3047 tonic::Status,
3048 >;
3049 async fn list(
3051 &self,
3052 request: tonic::Request<super::ListCollectionsRequest>,
3053 ) -> std::result::Result<
3054 tonic::Response<super::ListCollectionsResponse>,
3055 tonic::Status,
3056 >;
3057 async fn create(
3059 &self,
3060 request: tonic::Request<super::CreateCollection>,
3061 ) -> std::result::Result<
3062 tonic::Response<super::CollectionOperationResponse>,
3063 tonic::Status,
3064 >;
3065 async fn update(
3067 &self,
3068 request: tonic::Request<super::UpdateCollection>,
3069 ) -> std::result::Result<
3070 tonic::Response<super::CollectionOperationResponse>,
3071 tonic::Status,
3072 >;
3073 async fn delete(
3075 &self,
3076 request: tonic::Request<super::DeleteCollection>,
3077 ) -> std::result::Result<
3078 tonic::Response<super::CollectionOperationResponse>,
3079 tonic::Status,
3080 >;
3081 async fn update_aliases(
3083 &self,
3084 request: tonic::Request<super::ChangeAliases>,
3085 ) -> std::result::Result<
3086 tonic::Response<super::CollectionOperationResponse>,
3087 tonic::Status,
3088 >;
3089 async fn list_collection_aliases(
3091 &self,
3092 request: tonic::Request<super::ListCollectionAliasesRequest>,
3093 ) -> std::result::Result<
3094 tonic::Response<super::ListAliasesResponse>,
3095 tonic::Status,
3096 >;
3097 async fn list_aliases(
3099 &self,
3100 request: tonic::Request<super::ListAliasesRequest>,
3101 ) -> std::result::Result<
3102 tonic::Response<super::ListAliasesResponse>,
3103 tonic::Status,
3104 >;
3105 async fn collection_cluster_info(
3107 &self,
3108 request: tonic::Request<super::CollectionClusterInfoRequest>,
3109 ) -> std::result::Result<
3110 tonic::Response<super::CollectionClusterInfoResponse>,
3111 tonic::Status,
3112 >;
3113 async fn collection_exists(
3115 &self,
3116 request: tonic::Request<super::CollectionExistsRequest>,
3117 ) -> std::result::Result<
3118 tonic::Response<super::CollectionExistsResponse>,
3119 tonic::Status,
3120 >;
3121 async fn update_collection_cluster_setup(
3123 &self,
3124 request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
3125 ) -> std::result::Result<
3126 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
3127 tonic::Status,
3128 >;
3129 async fn create_shard_key(
3131 &self,
3132 request: tonic::Request<super::CreateShardKeyRequest>,
3133 ) -> std::result::Result<
3134 tonic::Response<super::CreateShardKeyResponse>,
3135 tonic::Status,
3136 >;
3137 async fn delete_shard_key(
3139 &self,
3140 request: tonic::Request<super::DeleteShardKeyRequest>,
3141 ) -> std::result::Result<
3142 tonic::Response<super::DeleteShardKeyResponse>,
3143 tonic::Status,
3144 >;
3145 async fn list_shard_keys(
3147 &self,
3148 request: tonic::Request<super::ListShardKeysRequest>,
3149 ) -> std::result::Result<
3150 tonic::Response<super::ListShardKeysResponse>,
3151 tonic::Status,
3152 >;
3153 }
3154 #[derive(Debug)]
3155 pub struct CollectionsServer<T> {
3156 inner: Arc<T>,
3157 accept_compression_encodings: EnabledCompressionEncodings,
3158 send_compression_encodings: EnabledCompressionEncodings,
3159 max_decoding_message_size: Option<usize>,
3160 max_encoding_message_size: Option<usize>,
3161 }
3162 impl<T> CollectionsServer<T> {
3163 pub fn new(inner: T) -> Self {
3164 Self::from_arc(Arc::new(inner))
3165 }
3166 pub fn from_arc(inner: Arc<T>) -> Self {
3167 Self {
3168 inner,
3169 accept_compression_encodings: Default::default(),
3170 send_compression_encodings: Default::default(),
3171 max_decoding_message_size: None,
3172 max_encoding_message_size: None,
3173 }
3174 }
3175 pub fn with_interceptor<F>(
3176 inner: T,
3177 interceptor: F,
3178 ) -> InterceptedService<Self, F>
3179 where
3180 F: tonic::service::Interceptor,
3181 {
3182 InterceptedService::new(Self::new(inner), interceptor)
3183 }
3184 #[must_use]
3186 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3187 self.accept_compression_encodings.enable(encoding);
3188 self
3189 }
3190 #[must_use]
3192 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3193 self.send_compression_encodings.enable(encoding);
3194 self
3195 }
3196 #[must_use]
3200 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3201 self.max_decoding_message_size = Some(limit);
3202 self
3203 }
3204 #[must_use]
3208 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3209 self.max_encoding_message_size = Some(limit);
3210 self
3211 }
3212 }
3213 impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
3214 where
3215 T: Collections,
3216 B: Body + std::marker::Send + 'static,
3217 B::Error: Into<StdError> + std::marker::Send + 'static,
3218 {
3219 type Response = http::Response<tonic::body::Body>;
3220 type Error = std::convert::Infallible;
3221 type Future = BoxFuture<Self::Response, Self::Error>;
3222 fn poll_ready(
3223 &mut self,
3224 _cx: &mut Context<'_>,
3225 ) -> Poll<std::result::Result<(), Self::Error>> {
3226 Poll::Ready(Ok(()))
3227 }
3228 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3229 match req.uri().path() {
3230 "/qdrant.Collections/Get" => {
3231 #[allow(non_camel_case_types)]
3232 struct GetSvc<T: Collections>(pub Arc<T>);
3233 impl<
3234 T: Collections,
3235 > tonic::server::UnaryService<super::GetCollectionInfoRequest>
3236 for GetSvc<T> {
3237 type Response = super::GetCollectionInfoResponse;
3238 type Future = BoxFuture<
3239 tonic::Response<Self::Response>,
3240 tonic::Status,
3241 >;
3242 fn call(
3243 &mut self,
3244 request: tonic::Request<super::GetCollectionInfoRequest>,
3245 ) -> Self::Future {
3246 let inner = Arc::clone(&self.0);
3247 let fut = async move {
3248 <T as Collections>::get(&inner, request).await
3249 };
3250 Box::pin(fut)
3251 }
3252 }
3253 let accept_compression_encodings = self.accept_compression_encodings;
3254 let send_compression_encodings = self.send_compression_encodings;
3255 let max_decoding_message_size = self.max_decoding_message_size;
3256 let max_encoding_message_size = self.max_encoding_message_size;
3257 let inner = self.inner.clone();
3258 let fut = async move {
3259 let method = GetSvc(inner);
3260 let codec = tonic_prost::ProstCodec::default();
3261 let mut grpc = tonic::server::Grpc::new(codec)
3262 .apply_compression_config(
3263 accept_compression_encodings,
3264 send_compression_encodings,
3265 )
3266 .apply_max_message_size_config(
3267 max_decoding_message_size,
3268 max_encoding_message_size,
3269 );
3270 let res = grpc.unary(method, req).await;
3271 Ok(res)
3272 };
3273 Box::pin(fut)
3274 }
3275 "/qdrant.Collections/List" => {
3276 #[allow(non_camel_case_types)]
3277 struct ListSvc<T: Collections>(pub Arc<T>);
3278 impl<
3279 T: Collections,
3280 > tonic::server::UnaryService<super::ListCollectionsRequest>
3281 for ListSvc<T> {
3282 type Response = super::ListCollectionsResponse;
3283 type Future = BoxFuture<
3284 tonic::Response<Self::Response>,
3285 tonic::Status,
3286 >;
3287 fn call(
3288 &mut self,
3289 request: tonic::Request<super::ListCollectionsRequest>,
3290 ) -> Self::Future {
3291 let inner = Arc::clone(&self.0);
3292 let fut = async move {
3293 <T as Collections>::list(&inner, request).await
3294 };
3295 Box::pin(fut)
3296 }
3297 }
3298 let accept_compression_encodings = self.accept_compression_encodings;
3299 let send_compression_encodings = self.send_compression_encodings;
3300 let max_decoding_message_size = self.max_decoding_message_size;
3301 let max_encoding_message_size = self.max_encoding_message_size;
3302 let inner = self.inner.clone();
3303 let fut = async move {
3304 let method = ListSvc(inner);
3305 let codec = tonic_prost::ProstCodec::default();
3306 let mut grpc = tonic::server::Grpc::new(codec)
3307 .apply_compression_config(
3308 accept_compression_encodings,
3309 send_compression_encodings,
3310 )
3311 .apply_max_message_size_config(
3312 max_decoding_message_size,
3313 max_encoding_message_size,
3314 );
3315 let res = grpc.unary(method, req).await;
3316 Ok(res)
3317 };
3318 Box::pin(fut)
3319 }
3320 "/qdrant.Collections/Create" => {
3321 #[allow(non_camel_case_types)]
3322 struct CreateSvc<T: Collections>(pub Arc<T>);
3323 impl<
3324 T: Collections,
3325 > tonic::server::UnaryService<super::CreateCollection>
3326 for CreateSvc<T> {
3327 type Response = super::CollectionOperationResponse;
3328 type Future = BoxFuture<
3329 tonic::Response<Self::Response>,
3330 tonic::Status,
3331 >;
3332 fn call(
3333 &mut self,
3334 request: tonic::Request<super::CreateCollection>,
3335 ) -> Self::Future {
3336 let inner = Arc::clone(&self.0);
3337 let fut = async move {
3338 <T as Collections>::create(&inner, request).await
3339 };
3340 Box::pin(fut)
3341 }
3342 }
3343 let accept_compression_encodings = self.accept_compression_encodings;
3344 let send_compression_encodings = self.send_compression_encodings;
3345 let max_decoding_message_size = self.max_decoding_message_size;
3346 let max_encoding_message_size = self.max_encoding_message_size;
3347 let inner = self.inner.clone();
3348 let fut = async move {
3349 let method = CreateSvc(inner);
3350 let codec = tonic_prost::ProstCodec::default();
3351 let mut grpc = tonic::server::Grpc::new(codec)
3352 .apply_compression_config(
3353 accept_compression_encodings,
3354 send_compression_encodings,
3355 )
3356 .apply_max_message_size_config(
3357 max_decoding_message_size,
3358 max_encoding_message_size,
3359 );
3360 let res = grpc.unary(method, req).await;
3361 Ok(res)
3362 };
3363 Box::pin(fut)
3364 }
3365 "/qdrant.Collections/Update" => {
3366 #[allow(non_camel_case_types)]
3367 struct UpdateSvc<T: Collections>(pub Arc<T>);
3368 impl<
3369 T: Collections,
3370 > tonic::server::UnaryService<super::UpdateCollection>
3371 for UpdateSvc<T> {
3372 type Response = super::CollectionOperationResponse;
3373 type Future = BoxFuture<
3374 tonic::Response<Self::Response>,
3375 tonic::Status,
3376 >;
3377 fn call(
3378 &mut self,
3379 request: tonic::Request<super::UpdateCollection>,
3380 ) -> Self::Future {
3381 let inner = Arc::clone(&self.0);
3382 let fut = async move {
3383 <T as Collections>::update(&inner, request).await
3384 };
3385 Box::pin(fut)
3386 }
3387 }
3388 let accept_compression_encodings = self.accept_compression_encodings;
3389 let send_compression_encodings = self.send_compression_encodings;
3390 let max_decoding_message_size = self.max_decoding_message_size;
3391 let max_encoding_message_size = self.max_encoding_message_size;
3392 let inner = self.inner.clone();
3393 let fut = async move {
3394 let method = UpdateSvc(inner);
3395 let codec = tonic_prost::ProstCodec::default();
3396 let mut grpc = tonic::server::Grpc::new(codec)
3397 .apply_compression_config(
3398 accept_compression_encodings,
3399 send_compression_encodings,
3400 )
3401 .apply_max_message_size_config(
3402 max_decoding_message_size,
3403 max_encoding_message_size,
3404 );
3405 let res = grpc.unary(method, req).await;
3406 Ok(res)
3407 };
3408 Box::pin(fut)
3409 }
3410 "/qdrant.Collections/Delete" => {
3411 #[allow(non_camel_case_types)]
3412 struct DeleteSvc<T: Collections>(pub Arc<T>);
3413 impl<
3414 T: Collections,
3415 > tonic::server::UnaryService<super::DeleteCollection>
3416 for DeleteSvc<T> {
3417 type Response = super::CollectionOperationResponse;
3418 type Future = BoxFuture<
3419 tonic::Response<Self::Response>,
3420 tonic::Status,
3421 >;
3422 fn call(
3423 &mut self,
3424 request: tonic::Request<super::DeleteCollection>,
3425 ) -> Self::Future {
3426 let inner = Arc::clone(&self.0);
3427 let fut = async move {
3428 <T as Collections>::delete(&inner, request).await
3429 };
3430 Box::pin(fut)
3431 }
3432 }
3433 let accept_compression_encodings = self.accept_compression_encodings;
3434 let send_compression_encodings = self.send_compression_encodings;
3435 let max_decoding_message_size = self.max_decoding_message_size;
3436 let max_encoding_message_size = self.max_encoding_message_size;
3437 let inner = self.inner.clone();
3438 let fut = async move {
3439 let method = DeleteSvc(inner);
3440 let codec = tonic_prost::ProstCodec::default();
3441 let mut grpc = tonic::server::Grpc::new(codec)
3442 .apply_compression_config(
3443 accept_compression_encodings,
3444 send_compression_encodings,
3445 )
3446 .apply_max_message_size_config(
3447 max_decoding_message_size,
3448 max_encoding_message_size,
3449 );
3450 let res = grpc.unary(method, req).await;
3451 Ok(res)
3452 };
3453 Box::pin(fut)
3454 }
3455 "/qdrant.Collections/UpdateAliases" => {
3456 #[allow(non_camel_case_types)]
3457 struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
3458 impl<
3459 T: Collections,
3460 > tonic::server::UnaryService<super::ChangeAliases>
3461 for UpdateAliasesSvc<T> {
3462 type Response = super::CollectionOperationResponse;
3463 type Future = BoxFuture<
3464 tonic::Response<Self::Response>,
3465 tonic::Status,
3466 >;
3467 fn call(
3468 &mut self,
3469 request: tonic::Request<super::ChangeAliases>,
3470 ) -> Self::Future {
3471 let inner = Arc::clone(&self.0);
3472 let fut = async move {
3473 <T as Collections>::update_aliases(&inner, request).await
3474 };
3475 Box::pin(fut)
3476 }
3477 }
3478 let accept_compression_encodings = self.accept_compression_encodings;
3479 let send_compression_encodings = self.send_compression_encodings;
3480 let max_decoding_message_size = self.max_decoding_message_size;
3481 let max_encoding_message_size = self.max_encoding_message_size;
3482 let inner = self.inner.clone();
3483 let fut = async move {
3484 let method = UpdateAliasesSvc(inner);
3485 let codec = tonic_prost::ProstCodec::default();
3486 let mut grpc = tonic::server::Grpc::new(codec)
3487 .apply_compression_config(
3488 accept_compression_encodings,
3489 send_compression_encodings,
3490 )
3491 .apply_max_message_size_config(
3492 max_decoding_message_size,
3493 max_encoding_message_size,
3494 );
3495 let res = grpc.unary(method, req).await;
3496 Ok(res)
3497 };
3498 Box::pin(fut)
3499 }
3500 "/qdrant.Collections/ListCollectionAliases" => {
3501 #[allow(non_camel_case_types)]
3502 struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
3503 impl<
3504 T: Collections,
3505 > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
3506 for ListCollectionAliasesSvc<T> {
3507 type Response = super::ListAliasesResponse;
3508 type Future = BoxFuture<
3509 tonic::Response<Self::Response>,
3510 tonic::Status,
3511 >;
3512 fn call(
3513 &mut self,
3514 request: tonic::Request<super::ListCollectionAliasesRequest>,
3515 ) -> Self::Future {
3516 let inner = Arc::clone(&self.0);
3517 let fut = async move {
3518 <T as Collections>::list_collection_aliases(&inner, request)
3519 .await
3520 };
3521 Box::pin(fut)
3522 }
3523 }
3524 let accept_compression_encodings = self.accept_compression_encodings;
3525 let send_compression_encodings = self.send_compression_encodings;
3526 let max_decoding_message_size = self.max_decoding_message_size;
3527 let max_encoding_message_size = self.max_encoding_message_size;
3528 let inner = self.inner.clone();
3529 let fut = async move {
3530 let method = ListCollectionAliasesSvc(inner);
3531 let codec = tonic_prost::ProstCodec::default();
3532 let mut grpc = tonic::server::Grpc::new(codec)
3533 .apply_compression_config(
3534 accept_compression_encodings,
3535 send_compression_encodings,
3536 )
3537 .apply_max_message_size_config(
3538 max_decoding_message_size,
3539 max_encoding_message_size,
3540 );
3541 let res = grpc.unary(method, req).await;
3542 Ok(res)
3543 };
3544 Box::pin(fut)
3545 }
3546 "/qdrant.Collections/ListAliases" => {
3547 #[allow(non_camel_case_types)]
3548 struct ListAliasesSvc<T: Collections>(pub Arc<T>);
3549 impl<
3550 T: Collections,
3551 > tonic::server::UnaryService<super::ListAliasesRequest>
3552 for ListAliasesSvc<T> {
3553 type Response = super::ListAliasesResponse;
3554 type Future = BoxFuture<
3555 tonic::Response<Self::Response>,
3556 tonic::Status,
3557 >;
3558 fn call(
3559 &mut self,
3560 request: tonic::Request<super::ListAliasesRequest>,
3561 ) -> Self::Future {
3562 let inner = Arc::clone(&self.0);
3563 let fut = async move {
3564 <T as Collections>::list_aliases(&inner, request).await
3565 };
3566 Box::pin(fut)
3567 }
3568 }
3569 let accept_compression_encodings = self.accept_compression_encodings;
3570 let send_compression_encodings = self.send_compression_encodings;
3571 let max_decoding_message_size = self.max_decoding_message_size;
3572 let max_encoding_message_size = self.max_encoding_message_size;
3573 let inner = self.inner.clone();
3574 let fut = async move {
3575 let method = ListAliasesSvc(inner);
3576 let codec = tonic_prost::ProstCodec::default();
3577 let mut grpc = tonic::server::Grpc::new(codec)
3578 .apply_compression_config(
3579 accept_compression_encodings,
3580 send_compression_encodings,
3581 )
3582 .apply_max_message_size_config(
3583 max_decoding_message_size,
3584 max_encoding_message_size,
3585 );
3586 let res = grpc.unary(method, req).await;
3587 Ok(res)
3588 };
3589 Box::pin(fut)
3590 }
3591 "/qdrant.Collections/CollectionClusterInfo" => {
3592 #[allow(non_camel_case_types)]
3593 struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
3594 impl<
3595 T: Collections,
3596 > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
3597 for CollectionClusterInfoSvc<T> {
3598 type Response = super::CollectionClusterInfoResponse;
3599 type Future = BoxFuture<
3600 tonic::Response<Self::Response>,
3601 tonic::Status,
3602 >;
3603 fn call(
3604 &mut self,
3605 request: tonic::Request<super::CollectionClusterInfoRequest>,
3606 ) -> Self::Future {
3607 let inner = Arc::clone(&self.0);
3608 let fut = async move {
3609 <T as Collections>::collection_cluster_info(&inner, request)
3610 .await
3611 };
3612 Box::pin(fut)
3613 }
3614 }
3615 let accept_compression_encodings = self.accept_compression_encodings;
3616 let send_compression_encodings = self.send_compression_encodings;
3617 let max_decoding_message_size = self.max_decoding_message_size;
3618 let max_encoding_message_size = self.max_encoding_message_size;
3619 let inner = self.inner.clone();
3620 let fut = async move {
3621 let method = CollectionClusterInfoSvc(inner);
3622 let codec = tonic_prost::ProstCodec::default();
3623 let mut grpc = tonic::server::Grpc::new(codec)
3624 .apply_compression_config(
3625 accept_compression_encodings,
3626 send_compression_encodings,
3627 )
3628 .apply_max_message_size_config(
3629 max_decoding_message_size,
3630 max_encoding_message_size,
3631 );
3632 let res = grpc.unary(method, req).await;
3633 Ok(res)
3634 };
3635 Box::pin(fut)
3636 }
3637 "/qdrant.Collections/CollectionExists" => {
3638 #[allow(non_camel_case_types)]
3639 struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
3640 impl<
3641 T: Collections,
3642 > tonic::server::UnaryService<super::CollectionExistsRequest>
3643 for CollectionExistsSvc<T> {
3644 type Response = super::CollectionExistsResponse;
3645 type Future = BoxFuture<
3646 tonic::Response<Self::Response>,
3647 tonic::Status,
3648 >;
3649 fn call(
3650 &mut self,
3651 request: tonic::Request<super::CollectionExistsRequest>,
3652 ) -> Self::Future {
3653 let inner = Arc::clone(&self.0);
3654 let fut = async move {
3655 <T as Collections>::collection_exists(&inner, request).await
3656 };
3657 Box::pin(fut)
3658 }
3659 }
3660 let accept_compression_encodings = self.accept_compression_encodings;
3661 let send_compression_encodings = self.send_compression_encodings;
3662 let max_decoding_message_size = self.max_decoding_message_size;
3663 let max_encoding_message_size = self.max_encoding_message_size;
3664 let inner = self.inner.clone();
3665 let fut = async move {
3666 let method = CollectionExistsSvc(inner);
3667 let codec = tonic_prost::ProstCodec::default();
3668 let mut grpc = tonic::server::Grpc::new(codec)
3669 .apply_compression_config(
3670 accept_compression_encodings,
3671 send_compression_encodings,
3672 )
3673 .apply_max_message_size_config(
3674 max_decoding_message_size,
3675 max_encoding_message_size,
3676 );
3677 let res = grpc.unary(method, req).await;
3678 Ok(res)
3679 };
3680 Box::pin(fut)
3681 }
3682 "/qdrant.Collections/UpdateCollectionClusterSetup" => {
3683 #[allow(non_camel_case_types)]
3684 struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
3685 impl<
3686 T: Collections,
3687 > tonic::server::UnaryService<
3688 super::UpdateCollectionClusterSetupRequest,
3689 > for UpdateCollectionClusterSetupSvc<T> {
3690 type Response = super::UpdateCollectionClusterSetupResponse;
3691 type Future = BoxFuture<
3692 tonic::Response<Self::Response>,
3693 tonic::Status,
3694 >;
3695 fn call(
3696 &mut self,
3697 request: tonic::Request<
3698 super::UpdateCollectionClusterSetupRequest,
3699 >,
3700 ) -> Self::Future {
3701 let inner = Arc::clone(&self.0);
3702 let fut = async move {
3703 <T as Collections>::update_collection_cluster_setup(
3704 &inner,
3705 request,
3706 )
3707 .await
3708 };
3709 Box::pin(fut)
3710 }
3711 }
3712 let accept_compression_encodings = self.accept_compression_encodings;
3713 let send_compression_encodings = self.send_compression_encodings;
3714 let max_decoding_message_size = self.max_decoding_message_size;
3715 let max_encoding_message_size = self.max_encoding_message_size;
3716 let inner = self.inner.clone();
3717 let fut = async move {
3718 let method = UpdateCollectionClusterSetupSvc(inner);
3719 let codec = tonic_prost::ProstCodec::default();
3720 let mut grpc = tonic::server::Grpc::new(codec)
3721 .apply_compression_config(
3722 accept_compression_encodings,
3723 send_compression_encodings,
3724 )
3725 .apply_max_message_size_config(
3726 max_decoding_message_size,
3727 max_encoding_message_size,
3728 );
3729 let res = grpc.unary(method, req).await;
3730 Ok(res)
3731 };
3732 Box::pin(fut)
3733 }
3734 "/qdrant.Collections/CreateShardKey" => {
3735 #[allow(non_camel_case_types)]
3736 struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
3737 impl<
3738 T: Collections,
3739 > tonic::server::UnaryService<super::CreateShardKeyRequest>
3740 for CreateShardKeySvc<T> {
3741 type Response = super::CreateShardKeyResponse;
3742 type Future = BoxFuture<
3743 tonic::Response<Self::Response>,
3744 tonic::Status,
3745 >;
3746 fn call(
3747 &mut self,
3748 request: tonic::Request<super::CreateShardKeyRequest>,
3749 ) -> Self::Future {
3750 let inner = Arc::clone(&self.0);
3751 let fut = async move {
3752 <T as Collections>::create_shard_key(&inner, request).await
3753 };
3754 Box::pin(fut)
3755 }
3756 }
3757 let accept_compression_encodings = self.accept_compression_encodings;
3758 let send_compression_encodings = self.send_compression_encodings;
3759 let max_decoding_message_size = self.max_decoding_message_size;
3760 let max_encoding_message_size = self.max_encoding_message_size;
3761 let inner = self.inner.clone();
3762 let fut = async move {
3763 let method = CreateShardKeySvc(inner);
3764 let codec = tonic_prost::ProstCodec::default();
3765 let mut grpc = tonic::server::Grpc::new(codec)
3766 .apply_compression_config(
3767 accept_compression_encodings,
3768 send_compression_encodings,
3769 )
3770 .apply_max_message_size_config(
3771 max_decoding_message_size,
3772 max_encoding_message_size,
3773 );
3774 let res = grpc.unary(method, req).await;
3775 Ok(res)
3776 };
3777 Box::pin(fut)
3778 }
3779 "/qdrant.Collections/DeleteShardKey" => {
3780 #[allow(non_camel_case_types)]
3781 struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
3782 impl<
3783 T: Collections,
3784 > tonic::server::UnaryService<super::DeleteShardKeyRequest>
3785 for DeleteShardKeySvc<T> {
3786 type Response = super::DeleteShardKeyResponse;
3787 type Future = BoxFuture<
3788 tonic::Response<Self::Response>,
3789 tonic::Status,
3790 >;
3791 fn call(
3792 &mut self,
3793 request: tonic::Request<super::DeleteShardKeyRequest>,
3794 ) -> Self::Future {
3795 let inner = Arc::clone(&self.0);
3796 let fut = async move {
3797 <T as Collections>::delete_shard_key(&inner, request).await
3798 };
3799 Box::pin(fut)
3800 }
3801 }
3802 let accept_compression_encodings = self.accept_compression_encodings;
3803 let send_compression_encodings = self.send_compression_encodings;
3804 let max_decoding_message_size = self.max_decoding_message_size;
3805 let max_encoding_message_size = self.max_encoding_message_size;
3806 let inner = self.inner.clone();
3807 let fut = async move {
3808 let method = DeleteShardKeySvc(inner);
3809 let codec = tonic_prost::ProstCodec::default();
3810 let mut grpc = tonic::server::Grpc::new(codec)
3811 .apply_compression_config(
3812 accept_compression_encodings,
3813 send_compression_encodings,
3814 )
3815 .apply_max_message_size_config(
3816 max_decoding_message_size,
3817 max_encoding_message_size,
3818 );
3819 let res = grpc.unary(method, req).await;
3820 Ok(res)
3821 };
3822 Box::pin(fut)
3823 }
3824 "/qdrant.Collections/ListShardKeys" => {
3825 #[allow(non_camel_case_types)]
3826 struct ListShardKeysSvc<T: Collections>(pub Arc<T>);
3827 impl<
3828 T: Collections,
3829 > tonic::server::UnaryService<super::ListShardKeysRequest>
3830 for ListShardKeysSvc<T> {
3831 type Response = super::ListShardKeysResponse;
3832 type Future = BoxFuture<
3833 tonic::Response<Self::Response>,
3834 tonic::Status,
3835 >;
3836 fn call(
3837 &mut self,
3838 request: tonic::Request<super::ListShardKeysRequest>,
3839 ) -> Self::Future {
3840 let inner = Arc::clone(&self.0);
3841 let fut = async move {
3842 <T as Collections>::list_shard_keys(&inner, request).await
3843 };
3844 Box::pin(fut)
3845 }
3846 }
3847 let accept_compression_encodings = self.accept_compression_encodings;
3848 let send_compression_encodings = self.send_compression_encodings;
3849 let max_decoding_message_size = self.max_decoding_message_size;
3850 let max_encoding_message_size = self.max_encoding_message_size;
3851 let inner = self.inner.clone();
3852 let fut = async move {
3853 let method = ListShardKeysSvc(inner);
3854 let codec = tonic_prost::ProstCodec::default();
3855 let mut grpc = tonic::server::Grpc::new(codec)
3856 .apply_compression_config(
3857 accept_compression_encodings,
3858 send_compression_encodings,
3859 )
3860 .apply_max_message_size_config(
3861 max_decoding_message_size,
3862 max_encoding_message_size,
3863 );
3864 let res = grpc.unary(method, req).await;
3865 Ok(res)
3866 };
3867 Box::pin(fut)
3868 }
3869 _ => {
3870 Box::pin(async move {
3871 let mut response = http::Response::new(
3872 tonic::body::Body::default(),
3873 );
3874 let headers = response.headers_mut();
3875 headers
3876 .insert(
3877 tonic::Status::GRPC_STATUS,
3878 (tonic::Code::Unimplemented as i32).into(),
3879 );
3880 headers
3881 .insert(
3882 http::header::CONTENT_TYPE,
3883 tonic::metadata::GRPC_CONTENT_TYPE,
3884 );
3885 Ok(response)
3886 })
3887 }
3888 }
3889 }
3890 }
3891 impl<T> Clone for CollectionsServer<T> {
3892 fn clone(&self) -> Self {
3893 let inner = self.inner.clone();
3894 Self {
3895 inner,
3896 accept_compression_encodings: self.accept_compression_encodings,
3897 send_compression_encodings: self.send_compression_encodings,
3898 max_decoding_message_size: self.max_decoding_message_size,
3899 max_encoding_message_size: self.max_encoding_message_size,
3900 }
3901 }
3902 }
3903 pub const SERVICE_NAME: &str = "qdrant.Collections";
3905 impl<T> tonic::server::NamedService for CollectionsServer<T> {
3906 const NAME: &'static str = SERVICE_NAME;
3907 }
3908}
3909#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3910pub struct WriteOrdering {
3911 #[prost(enumeration = "WriteOrderingType", tag = "1")]
3913 pub r#type: i32,
3914}
3915#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3916pub struct ReadConsistency {
3917 #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3918 pub value: ::core::option::Option<read_consistency::Value>,
3919}
3920pub mod read_consistency {
3922 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
3923 pub enum Value {
3924 #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3926 Type(i32),
3927 #[prost(uint64, tag = "2")]
3930 Factor(u64),
3931 }
3932}
3933#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3934pub struct SparseIndices {
3935 #[prost(uint32, repeated, tag = "1")]
3936 pub data: ::prost::alloc::vec::Vec<u32>,
3937}
3938#[derive(Clone, PartialEq, ::prost::Message)]
3939pub struct Document {
3940 #[prost(string, tag = "1")]
3942 pub text: ::prost::alloc::string::String,
3943 #[prost(string, tag = "3")]
3945 pub model: ::prost::alloc::string::String,
3946 #[prost(map = "string, message", tag = "4")]
3948 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3949}
3950#[derive(Clone, PartialEq, ::prost::Message)]
3951pub struct Image {
3952 #[prost(message, optional, tag = "1")]
3954 pub image: ::core::option::Option<Value>,
3955 #[prost(string, tag = "2")]
3957 pub model: ::prost::alloc::string::String,
3958 #[prost(map = "string, message", tag = "3")]
3960 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3961}
3962#[derive(Clone, PartialEq, ::prost::Message)]
3963pub struct InferenceObject {
3964 #[prost(message, optional, tag = "1")]
3966 pub object: ::core::option::Option<Value>,
3967 #[prost(string, tag = "2")]
3969 pub model: ::prost::alloc::string::String,
3970 #[prost(map = "string, message", tag = "3")]
3972 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3973}
3974#[derive(Clone, PartialEq, ::prost::Message)]
3975pub struct Vector {
3976 #[deprecated]
3978 #[prost(float, repeated, packed = "false", tag = "1")]
3979 pub data: ::prost::alloc::vec::Vec<f32>,
3983 #[deprecated]
3985 #[prost(message, optional, tag = "2")]
3986 pub indices: ::core::option::Option<SparseIndices>,
3990 #[deprecated]
3992 #[prost(uint32, optional, tag = "3")]
3993 pub vectors_count: ::core::option::Option<u32>,
3997 #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3998 pub vector: ::core::option::Option<vector::Vector>,
3999}
4000pub mod vector {
4002 #[derive(Clone, PartialEq, ::prost::Oneof)]
4003 pub enum Vector {
4004 #[prost(message, tag = "101")]
4006 Dense(super::DenseVector),
4007 #[prost(message, tag = "102")]
4009 Sparse(super::SparseVector),
4010 #[prost(message, tag = "103")]
4012 MultiDense(super::MultiDenseVector),
4013 #[prost(message, tag = "104")]
4014 Document(super::Document),
4015 #[prost(message, tag = "105")]
4016 Image(super::Image),
4017 #[prost(message, tag = "106")]
4018 Object(super::InferenceObject),
4019 }
4020}
4021#[derive(Clone, PartialEq, ::prost::Message)]
4022pub struct VectorOutput {
4023 #[deprecated]
4025 #[prost(float, repeated, packed = "false", tag = "1")]
4026 pub data: ::prost::alloc::vec::Vec<f32>,
4030 #[deprecated]
4032 #[prost(message, optional, tag = "2")]
4033 pub indices: ::core::option::Option<SparseIndices>,
4037 #[deprecated]
4039 #[prost(uint32, optional, tag = "3")]
4040 pub vectors_count: ::core::option::Option<u32>,
4044 #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
4045 pub vector: ::core::option::Option<vector_output::Vector>,
4046}
4047pub mod vector_output {
4049 #[derive(Clone, PartialEq, ::prost::Oneof)]
4050 pub enum Vector {
4051 #[prost(message, tag = "101")]
4053 Dense(super::DenseVector),
4054 #[prost(message, tag = "102")]
4056 Sparse(super::SparseVector),
4057 #[prost(message, tag = "103")]
4059 MultiDense(super::MultiDenseVector),
4060 }
4061}
4062#[derive(Clone, PartialEq, ::prost::Message)]
4063pub struct DenseVector {
4064 #[prost(float, repeated, tag = "1")]
4065 pub data: ::prost::alloc::vec::Vec<f32>,
4066}
4067#[derive(Clone, PartialEq, ::prost::Message)]
4068pub struct SparseVector {
4069 #[prost(float, repeated, tag = "1")]
4070 pub values: ::prost::alloc::vec::Vec<f32>,
4071 #[prost(uint32, repeated, tag = "2")]
4072 pub indices: ::prost::alloc::vec::Vec<u32>,
4073}
4074#[derive(Clone, PartialEq, ::prost::Message)]
4075pub struct MultiDenseVector {
4076 #[prost(message, repeated, tag = "1")]
4077 pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
4078}
4079#[derive(Clone, PartialEq, ::prost::Message)]
4082pub struct VectorInput {
4083 #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
4084 pub variant: ::core::option::Option<vector_input::Variant>,
4085}
4086pub mod vector_input {
4088 #[derive(Clone, PartialEq, ::prost::Oneof)]
4089 pub enum Variant {
4090 #[prost(message, tag = "1")]
4091 Id(super::PointId),
4092 #[prost(message, tag = "2")]
4093 Dense(super::DenseVector),
4094 #[prost(message, tag = "3")]
4095 Sparse(super::SparseVector),
4096 #[prost(message, tag = "4")]
4097 MultiDense(super::MultiDenseVector),
4098 #[prost(message, tag = "5")]
4099 Document(super::Document),
4100 #[prost(message, tag = "6")]
4101 Image(super::Image),
4102 #[prost(message, tag = "7")]
4103 Object(super::InferenceObject),
4104 }
4105}
4106#[derive(Clone, PartialEq, ::prost::Message)]
4107pub struct ShardKeySelector {
4108 #[prost(message, repeated, tag = "1")]
4110 pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
4111 #[prost(message, optional, tag = "2")]
4112 pub fallback: ::core::option::Option<ShardKey>,
4113}
4114#[derive(Clone, PartialEq, ::prost::Message)]
4115pub struct UpsertPoints {
4116 #[prost(string, tag = "1")]
4118 pub collection_name: ::prost::alloc::string::String,
4119 #[prost(bool, optional, tag = "2")]
4121 pub wait: ::core::option::Option<bool>,
4122 #[prost(message, repeated, tag = "3")]
4123 pub points: ::prost::alloc::vec::Vec<PointStruct>,
4124 #[prost(message, optional, tag = "4")]
4126 pub ordering: ::core::option::Option<WriteOrdering>,
4127 #[prost(message, optional, tag = "5")]
4129 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4130 #[prost(message, optional, tag = "6")]
4133 pub update_filter: ::core::option::Option<Filter>,
4134 #[prost(uint64, optional, tag = "7")]
4136 pub timeout: ::core::option::Option<u64>,
4137 #[prost(enumeration = "UpdateMode", optional, tag = "8")]
4139 pub update_mode: ::core::option::Option<i32>,
4140}
4141#[derive(Clone, PartialEq, ::prost::Message)]
4142pub struct DeletePoints {
4143 #[prost(string, tag = "1")]
4145 pub collection_name: ::prost::alloc::string::String,
4146 #[prost(bool, optional, tag = "2")]
4148 pub wait: ::core::option::Option<bool>,
4149 #[prost(message, optional, tag = "3")]
4151 pub points: ::core::option::Option<PointsSelector>,
4152 #[prost(message, optional, tag = "4")]
4154 pub ordering: ::core::option::Option<WriteOrdering>,
4155 #[prost(message, optional, tag = "5")]
4157 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4158 #[prost(uint64, optional, tag = "6")]
4160 pub timeout: ::core::option::Option<u64>,
4161}
4162#[derive(Clone, PartialEq, ::prost::Message)]
4163pub struct GetPoints {
4164 #[prost(string, tag = "1")]
4166 pub collection_name: ::prost::alloc::string::String,
4167 #[prost(message, repeated, tag = "2")]
4169 pub ids: ::prost::alloc::vec::Vec<PointId>,
4170 #[prost(message, optional, tag = "4")]
4172 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4173 #[prost(message, optional, tag = "5")]
4175 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4176 #[prost(message, optional, tag = "6")]
4178 pub read_consistency: ::core::option::Option<ReadConsistency>,
4179 #[prost(message, optional, tag = "7")]
4181 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4182 #[prost(uint64, optional, tag = "8")]
4184 pub timeout: ::core::option::Option<u64>,
4185}
4186#[derive(Clone, PartialEq, ::prost::Message)]
4187pub struct UpdatePointVectors {
4188 #[prost(string, tag = "1")]
4190 pub collection_name: ::prost::alloc::string::String,
4191 #[prost(bool, optional, tag = "2")]
4193 pub wait: ::core::option::Option<bool>,
4194 #[prost(message, repeated, tag = "3")]
4196 pub points: ::prost::alloc::vec::Vec<PointVectors>,
4197 #[prost(message, optional, tag = "4")]
4199 pub ordering: ::core::option::Option<WriteOrdering>,
4200 #[prost(message, optional, tag = "5")]
4202 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4203 #[prost(message, optional, tag = "6")]
4205 pub update_filter: ::core::option::Option<Filter>,
4206 #[prost(uint64, optional, tag = "7")]
4208 pub timeout: ::core::option::Option<u64>,
4209}
4210#[derive(Clone, PartialEq, ::prost::Message)]
4211pub struct PointVectors {
4212 #[prost(message, optional, tag = "1")]
4214 pub id: ::core::option::Option<PointId>,
4215 #[prost(message, optional, tag = "2")]
4217 pub vectors: ::core::option::Option<Vectors>,
4218}
4219#[derive(Clone, PartialEq, ::prost::Message)]
4220pub struct DeletePointVectors {
4221 #[prost(string, tag = "1")]
4223 pub collection_name: ::prost::alloc::string::String,
4224 #[prost(bool, optional, tag = "2")]
4226 pub wait: ::core::option::Option<bool>,
4227 #[prost(message, optional, tag = "3")]
4229 pub points_selector: ::core::option::Option<PointsSelector>,
4230 #[prost(message, optional, tag = "4")]
4232 pub vectors: ::core::option::Option<VectorsSelector>,
4233 #[prost(message, optional, tag = "5")]
4235 pub ordering: ::core::option::Option<WriteOrdering>,
4236 #[prost(message, optional, tag = "6")]
4238 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4239 #[prost(uint64, optional, tag = "7")]
4241 pub timeout: ::core::option::Option<u64>,
4242}
4243#[derive(Clone, PartialEq, ::prost::Message)]
4244pub struct SetPayloadPoints {
4245 #[prost(string, tag = "1")]
4247 pub collection_name: ::prost::alloc::string::String,
4248 #[prost(bool, optional, tag = "2")]
4250 pub wait: ::core::option::Option<bool>,
4251 #[prost(map = "string, message", tag = "3")]
4253 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4254 #[prost(message, optional, tag = "5")]
4256 pub points_selector: ::core::option::Option<PointsSelector>,
4257 #[prost(message, optional, tag = "6")]
4259 pub ordering: ::core::option::Option<WriteOrdering>,
4260 #[prost(message, optional, tag = "7")]
4262 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4263 #[prost(string, optional, tag = "8")]
4265 pub key: ::core::option::Option<::prost::alloc::string::String>,
4266 #[prost(uint64, optional, tag = "9")]
4268 pub timeout: ::core::option::Option<u64>,
4269}
4270#[derive(Clone, PartialEq, ::prost::Message)]
4271pub struct DeletePayloadPoints {
4272 #[prost(string, tag = "1")]
4274 pub collection_name: ::prost::alloc::string::String,
4275 #[prost(bool, optional, tag = "2")]
4277 pub wait: ::core::option::Option<bool>,
4278 #[prost(string, repeated, tag = "3")]
4280 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4281 #[prost(message, optional, tag = "5")]
4283 pub points_selector: ::core::option::Option<PointsSelector>,
4284 #[prost(message, optional, tag = "6")]
4286 pub ordering: ::core::option::Option<WriteOrdering>,
4287 #[prost(message, optional, tag = "7")]
4289 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4290 #[prost(uint64, optional, tag = "8")]
4292 pub timeout: ::core::option::Option<u64>,
4293}
4294#[derive(Clone, PartialEq, ::prost::Message)]
4295pub struct ClearPayloadPoints {
4296 #[prost(string, tag = "1")]
4298 pub collection_name: ::prost::alloc::string::String,
4299 #[prost(bool, optional, tag = "2")]
4301 pub wait: ::core::option::Option<bool>,
4302 #[prost(message, optional, tag = "3")]
4304 pub points: ::core::option::Option<PointsSelector>,
4305 #[prost(message, optional, tag = "4")]
4307 pub ordering: ::core::option::Option<WriteOrdering>,
4308 #[prost(message, optional, tag = "5")]
4310 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4311 #[prost(uint64, optional, tag = "6")]
4313 pub timeout: ::core::option::Option<u64>,
4314}
4315#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4316pub struct CreateFieldIndexCollection {
4317 #[prost(string, tag = "1")]
4319 pub collection_name: ::prost::alloc::string::String,
4320 #[prost(bool, optional, tag = "2")]
4322 pub wait: ::core::option::Option<bool>,
4323 #[prost(string, tag = "3")]
4325 pub field_name: ::prost::alloc::string::String,
4326 #[prost(enumeration = "FieldType", optional, tag = "4")]
4328 pub field_type: ::core::option::Option<i32>,
4329 #[prost(message, optional, tag = "5")]
4331 pub field_index_params: ::core::option::Option<PayloadIndexParams>,
4332 #[prost(message, optional, tag = "6")]
4334 pub ordering: ::core::option::Option<WriteOrdering>,
4335 #[prost(uint64, optional, tag = "7")]
4337 pub timeout: ::core::option::Option<u64>,
4338}
4339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4340pub struct DeleteFieldIndexCollection {
4341 #[prost(string, tag = "1")]
4343 pub collection_name: ::prost::alloc::string::String,
4344 #[prost(bool, optional, tag = "2")]
4346 pub wait: ::core::option::Option<bool>,
4347 #[prost(string, tag = "3")]
4349 pub field_name: ::prost::alloc::string::String,
4350 #[prost(message, optional, tag = "4")]
4352 pub ordering: ::core::option::Option<WriteOrdering>,
4353 #[prost(uint64, optional, tag = "5")]
4355 pub timeout: ::core::option::Option<u64>,
4356}
4357#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4361pub struct DenseVectorCreationConfig {
4362 #[prost(uint64, tag = "1")]
4364 pub size: u64,
4365 #[prost(enumeration = "Distance", tag = "2")]
4367 pub distance: i32,
4368 #[prost(message, optional, tag = "3")]
4370 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
4371 #[prost(enumeration = "Datatype", optional, tag = "4")]
4373 pub datatype: ::core::option::Option<i32>,
4374}
4375#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4378pub struct SparseVectorCreationConfig {
4379 #[prost(enumeration = "Modifier", optional, tag = "1")]
4381 pub modifier: ::core::option::Option<i32>,
4382 #[prost(enumeration = "Datatype", optional, tag = "2")]
4384 pub datatype: ::core::option::Option<i32>,
4385}
4386#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4387pub struct CreateVectorNameRequest {
4388 #[prost(string, tag = "1")]
4390 pub collection_name: ::prost::alloc::string::String,
4391 #[prost(bool, optional, tag = "2")]
4393 pub wait: ::core::option::Option<bool>,
4394 #[prost(string, tag = "3")]
4396 pub vector_name: ::prost::alloc::string::String,
4397 #[prost(uint64, optional, tag = "6")]
4399 pub timeout: ::core::option::Option<u64>,
4400 #[prost(message, optional, tag = "7")]
4402 pub ordering: ::core::option::Option<WriteOrdering>,
4403 #[prost(oneof = "create_vector_name_request::VectorConfig", tags = "4, 5")]
4405 pub vector_config: ::core::option::Option<create_vector_name_request::VectorConfig>,
4406}
4407pub mod create_vector_name_request {
4409 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
4411 pub enum VectorConfig {
4412 #[prost(message, tag = "4")]
4414 DenseConfig(super::DenseVectorCreationConfig),
4415 #[prost(message, tag = "5")]
4417 SparseConfig(super::SparseVectorCreationConfig),
4418 }
4419}
4420#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4421pub struct DeleteVectorNameRequest {
4422 #[prost(string, tag = "1")]
4424 pub collection_name: ::prost::alloc::string::String,
4425 #[prost(bool, optional, tag = "2")]
4427 pub wait: ::core::option::Option<bool>,
4428 #[prost(string, tag = "3")]
4430 pub vector_name: ::prost::alloc::string::String,
4431 #[prost(uint64, optional, tag = "4")]
4433 pub timeout: ::core::option::Option<u64>,
4434 #[prost(message, optional, tag = "5")]
4436 pub ordering: ::core::option::Option<WriteOrdering>,
4437}
4438#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4439pub struct PayloadIncludeSelector {
4440 #[prost(string, repeated, tag = "1")]
4442 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4443}
4444#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4445pub struct PayloadExcludeSelector {
4446 #[prost(string, repeated, tag = "1")]
4448 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4449}
4450#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4451pub struct WithPayloadSelector {
4452 #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
4453 pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
4454}
4455pub mod with_payload_selector {
4457 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
4458 pub enum SelectorOptions {
4459 #[prost(bool, tag = "1")]
4461 Enable(bool),
4462 #[prost(message, tag = "2")]
4463 Include(super::PayloadIncludeSelector),
4464 #[prost(message, tag = "3")]
4465 Exclude(super::PayloadExcludeSelector),
4466 }
4467}
4468#[derive(Clone, PartialEq, ::prost::Message)]
4469pub struct NamedVectors {
4470 #[prost(map = "string, message", tag = "1")]
4471 pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
4472}
4473#[derive(Clone, PartialEq, ::prost::Message)]
4474pub struct NamedVectorsOutput {
4475 #[prost(map = "string, message", tag = "1")]
4476 pub vectors: ::std::collections::HashMap<
4477 ::prost::alloc::string::String,
4478 VectorOutput,
4479 >,
4480}
4481#[derive(Clone, PartialEq, ::prost::Message)]
4482pub struct Vectors {
4483 #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
4484 pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
4485}
4486pub mod vectors {
4488 #[derive(Clone, PartialEq, ::prost::Oneof)]
4489 pub enum VectorsOptions {
4490 #[prost(message, tag = "1")]
4491 Vector(super::Vector),
4492 #[prost(message, tag = "2")]
4493 Vectors(super::NamedVectors),
4494 }
4495}
4496#[derive(Clone, PartialEq, ::prost::Message)]
4497pub struct VectorsOutput {
4498 #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
4499 pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
4500}
4501pub mod vectors_output {
4503 #[derive(Clone, PartialEq, ::prost::Oneof)]
4504 pub enum VectorsOptions {
4505 #[prost(message, tag = "1")]
4506 Vector(super::VectorOutput),
4507 #[prost(message, tag = "2")]
4508 Vectors(super::NamedVectorsOutput),
4509 }
4510}
4511#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4512pub struct VectorsSelector {
4513 #[prost(string, repeated, tag = "1")]
4515 pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4516}
4517#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4518pub struct WithVectorsSelector {
4519 #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
4520 pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
4521}
4522pub mod with_vectors_selector {
4524 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
4525 pub enum SelectorOptions {
4526 #[prost(bool, tag = "1")]
4528 Enable(bool),
4529 #[prost(message, tag = "2")]
4531 Include(super::VectorsSelector),
4532 }
4533}
4534#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4535pub struct QuantizationSearchParams {
4536 #[prost(bool, optional, tag = "1")]
4538 pub ignore: ::core::option::Option<bool>,
4539 #[prost(bool, optional, tag = "2")]
4542 pub rescore: ::core::option::Option<bool>,
4543 #[prost(double, optional, tag = "3")]
4552 pub oversampling: ::core::option::Option<f64>,
4553}
4554#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4555pub struct AcornSearchParams {
4556 #[prost(bool, optional, tag = "1")]
4562 pub enable: ::core::option::Option<bool>,
4563 #[prost(double, optional, tag = "2")]
4571 pub max_selectivity: ::core::option::Option<f64>,
4572}
4573#[derive(Clone, PartialEq, ::prost::Message)]
4576pub struct IdfParams {
4577 #[prost(message, optional, tag = "1")]
4580 pub corpus: ::core::option::Option<Filter>,
4581}
4582#[derive(Clone, PartialEq, ::prost::Message)]
4583pub struct SearchParams {
4584 #[prost(uint64, optional, tag = "1")]
4587 pub hnsw_ef: ::core::option::Option<u64>,
4588 #[prost(bool, optional, tag = "2")]
4590 pub exact: ::core::option::Option<bool>,
4591 #[prost(message, optional, tag = "3")]
4593 pub quantization: ::core::option::Option<QuantizationSearchParams>,
4594 #[prost(bool, optional, tag = "4")]
4598 pub indexed_only: ::core::option::Option<bool>,
4599 #[prost(message, optional, tag = "5")]
4601 pub acorn: ::core::option::Option<AcornSearchParams>,
4602 #[prost(message, optional, tag = "6")]
4605 pub idf: ::core::option::Option<IdfParams>,
4606}
4607#[derive(Clone, PartialEq, ::prost::Message)]
4608pub struct SearchPoints {
4609 #[prost(string, tag = "1")]
4611 pub collection_name: ::prost::alloc::string::String,
4612 #[prost(float, repeated, tag = "2")]
4614 pub vector: ::prost::alloc::vec::Vec<f32>,
4615 #[prost(message, optional, tag = "3")]
4617 pub filter: ::core::option::Option<Filter>,
4618 #[prost(uint64, tag = "4")]
4620 pub limit: u64,
4621 #[prost(message, optional, tag = "6")]
4623 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4624 #[prost(message, optional, tag = "7")]
4626 pub params: ::core::option::Option<SearchParams>,
4627 #[prost(float, optional, tag = "8")]
4629 pub score_threshold: ::core::option::Option<f32>,
4630 #[prost(uint64, optional, tag = "9")]
4632 pub offset: ::core::option::Option<u64>,
4633 #[prost(string, optional, tag = "10")]
4635 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4636 #[prost(message, optional, tag = "11")]
4638 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4639 #[prost(message, optional, tag = "12")]
4641 pub read_consistency: ::core::option::Option<ReadConsistency>,
4642 #[prost(uint64, optional, tag = "13")]
4644 pub timeout: ::core::option::Option<u64>,
4645 #[prost(message, optional, tag = "14")]
4647 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4648 #[prost(message, optional, tag = "15")]
4649 pub sparse_indices: ::core::option::Option<SparseIndices>,
4650}
4651#[derive(Clone, PartialEq, ::prost::Message)]
4652pub struct SearchBatchPoints {
4653 #[prost(string, tag = "1")]
4655 pub collection_name: ::prost::alloc::string::String,
4656 #[prost(message, repeated, tag = "2")]
4657 pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
4658 #[prost(message, optional, tag = "3")]
4660 pub read_consistency: ::core::option::Option<ReadConsistency>,
4661 #[prost(uint64, optional, tag = "4")]
4663 pub timeout: ::core::option::Option<u64>,
4664}
4665#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4666pub struct WithLookup {
4667 #[prost(string, tag = "1")]
4669 pub collection: ::prost::alloc::string::String,
4670 #[prost(message, optional, tag = "2")]
4672 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4673 #[prost(message, optional, tag = "3")]
4675 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4676}
4677#[derive(Clone, PartialEq, ::prost::Message)]
4678pub struct SearchPointGroups {
4679 #[prost(string, tag = "1")]
4681 pub collection_name: ::prost::alloc::string::String,
4682 #[prost(float, repeated, tag = "2")]
4684 pub vector: ::prost::alloc::vec::Vec<f32>,
4685 #[prost(message, optional, tag = "3")]
4687 pub filter: ::core::option::Option<Filter>,
4688 #[prost(uint32, tag = "4")]
4690 pub limit: u32,
4691 #[prost(message, optional, tag = "5")]
4693 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4694 #[prost(message, optional, tag = "6")]
4696 pub params: ::core::option::Option<SearchParams>,
4697 #[prost(float, optional, tag = "7")]
4699 pub score_threshold: ::core::option::Option<f32>,
4700 #[prost(string, optional, tag = "8")]
4702 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4703 #[prost(message, optional, tag = "9")]
4705 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4706 #[prost(string, tag = "10")]
4710 pub group_by: ::prost::alloc::string::String,
4711 #[prost(uint32, tag = "11")]
4713 pub group_size: u32,
4714 #[prost(message, optional, tag = "12")]
4716 pub read_consistency: ::core::option::Option<ReadConsistency>,
4717 #[prost(message, optional, tag = "13")]
4719 pub with_lookup: ::core::option::Option<WithLookup>,
4720 #[prost(uint64, optional, tag = "14")]
4722 pub timeout: ::core::option::Option<u64>,
4723 #[prost(message, optional, tag = "15")]
4725 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4726 #[prost(message, optional, tag = "16")]
4727 pub sparse_indices: ::core::option::Option<SparseIndices>,
4728}
4729#[derive(Clone, PartialEq, ::prost::Message)]
4730pub struct StartFrom {
4731 #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
4732 pub value: ::core::option::Option<start_from::Value>,
4733}
4734pub mod start_from {
4736 #[derive(Clone, PartialEq, ::prost::Oneof)]
4737 pub enum Value {
4738 #[prost(double, tag = "1")]
4739 Float(f64),
4740 #[prost(int64, tag = "2")]
4741 Integer(i64),
4742 #[prost(message, tag = "3")]
4743 Timestamp(::prost_types::Timestamp),
4744 #[prost(string, tag = "4")]
4745 Datetime(::prost::alloc::string::String),
4746 }
4747}
4748#[derive(Clone, PartialEq, ::prost::Message)]
4749pub struct OrderBy {
4750 #[prost(string, tag = "1")]
4752 pub key: ::prost::alloc::string::String,
4753 #[prost(enumeration = "Direction", optional, tag = "2")]
4755 pub direction: ::core::option::Option<i32>,
4756 #[prost(message, optional, tag = "3")]
4758 pub start_from: ::core::option::Option<StartFrom>,
4759}
4760#[derive(Clone, PartialEq, ::prost::Message)]
4761pub struct ScrollPoints {
4762 #[prost(string, tag = "1")]
4763 pub collection_name: ::prost::alloc::string::String,
4764 #[prost(message, optional, tag = "2")]
4766 pub filter: ::core::option::Option<Filter>,
4767 #[prost(message, optional, tag = "3")]
4769 pub offset: ::core::option::Option<PointId>,
4770 #[prost(uint32, optional, tag = "4")]
4772 pub limit: ::core::option::Option<u32>,
4773 #[prost(message, optional, tag = "6")]
4775 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4776 #[prost(message, optional, tag = "7")]
4778 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4779 #[prost(message, optional, tag = "8")]
4781 pub read_consistency: ::core::option::Option<ReadConsistency>,
4782 #[prost(message, optional, tag = "9")]
4784 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4785 #[prost(message, optional, tag = "10")]
4787 pub order_by: ::core::option::Option<OrderBy>,
4788 #[prost(uint64, optional, tag = "11")]
4790 pub timeout: ::core::option::Option<u64>,
4791}
4792#[derive(Clone, PartialEq, ::prost::Message)]
4793pub struct LookupLocation {
4794 #[prost(string, tag = "1")]
4795 pub collection_name: ::prost::alloc::string::String,
4796 #[prost(string, optional, tag = "2")]
4798 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4799 #[prost(message, optional, tag = "3")]
4801 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4802}
4803#[derive(Clone, PartialEq, ::prost::Message)]
4804pub struct RecommendPoints {
4805 #[prost(string, tag = "1")]
4807 pub collection_name: ::prost::alloc::string::String,
4808 #[prost(message, repeated, tag = "2")]
4810 pub positive: ::prost::alloc::vec::Vec<PointId>,
4811 #[prost(message, repeated, tag = "3")]
4813 pub negative: ::prost::alloc::vec::Vec<PointId>,
4814 #[prost(message, optional, tag = "4")]
4816 pub filter: ::core::option::Option<Filter>,
4817 #[prost(uint64, tag = "5")]
4819 pub limit: u64,
4820 #[prost(message, optional, tag = "7")]
4822 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4823 #[prost(message, optional, tag = "8")]
4825 pub params: ::core::option::Option<SearchParams>,
4826 #[prost(float, optional, tag = "9")]
4828 pub score_threshold: ::core::option::Option<f32>,
4829 #[prost(uint64, optional, tag = "10")]
4831 pub offset: ::core::option::Option<u64>,
4832 #[prost(string, optional, tag = "11")]
4834 pub using: ::core::option::Option<::prost::alloc::string::String>,
4835 #[prost(message, optional, tag = "12")]
4837 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4838 #[prost(message, optional, tag = "13")]
4840 pub lookup_from: ::core::option::Option<LookupLocation>,
4841 #[prost(message, optional, tag = "14")]
4843 pub read_consistency: ::core::option::Option<ReadConsistency>,
4844 #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
4846 pub strategy: ::core::option::Option<i32>,
4847 #[prost(message, repeated, tag = "17")]
4849 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4850 #[prost(message, repeated, tag = "18")]
4852 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4853 #[prost(uint64, optional, tag = "19")]
4855 pub timeout: ::core::option::Option<u64>,
4856 #[prost(message, optional, tag = "20")]
4858 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4859}
4860#[derive(Clone, PartialEq, ::prost::Message)]
4861pub struct RecommendBatchPoints {
4862 #[prost(string, tag = "1")]
4864 pub collection_name: ::prost::alloc::string::String,
4865 #[prost(message, repeated, tag = "2")]
4866 pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
4867 #[prost(message, optional, tag = "3")]
4869 pub read_consistency: ::core::option::Option<ReadConsistency>,
4870 #[prost(uint64, optional, tag = "4")]
4872 pub timeout: ::core::option::Option<u64>,
4873}
4874#[derive(Clone, PartialEq, ::prost::Message)]
4875pub struct RecommendPointGroups {
4876 #[prost(string, tag = "1")]
4878 pub collection_name: ::prost::alloc::string::String,
4879 #[prost(message, repeated, tag = "2")]
4881 pub positive: ::prost::alloc::vec::Vec<PointId>,
4882 #[prost(message, repeated, tag = "3")]
4884 pub negative: ::prost::alloc::vec::Vec<PointId>,
4885 #[prost(message, optional, tag = "4")]
4887 pub filter: ::core::option::Option<Filter>,
4888 #[prost(uint32, tag = "5")]
4890 pub limit: u32,
4891 #[prost(message, optional, tag = "6")]
4893 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4894 #[prost(message, optional, tag = "7")]
4896 pub params: ::core::option::Option<SearchParams>,
4897 #[prost(float, optional, tag = "8")]
4899 pub score_threshold: ::core::option::Option<f32>,
4900 #[prost(string, optional, tag = "9")]
4902 pub using: ::core::option::Option<::prost::alloc::string::String>,
4903 #[prost(message, optional, tag = "10")]
4905 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4906 #[prost(message, optional, tag = "11")]
4908 pub lookup_from: ::core::option::Option<LookupLocation>,
4909 #[prost(string, tag = "12")]
4913 pub group_by: ::prost::alloc::string::String,
4914 #[prost(uint32, tag = "13")]
4916 pub group_size: u32,
4917 #[prost(message, optional, tag = "14")]
4919 pub read_consistency: ::core::option::Option<ReadConsistency>,
4920 #[prost(message, optional, tag = "15")]
4922 pub with_lookup: ::core::option::Option<WithLookup>,
4923 #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
4925 pub strategy: ::core::option::Option<i32>,
4926 #[prost(message, repeated, tag = "18")]
4928 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4929 #[prost(message, repeated, tag = "19")]
4931 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4932 #[prost(uint64, optional, tag = "20")]
4934 pub timeout: ::core::option::Option<u64>,
4935 #[prost(message, optional, tag = "21")]
4937 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4938}
4939#[derive(Clone, PartialEq, ::prost::Message)]
4940pub struct TargetVector {
4941 #[prost(oneof = "target_vector::Target", tags = "1")]
4942 pub target: ::core::option::Option<target_vector::Target>,
4943}
4944pub mod target_vector {
4946 #[derive(Clone, PartialEq, ::prost::Oneof)]
4947 pub enum Target {
4948 #[prost(message, tag = "1")]
4949 Single(super::VectorExample),
4950 }
4951}
4952#[derive(Clone, PartialEq, ::prost::Message)]
4953pub struct VectorExample {
4954 #[prost(oneof = "vector_example::Example", tags = "1, 2")]
4955 pub example: ::core::option::Option<vector_example::Example>,
4956}
4957pub mod vector_example {
4959 #[derive(Clone, PartialEq, ::prost::Oneof)]
4960 pub enum Example {
4961 #[prost(message, tag = "1")]
4962 Id(super::PointId),
4963 #[prost(message, tag = "2")]
4964 Vector(super::Vector),
4965 }
4966}
4967#[derive(Clone, PartialEq, ::prost::Message)]
4968pub struct ContextExamplePair {
4969 #[prost(message, optional, tag = "1")]
4970 pub positive: ::core::option::Option<VectorExample>,
4971 #[prost(message, optional, tag = "2")]
4972 pub negative: ::core::option::Option<VectorExample>,
4973}
4974#[derive(Clone, PartialEq, ::prost::Message)]
4975pub struct DiscoverPoints {
4976 #[prost(string, tag = "1")]
4978 pub collection_name: ::prost::alloc::string::String,
4979 #[prost(message, optional, tag = "2")]
4981 pub target: ::core::option::Option<TargetVector>,
4982 #[prost(message, repeated, tag = "3")]
4984 pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
4985 #[prost(message, optional, tag = "4")]
4987 pub filter: ::core::option::Option<Filter>,
4988 #[prost(uint64, tag = "5")]
4990 pub limit: u64,
4991 #[prost(message, optional, tag = "6")]
4993 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4994 #[prost(message, optional, tag = "7")]
4996 pub params: ::core::option::Option<SearchParams>,
4997 #[prost(uint64, optional, tag = "8")]
4999 pub offset: ::core::option::Option<u64>,
5000 #[prost(string, optional, tag = "9")]
5002 pub using: ::core::option::Option<::prost::alloc::string::String>,
5003 #[prost(message, optional, tag = "10")]
5005 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
5006 #[prost(message, optional, tag = "11")]
5008 pub lookup_from: ::core::option::Option<LookupLocation>,
5009 #[prost(message, optional, tag = "12")]
5011 pub read_consistency: ::core::option::Option<ReadConsistency>,
5012 #[prost(uint64, optional, tag = "13")]
5014 pub timeout: ::core::option::Option<u64>,
5015 #[prost(message, optional, tag = "14")]
5017 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5018}
5019#[derive(Clone, PartialEq, ::prost::Message)]
5020pub struct DiscoverBatchPoints {
5021 #[prost(string, tag = "1")]
5023 pub collection_name: ::prost::alloc::string::String,
5024 #[prost(message, repeated, tag = "2")]
5025 pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
5026 #[prost(message, optional, tag = "3")]
5028 pub read_consistency: ::core::option::Option<ReadConsistency>,
5029 #[prost(uint64, optional, tag = "4")]
5031 pub timeout: ::core::option::Option<u64>,
5032}
5033#[derive(Clone, PartialEq, ::prost::Message)]
5034pub struct CountPoints {
5035 #[prost(string, tag = "1")]
5037 pub collection_name: ::prost::alloc::string::String,
5038 #[prost(message, optional, tag = "2")]
5040 pub filter: ::core::option::Option<Filter>,
5041 #[prost(bool, optional, tag = "3")]
5043 pub exact: ::core::option::Option<bool>,
5044 #[prost(message, optional, tag = "4")]
5046 pub read_consistency: ::core::option::Option<ReadConsistency>,
5047 #[prost(message, optional, tag = "5")]
5049 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5050 #[prost(uint64, optional, tag = "6")]
5052 pub timeout: ::core::option::Option<u64>,
5053}
5054#[derive(Clone, PartialEq, ::prost::Message)]
5055pub struct RecommendInput {
5056 #[prost(message, repeated, tag = "1")]
5058 pub positive: ::prost::alloc::vec::Vec<VectorInput>,
5059 #[prost(message, repeated, tag = "2")]
5061 pub negative: ::prost::alloc::vec::Vec<VectorInput>,
5062 #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
5064 pub strategy: ::core::option::Option<i32>,
5065}
5066#[derive(Clone, PartialEq, ::prost::Message)]
5067pub struct ContextInputPair {
5068 #[prost(message, optional, tag = "1")]
5070 pub positive: ::core::option::Option<VectorInput>,
5071 #[prost(message, optional, tag = "2")]
5073 pub negative: ::core::option::Option<VectorInput>,
5074}
5075#[derive(Clone, PartialEq, ::prost::Message)]
5076pub struct DiscoverInput {
5077 #[prost(message, optional, tag = "1")]
5079 pub target: ::core::option::Option<VectorInput>,
5080 #[prost(message, optional, tag = "2")]
5082 pub context: ::core::option::Option<ContextInput>,
5083}
5084#[derive(Clone, PartialEq, ::prost::Message)]
5085pub struct ContextInput {
5086 #[prost(message, repeated, tag = "1")]
5088 pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
5089}
5090#[derive(Clone, PartialEq, ::prost::Message)]
5091pub struct RelevanceFeedbackInput {
5092 #[prost(message, optional, tag = "1")]
5094 pub target: ::core::option::Option<VectorInput>,
5095 #[prost(message, repeated, tag = "2")]
5097 pub feedback: ::prost::alloc::vec::Vec<FeedbackItem>,
5098 #[prost(message, optional, tag = "3")]
5100 pub strategy: ::core::option::Option<FeedbackStrategy>,
5101}
5102#[derive(Clone, PartialEq, ::prost::Message)]
5103pub struct FeedbackItem {
5104 #[prost(message, optional, tag = "1")]
5106 pub example: ::core::option::Option<VectorInput>,
5107 #[prost(float, tag = "2")]
5109 pub score: f32,
5110}
5111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5112pub struct FeedbackStrategy {
5113 #[prost(oneof = "feedback_strategy::Variant", tags = "1")]
5114 pub variant: ::core::option::Option<feedback_strategy::Variant>,
5115}
5116pub mod feedback_strategy {
5118 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5119 pub enum Variant {
5120 #[prost(message, tag = "1")]
5122 Naive(super::NaiveFeedbackStrategy),
5123 }
5124}
5125#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5126pub struct NaiveFeedbackStrategy {
5127 #[prost(float, tag = "1")]
5128 pub a: f32,
5129 #[prost(float, tag = "2")]
5130 pub b: f32,
5131 #[prost(float, tag = "3")]
5132 pub c: f32,
5133}
5134#[derive(Clone, PartialEq, ::prost::Message)]
5135pub struct Formula {
5136 #[prost(message, optional, tag = "1")]
5137 pub expression: ::core::option::Option<Expression>,
5138 #[prost(map = "string, message", tag = "2")]
5139 pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5140}
5141#[derive(Clone, PartialEq, ::prost::Message)]
5142pub struct Expression {
5143 #[prost(
5144 oneof = "expression::Variant",
5145 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22"
5146 )]
5147 pub variant: ::core::option::Option<expression::Variant>,
5148}
5149pub mod expression {
5151 #[derive(Clone, PartialEq, ::prost::Oneof)]
5152 pub enum Variant {
5153 #[prost(float, tag = "1")]
5154 Constant(f32),
5155 #[prost(string, tag = "2")]
5157 Variable(::prost::alloc::string::String),
5158 #[prost(message, tag = "3")]
5160 Condition(super::Condition),
5161 #[prost(message, tag = "4")]
5163 GeoDistance(super::GeoDistance),
5164 #[prost(string, tag = "5")]
5166 Datetime(::prost::alloc::string::String),
5167 #[prost(string, tag = "6")]
5169 DatetimeKey(::prost::alloc::string::String),
5170 #[prost(message, tag = "7")]
5172 Mult(super::MultExpression),
5173 #[prost(message, tag = "8")]
5175 Sum(super::SumExpression),
5176 #[prost(message, tag = "9")]
5178 Div(::prost::alloc::boxed::Box<super::DivExpression>),
5179 #[prost(message, tag = "10")]
5181 Neg(::prost::alloc::boxed::Box<super::Expression>),
5182 #[prost(message, tag = "11")]
5184 Abs(::prost::alloc::boxed::Box<super::Expression>),
5185 #[prost(message, tag = "12")]
5187 Sqrt(::prost::alloc::boxed::Box<super::Expression>),
5188 #[prost(message, tag = "13")]
5190 Pow(::prost::alloc::boxed::Box<super::PowExpression>),
5191 #[prost(message, tag = "14")]
5193 Exp(::prost::alloc::boxed::Box<super::Expression>),
5194 #[prost(message, tag = "15")]
5196 Log10(::prost::alloc::boxed::Box<super::Expression>),
5197 #[prost(message, tag = "16")]
5199 Ln(::prost::alloc::boxed::Box<super::Expression>),
5200 #[prost(message, tag = "17")]
5202 ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5203 #[prost(message, tag = "18")]
5205 GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5206 #[prost(message, tag = "19")]
5208 LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
5209 #[prost(message, tag = "20")]
5211 Acosh(::prost::alloc::boxed::Box<super::Expression>),
5212 #[prost(message, tag = "21")]
5214 Max(super::MaxExpression),
5215 #[prost(message, tag = "22")]
5217 Min(super::MinExpression),
5218 }
5219}
5220#[derive(Clone, PartialEq, ::prost::Message)]
5221pub struct GeoDistance {
5222 #[prost(message, optional, tag = "1")]
5223 pub origin: ::core::option::Option<GeoPoint>,
5224 #[prost(string, tag = "2")]
5225 pub to: ::prost::alloc::string::String,
5226}
5227#[derive(Clone, PartialEq, ::prost::Message)]
5228pub struct MultExpression {
5229 #[prost(message, repeated, tag = "1")]
5230 pub mult: ::prost::alloc::vec::Vec<Expression>,
5231}
5232#[derive(Clone, PartialEq, ::prost::Message)]
5233pub struct SumExpression {
5234 #[prost(message, repeated, tag = "1")]
5235 pub sum: ::prost::alloc::vec::Vec<Expression>,
5236}
5237#[derive(Clone, PartialEq, ::prost::Message)]
5238pub struct MaxExpression {
5239 #[prost(message, repeated, tag = "1")]
5240 pub max: ::prost::alloc::vec::Vec<Expression>,
5241}
5242#[derive(Clone, PartialEq, ::prost::Message)]
5243pub struct MinExpression {
5244 #[prost(message, repeated, tag = "1")]
5245 pub min: ::prost::alloc::vec::Vec<Expression>,
5246}
5247#[derive(Clone, PartialEq, ::prost::Message)]
5248pub struct DivExpression {
5249 #[prost(message, optional, boxed, tag = "1")]
5250 pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5251 #[prost(message, optional, boxed, tag = "2")]
5252 pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5253 #[prost(float, optional, tag = "3")]
5254 pub by_zero_default: ::core::option::Option<f32>,
5255}
5256#[derive(Clone, PartialEq, ::prost::Message)]
5257pub struct PowExpression {
5258 #[prost(message, optional, boxed, tag = "1")]
5259 pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5260 #[prost(message, optional, boxed, tag = "2")]
5261 pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5262}
5263#[derive(Clone, PartialEq, ::prost::Message)]
5264pub struct DecayParamsExpression {
5265 #[prost(message, optional, boxed, tag = "1")]
5267 pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5268 #[prost(message, optional, boxed, tag = "2")]
5270 pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
5271 #[prost(float, optional, tag = "3")]
5274 pub scale: ::core::option::Option<f32>,
5275 #[prost(float, optional, tag = "4")]
5279 pub midpoint: ::core::option::Option<f32>,
5280}
5281#[derive(Clone, PartialEq, ::prost::Message)]
5282pub struct NearestInputWithMmr {
5283 #[prost(message, optional, tag = "1")]
5285 pub nearest: ::core::option::Option<VectorInput>,
5286 #[prost(message, optional, tag = "2")]
5289 pub mmr: ::core::option::Option<Mmr>,
5290}
5291#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5293pub struct Mmr {
5294 #[prost(float, optional, tag = "2")]
5303 pub diversity: ::core::option::Option<f32>,
5304 #[prost(uint32, optional, tag = "3")]
5308 pub candidates_limit: ::core::option::Option<u32>,
5309}
5310#[derive(Clone, PartialEq, ::prost::Message)]
5312pub struct Rrf {
5313 #[prost(uint32, optional, tag = "1")]
5315 pub k: ::core::option::Option<u32>,
5316 #[prost(float, repeated, tag = "2")]
5321 pub weights: ::prost::alloc::vec::Vec<f32>,
5322}
5323#[derive(Clone, PartialEq, ::prost::Message)]
5324pub struct Query {
5325 #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
5326 pub variant: ::core::option::Option<query::Variant>,
5327}
5328pub mod query {
5330 #[derive(Clone, PartialEq, ::prost::Oneof)]
5331 pub enum Variant {
5332 #[prost(message, tag = "1")]
5334 Nearest(super::VectorInput),
5335 #[prost(message, tag = "2")]
5337 Recommend(super::RecommendInput),
5338 #[prost(message, tag = "3")]
5340 Discover(super::DiscoverInput),
5341 #[prost(message, tag = "4")]
5343 Context(super::ContextInput),
5344 #[prost(message, tag = "5")]
5346 OrderBy(super::OrderBy),
5347 #[prost(enumeration = "super::Fusion", tag = "6")]
5349 Fusion(i32),
5350 #[prost(enumeration = "super::Sample", tag = "7")]
5352 Sample(i32),
5353 #[prost(message, tag = "8")]
5355 Formula(super::Formula),
5356 #[prost(message, tag = "9")]
5358 NearestWithMmr(super::NearestInputWithMmr),
5359 #[prost(message, tag = "10")]
5361 Rrf(super::Rrf),
5362 #[prost(message, tag = "11")]
5364 RelevanceFeedback(super::RelevanceFeedbackInput),
5365 #[prost(message, tag = "12")]
5367 Text(super::TextQuery),
5368 }
5369}
5370#[derive(Clone, PartialEq, ::prost::Message)]
5374pub struct TextQuery {
5375 #[prost(string, tag = "1")]
5377 pub query: ::prost::alloc::string::String,
5378 #[prost(oneof = "text_query::Scoring", tags = "2")]
5382 pub scoring: ::core::option::Option<text_query::Scoring>,
5383}
5384pub mod text_query {
5386 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5390 pub enum Scoring {
5391 #[prost(message, tag = "2")]
5393 Bm25(super::Bm25Params),
5394 }
5395}
5396#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5397pub struct Bm25Params {
5398 #[prost(float, optional, tag = "1")]
5400 pub k: ::core::option::Option<f32>,
5401 #[prost(float, optional, tag = "2")]
5403 pub b: ::core::option::Option<f32>,
5404}
5405#[derive(Clone, PartialEq, ::prost::Message)]
5406pub struct PrefetchQuery {
5407 #[prost(message, repeated, tag = "1")]
5410 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5411 #[prost(message, optional, tag = "2")]
5414 pub query: ::core::option::Option<Query>,
5415 #[prost(string, optional, tag = "3")]
5419 pub using: ::core::option::Option<::prost::alloc::string::String>,
5420 #[prost(message, optional, tag = "4")]
5422 pub filter: ::core::option::Option<Filter>,
5423 #[prost(message, optional, tag = "5")]
5425 pub params: ::core::option::Option<SearchParams>,
5426 #[prost(float, optional, tag = "6")]
5428 pub score_threshold: ::core::option::Option<f32>,
5429 #[prost(uint64, optional, tag = "7")]
5431 pub limit: ::core::option::Option<u64>,
5432 #[prost(message, optional, tag = "8")]
5435 pub lookup_from: ::core::option::Option<LookupLocation>,
5436}
5437#[derive(Clone, PartialEq, ::prost::Message)]
5438pub struct QueryPoints {
5439 #[prost(string, tag = "1")]
5441 pub collection_name: ::prost::alloc::string::String,
5442 #[prost(message, repeated, tag = "2")]
5445 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5446 #[prost(message, optional, tag = "3")]
5448 pub query: ::core::option::Option<Query>,
5449 #[prost(string, optional, tag = "4")]
5453 pub using: ::core::option::Option<::prost::alloc::string::String>,
5454 #[prost(message, optional, tag = "5")]
5456 pub filter: ::core::option::Option<Filter>,
5457 #[prost(message, optional, tag = "6")]
5459 pub params: ::core::option::Option<SearchParams>,
5460 #[prost(float, optional, tag = "7")]
5462 pub score_threshold: ::core::option::Option<f32>,
5463 #[prost(uint64, optional, tag = "8")]
5465 pub limit: ::core::option::Option<u64>,
5466 #[prost(uint64, optional, tag = "9")]
5468 pub offset: ::core::option::Option<u64>,
5469 #[prost(message, optional, tag = "10")]
5471 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
5472 #[prost(message, optional, tag = "11")]
5474 pub with_payload: ::core::option::Option<WithPayloadSelector>,
5475 #[prost(message, optional, tag = "12")]
5477 pub read_consistency: ::core::option::Option<ReadConsistency>,
5478 #[prost(message, optional, tag = "13")]
5481 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5482 #[prost(message, optional, tag = "14")]
5485 pub lookup_from: ::core::option::Option<LookupLocation>,
5486 #[prost(uint64, optional, tag = "15")]
5488 pub timeout: ::core::option::Option<u64>,
5489}
5490#[derive(Clone, PartialEq, ::prost::Message)]
5491pub struct QueryBatchPoints {
5492 #[prost(string, tag = "1")]
5493 pub collection_name: ::prost::alloc::string::String,
5494 #[prost(message, repeated, tag = "2")]
5495 pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
5496 #[prost(message, optional, tag = "3")]
5498 pub read_consistency: ::core::option::Option<ReadConsistency>,
5499 #[prost(uint64, optional, tag = "4")]
5501 pub timeout: ::core::option::Option<u64>,
5502}
5503#[derive(Clone, PartialEq, ::prost::Message)]
5504pub struct QueryPointGroups {
5505 #[prost(string, tag = "1")]
5507 pub collection_name: ::prost::alloc::string::String,
5508 #[prost(message, repeated, tag = "2")]
5511 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
5512 #[prost(message, optional, tag = "3")]
5514 pub query: ::core::option::Option<Query>,
5515 #[prost(string, optional, tag = "4")]
5519 pub using: ::core::option::Option<::prost::alloc::string::String>,
5520 #[prost(message, optional, tag = "5")]
5522 pub filter: ::core::option::Option<Filter>,
5523 #[prost(message, optional, tag = "6")]
5525 pub params: ::core::option::Option<SearchParams>,
5526 #[prost(float, optional, tag = "7")]
5528 pub score_threshold: ::core::option::Option<f32>,
5529 #[prost(message, optional, tag = "8")]
5531 pub with_payload: ::core::option::Option<WithPayloadSelector>,
5532 #[prost(message, optional, tag = "9")]
5534 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
5535 #[prost(message, optional, tag = "10")]
5538 pub lookup_from: ::core::option::Option<LookupLocation>,
5539 #[prost(uint64, optional, tag = "11")]
5541 pub limit: ::core::option::Option<u64>,
5542 #[prost(uint64, optional, tag = "12")]
5544 pub group_size: ::core::option::Option<u64>,
5545 #[prost(string, tag = "13")]
5549 pub group_by: ::prost::alloc::string::String,
5550 #[prost(message, optional, tag = "14")]
5552 pub read_consistency: ::core::option::Option<ReadConsistency>,
5553 #[prost(message, optional, tag = "15")]
5555 pub with_lookup: ::core::option::Option<WithLookup>,
5556 #[prost(uint64, optional, tag = "16")]
5558 pub timeout: ::core::option::Option<u64>,
5559 #[prost(message, optional, tag = "17")]
5561 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5562}
5563#[derive(Clone, PartialEq, ::prost::Message)]
5564pub struct FacetCounts {
5565 #[prost(string, tag = "1")]
5567 pub collection_name: ::prost::alloc::string::String,
5568 #[prost(string, tag = "2")]
5570 pub key: ::prost::alloc::string::String,
5571 #[prost(message, optional, tag = "3")]
5573 pub filter: ::core::option::Option<Filter>,
5574 #[prost(uint64, optional, tag = "4")]
5576 pub limit: ::core::option::Option<u64>,
5577 #[prost(bool, optional, tag = "5")]
5579 pub exact: ::core::option::Option<bool>,
5580 #[prost(uint64, optional, tag = "6")]
5582 pub timeout: ::core::option::Option<u64>,
5583 #[prost(message, optional, tag = "7")]
5585 pub read_consistency: ::core::option::Option<ReadConsistency>,
5586 #[prost(message, optional, tag = "8")]
5588 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5589}
5590#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5591pub struct FacetValue {
5592 #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
5593 pub variant: ::core::option::Option<facet_value::Variant>,
5594}
5595pub mod facet_value {
5597 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
5598 pub enum Variant {
5599 #[prost(string, tag = "1")]
5601 StringValue(::prost::alloc::string::String),
5602 #[prost(int64, tag = "2")]
5604 IntegerValue(i64),
5605 #[prost(bool, tag = "3")]
5607 BoolValue(bool),
5608 }
5609}
5610#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5611pub struct FacetHit {
5612 #[prost(message, optional, tag = "1")]
5614 pub value: ::core::option::Option<FacetValue>,
5615 #[prost(uint64, tag = "2")]
5617 pub count: u64,
5618}
5619#[derive(Clone, PartialEq, ::prost::Message)]
5620pub struct SearchMatrixPoints {
5621 #[prost(string, tag = "1")]
5623 pub collection_name: ::prost::alloc::string::String,
5624 #[prost(message, optional, tag = "2")]
5626 pub filter: ::core::option::Option<Filter>,
5627 #[prost(uint64, optional, tag = "3")]
5629 pub sample: ::core::option::Option<u64>,
5630 #[prost(uint64, optional, tag = "4")]
5632 pub limit: ::core::option::Option<u64>,
5633 #[prost(string, optional, tag = "5")]
5635 pub using: ::core::option::Option<::prost::alloc::string::String>,
5636 #[prost(uint64, optional, tag = "6")]
5638 pub timeout: ::core::option::Option<u64>,
5639 #[prost(message, optional, tag = "7")]
5641 pub read_consistency: ::core::option::Option<ReadConsistency>,
5642 #[prost(message, optional, tag = "8")]
5644 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5645}
5646#[derive(Clone, PartialEq, ::prost::Message)]
5647pub struct SearchMatrixPairs {
5648 #[prost(message, repeated, tag = "1")]
5650 pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
5651}
5652#[derive(Clone, PartialEq, ::prost::Message)]
5653pub struct SearchMatrixPair {
5654 #[prost(message, optional, tag = "1")]
5656 pub a: ::core::option::Option<PointId>,
5657 #[prost(message, optional, tag = "2")]
5659 pub b: ::core::option::Option<PointId>,
5660 #[prost(float, tag = "3")]
5662 pub score: f32,
5663}
5664#[derive(Clone, PartialEq, ::prost::Message)]
5665pub struct SearchMatrixOffsets {
5666 #[prost(uint64, repeated, tag = "1")]
5668 pub offsets_row: ::prost::alloc::vec::Vec<u64>,
5669 #[prost(uint64, repeated, tag = "2")]
5671 pub offsets_col: ::prost::alloc::vec::Vec<u64>,
5672 #[prost(float, repeated, tag = "3")]
5674 pub scores: ::prost::alloc::vec::Vec<f32>,
5675 #[prost(message, repeated, tag = "4")]
5677 pub ids: ::prost::alloc::vec::Vec<PointId>,
5678}
5679#[derive(Clone, PartialEq, ::prost::Message)]
5680pub struct PointsUpdateOperation {
5681 #[prost(
5682 oneof = "points_update_operation::Operation",
5683 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
5684 )]
5685 pub operation: ::core::option::Option<points_update_operation::Operation>,
5686}
5687pub mod points_update_operation {
5689 #[derive(Clone, PartialEq, ::prost::Message)]
5690 pub struct PointStructList {
5691 #[prost(message, repeated, tag = "1")]
5692 pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
5693 #[prost(message, optional, tag = "2")]
5695 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5696 #[prost(message, optional, tag = "3")]
5699 pub update_filter: ::core::option::Option<super::Filter>,
5700 #[prost(enumeration = "super::UpdateMode", optional, tag = "4")]
5702 pub update_mode: ::core::option::Option<i32>,
5703 }
5704 #[derive(Clone, PartialEq, ::prost::Message)]
5705 pub struct SetPayload {
5706 #[prost(map = "string, message", tag = "1")]
5707 pub payload: ::std::collections::HashMap<
5708 ::prost::alloc::string::String,
5709 super::Value,
5710 >,
5711 #[prost(message, optional, tag = "2")]
5713 pub points_selector: ::core::option::Option<super::PointsSelector>,
5714 #[prost(message, optional, tag = "3")]
5716 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5717 #[prost(string, optional, tag = "4")]
5719 pub key: ::core::option::Option<::prost::alloc::string::String>,
5720 }
5721 #[derive(Clone, PartialEq, ::prost::Message)]
5722 pub struct OverwritePayload {
5723 #[prost(map = "string, message", tag = "1")]
5724 pub payload: ::std::collections::HashMap<
5725 ::prost::alloc::string::String,
5726 super::Value,
5727 >,
5728 #[prost(message, optional, tag = "2")]
5730 pub points_selector: ::core::option::Option<super::PointsSelector>,
5731 #[prost(message, optional, tag = "3")]
5733 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5734 #[prost(string, optional, tag = "4")]
5736 pub key: ::core::option::Option<::prost::alloc::string::String>,
5737 }
5738 #[derive(Clone, PartialEq, ::prost::Message)]
5739 pub struct DeletePayload {
5740 #[prost(string, repeated, tag = "1")]
5741 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5742 #[prost(message, optional, tag = "2")]
5744 pub points_selector: ::core::option::Option<super::PointsSelector>,
5745 #[prost(message, optional, tag = "3")]
5747 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5748 }
5749 #[derive(Clone, PartialEq, ::prost::Message)]
5750 pub struct UpdateVectors {
5751 #[prost(message, repeated, tag = "1")]
5753 pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
5754 #[prost(message, optional, tag = "2")]
5756 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5757 #[prost(message, optional, tag = "3")]
5759 pub update_filter: ::core::option::Option<super::Filter>,
5760 }
5761 #[derive(Clone, PartialEq, ::prost::Message)]
5762 pub struct DeleteVectors {
5763 #[prost(message, optional, tag = "1")]
5765 pub points_selector: ::core::option::Option<super::PointsSelector>,
5766 #[prost(message, optional, tag = "2")]
5768 pub vectors: ::core::option::Option<super::VectorsSelector>,
5769 #[prost(message, optional, tag = "3")]
5771 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5772 }
5773 #[derive(Clone, PartialEq, ::prost::Message)]
5774 pub struct DeletePoints {
5775 #[prost(message, optional, tag = "1")]
5777 pub points: ::core::option::Option<super::PointsSelector>,
5778 #[prost(message, optional, tag = "2")]
5780 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5781 }
5782 #[derive(Clone, PartialEq, ::prost::Message)]
5783 pub struct ClearPayload {
5784 #[prost(message, optional, tag = "1")]
5786 pub points: ::core::option::Option<super::PointsSelector>,
5787 #[prost(message, optional, tag = "2")]
5789 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5790 }
5791 #[derive(Clone, PartialEq, ::prost::Oneof)]
5792 pub enum Operation {
5793 #[prost(message, tag = "1")]
5794 Upsert(PointStructList),
5795 #[deprecated]
5796 #[prost(message, tag = "2")]
5797 DeleteDeprecated(super::PointsSelector),
5798 #[prost(message, tag = "3")]
5799 SetPayload(SetPayload),
5800 #[prost(message, tag = "4")]
5801 OverwritePayload(OverwritePayload),
5802 #[prost(message, tag = "5")]
5803 DeletePayload(DeletePayload),
5804 #[deprecated]
5805 #[prost(message, tag = "6")]
5806 ClearPayloadDeprecated(super::PointsSelector),
5807 #[prost(message, tag = "7")]
5808 UpdateVectors(UpdateVectors),
5809 #[prost(message, tag = "8")]
5810 DeleteVectors(DeleteVectors),
5811 #[prost(message, tag = "9")]
5812 DeletePoints(DeletePoints),
5813 #[prost(message, tag = "10")]
5814 ClearPayload(ClearPayload),
5815 }
5816}
5817#[derive(Clone, PartialEq, ::prost::Message)]
5818pub struct UpdateBatchPoints {
5819 #[prost(string, tag = "1")]
5821 pub collection_name: ::prost::alloc::string::String,
5822 #[prost(bool, optional, tag = "2")]
5824 pub wait: ::core::option::Option<bool>,
5825 #[prost(message, repeated, tag = "3")]
5826 pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
5827 #[prost(message, optional, tag = "4")]
5829 pub ordering: ::core::option::Option<WriteOrdering>,
5830 #[prost(uint64, optional, tag = "5")]
5832 pub timeout: ::core::option::Option<u64>,
5833}
5834#[derive(Clone, PartialEq, ::prost::Message)]
5835pub struct PointsOperationResponse {
5836 #[prost(message, optional, tag = "1")]
5837 pub result: ::core::option::Option<UpdateResult>,
5838 #[prost(double, tag = "2")]
5840 pub time: f64,
5841 #[prost(message, optional, tag = "3")]
5842 pub usage: ::core::option::Option<Usage>,
5843}
5844#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5845pub struct UpdateResult {
5846 #[prost(uint64, optional, tag = "1")]
5848 pub operation_id: ::core::option::Option<u64>,
5849 #[prost(enumeration = "UpdateStatus", tag = "2")]
5851 pub status: i32,
5852}
5853#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5854pub struct OrderValue {
5855 #[prost(oneof = "order_value::Variant", tags = "1, 2")]
5856 pub variant: ::core::option::Option<order_value::Variant>,
5857}
5858pub mod order_value {
5860 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5861 pub enum Variant {
5862 #[prost(int64, tag = "1")]
5863 Int(i64),
5864 #[prost(double, tag = "2")]
5865 Float(f64),
5866 }
5867}
5868#[derive(Clone, PartialEq, ::prost::Message)]
5869pub struct ScoredPoint {
5870 #[prost(message, optional, tag = "1")]
5872 pub id: ::core::option::Option<PointId>,
5873 #[prost(map = "string, message", tag = "2")]
5875 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5876 #[prost(float, tag = "3")]
5878 pub score: f32,
5879 #[prost(uint64, tag = "5")]
5881 pub version: u64,
5882 #[prost(message, optional, tag = "6")]
5884 pub vectors: ::core::option::Option<VectorsOutput>,
5885 #[prost(message, optional, tag = "7")]
5887 pub shard_key: ::core::option::Option<ShardKey>,
5888 #[prost(message, optional, tag = "8")]
5890 pub order_value: ::core::option::Option<OrderValue>,
5891}
5892#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5893pub struct GroupId {
5894 #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
5895 pub kind: ::core::option::Option<group_id::Kind>,
5896}
5897pub mod group_id {
5899 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
5900 pub enum Kind {
5901 #[prost(uint64, tag = "1")]
5903 UnsignedValue(u64),
5904 #[prost(int64, tag = "2")]
5906 IntegerValue(i64),
5907 #[prost(string, tag = "3")]
5909 StringValue(::prost::alloc::string::String),
5910 }
5911}
5912#[derive(Clone, PartialEq, ::prost::Message)]
5913pub struct PointGroup {
5914 #[prost(message, optional, tag = "1")]
5916 pub id: ::core::option::Option<GroupId>,
5917 #[prost(message, repeated, tag = "2")]
5919 pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
5920 #[prost(message, optional, tag = "3")]
5922 pub lookup: ::core::option::Option<RetrievedPoint>,
5923}
5924#[derive(Clone, PartialEq, ::prost::Message)]
5925pub struct GroupsResult {
5926 #[prost(message, repeated, tag = "1")]
5928 pub groups: ::prost::alloc::vec::Vec<PointGroup>,
5929}
5930#[derive(Clone, PartialEq, ::prost::Message)]
5931pub struct SearchResponse {
5932 #[prost(message, repeated, tag = "1")]
5933 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
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 QueryResponse {
5942 #[prost(message, repeated, tag = "1")]
5943 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
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 QueryBatchResponse {
5952 #[prost(message, repeated, tag = "1")]
5953 pub result: ::prost::alloc::vec::Vec<BatchResult>,
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 QueryGroupsResponse {
5962 #[prost(message, optional, tag = "1")]
5963 pub result: ::core::option::Option<GroupsResult>,
5964 #[prost(double, tag = "2")]
5966 pub time: f64,
5967 #[prost(message, optional, tag = "3")]
5968 pub usage: ::core::option::Option<Usage>,
5969}
5970#[derive(Clone, PartialEq, ::prost::Message)]
5971pub struct BatchResult {
5972 #[prost(message, repeated, tag = "1")]
5973 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5974}
5975#[derive(Clone, PartialEq, ::prost::Message)]
5976pub struct SearchBatchResponse {
5977 #[prost(message, repeated, tag = "1")]
5978 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5979 #[prost(double, tag = "2")]
5981 pub time: f64,
5982 #[prost(message, optional, tag = "3")]
5983 pub usage: ::core::option::Option<Usage>,
5984}
5985#[derive(Clone, PartialEq, ::prost::Message)]
5986pub struct SearchGroupsResponse {
5987 #[prost(message, optional, tag = "1")]
5988 pub result: ::core::option::Option<GroupsResult>,
5989 #[prost(double, tag = "2")]
5991 pub time: f64,
5992 #[prost(message, optional, tag = "3")]
5993 pub usage: ::core::option::Option<Usage>,
5994}
5995#[derive(Clone, PartialEq, ::prost::Message)]
5996pub struct CountResponse {
5997 #[prost(message, optional, tag = "1")]
5998 pub result: ::core::option::Option<CountResult>,
5999 #[prost(double, tag = "2")]
6001 pub time: f64,
6002 #[prost(message, optional, tag = "3")]
6003 pub usage: ::core::option::Option<Usage>,
6004}
6005#[derive(Clone, PartialEq, ::prost::Message)]
6006pub struct ScrollResponse {
6007 #[prost(message, optional, tag = "1")]
6009 pub next_page_offset: ::core::option::Option<PointId>,
6010 #[prost(message, repeated, tag = "2")]
6011 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
6012 #[prost(double, tag = "3")]
6014 pub time: f64,
6015 #[prost(message, optional, tag = "4")]
6016 pub usage: ::core::option::Option<Usage>,
6017}
6018#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6019pub struct CountResult {
6020 #[prost(uint64, tag = "1")]
6021 pub count: u64,
6022}
6023#[derive(Clone, PartialEq, ::prost::Message)]
6024pub struct RetrievedPoint {
6025 #[prost(message, optional, tag = "1")]
6026 pub id: ::core::option::Option<PointId>,
6027 #[prost(map = "string, message", tag = "2")]
6028 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
6029 #[prost(message, optional, tag = "4")]
6030 pub vectors: ::core::option::Option<VectorsOutput>,
6031 #[prost(message, optional, tag = "5")]
6033 pub shard_key: ::core::option::Option<ShardKey>,
6034 #[prost(message, optional, tag = "6")]
6036 pub order_value: ::core::option::Option<OrderValue>,
6037}
6038#[derive(Clone, PartialEq, ::prost::Message)]
6039pub struct GetResponse {
6040 #[prost(message, repeated, tag = "1")]
6041 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
6042 #[prost(double, tag = "2")]
6044 pub time: f64,
6045 #[prost(message, optional, tag = "3")]
6046 pub usage: ::core::option::Option<Usage>,
6047}
6048#[derive(Clone, PartialEq, ::prost::Message)]
6049pub struct RecommendResponse {
6050 #[prost(message, repeated, tag = "1")]
6051 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
6052 #[prost(double, tag = "2")]
6054 pub time: f64,
6055 #[prost(message, optional, tag = "3")]
6056 pub usage: ::core::option::Option<Usage>,
6057}
6058#[derive(Clone, PartialEq, ::prost::Message)]
6059pub struct RecommendBatchResponse {
6060 #[prost(message, repeated, tag = "1")]
6061 pub result: ::prost::alloc::vec::Vec<BatchResult>,
6062 #[prost(double, tag = "2")]
6064 pub time: f64,
6065 #[prost(message, optional, tag = "3")]
6066 pub usage: ::core::option::Option<Usage>,
6067}
6068#[derive(Clone, PartialEq, ::prost::Message)]
6069pub struct DiscoverResponse {
6070 #[prost(message, repeated, tag = "1")]
6071 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
6072 #[prost(double, tag = "2")]
6074 pub time: f64,
6075 #[prost(message, optional, tag = "3")]
6076 pub usage: ::core::option::Option<Usage>,
6077}
6078#[derive(Clone, PartialEq, ::prost::Message)]
6079pub struct DiscoverBatchResponse {
6080 #[prost(message, repeated, tag = "1")]
6081 pub result: ::prost::alloc::vec::Vec<BatchResult>,
6082 #[prost(double, tag = "2")]
6084 pub time: f64,
6085 #[prost(message, optional, tag = "3")]
6086 pub usage: ::core::option::Option<Usage>,
6087}
6088#[derive(Clone, PartialEq, ::prost::Message)]
6089pub struct RecommendGroupsResponse {
6090 #[prost(message, optional, tag = "1")]
6091 pub result: ::core::option::Option<GroupsResult>,
6092 #[prost(double, tag = "2")]
6094 pub time: f64,
6095 #[prost(message, optional, tag = "3")]
6096 pub usage: ::core::option::Option<Usage>,
6097}
6098#[derive(Clone, PartialEq, ::prost::Message)]
6099pub struct UpdateBatchResponse {
6100 #[prost(message, repeated, tag = "1")]
6101 pub result: ::prost::alloc::vec::Vec<UpdateResult>,
6102 #[prost(double, tag = "2")]
6104 pub time: f64,
6105 #[prost(message, optional, tag = "3")]
6106 pub usage: ::core::option::Option<Usage>,
6107}
6108#[derive(Clone, PartialEq, ::prost::Message)]
6109pub struct FacetResponse {
6110 #[prost(message, repeated, tag = "1")]
6111 pub hits: ::prost::alloc::vec::Vec<FacetHit>,
6112 #[prost(double, tag = "2")]
6114 pub time: f64,
6115 #[prost(message, optional, tag = "3")]
6116 pub usage: ::core::option::Option<Usage>,
6117}
6118#[derive(Clone, PartialEq, ::prost::Message)]
6119pub struct SearchMatrixPairsResponse {
6120 #[prost(message, optional, tag = "1")]
6121 pub result: ::core::option::Option<SearchMatrixPairs>,
6122 #[prost(double, tag = "2")]
6124 pub time: f64,
6125 #[prost(message, optional, tag = "3")]
6126 pub usage: ::core::option::Option<Usage>,
6127}
6128#[derive(Clone, PartialEq, ::prost::Message)]
6129pub struct SearchMatrixOffsetsResponse {
6130 #[prost(message, optional, tag = "1")]
6131 pub result: ::core::option::Option<SearchMatrixOffsets>,
6132 #[prost(double, tag = "2")]
6134 pub time: f64,
6135 #[prost(message, optional, tag = "3")]
6136 pub usage: ::core::option::Option<Usage>,
6137}
6138#[derive(Clone, PartialEq, ::prost::Message)]
6139pub struct PointsSelector {
6140 #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
6141 pub points_selector_one_of: ::core::option::Option<
6142 points_selector::PointsSelectorOneOf,
6143 >,
6144}
6145pub mod points_selector {
6147 #[derive(Clone, PartialEq, ::prost::Oneof)]
6148 pub enum PointsSelectorOneOf {
6149 #[prost(message, tag = "1")]
6150 Points(super::PointsIdsList),
6151 #[prost(message, tag = "2")]
6152 Filter(super::Filter),
6153 }
6154}
6155#[derive(Clone, PartialEq, ::prost::Message)]
6156pub struct PointsIdsList {
6157 #[prost(message, repeated, tag = "1")]
6158 pub ids: ::prost::alloc::vec::Vec<PointId>,
6159}
6160#[derive(Clone, PartialEq, ::prost::Message)]
6161pub struct PointStruct {
6162 #[prost(message, optional, tag = "1")]
6163 pub id: ::core::option::Option<PointId>,
6164 #[prost(map = "string, message", tag = "3")]
6165 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
6166 #[prost(message, optional, tag = "4")]
6167 pub vectors: ::core::option::Option<Vectors>,
6168}
6169#[derive(Clone, PartialEq, ::prost::Message)]
6173pub struct Usage {
6174 #[prost(message, optional, tag = "1")]
6175 pub hardware: ::core::option::Option<HardwareUsage>,
6176 #[prost(message, optional, tag = "2")]
6177 pub inference: ::core::option::Option<InferenceUsage>,
6178}
6179#[derive(Clone, PartialEq, ::prost::Message)]
6180pub struct InferenceUsage {
6181 #[prost(map = "string, message", tag = "1")]
6182 pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
6183}
6184#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6185pub struct ModelUsage {
6186 #[prost(uint64, tag = "1")]
6187 pub tokens: u64,
6188}
6189#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6190pub struct HardwareUsage {
6191 #[prost(uint64, tag = "1")]
6192 pub cpu: u64,
6193 #[prost(uint64, tag = "2")]
6194 pub payload_io_read: u64,
6195 #[prost(uint64, tag = "3")]
6196 pub payload_io_write: u64,
6197 #[prost(uint64, tag = "4")]
6198 pub payload_index_io_read: u64,
6199 #[prost(uint64, tag = "5")]
6200 pub payload_index_io_write: u64,
6201 #[prost(uint64, tag = "6")]
6202 pub vector_io_read: u64,
6203 #[prost(uint64, tag = "7")]
6204 pub vector_io_write: u64,
6205}
6206#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6207#[repr(i32)]
6208pub enum WriteOrderingType {
6209 Weak = 0,
6211 Medium = 1,
6214 Strong = 2,
6217}
6218impl WriteOrderingType {
6219 pub fn as_str_name(&self) -> &'static str {
6224 match self {
6225 Self::Weak => "Weak",
6226 Self::Medium => "Medium",
6227 Self::Strong => "Strong",
6228 }
6229 }
6230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6232 match value {
6233 "Weak" => Some(Self::Weak),
6234 "Medium" => Some(Self::Medium),
6235 "Strong" => Some(Self::Strong),
6236 _ => None,
6237 }
6238 }
6239}
6240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6242#[repr(i32)]
6243pub enum UpdateMode {
6244 Upsert = 0,
6246 InsertOnly = 1,
6248 UpdateOnly = 2,
6250}
6251impl UpdateMode {
6252 pub fn as_str_name(&self) -> &'static str {
6257 match self {
6258 Self::Upsert => "Upsert",
6259 Self::InsertOnly => "InsertOnly",
6260 Self::UpdateOnly => "UpdateOnly",
6261 }
6262 }
6263 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6265 match value {
6266 "Upsert" => Some(Self::Upsert),
6267 "InsertOnly" => Some(Self::InsertOnly),
6268 "UpdateOnly" => Some(Self::UpdateOnly),
6269 _ => None,
6270 }
6271 }
6272}
6273#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6274#[repr(i32)]
6275pub enum ReadConsistencyType {
6276 All = 0,
6278 Majority = 1,
6280 Quorum = 2,
6282}
6283impl ReadConsistencyType {
6284 pub fn as_str_name(&self) -> &'static str {
6289 match self {
6290 Self::All => "All",
6291 Self::Majority => "Majority",
6292 Self::Quorum => "Quorum",
6293 }
6294 }
6295 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6297 match value {
6298 "All" => Some(Self::All),
6299 "Majority" => Some(Self::Majority),
6300 "Quorum" => Some(Self::Quorum),
6301 _ => None,
6302 }
6303 }
6304}
6305#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6306#[repr(i32)]
6307pub enum FieldType {
6308 Keyword = 0,
6309 Integer = 1,
6310 Float = 2,
6311 Geo = 3,
6312 Text = 4,
6313 Bool = 5,
6314 Datetime = 6,
6315 Uuid = 7,
6316}
6317impl FieldType {
6318 pub fn as_str_name(&self) -> &'static str {
6323 match self {
6324 Self::Keyword => "FieldTypeKeyword",
6325 Self::Integer => "FieldTypeInteger",
6326 Self::Float => "FieldTypeFloat",
6327 Self::Geo => "FieldTypeGeo",
6328 Self::Text => "FieldTypeText",
6329 Self::Bool => "FieldTypeBool",
6330 Self::Datetime => "FieldTypeDatetime",
6331 Self::Uuid => "FieldTypeUuid",
6332 }
6333 }
6334 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6336 match value {
6337 "FieldTypeKeyword" => Some(Self::Keyword),
6338 "FieldTypeInteger" => Some(Self::Integer),
6339 "FieldTypeFloat" => Some(Self::Float),
6340 "FieldTypeGeo" => Some(Self::Geo),
6341 "FieldTypeText" => Some(Self::Text),
6342 "FieldTypeBool" => Some(Self::Bool),
6343 "FieldTypeDatetime" => Some(Self::Datetime),
6344 "FieldTypeUuid" => Some(Self::Uuid),
6345 _ => None,
6346 }
6347 }
6348}
6349#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6350#[repr(i32)]
6351pub enum Direction {
6352 Asc = 0,
6353 Desc = 1,
6354}
6355impl Direction {
6356 pub fn as_str_name(&self) -> &'static str {
6361 match self {
6362 Self::Asc => "Asc",
6363 Self::Desc => "Desc",
6364 }
6365 }
6366 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6368 match value {
6369 "Asc" => Some(Self::Asc),
6370 "Desc" => Some(Self::Desc),
6371 _ => None,
6372 }
6373 }
6374}
6375#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6377#[repr(i32)]
6378pub enum RecommendStrategy {
6379 AverageVector = 0,
6382 BestScore = 1,
6386 SumScores = 2,
6389}
6390impl RecommendStrategy {
6391 pub fn as_str_name(&self) -> &'static str {
6396 match self {
6397 Self::AverageVector => "AverageVector",
6398 Self::BestScore => "BestScore",
6399 Self::SumScores => "SumScores",
6400 }
6401 }
6402 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6404 match value {
6405 "AverageVector" => Some(Self::AverageVector),
6406 "BestScore" => Some(Self::BestScore),
6407 "SumScores" => Some(Self::SumScores),
6408 _ => None,
6409 }
6410 }
6411}
6412#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6413#[repr(i32)]
6414pub enum Fusion {
6415 Rrf = 0,
6417 Dbsf = 1,
6419}
6420impl Fusion {
6421 pub fn as_str_name(&self) -> &'static str {
6426 match self {
6427 Self::Rrf => "RRF",
6428 Self::Dbsf => "DBSF",
6429 }
6430 }
6431 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6433 match value {
6434 "RRF" => Some(Self::Rrf),
6435 "DBSF" => Some(Self::Dbsf),
6436 _ => None,
6437 }
6438 }
6439}
6440#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6446#[repr(i32)]
6447pub enum Sample {
6448 Random = 0,
6449}
6450impl Sample {
6451 pub fn as_str_name(&self) -> &'static str {
6456 match self {
6457 Self::Random => "Random",
6458 }
6459 }
6460 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6462 match value {
6463 "Random" => Some(Self::Random),
6464 _ => None,
6465 }
6466 }
6467}
6468#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6469#[repr(i32)]
6470pub enum UpdateStatus {
6471 UnknownUpdateStatus = 0,
6472 Acknowledged = 1,
6474 Completed = 2,
6476 ClockRejected = 3,
6478 WaitTimeout = 4,
6480}
6481impl UpdateStatus {
6482 pub fn as_str_name(&self) -> &'static str {
6487 match self {
6488 Self::UnknownUpdateStatus => "UnknownUpdateStatus",
6489 Self::Acknowledged => "Acknowledged",
6490 Self::Completed => "Completed",
6491 Self::ClockRejected => "ClockRejected",
6492 Self::WaitTimeout => "WaitTimeout",
6493 }
6494 }
6495 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6497 match value {
6498 "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
6499 "Acknowledged" => Some(Self::Acknowledged),
6500 "Completed" => Some(Self::Completed),
6501 "ClockRejected" => Some(Self::ClockRejected),
6502 "WaitTimeout" => Some(Self::WaitTimeout),
6503 _ => None,
6504 }
6505 }
6506}
6507pub mod points_client {
6509 #![allow(
6510 unused_variables,
6511 dead_code,
6512 missing_docs,
6513 clippy::wildcard_imports,
6514 clippy::let_unit_value,
6515 )]
6516 use tonic::codegen::*;
6517 use tonic::codegen::http::Uri;
6518 #[derive(Debug, Clone)]
6519 pub struct PointsClient<T> {
6520 inner: tonic::client::Grpc<T>,
6521 }
6522 impl PointsClient<tonic::transport::Channel> {
6523 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
6525 where
6526 D: TryInto<tonic::transport::Endpoint>,
6527 D::Error: Into<StdError>,
6528 {
6529 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
6530 Ok(Self::new(conn))
6531 }
6532 }
6533 impl<T> PointsClient<T>
6534 where
6535 T: tonic::client::GrpcService<tonic::body::Body>,
6536 T::Error: Into<StdError>,
6537 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6538 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6539 {
6540 pub fn new(inner: T) -> Self {
6541 let inner = tonic::client::Grpc::new(inner);
6542 Self { inner }
6543 }
6544 pub fn with_origin(inner: T, origin: Uri) -> Self {
6545 let inner = tonic::client::Grpc::with_origin(inner, origin);
6546 Self { inner }
6547 }
6548 pub fn with_interceptor<F>(
6549 inner: T,
6550 interceptor: F,
6551 ) -> PointsClient<InterceptedService<T, F>>
6552 where
6553 F: tonic::service::Interceptor,
6554 T::ResponseBody: Default,
6555 T: tonic::codegen::Service<
6556 http::Request<tonic::body::Body>,
6557 Response = http::Response<
6558 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
6559 >,
6560 >,
6561 <T as tonic::codegen::Service<
6562 http::Request<tonic::body::Body>,
6563 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6564 {
6565 PointsClient::new(InterceptedService::new(inner, interceptor))
6566 }
6567 #[must_use]
6572 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6573 self.inner = self.inner.send_compressed(encoding);
6574 self
6575 }
6576 #[must_use]
6578 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6579 self.inner = self.inner.accept_compressed(encoding);
6580 self
6581 }
6582 #[must_use]
6586 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6587 self.inner = self.inner.max_decoding_message_size(limit);
6588 self
6589 }
6590 #[must_use]
6594 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6595 self.inner = self.inner.max_encoding_message_size(limit);
6596 self
6597 }
6598 pub async fn upsert(
6601 &mut self,
6602 request: impl tonic::IntoRequest<super::UpsertPoints>,
6603 ) -> std::result::Result<
6604 tonic::Response<super::PointsOperationResponse>,
6605 tonic::Status,
6606 > {
6607 self.inner
6608 .ready()
6609 .await
6610 .map_err(|e| {
6611 tonic::Status::unknown(
6612 format!("Service was not ready: {}", e.into()),
6613 )
6614 })?;
6615 let codec = tonic_prost::ProstCodec::default();
6616 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
6617 let mut req = request.into_request();
6618 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
6619 self.inner.unary(req, path, codec).await
6620 }
6621 pub async fn delete(
6623 &mut self,
6624 request: impl tonic::IntoRequest<super::DeletePoints>,
6625 ) -> std::result::Result<
6626 tonic::Response<super::PointsOperationResponse>,
6627 tonic::Status,
6628 > {
6629 self.inner
6630 .ready()
6631 .await
6632 .map_err(|e| {
6633 tonic::Status::unknown(
6634 format!("Service was not ready: {}", e.into()),
6635 )
6636 })?;
6637 let codec = tonic_prost::ProstCodec::default();
6638 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
6639 let mut req = request.into_request();
6640 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
6641 self.inner.unary(req, path, codec).await
6642 }
6643 pub async fn get(
6645 &mut self,
6646 request: impl tonic::IntoRequest<super::GetPoints>,
6647 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
6648 self.inner
6649 .ready()
6650 .await
6651 .map_err(|e| {
6652 tonic::Status::unknown(
6653 format!("Service was not ready: {}", e.into()),
6654 )
6655 })?;
6656 let codec = tonic_prost::ProstCodec::default();
6657 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
6658 let mut req = request.into_request();
6659 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
6660 self.inner.unary(req, path, codec).await
6661 }
6662 pub async fn update_vectors(
6664 &mut self,
6665 request: impl tonic::IntoRequest<super::UpdatePointVectors>,
6666 ) -> std::result::Result<
6667 tonic::Response<super::PointsOperationResponse>,
6668 tonic::Status,
6669 > {
6670 self.inner
6671 .ready()
6672 .await
6673 .map_err(|e| {
6674 tonic::Status::unknown(
6675 format!("Service was not ready: {}", e.into()),
6676 )
6677 })?;
6678 let codec = tonic_prost::ProstCodec::default();
6679 let path = http::uri::PathAndQuery::from_static(
6680 "/qdrant.Points/UpdateVectors",
6681 );
6682 let mut req = request.into_request();
6683 req.extensions_mut()
6684 .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
6685 self.inner.unary(req, path, codec).await
6686 }
6687 pub async fn delete_vectors(
6689 &mut self,
6690 request: impl tonic::IntoRequest<super::DeletePointVectors>,
6691 ) -> std::result::Result<
6692 tonic::Response<super::PointsOperationResponse>,
6693 tonic::Status,
6694 > {
6695 self.inner
6696 .ready()
6697 .await
6698 .map_err(|e| {
6699 tonic::Status::unknown(
6700 format!("Service was not ready: {}", e.into()),
6701 )
6702 })?;
6703 let codec = tonic_prost::ProstCodec::default();
6704 let path = http::uri::PathAndQuery::from_static(
6705 "/qdrant.Points/DeleteVectors",
6706 );
6707 let mut req = request.into_request();
6708 req.extensions_mut()
6709 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
6710 self.inner.unary(req, path, codec).await
6711 }
6712 pub async fn set_payload(
6714 &mut self,
6715 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6716 ) -> std::result::Result<
6717 tonic::Response<super::PointsOperationResponse>,
6718 tonic::Status,
6719 > {
6720 self.inner
6721 .ready()
6722 .await
6723 .map_err(|e| {
6724 tonic::Status::unknown(
6725 format!("Service was not ready: {}", e.into()),
6726 )
6727 })?;
6728 let codec = tonic_prost::ProstCodec::default();
6729 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
6730 let mut req = request.into_request();
6731 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
6732 self.inner.unary(req, path, codec).await
6733 }
6734 pub async fn overwrite_payload(
6736 &mut self,
6737 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6738 ) -> std::result::Result<
6739 tonic::Response<super::PointsOperationResponse>,
6740 tonic::Status,
6741 > {
6742 self.inner
6743 .ready()
6744 .await
6745 .map_err(|e| {
6746 tonic::Status::unknown(
6747 format!("Service was not ready: {}", e.into()),
6748 )
6749 })?;
6750 let codec = tonic_prost::ProstCodec::default();
6751 let path = http::uri::PathAndQuery::from_static(
6752 "/qdrant.Points/OverwritePayload",
6753 );
6754 let mut req = request.into_request();
6755 req.extensions_mut()
6756 .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
6757 self.inner.unary(req, path, codec).await
6758 }
6759 pub async fn delete_payload(
6761 &mut self,
6762 request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
6763 ) -> std::result::Result<
6764 tonic::Response<super::PointsOperationResponse>,
6765 tonic::Status,
6766 > {
6767 self.inner
6768 .ready()
6769 .await
6770 .map_err(|e| {
6771 tonic::Status::unknown(
6772 format!("Service was not ready: {}", e.into()),
6773 )
6774 })?;
6775 let codec = tonic_prost::ProstCodec::default();
6776 let path = http::uri::PathAndQuery::from_static(
6777 "/qdrant.Points/DeletePayload",
6778 );
6779 let mut req = request.into_request();
6780 req.extensions_mut()
6781 .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
6782 self.inner.unary(req, path, codec).await
6783 }
6784 pub async fn clear_payload(
6786 &mut self,
6787 request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
6788 ) -> std::result::Result<
6789 tonic::Response<super::PointsOperationResponse>,
6790 tonic::Status,
6791 > {
6792 self.inner
6793 .ready()
6794 .await
6795 .map_err(|e| {
6796 tonic::Status::unknown(
6797 format!("Service was not ready: {}", e.into()),
6798 )
6799 })?;
6800 let codec = tonic_prost::ProstCodec::default();
6801 let path = http::uri::PathAndQuery::from_static(
6802 "/qdrant.Points/ClearPayload",
6803 );
6804 let mut req = request.into_request();
6805 req.extensions_mut()
6806 .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
6807 self.inner.unary(req, path, codec).await
6808 }
6809 pub async fn create_field_index(
6811 &mut self,
6812 request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
6813 ) -> std::result::Result<
6814 tonic::Response<super::PointsOperationResponse>,
6815 tonic::Status,
6816 > {
6817 self.inner
6818 .ready()
6819 .await
6820 .map_err(|e| {
6821 tonic::Status::unknown(
6822 format!("Service was not ready: {}", e.into()),
6823 )
6824 })?;
6825 let codec = tonic_prost::ProstCodec::default();
6826 let path = http::uri::PathAndQuery::from_static(
6827 "/qdrant.Points/CreateFieldIndex",
6828 );
6829 let mut req = request.into_request();
6830 req.extensions_mut()
6831 .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
6832 self.inner.unary(req, path, codec).await
6833 }
6834 pub async fn delete_field_index(
6836 &mut self,
6837 request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
6838 ) -> std::result::Result<
6839 tonic::Response<super::PointsOperationResponse>,
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(
6852 "/qdrant.Points/DeleteFieldIndex",
6853 );
6854 let mut req = request.into_request();
6855 req.extensions_mut()
6856 .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
6857 self.inner.unary(req, path, codec).await
6858 }
6859 pub async fn create_vector_name(
6861 &mut self,
6862 request: impl tonic::IntoRequest<super::CreateVectorNameRequest>,
6863 ) -> std::result::Result<
6864 tonic::Response<super::PointsOperationResponse>,
6865 tonic::Status,
6866 > {
6867 self.inner
6868 .ready()
6869 .await
6870 .map_err(|e| {
6871 tonic::Status::unknown(
6872 format!("Service was not ready: {}", e.into()),
6873 )
6874 })?;
6875 let codec = tonic_prost::ProstCodec::default();
6876 let path = http::uri::PathAndQuery::from_static(
6877 "/qdrant.Points/CreateVectorName",
6878 );
6879 let mut req = request.into_request();
6880 req.extensions_mut()
6881 .insert(GrpcMethod::new("qdrant.Points", "CreateVectorName"));
6882 self.inner.unary(req, path, codec).await
6883 }
6884 pub async fn delete_vector_name(
6886 &mut self,
6887 request: impl tonic::IntoRequest<super::DeleteVectorNameRequest>,
6888 ) -> std::result::Result<
6889 tonic::Response<super::PointsOperationResponse>,
6890 tonic::Status,
6891 > {
6892 self.inner
6893 .ready()
6894 .await
6895 .map_err(|e| {
6896 tonic::Status::unknown(
6897 format!("Service was not ready: {}", e.into()),
6898 )
6899 })?;
6900 let codec = tonic_prost::ProstCodec::default();
6901 let path = http::uri::PathAndQuery::from_static(
6902 "/qdrant.Points/DeleteVectorName",
6903 );
6904 let mut req = request.into_request();
6905 req.extensions_mut()
6906 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectorName"));
6907 self.inner.unary(req, path, codec).await
6908 }
6909 #[deprecated]
6914 pub async fn search(
6915 &mut self,
6916 request: impl tonic::IntoRequest<super::SearchPoints>,
6917 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
6918 self.inner
6919 .ready()
6920 .await
6921 .map_err(|e| {
6922 tonic::Status::unknown(
6923 format!("Service was not ready: {}", e.into()),
6924 )
6925 })?;
6926 let codec = tonic_prost::ProstCodec::default();
6927 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
6928 let mut req = request.into_request();
6929 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
6930 self.inner.unary(req, path, codec).await
6931 }
6932 #[deprecated]
6937 pub async fn search_batch(
6938 &mut self,
6939 request: impl tonic::IntoRequest<super::SearchBatchPoints>,
6940 ) -> std::result::Result<
6941 tonic::Response<super::SearchBatchResponse>,
6942 tonic::Status,
6943 > {
6944 self.inner
6945 .ready()
6946 .await
6947 .map_err(|e| {
6948 tonic::Status::unknown(
6949 format!("Service was not ready: {}", e.into()),
6950 )
6951 })?;
6952 let codec = tonic_prost::ProstCodec::default();
6953 let path = http::uri::PathAndQuery::from_static(
6954 "/qdrant.Points/SearchBatch",
6955 );
6956 let mut req = request.into_request();
6957 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
6958 self.inner.unary(req, path, codec).await
6959 }
6960 #[deprecated]
6965 pub async fn search_groups(
6966 &mut self,
6967 request: impl tonic::IntoRequest<super::SearchPointGroups>,
6968 ) -> std::result::Result<
6969 tonic::Response<super::SearchGroupsResponse>,
6970 tonic::Status,
6971 > {
6972 self.inner
6973 .ready()
6974 .await
6975 .map_err(|e| {
6976 tonic::Status::unknown(
6977 format!("Service was not ready: {}", e.into()),
6978 )
6979 })?;
6980 let codec = tonic_prost::ProstCodec::default();
6981 let path = http::uri::PathAndQuery::from_static(
6982 "/qdrant.Points/SearchGroups",
6983 );
6984 let mut req = request.into_request();
6985 req.extensions_mut()
6986 .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
6987 self.inner.unary(req, path, codec).await
6988 }
6989 pub async fn scroll(
6991 &mut self,
6992 request: impl tonic::IntoRequest<super::ScrollPoints>,
6993 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
6994 self.inner
6995 .ready()
6996 .await
6997 .map_err(|e| {
6998 tonic::Status::unknown(
6999 format!("Service was not ready: {}", e.into()),
7000 )
7001 })?;
7002 let codec = tonic_prost::ProstCodec::default();
7003 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
7004 let mut req = request.into_request();
7005 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
7006 self.inner.unary(req, path, codec).await
7007 }
7008 #[deprecated]
7013 pub async fn recommend(
7014 &mut self,
7015 request: impl tonic::IntoRequest<super::RecommendPoints>,
7016 ) -> std::result::Result<
7017 tonic::Response<super::RecommendResponse>,
7018 tonic::Status,
7019 > {
7020 self.inner
7021 .ready()
7022 .await
7023 .map_err(|e| {
7024 tonic::Status::unknown(
7025 format!("Service was not ready: {}", e.into()),
7026 )
7027 })?;
7028 let codec = tonic_prost::ProstCodec::default();
7029 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
7030 let mut req = request.into_request();
7031 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
7032 self.inner.unary(req, path, codec).await
7033 }
7034 #[deprecated]
7039 pub async fn recommend_batch(
7040 &mut self,
7041 request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
7042 ) -> std::result::Result<
7043 tonic::Response<super::RecommendBatchResponse>,
7044 tonic::Status,
7045 > {
7046 self.inner
7047 .ready()
7048 .await
7049 .map_err(|e| {
7050 tonic::Status::unknown(
7051 format!("Service was not ready: {}", e.into()),
7052 )
7053 })?;
7054 let codec = tonic_prost::ProstCodec::default();
7055 let path = http::uri::PathAndQuery::from_static(
7056 "/qdrant.Points/RecommendBatch",
7057 );
7058 let mut req = request.into_request();
7059 req.extensions_mut()
7060 .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
7061 self.inner.unary(req, path, codec).await
7062 }
7063 #[deprecated]
7068 pub async fn recommend_groups(
7069 &mut self,
7070 request: impl tonic::IntoRequest<super::RecommendPointGroups>,
7071 ) -> std::result::Result<
7072 tonic::Response<super::RecommendGroupsResponse>,
7073 tonic::Status,
7074 > {
7075 self.inner
7076 .ready()
7077 .await
7078 .map_err(|e| {
7079 tonic::Status::unknown(
7080 format!("Service was not ready: {}", e.into()),
7081 )
7082 })?;
7083 let codec = tonic_prost::ProstCodec::default();
7084 let path = http::uri::PathAndQuery::from_static(
7085 "/qdrant.Points/RecommendGroups",
7086 );
7087 let mut req = request.into_request();
7088 req.extensions_mut()
7089 .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
7090 self.inner.unary(req, path, codec).await
7091 }
7092 #[deprecated]
7114 pub async fn discover(
7115 &mut self,
7116 request: impl tonic::IntoRequest<super::DiscoverPoints>,
7117 ) -> std::result::Result<
7118 tonic::Response<super::DiscoverResponse>,
7119 tonic::Status,
7120 > {
7121 self.inner
7122 .ready()
7123 .await
7124 .map_err(|e| {
7125 tonic::Status::unknown(
7126 format!("Service was not ready: {}", e.into()),
7127 )
7128 })?;
7129 let codec = tonic_prost::ProstCodec::default();
7130 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
7131 let mut req = request.into_request();
7132 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
7133 self.inner.unary(req, path, codec).await
7134 }
7135 #[deprecated]
7139 pub async fn discover_batch(
7140 &mut self,
7141 request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
7142 ) -> std::result::Result<
7143 tonic::Response<super::DiscoverBatchResponse>,
7144 tonic::Status,
7145 > {
7146 self.inner
7147 .ready()
7148 .await
7149 .map_err(|e| {
7150 tonic::Status::unknown(
7151 format!("Service was not ready: {}", e.into()),
7152 )
7153 })?;
7154 let codec = tonic_prost::ProstCodec::default();
7155 let path = http::uri::PathAndQuery::from_static(
7156 "/qdrant.Points/DiscoverBatch",
7157 );
7158 let mut req = request.into_request();
7159 req.extensions_mut()
7160 .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
7161 self.inner.unary(req, path, codec).await
7162 }
7163 pub async fn count(
7165 &mut self,
7166 request: impl tonic::IntoRequest<super::CountPoints>,
7167 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
7168 self.inner
7169 .ready()
7170 .await
7171 .map_err(|e| {
7172 tonic::Status::unknown(
7173 format!("Service was not ready: {}", e.into()),
7174 )
7175 })?;
7176 let codec = tonic_prost::ProstCodec::default();
7177 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
7178 let mut req = request.into_request();
7179 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
7180 self.inner.unary(req, path, codec).await
7181 }
7182 pub async fn update_batch(
7184 &mut self,
7185 request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
7186 ) -> std::result::Result<
7187 tonic::Response<super::UpdateBatchResponse>,
7188 tonic::Status,
7189 > {
7190 self.inner
7191 .ready()
7192 .await
7193 .map_err(|e| {
7194 tonic::Status::unknown(
7195 format!("Service was not ready: {}", e.into()),
7196 )
7197 })?;
7198 let codec = tonic_prost::ProstCodec::default();
7199 let path = http::uri::PathAndQuery::from_static(
7200 "/qdrant.Points/UpdateBatch",
7201 );
7202 let mut req = request.into_request();
7203 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
7204 self.inner.unary(req, path, codec).await
7205 }
7206 pub async fn query(
7210 &mut self,
7211 request: impl tonic::IntoRequest<super::QueryPoints>,
7212 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
7213 self.inner
7214 .ready()
7215 .await
7216 .map_err(|e| {
7217 tonic::Status::unknown(
7218 format!("Service was not ready: {}", e.into()),
7219 )
7220 })?;
7221 let codec = tonic_prost::ProstCodec::default();
7222 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
7223 let mut req = request.into_request();
7224 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
7225 self.inner.unary(req, path, codec).await
7226 }
7227 pub async fn query_batch(
7231 &mut self,
7232 request: impl tonic::IntoRequest<super::QueryBatchPoints>,
7233 ) -> std::result::Result<
7234 tonic::Response<super::QueryBatchResponse>,
7235 tonic::Status,
7236 > {
7237 self.inner
7238 .ready()
7239 .await
7240 .map_err(|e| {
7241 tonic::Status::unknown(
7242 format!("Service was not ready: {}", e.into()),
7243 )
7244 })?;
7245 let codec = tonic_prost::ProstCodec::default();
7246 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
7247 let mut req = request.into_request();
7248 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
7249 self.inner.unary(req, path, codec).await
7250 }
7251 pub async fn query_groups(
7255 &mut self,
7256 request: impl tonic::IntoRequest<super::QueryPointGroups>,
7257 ) -> std::result::Result<
7258 tonic::Response<super::QueryGroupsResponse>,
7259 tonic::Status,
7260 > {
7261 self.inner
7262 .ready()
7263 .await
7264 .map_err(|e| {
7265 tonic::Status::unknown(
7266 format!("Service was not ready: {}", e.into()),
7267 )
7268 })?;
7269 let codec = tonic_prost::ProstCodec::default();
7270 let path = http::uri::PathAndQuery::from_static(
7271 "/qdrant.Points/QueryGroups",
7272 );
7273 let mut req = request.into_request();
7274 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
7275 self.inner.unary(req, path, codec).await
7276 }
7277 pub async fn facet(
7281 &mut self,
7282 request: impl tonic::IntoRequest<super::FacetCounts>,
7283 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
7284 self.inner
7285 .ready()
7286 .await
7287 .map_err(|e| {
7288 tonic::Status::unknown(
7289 format!("Service was not ready: {}", e.into()),
7290 )
7291 })?;
7292 let codec = tonic_prost::ProstCodec::default();
7293 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
7294 let mut req = request.into_request();
7295 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
7296 self.inner.unary(req, path, codec).await
7297 }
7298 pub async fn search_matrix_pairs(
7300 &mut self,
7301 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
7302 ) -> std::result::Result<
7303 tonic::Response<super::SearchMatrixPairsResponse>,
7304 tonic::Status,
7305 > {
7306 self.inner
7307 .ready()
7308 .await
7309 .map_err(|e| {
7310 tonic::Status::unknown(
7311 format!("Service was not ready: {}", e.into()),
7312 )
7313 })?;
7314 let codec = tonic_prost::ProstCodec::default();
7315 let path = http::uri::PathAndQuery::from_static(
7316 "/qdrant.Points/SearchMatrixPairs",
7317 );
7318 let mut req = request.into_request();
7319 req.extensions_mut()
7320 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
7321 self.inner.unary(req, path, codec).await
7322 }
7323 pub async fn search_matrix_offsets(
7325 &mut self,
7326 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
7327 ) -> std::result::Result<
7328 tonic::Response<super::SearchMatrixOffsetsResponse>,
7329 tonic::Status,
7330 > {
7331 self.inner
7332 .ready()
7333 .await
7334 .map_err(|e| {
7335 tonic::Status::unknown(
7336 format!("Service was not ready: {}", e.into()),
7337 )
7338 })?;
7339 let codec = tonic_prost::ProstCodec::default();
7340 let path = http::uri::PathAndQuery::from_static(
7341 "/qdrant.Points/SearchMatrixOffsets",
7342 );
7343 let mut req = request.into_request();
7344 req.extensions_mut()
7345 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
7346 self.inner.unary(req, path, codec).await
7347 }
7348 }
7349}
7350pub mod points_server {
7352 #![allow(
7353 unused_variables,
7354 dead_code,
7355 missing_docs,
7356 clippy::wildcard_imports,
7357 clippy::let_unit_value,
7358 )]
7359 use tonic::codegen::*;
7360 #[async_trait]
7362 pub trait Points: std::marker::Send + std::marker::Sync + 'static {
7363 async fn upsert(
7366 &self,
7367 request: tonic::Request<super::UpsertPoints>,
7368 ) -> std::result::Result<
7369 tonic::Response<super::PointsOperationResponse>,
7370 tonic::Status,
7371 >;
7372 async fn delete(
7374 &self,
7375 request: tonic::Request<super::DeletePoints>,
7376 ) -> std::result::Result<
7377 tonic::Response<super::PointsOperationResponse>,
7378 tonic::Status,
7379 >;
7380 async fn get(
7382 &self,
7383 request: tonic::Request<super::GetPoints>,
7384 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
7385 async fn update_vectors(
7387 &self,
7388 request: tonic::Request<super::UpdatePointVectors>,
7389 ) -> std::result::Result<
7390 tonic::Response<super::PointsOperationResponse>,
7391 tonic::Status,
7392 >;
7393 async fn delete_vectors(
7395 &self,
7396 request: tonic::Request<super::DeletePointVectors>,
7397 ) -> std::result::Result<
7398 tonic::Response<super::PointsOperationResponse>,
7399 tonic::Status,
7400 >;
7401 async fn set_payload(
7403 &self,
7404 request: tonic::Request<super::SetPayloadPoints>,
7405 ) -> std::result::Result<
7406 tonic::Response<super::PointsOperationResponse>,
7407 tonic::Status,
7408 >;
7409 async fn overwrite_payload(
7411 &self,
7412 request: tonic::Request<super::SetPayloadPoints>,
7413 ) -> std::result::Result<
7414 tonic::Response<super::PointsOperationResponse>,
7415 tonic::Status,
7416 >;
7417 async fn delete_payload(
7419 &self,
7420 request: tonic::Request<super::DeletePayloadPoints>,
7421 ) -> std::result::Result<
7422 tonic::Response<super::PointsOperationResponse>,
7423 tonic::Status,
7424 >;
7425 async fn clear_payload(
7427 &self,
7428 request: tonic::Request<super::ClearPayloadPoints>,
7429 ) -> std::result::Result<
7430 tonic::Response<super::PointsOperationResponse>,
7431 tonic::Status,
7432 >;
7433 async fn create_field_index(
7435 &self,
7436 request: tonic::Request<super::CreateFieldIndexCollection>,
7437 ) -> std::result::Result<
7438 tonic::Response<super::PointsOperationResponse>,
7439 tonic::Status,
7440 >;
7441 async fn delete_field_index(
7443 &self,
7444 request: tonic::Request<super::DeleteFieldIndexCollection>,
7445 ) -> std::result::Result<
7446 tonic::Response<super::PointsOperationResponse>,
7447 tonic::Status,
7448 >;
7449 async fn create_vector_name(
7451 &self,
7452 request: tonic::Request<super::CreateVectorNameRequest>,
7453 ) -> std::result::Result<
7454 tonic::Response<super::PointsOperationResponse>,
7455 tonic::Status,
7456 >;
7457 async fn delete_vector_name(
7459 &self,
7460 request: tonic::Request<super::DeleteVectorNameRequest>,
7461 ) -> std::result::Result<
7462 tonic::Response<super::PointsOperationResponse>,
7463 tonic::Status,
7464 >;
7465 async fn search(
7470 &self,
7471 request: tonic::Request<super::SearchPoints>,
7472 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
7473 async fn search_batch(
7478 &self,
7479 request: tonic::Request<super::SearchBatchPoints>,
7480 ) -> std::result::Result<
7481 tonic::Response<super::SearchBatchResponse>,
7482 tonic::Status,
7483 >;
7484 async fn search_groups(
7489 &self,
7490 request: tonic::Request<super::SearchPointGroups>,
7491 ) -> std::result::Result<
7492 tonic::Response<super::SearchGroupsResponse>,
7493 tonic::Status,
7494 >;
7495 async fn scroll(
7497 &self,
7498 request: tonic::Request<super::ScrollPoints>,
7499 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
7500 async fn recommend(
7505 &self,
7506 request: tonic::Request<super::RecommendPoints>,
7507 ) -> std::result::Result<
7508 tonic::Response<super::RecommendResponse>,
7509 tonic::Status,
7510 >;
7511 async fn recommend_batch(
7516 &self,
7517 request: tonic::Request<super::RecommendBatchPoints>,
7518 ) -> std::result::Result<
7519 tonic::Response<super::RecommendBatchResponse>,
7520 tonic::Status,
7521 >;
7522 async fn recommend_groups(
7527 &self,
7528 request: tonic::Request<super::RecommendPointGroups>,
7529 ) -> std::result::Result<
7530 tonic::Response<super::RecommendGroupsResponse>,
7531 tonic::Status,
7532 >;
7533 async fn discover(
7555 &self,
7556 request: tonic::Request<super::DiscoverPoints>,
7557 ) -> std::result::Result<
7558 tonic::Response<super::DiscoverResponse>,
7559 tonic::Status,
7560 >;
7561 async fn discover_batch(
7565 &self,
7566 request: tonic::Request<super::DiscoverBatchPoints>,
7567 ) -> std::result::Result<
7568 tonic::Response<super::DiscoverBatchResponse>,
7569 tonic::Status,
7570 >;
7571 async fn count(
7573 &self,
7574 request: tonic::Request<super::CountPoints>,
7575 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
7576 async fn update_batch(
7578 &self,
7579 request: tonic::Request<super::UpdateBatchPoints>,
7580 ) -> std::result::Result<
7581 tonic::Response<super::UpdateBatchResponse>,
7582 tonic::Status,
7583 >;
7584 async fn query(
7588 &self,
7589 request: tonic::Request<super::QueryPoints>,
7590 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
7591 async fn query_batch(
7595 &self,
7596 request: tonic::Request<super::QueryBatchPoints>,
7597 ) -> std::result::Result<
7598 tonic::Response<super::QueryBatchResponse>,
7599 tonic::Status,
7600 >;
7601 async fn query_groups(
7605 &self,
7606 request: tonic::Request<super::QueryPointGroups>,
7607 ) -> std::result::Result<
7608 tonic::Response<super::QueryGroupsResponse>,
7609 tonic::Status,
7610 >;
7611 async fn facet(
7615 &self,
7616 request: tonic::Request<super::FacetCounts>,
7617 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
7618 async fn search_matrix_pairs(
7620 &self,
7621 request: tonic::Request<super::SearchMatrixPoints>,
7622 ) -> std::result::Result<
7623 tonic::Response<super::SearchMatrixPairsResponse>,
7624 tonic::Status,
7625 >;
7626 async fn search_matrix_offsets(
7628 &self,
7629 request: tonic::Request<super::SearchMatrixPoints>,
7630 ) -> std::result::Result<
7631 tonic::Response<super::SearchMatrixOffsetsResponse>,
7632 tonic::Status,
7633 >;
7634 }
7635 #[derive(Debug)]
7636 pub struct PointsServer<T> {
7637 inner: Arc<T>,
7638 accept_compression_encodings: EnabledCompressionEncodings,
7639 send_compression_encodings: EnabledCompressionEncodings,
7640 max_decoding_message_size: Option<usize>,
7641 max_encoding_message_size: Option<usize>,
7642 }
7643 impl<T> PointsServer<T> {
7644 pub fn new(inner: T) -> Self {
7645 Self::from_arc(Arc::new(inner))
7646 }
7647 pub fn from_arc(inner: Arc<T>) -> Self {
7648 Self {
7649 inner,
7650 accept_compression_encodings: Default::default(),
7651 send_compression_encodings: Default::default(),
7652 max_decoding_message_size: None,
7653 max_encoding_message_size: None,
7654 }
7655 }
7656 pub fn with_interceptor<F>(
7657 inner: T,
7658 interceptor: F,
7659 ) -> InterceptedService<Self, F>
7660 where
7661 F: tonic::service::Interceptor,
7662 {
7663 InterceptedService::new(Self::new(inner), interceptor)
7664 }
7665 #[must_use]
7667 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7668 self.accept_compression_encodings.enable(encoding);
7669 self
7670 }
7671 #[must_use]
7673 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7674 self.send_compression_encodings.enable(encoding);
7675 self
7676 }
7677 #[must_use]
7681 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7682 self.max_decoding_message_size = Some(limit);
7683 self
7684 }
7685 #[must_use]
7689 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7690 self.max_encoding_message_size = Some(limit);
7691 self
7692 }
7693 }
7694 impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
7695 where
7696 T: Points,
7697 B: Body + std::marker::Send + 'static,
7698 B::Error: Into<StdError> + std::marker::Send + 'static,
7699 {
7700 type Response = http::Response<tonic::body::Body>;
7701 type Error = std::convert::Infallible;
7702 type Future = BoxFuture<Self::Response, Self::Error>;
7703 fn poll_ready(
7704 &mut self,
7705 _cx: &mut Context<'_>,
7706 ) -> Poll<std::result::Result<(), Self::Error>> {
7707 Poll::Ready(Ok(()))
7708 }
7709 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7710 match req.uri().path() {
7711 "/qdrant.Points/Upsert" => {
7712 #[allow(non_camel_case_types)]
7713 struct UpsertSvc<T: Points>(pub Arc<T>);
7714 impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
7715 for UpsertSvc<T> {
7716 type Response = super::PointsOperationResponse;
7717 type Future = BoxFuture<
7718 tonic::Response<Self::Response>,
7719 tonic::Status,
7720 >;
7721 fn call(
7722 &mut self,
7723 request: tonic::Request<super::UpsertPoints>,
7724 ) -> Self::Future {
7725 let inner = Arc::clone(&self.0);
7726 let fut = async move {
7727 <T as Points>::upsert(&inner, request).await
7728 };
7729 Box::pin(fut)
7730 }
7731 }
7732 let accept_compression_encodings = self.accept_compression_encodings;
7733 let send_compression_encodings = self.send_compression_encodings;
7734 let max_decoding_message_size = self.max_decoding_message_size;
7735 let max_encoding_message_size = self.max_encoding_message_size;
7736 let inner = self.inner.clone();
7737 let fut = async move {
7738 let method = UpsertSvc(inner);
7739 let codec = tonic_prost::ProstCodec::default();
7740 let mut grpc = tonic::server::Grpc::new(codec)
7741 .apply_compression_config(
7742 accept_compression_encodings,
7743 send_compression_encodings,
7744 )
7745 .apply_max_message_size_config(
7746 max_decoding_message_size,
7747 max_encoding_message_size,
7748 );
7749 let res = grpc.unary(method, req).await;
7750 Ok(res)
7751 };
7752 Box::pin(fut)
7753 }
7754 "/qdrant.Points/Delete" => {
7755 #[allow(non_camel_case_types)]
7756 struct DeleteSvc<T: Points>(pub Arc<T>);
7757 impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
7758 for DeleteSvc<T> {
7759 type Response = super::PointsOperationResponse;
7760 type Future = BoxFuture<
7761 tonic::Response<Self::Response>,
7762 tonic::Status,
7763 >;
7764 fn call(
7765 &mut self,
7766 request: tonic::Request<super::DeletePoints>,
7767 ) -> Self::Future {
7768 let inner = Arc::clone(&self.0);
7769 let fut = async move {
7770 <T as Points>::delete(&inner, request).await
7771 };
7772 Box::pin(fut)
7773 }
7774 }
7775 let accept_compression_encodings = self.accept_compression_encodings;
7776 let send_compression_encodings = self.send_compression_encodings;
7777 let max_decoding_message_size = self.max_decoding_message_size;
7778 let max_encoding_message_size = self.max_encoding_message_size;
7779 let inner = self.inner.clone();
7780 let fut = async move {
7781 let method = DeleteSvc(inner);
7782 let codec = tonic_prost::ProstCodec::default();
7783 let mut grpc = tonic::server::Grpc::new(codec)
7784 .apply_compression_config(
7785 accept_compression_encodings,
7786 send_compression_encodings,
7787 )
7788 .apply_max_message_size_config(
7789 max_decoding_message_size,
7790 max_encoding_message_size,
7791 );
7792 let res = grpc.unary(method, req).await;
7793 Ok(res)
7794 };
7795 Box::pin(fut)
7796 }
7797 "/qdrant.Points/Get" => {
7798 #[allow(non_camel_case_types)]
7799 struct GetSvc<T: Points>(pub Arc<T>);
7800 impl<T: Points> tonic::server::UnaryService<super::GetPoints>
7801 for GetSvc<T> {
7802 type Response = super::GetResponse;
7803 type Future = BoxFuture<
7804 tonic::Response<Self::Response>,
7805 tonic::Status,
7806 >;
7807 fn call(
7808 &mut self,
7809 request: tonic::Request<super::GetPoints>,
7810 ) -> Self::Future {
7811 let inner = Arc::clone(&self.0);
7812 let fut = async move {
7813 <T as Points>::get(&inner, request).await
7814 };
7815 Box::pin(fut)
7816 }
7817 }
7818 let accept_compression_encodings = self.accept_compression_encodings;
7819 let send_compression_encodings = self.send_compression_encodings;
7820 let max_decoding_message_size = self.max_decoding_message_size;
7821 let max_encoding_message_size = self.max_encoding_message_size;
7822 let inner = self.inner.clone();
7823 let fut = async move {
7824 let method = GetSvc(inner);
7825 let codec = tonic_prost::ProstCodec::default();
7826 let mut grpc = tonic::server::Grpc::new(codec)
7827 .apply_compression_config(
7828 accept_compression_encodings,
7829 send_compression_encodings,
7830 )
7831 .apply_max_message_size_config(
7832 max_decoding_message_size,
7833 max_encoding_message_size,
7834 );
7835 let res = grpc.unary(method, req).await;
7836 Ok(res)
7837 };
7838 Box::pin(fut)
7839 }
7840 "/qdrant.Points/UpdateVectors" => {
7841 #[allow(non_camel_case_types)]
7842 struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
7843 impl<
7844 T: Points,
7845 > tonic::server::UnaryService<super::UpdatePointVectors>
7846 for UpdateVectorsSvc<T> {
7847 type Response = super::PointsOperationResponse;
7848 type Future = BoxFuture<
7849 tonic::Response<Self::Response>,
7850 tonic::Status,
7851 >;
7852 fn call(
7853 &mut self,
7854 request: tonic::Request<super::UpdatePointVectors>,
7855 ) -> Self::Future {
7856 let inner = Arc::clone(&self.0);
7857 let fut = async move {
7858 <T as Points>::update_vectors(&inner, request).await
7859 };
7860 Box::pin(fut)
7861 }
7862 }
7863 let accept_compression_encodings = self.accept_compression_encodings;
7864 let send_compression_encodings = self.send_compression_encodings;
7865 let max_decoding_message_size = self.max_decoding_message_size;
7866 let max_encoding_message_size = self.max_encoding_message_size;
7867 let inner = self.inner.clone();
7868 let fut = async move {
7869 let method = UpdateVectorsSvc(inner);
7870 let codec = tonic_prost::ProstCodec::default();
7871 let mut grpc = tonic::server::Grpc::new(codec)
7872 .apply_compression_config(
7873 accept_compression_encodings,
7874 send_compression_encodings,
7875 )
7876 .apply_max_message_size_config(
7877 max_decoding_message_size,
7878 max_encoding_message_size,
7879 );
7880 let res = grpc.unary(method, req).await;
7881 Ok(res)
7882 };
7883 Box::pin(fut)
7884 }
7885 "/qdrant.Points/DeleteVectors" => {
7886 #[allow(non_camel_case_types)]
7887 struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
7888 impl<
7889 T: Points,
7890 > tonic::server::UnaryService<super::DeletePointVectors>
7891 for DeleteVectorsSvc<T> {
7892 type Response = super::PointsOperationResponse;
7893 type Future = BoxFuture<
7894 tonic::Response<Self::Response>,
7895 tonic::Status,
7896 >;
7897 fn call(
7898 &mut self,
7899 request: tonic::Request<super::DeletePointVectors>,
7900 ) -> Self::Future {
7901 let inner = Arc::clone(&self.0);
7902 let fut = async move {
7903 <T as Points>::delete_vectors(&inner, request).await
7904 };
7905 Box::pin(fut)
7906 }
7907 }
7908 let accept_compression_encodings = self.accept_compression_encodings;
7909 let send_compression_encodings = self.send_compression_encodings;
7910 let max_decoding_message_size = self.max_decoding_message_size;
7911 let max_encoding_message_size = self.max_encoding_message_size;
7912 let inner = self.inner.clone();
7913 let fut = async move {
7914 let method = DeleteVectorsSvc(inner);
7915 let codec = tonic_prost::ProstCodec::default();
7916 let mut grpc = tonic::server::Grpc::new(codec)
7917 .apply_compression_config(
7918 accept_compression_encodings,
7919 send_compression_encodings,
7920 )
7921 .apply_max_message_size_config(
7922 max_decoding_message_size,
7923 max_encoding_message_size,
7924 );
7925 let res = grpc.unary(method, req).await;
7926 Ok(res)
7927 };
7928 Box::pin(fut)
7929 }
7930 "/qdrant.Points/SetPayload" => {
7931 #[allow(non_camel_case_types)]
7932 struct SetPayloadSvc<T: Points>(pub Arc<T>);
7933 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7934 for SetPayloadSvc<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::SetPayloadPoints>,
7943 ) -> Self::Future {
7944 let inner = Arc::clone(&self.0);
7945 let fut = async move {
7946 <T as Points>::set_payload(&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 = SetPayloadSvc(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/OverwritePayload" => {
7974 #[allow(non_camel_case_types)]
7975 struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
7976 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7977 for OverwritePayloadSvc<T> {
7978 type Response = super::PointsOperationResponse;
7979 type Future = BoxFuture<
7980 tonic::Response<Self::Response>,
7981 tonic::Status,
7982 >;
7983 fn call(
7984 &mut self,
7985 request: tonic::Request<super::SetPayloadPoints>,
7986 ) -> Self::Future {
7987 let inner = Arc::clone(&self.0);
7988 let fut = async move {
7989 <T as Points>::overwrite_payload(&inner, request).await
7990 };
7991 Box::pin(fut)
7992 }
7993 }
7994 let accept_compression_encodings = self.accept_compression_encodings;
7995 let send_compression_encodings = self.send_compression_encodings;
7996 let max_decoding_message_size = self.max_decoding_message_size;
7997 let max_encoding_message_size = self.max_encoding_message_size;
7998 let inner = self.inner.clone();
7999 let fut = async move {
8000 let method = OverwritePayloadSvc(inner);
8001 let codec = tonic_prost::ProstCodec::default();
8002 let mut grpc = tonic::server::Grpc::new(codec)
8003 .apply_compression_config(
8004 accept_compression_encodings,
8005 send_compression_encodings,
8006 )
8007 .apply_max_message_size_config(
8008 max_decoding_message_size,
8009 max_encoding_message_size,
8010 );
8011 let res = grpc.unary(method, req).await;
8012 Ok(res)
8013 };
8014 Box::pin(fut)
8015 }
8016 "/qdrant.Points/DeletePayload" => {
8017 #[allow(non_camel_case_types)]
8018 struct DeletePayloadSvc<T: Points>(pub Arc<T>);
8019 impl<
8020 T: Points,
8021 > tonic::server::UnaryService<super::DeletePayloadPoints>
8022 for DeletePayloadSvc<T> {
8023 type Response = super::PointsOperationResponse;
8024 type Future = BoxFuture<
8025 tonic::Response<Self::Response>,
8026 tonic::Status,
8027 >;
8028 fn call(
8029 &mut self,
8030 request: tonic::Request<super::DeletePayloadPoints>,
8031 ) -> Self::Future {
8032 let inner = Arc::clone(&self.0);
8033 let fut = async move {
8034 <T as Points>::delete_payload(&inner, request).await
8035 };
8036 Box::pin(fut)
8037 }
8038 }
8039 let accept_compression_encodings = self.accept_compression_encodings;
8040 let send_compression_encodings = self.send_compression_encodings;
8041 let max_decoding_message_size = self.max_decoding_message_size;
8042 let max_encoding_message_size = self.max_encoding_message_size;
8043 let inner = self.inner.clone();
8044 let fut = async move {
8045 let method = DeletePayloadSvc(inner);
8046 let codec = tonic_prost::ProstCodec::default();
8047 let mut grpc = tonic::server::Grpc::new(codec)
8048 .apply_compression_config(
8049 accept_compression_encodings,
8050 send_compression_encodings,
8051 )
8052 .apply_max_message_size_config(
8053 max_decoding_message_size,
8054 max_encoding_message_size,
8055 );
8056 let res = grpc.unary(method, req).await;
8057 Ok(res)
8058 };
8059 Box::pin(fut)
8060 }
8061 "/qdrant.Points/ClearPayload" => {
8062 #[allow(non_camel_case_types)]
8063 struct ClearPayloadSvc<T: Points>(pub Arc<T>);
8064 impl<
8065 T: Points,
8066 > tonic::server::UnaryService<super::ClearPayloadPoints>
8067 for ClearPayloadSvc<T> {
8068 type Response = super::PointsOperationResponse;
8069 type Future = BoxFuture<
8070 tonic::Response<Self::Response>,
8071 tonic::Status,
8072 >;
8073 fn call(
8074 &mut self,
8075 request: tonic::Request<super::ClearPayloadPoints>,
8076 ) -> Self::Future {
8077 let inner = Arc::clone(&self.0);
8078 let fut = async move {
8079 <T as Points>::clear_payload(&inner, request).await
8080 };
8081 Box::pin(fut)
8082 }
8083 }
8084 let accept_compression_encodings = self.accept_compression_encodings;
8085 let send_compression_encodings = self.send_compression_encodings;
8086 let max_decoding_message_size = self.max_decoding_message_size;
8087 let max_encoding_message_size = self.max_encoding_message_size;
8088 let inner = self.inner.clone();
8089 let fut = async move {
8090 let method = ClearPayloadSvc(inner);
8091 let codec = tonic_prost::ProstCodec::default();
8092 let mut grpc = tonic::server::Grpc::new(codec)
8093 .apply_compression_config(
8094 accept_compression_encodings,
8095 send_compression_encodings,
8096 )
8097 .apply_max_message_size_config(
8098 max_decoding_message_size,
8099 max_encoding_message_size,
8100 );
8101 let res = grpc.unary(method, req).await;
8102 Ok(res)
8103 };
8104 Box::pin(fut)
8105 }
8106 "/qdrant.Points/CreateFieldIndex" => {
8107 #[allow(non_camel_case_types)]
8108 struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
8109 impl<
8110 T: Points,
8111 > tonic::server::UnaryService<super::CreateFieldIndexCollection>
8112 for CreateFieldIndexSvc<T> {
8113 type Response = super::PointsOperationResponse;
8114 type Future = BoxFuture<
8115 tonic::Response<Self::Response>,
8116 tonic::Status,
8117 >;
8118 fn call(
8119 &mut self,
8120 request: tonic::Request<super::CreateFieldIndexCollection>,
8121 ) -> Self::Future {
8122 let inner = Arc::clone(&self.0);
8123 let fut = async move {
8124 <T as Points>::create_field_index(&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 = CreateFieldIndexSvc(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/DeleteFieldIndex" => {
8152 #[allow(non_camel_case_types)]
8153 struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
8154 impl<
8155 T: Points,
8156 > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
8157 for DeleteFieldIndexSvc<T> {
8158 type Response = super::PointsOperationResponse;
8159 type Future = BoxFuture<
8160 tonic::Response<Self::Response>,
8161 tonic::Status,
8162 >;
8163 fn call(
8164 &mut self,
8165 request: tonic::Request<super::DeleteFieldIndexCollection>,
8166 ) -> Self::Future {
8167 let inner = Arc::clone(&self.0);
8168 let fut = async move {
8169 <T as Points>::delete_field_index(&inner, request).await
8170 };
8171 Box::pin(fut)
8172 }
8173 }
8174 let accept_compression_encodings = self.accept_compression_encodings;
8175 let send_compression_encodings = self.send_compression_encodings;
8176 let max_decoding_message_size = self.max_decoding_message_size;
8177 let max_encoding_message_size = self.max_encoding_message_size;
8178 let inner = self.inner.clone();
8179 let fut = async move {
8180 let method = DeleteFieldIndexSvc(inner);
8181 let codec = tonic_prost::ProstCodec::default();
8182 let mut grpc = tonic::server::Grpc::new(codec)
8183 .apply_compression_config(
8184 accept_compression_encodings,
8185 send_compression_encodings,
8186 )
8187 .apply_max_message_size_config(
8188 max_decoding_message_size,
8189 max_encoding_message_size,
8190 );
8191 let res = grpc.unary(method, req).await;
8192 Ok(res)
8193 };
8194 Box::pin(fut)
8195 }
8196 "/qdrant.Points/CreateVectorName" => {
8197 #[allow(non_camel_case_types)]
8198 struct CreateVectorNameSvc<T: Points>(pub Arc<T>);
8199 impl<
8200 T: Points,
8201 > tonic::server::UnaryService<super::CreateVectorNameRequest>
8202 for CreateVectorNameSvc<T> {
8203 type Response = super::PointsOperationResponse;
8204 type Future = BoxFuture<
8205 tonic::Response<Self::Response>,
8206 tonic::Status,
8207 >;
8208 fn call(
8209 &mut self,
8210 request: tonic::Request<super::CreateVectorNameRequest>,
8211 ) -> Self::Future {
8212 let inner = Arc::clone(&self.0);
8213 let fut = async move {
8214 <T as Points>::create_vector_name(&inner, request).await
8215 };
8216 Box::pin(fut)
8217 }
8218 }
8219 let accept_compression_encodings = self.accept_compression_encodings;
8220 let send_compression_encodings = self.send_compression_encodings;
8221 let max_decoding_message_size = self.max_decoding_message_size;
8222 let max_encoding_message_size = self.max_encoding_message_size;
8223 let inner = self.inner.clone();
8224 let fut = async move {
8225 let method = CreateVectorNameSvc(inner);
8226 let codec = tonic_prost::ProstCodec::default();
8227 let mut grpc = tonic::server::Grpc::new(codec)
8228 .apply_compression_config(
8229 accept_compression_encodings,
8230 send_compression_encodings,
8231 )
8232 .apply_max_message_size_config(
8233 max_decoding_message_size,
8234 max_encoding_message_size,
8235 );
8236 let res = grpc.unary(method, req).await;
8237 Ok(res)
8238 };
8239 Box::pin(fut)
8240 }
8241 "/qdrant.Points/DeleteVectorName" => {
8242 #[allow(non_camel_case_types)]
8243 struct DeleteVectorNameSvc<T: Points>(pub Arc<T>);
8244 impl<
8245 T: Points,
8246 > tonic::server::UnaryService<super::DeleteVectorNameRequest>
8247 for DeleteVectorNameSvc<T> {
8248 type Response = super::PointsOperationResponse;
8249 type Future = BoxFuture<
8250 tonic::Response<Self::Response>,
8251 tonic::Status,
8252 >;
8253 fn call(
8254 &mut self,
8255 request: tonic::Request<super::DeleteVectorNameRequest>,
8256 ) -> Self::Future {
8257 let inner = Arc::clone(&self.0);
8258 let fut = async move {
8259 <T as Points>::delete_vector_name(&inner, request).await
8260 };
8261 Box::pin(fut)
8262 }
8263 }
8264 let accept_compression_encodings = self.accept_compression_encodings;
8265 let send_compression_encodings = self.send_compression_encodings;
8266 let max_decoding_message_size = self.max_decoding_message_size;
8267 let max_encoding_message_size = self.max_encoding_message_size;
8268 let inner = self.inner.clone();
8269 let fut = async move {
8270 let method = DeleteVectorNameSvc(inner);
8271 let codec = tonic_prost::ProstCodec::default();
8272 let mut grpc = tonic::server::Grpc::new(codec)
8273 .apply_compression_config(
8274 accept_compression_encodings,
8275 send_compression_encodings,
8276 )
8277 .apply_max_message_size_config(
8278 max_decoding_message_size,
8279 max_encoding_message_size,
8280 );
8281 let res = grpc.unary(method, req).await;
8282 Ok(res)
8283 };
8284 Box::pin(fut)
8285 }
8286 "/qdrant.Points/Search" => {
8287 #[allow(non_camel_case_types)]
8288 struct SearchSvc<T: Points>(pub Arc<T>);
8289 impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
8290 for SearchSvc<T> {
8291 type Response = super::SearchResponse;
8292 type Future = BoxFuture<
8293 tonic::Response<Self::Response>,
8294 tonic::Status,
8295 >;
8296 fn call(
8297 &mut self,
8298 request: tonic::Request<super::SearchPoints>,
8299 ) -> Self::Future {
8300 let inner = Arc::clone(&self.0);
8301 let fut = async move {
8302 <T as Points>::search(&inner, request).await
8303 };
8304 Box::pin(fut)
8305 }
8306 }
8307 let accept_compression_encodings = self.accept_compression_encodings;
8308 let send_compression_encodings = self.send_compression_encodings;
8309 let max_decoding_message_size = self.max_decoding_message_size;
8310 let max_encoding_message_size = self.max_encoding_message_size;
8311 let inner = self.inner.clone();
8312 let fut = async move {
8313 let method = SearchSvc(inner);
8314 let codec = tonic_prost::ProstCodec::default();
8315 let mut grpc = tonic::server::Grpc::new(codec)
8316 .apply_compression_config(
8317 accept_compression_encodings,
8318 send_compression_encodings,
8319 )
8320 .apply_max_message_size_config(
8321 max_decoding_message_size,
8322 max_encoding_message_size,
8323 );
8324 let res = grpc.unary(method, req).await;
8325 Ok(res)
8326 };
8327 Box::pin(fut)
8328 }
8329 "/qdrant.Points/SearchBatch" => {
8330 #[allow(non_camel_case_types)]
8331 struct SearchBatchSvc<T: Points>(pub Arc<T>);
8332 impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
8333 for SearchBatchSvc<T> {
8334 type Response = super::SearchBatchResponse;
8335 type Future = BoxFuture<
8336 tonic::Response<Self::Response>,
8337 tonic::Status,
8338 >;
8339 fn call(
8340 &mut self,
8341 request: tonic::Request<super::SearchBatchPoints>,
8342 ) -> Self::Future {
8343 let inner = Arc::clone(&self.0);
8344 let fut = async move {
8345 <T as Points>::search_batch(&inner, request).await
8346 };
8347 Box::pin(fut)
8348 }
8349 }
8350 let accept_compression_encodings = self.accept_compression_encodings;
8351 let send_compression_encodings = self.send_compression_encodings;
8352 let max_decoding_message_size = self.max_decoding_message_size;
8353 let max_encoding_message_size = self.max_encoding_message_size;
8354 let inner = self.inner.clone();
8355 let fut = async move {
8356 let method = SearchBatchSvc(inner);
8357 let codec = tonic_prost::ProstCodec::default();
8358 let mut grpc = tonic::server::Grpc::new(codec)
8359 .apply_compression_config(
8360 accept_compression_encodings,
8361 send_compression_encodings,
8362 )
8363 .apply_max_message_size_config(
8364 max_decoding_message_size,
8365 max_encoding_message_size,
8366 );
8367 let res = grpc.unary(method, req).await;
8368 Ok(res)
8369 };
8370 Box::pin(fut)
8371 }
8372 "/qdrant.Points/SearchGroups" => {
8373 #[allow(non_camel_case_types)]
8374 struct SearchGroupsSvc<T: Points>(pub Arc<T>);
8375 impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
8376 for SearchGroupsSvc<T> {
8377 type Response = super::SearchGroupsResponse;
8378 type Future = BoxFuture<
8379 tonic::Response<Self::Response>,
8380 tonic::Status,
8381 >;
8382 fn call(
8383 &mut self,
8384 request: tonic::Request<super::SearchPointGroups>,
8385 ) -> Self::Future {
8386 let inner = Arc::clone(&self.0);
8387 let fut = async move {
8388 <T as Points>::search_groups(&inner, request).await
8389 };
8390 Box::pin(fut)
8391 }
8392 }
8393 let accept_compression_encodings = self.accept_compression_encodings;
8394 let send_compression_encodings = self.send_compression_encodings;
8395 let max_decoding_message_size = self.max_decoding_message_size;
8396 let max_encoding_message_size = self.max_encoding_message_size;
8397 let inner = self.inner.clone();
8398 let fut = async move {
8399 let method = SearchGroupsSvc(inner);
8400 let codec = tonic_prost::ProstCodec::default();
8401 let mut grpc = tonic::server::Grpc::new(codec)
8402 .apply_compression_config(
8403 accept_compression_encodings,
8404 send_compression_encodings,
8405 )
8406 .apply_max_message_size_config(
8407 max_decoding_message_size,
8408 max_encoding_message_size,
8409 );
8410 let res = grpc.unary(method, req).await;
8411 Ok(res)
8412 };
8413 Box::pin(fut)
8414 }
8415 "/qdrant.Points/Scroll" => {
8416 #[allow(non_camel_case_types)]
8417 struct ScrollSvc<T: Points>(pub Arc<T>);
8418 impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
8419 for ScrollSvc<T> {
8420 type Response = super::ScrollResponse;
8421 type Future = BoxFuture<
8422 tonic::Response<Self::Response>,
8423 tonic::Status,
8424 >;
8425 fn call(
8426 &mut self,
8427 request: tonic::Request<super::ScrollPoints>,
8428 ) -> Self::Future {
8429 let inner = Arc::clone(&self.0);
8430 let fut = async move {
8431 <T as Points>::scroll(&inner, request).await
8432 };
8433 Box::pin(fut)
8434 }
8435 }
8436 let accept_compression_encodings = self.accept_compression_encodings;
8437 let send_compression_encodings = self.send_compression_encodings;
8438 let max_decoding_message_size = self.max_decoding_message_size;
8439 let max_encoding_message_size = self.max_encoding_message_size;
8440 let inner = self.inner.clone();
8441 let fut = async move {
8442 let method = ScrollSvc(inner);
8443 let codec = tonic_prost::ProstCodec::default();
8444 let mut grpc = tonic::server::Grpc::new(codec)
8445 .apply_compression_config(
8446 accept_compression_encodings,
8447 send_compression_encodings,
8448 )
8449 .apply_max_message_size_config(
8450 max_decoding_message_size,
8451 max_encoding_message_size,
8452 );
8453 let res = grpc.unary(method, req).await;
8454 Ok(res)
8455 };
8456 Box::pin(fut)
8457 }
8458 "/qdrant.Points/Recommend" => {
8459 #[allow(non_camel_case_types)]
8460 struct RecommendSvc<T: Points>(pub Arc<T>);
8461 impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
8462 for RecommendSvc<T> {
8463 type Response = super::RecommendResponse;
8464 type Future = BoxFuture<
8465 tonic::Response<Self::Response>,
8466 tonic::Status,
8467 >;
8468 fn call(
8469 &mut self,
8470 request: tonic::Request<super::RecommendPoints>,
8471 ) -> Self::Future {
8472 let inner = Arc::clone(&self.0);
8473 let fut = async move {
8474 <T as Points>::recommend(&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 = RecommendSvc(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/RecommendBatch" => {
8502 #[allow(non_camel_case_types)]
8503 struct RecommendBatchSvc<T: Points>(pub Arc<T>);
8504 impl<
8505 T: Points,
8506 > tonic::server::UnaryService<super::RecommendBatchPoints>
8507 for RecommendBatchSvc<T> {
8508 type Response = super::RecommendBatchResponse;
8509 type Future = BoxFuture<
8510 tonic::Response<Self::Response>,
8511 tonic::Status,
8512 >;
8513 fn call(
8514 &mut self,
8515 request: tonic::Request<super::RecommendBatchPoints>,
8516 ) -> Self::Future {
8517 let inner = Arc::clone(&self.0);
8518 let fut = async move {
8519 <T as Points>::recommend_batch(&inner, request).await
8520 };
8521 Box::pin(fut)
8522 }
8523 }
8524 let accept_compression_encodings = self.accept_compression_encodings;
8525 let send_compression_encodings = self.send_compression_encodings;
8526 let max_decoding_message_size = self.max_decoding_message_size;
8527 let max_encoding_message_size = self.max_encoding_message_size;
8528 let inner = self.inner.clone();
8529 let fut = async move {
8530 let method = RecommendBatchSvc(inner);
8531 let codec = tonic_prost::ProstCodec::default();
8532 let mut grpc = tonic::server::Grpc::new(codec)
8533 .apply_compression_config(
8534 accept_compression_encodings,
8535 send_compression_encodings,
8536 )
8537 .apply_max_message_size_config(
8538 max_decoding_message_size,
8539 max_encoding_message_size,
8540 );
8541 let res = grpc.unary(method, req).await;
8542 Ok(res)
8543 };
8544 Box::pin(fut)
8545 }
8546 "/qdrant.Points/RecommendGroups" => {
8547 #[allow(non_camel_case_types)]
8548 struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
8549 impl<
8550 T: Points,
8551 > tonic::server::UnaryService<super::RecommendPointGroups>
8552 for RecommendGroupsSvc<T> {
8553 type Response = super::RecommendGroupsResponse;
8554 type Future = BoxFuture<
8555 tonic::Response<Self::Response>,
8556 tonic::Status,
8557 >;
8558 fn call(
8559 &mut self,
8560 request: tonic::Request<super::RecommendPointGroups>,
8561 ) -> Self::Future {
8562 let inner = Arc::clone(&self.0);
8563 let fut = async move {
8564 <T as Points>::recommend_groups(&inner, request).await
8565 };
8566 Box::pin(fut)
8567 }
8568 }
8569 let accept_compression_encodings = self.accept_compression_encodings;
8570 let send_compression_encodings = self.send_compression_encodings;
8571 let max_decoding_message_size = self.max_decoding_message_size;
8572 let max_encoding_message_size = self.max_encoding_message_size;
8573 let inner = self.inner.clone();
8574 let fut = async move {
8575 let method = RecommendGroupsSvc(inner);
8576 let codec = tonic_prost::ProstCodec::default();
8577 let mut grpc = tonic::server::Grpc::new(codec)
8578 .apply_compression_config(
8579 accept_compression_encodings,
8580 send_compression_encodings,
8581 )
8582 .apply_max_message_size_config(
8583 max_decoding_message_size,
8584 max_encoding_message_size,
8585 );
8586 let res = grpc.unary(method, req).await;
8587 Ok(res)
8588 };
8589 Box::pin(fut)
8590 }
8591 "/qdrant.Points/Discover" => {
8592 #[allow(non_camel_case_types)]
8593 struct DiscoverSvc<T: Points>(pub Arc<T>);
8594 impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
8595 for DiscoverSvc<T> {
8596 type Response = super::DiscoverResponse;
8597 type Future = BoxFuture<
8598 tonic::Response<Self::Response>,
8599 tonic::Status,
8600 >;
8601 fn call(
8602 &mut self,
8603 request: tonic::Request<super::DiscoverPoints>,
8604 ) -> Self::Future {
8605 let inner = Arc::clone(&self.0);
8606 let fut = async move {
8607 <T as Points>::discover(&inner, request).await
8608 };
8609 Box::pin(fut)
8610 }
8611 }
8612 let accept_compression_encodings = self.accept_compression_encodings;
8613 let send_compression_encodings = self.send_compression_encodings;
8614 let max_decoding_message_size = self.max_decoding_message_size;
8615 let max_encoding_message_size = self.max_encoding_message_size;
8616 let inner = self.inner.clone();
8617 let fut = async move {
8618 let method = DiscoverSvc(inner);
8619 let codec = tonic_prost::ProstCodec::default();
8620 let mut grpc = tonic::server::Grpc::new(codec)
8621 .apply_compression_config(
8622 accept_compression_encodings,
8623 send_compression_encodings,
8624 )
8625 .apply_max_message_size_config(
8626 max_decoding_message_size,
8627 max_encoding_message_size,
8628 );
8629 let res = grpc.unary(method, req).await;
8630 Ok(res)
8631 };
8632 Box::pin(fut)
8633 }
8634 "/qdrant.Points/DiscoverBatch" => {
8635 #[allow(non_camel_case_types)]
8636 struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
8637 impl<
8638 T: Points,
8639 > tonic::server::UnaryService<super::DiscoverBatchPoints>
8640 for DiscoverBatchSvc<T> {
8641 type Response = super::DiscoverBatchResponse;
8642 type Future = BoxFuture<
8643 tonic::Response<Self::Response>,
8644 tonic::Status,
8645 >;
8646 fn call(
8647 &mut self,
8648 request: tonic::Request<super::DiscoverBatchPoints>,
8649 ) -> Self::Future {
8650 let inner = Arc::clone(&self.0);
8651 let fut = async move {
8652 <T as Points>::discover_batch(&inner, request).await
8653 };
8654 Box::pin(fut)
8655 }
8656 }
8657 let accept_compression_encodings = self.accept_compression_encodings;
8658 let send_compression_encodings = self.send_compression_encodings;
8659 let max_decoding_message_size = self.max_decoding_message_size;
8660 let max_encoding_message_size = self.max_encoding_message_size;
8661 let inner = self.inner.clone();
8662 let fut = async move {
8663 let method = DiscoverBatchSvc(inner);
8664 let codec = tonic_prost::ProstCodec::default();
8665 let mut grpc = tonic::server::Grpc::new(codec)
8666 .apply_compression_config(
8667 accept_compression_encodings,
8668 send_compression_encodings,
8669 )
8670 .apply_max_message_size_config(
8671 max_decoding_message_size,
8672 max_encoding_message_size,
8673 );
8674 let res = grpc.unary(method, req).await;
8675 Ok(res)
8676 };
8677 Box::pin(fut)
8678 }
8679 "/qdrant.Points/Count" => {
8680 #[allow(non_camel_case_types)]
8681 struct CountSvc<T: Points>(pub Arc<T>);
8682 impl<T: Points> tonic::server::UnaryService<super::CountPoints>
8683 for CountSvc<T> {
8684 type Response = super::CountResponse;
8685 type Future = BoxFuture<
8686 tonic::Response<Self::Response>,
8687 tonic::Status,
8688 >;
8689 fn call(
8690 &mut self,
8691 request: tonic::Request<super::CountPoints>,
8692 ) -> Self::Future {
8693 let inner = Arc::clone(&self.0);
8694 let fut = async move {
8695 <T as Points>::count(&inner, request).await
8696 };
8697 Box::pin(fut)
8698 }
8699 }
8700 let accept_compression_encodings = self.accept_compression_encodings;
8701 let send_compression_encodings = self.send_compression_encodings;
8702 let max_decoding_message_size = self.max_decoding_message_size;
8703 let max_encoding_message_size = self.max_encoding_message_size;
8704 let inner = self.inner.clone();
8705 let fut = async move {
8706 let method = CountSvc(inner);
8707 let codec = tonic_prost::ProstCodec::default();
8708 let mut grpc = tonic::server::Grpc::new(codec)
8709 .apply_compression_config(
8710 accept_compression_encodings,
8711 send_compression_encodings,
8712 )
8713 .apply_max_message_size_config(
8714 max_decoding_message_size,
8715 max_encoding_message_size,
8716 );
8717 let res = grpc.unary(method, req).await;
8718 Ok(res)
8719 };
8720 Box::pin(fut)
8721 }
8722 "/qdrant.Points/UpdateBatch" => {
8723 #[allow(non_camel_case_types)]
8724 struct UpdateBatchSvc<T: Points>(pub Arc<T>);
8725 impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
8726 for UpdateBatchSvc<T> {
8727 type Response = super::UpdateBatchResponse;
8728 type Future = BoxFuture<
8729 tonic::Response<Self::Response>,
8730 tonic::Status,
8731 >;
8732 fn call(
8733 &mut self,
8734 request: tonic::Request<super::UpdateBatchPoints>,
8735 ) -> Self::Future {
8736 let inner = Arc::clone(&self.0);
8737 let fut = async move {
8738 <T as Points>::update_batch(&inner, request).await
8739 };
8740 Box::pin(fut)
8741 }
8742 }
8743 let accept_compression_encodings = self.accept_compression_encodings;
8744 let send_compression_encodings = self.send_compression_encodings;
8745 let max_decoding_message_size = self.max_decoding_message_size;
8746 let max_encoding_message_size = self.max_encoding_message_size;
8747 let inner = self.inner.clone();
8748 let fut = async move {
8749 let method = UpdateBatchSvc(inner);
8750 let codec = tonic_prost::ProstCodec::default();
8751 let mut grpc = tonic::server::Grpc::new(codec)
8752 .apply_compression_config(
8753 accept_compression_encodings,
8754 send_compression_encodings,
8755 )
8756 .apply_max_message_size_config(
8757 max_decoding_message_size,
8758 max_encoding_message_size,
8759 );
8760 let res = grpc.unary(method, req).await;
8761 Ok(res)
8762 };
8763 Box::pin(fut)
8764 }
8765 "/qdrant.Points/Query" => {
8766 #[allow(non_camel_case_types)]
8767 struct QuerySvc<T: Points>(pub Arc<T>);
8768 impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
8769 for QuerySvc<T> {
8770 type Response = super::QueryResponse;
8771 type Future = BoxFuture<
8772 tonic::Response<Self::Response>,
8773 tonic::Status,
8774 >;
8775 fn call(
8776 &mut self,
8777 request: tonic::Request<super::QueryPoints>,
8778 ) -> Self::Future {
8779 let inner = Arc::clone(&self.0);
8780 let fut = async move {
8781 <T as Points>::query(&inner, request).await
8782 };
8783 Box::pin(fut)
8784 }
8785 }
8786 let accept_compression_encodings = self.accept_compression_encodings;
8787 let send_compression_encodings = self.send_compression_encodings;
8788 let max_decoding_message_size = self.max_decoding_message_size;
8789 let max_encoding_message_size = self.max_encoding_message_size;
8790 let inner = self.inner.clone();
8791 let fut = async move {
8792 let method = QuerySvc(inner);
8793 let codec = tonic_prost::ProstCodec::default();
8794 let mut grpc = tonic::server::Grpc::new(codec)
8795 .apply_compression_config(
8796 accept_compression_encodings,
8797 send_compression_encodings,
8798 )
8799 .apply_max_message_size_config(
8800 max_decoding_message_size,
8801 max_encoding_message_size,
8802 );
8803 let res = grpc.unary(method, req).await;
8804 Ok(res)
8805 };
8806 Box::pin(fut)
8807 }
8808 "/qdrant.Points/QueryBatch" => {
8809 #[allow(non_camel_case_types)]
8810 struct QueryBatchSvc<T: Points>(pub Arc<T>);
8811 impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
8812 for QueryBatchSvc<T> {
8813 type Response = super::QueryBatchResponse;
8814 type Future = BoxFuture<
8815 tonic::Response<Self::Response>,
8816 tonic::Status,
8817 >;
8818 fn call(
8819 &mut self,
8820 request: tonic::Request<super::QueryBatchPoints>,
8821 ) -> Self::Future {
8822 let inner = Arc::clone(&self.0);
8823 let fut = async move {
8824 <T as Points>::query_batch(&inner, request).await
8825 };
8826 Box::pin(fut)
8827 }
8828 }
8829 let accept_compression_encodings = self.accept_compression_encodings;
8830 let send_compression_encodings = self.send_compression_encodings;
8831 let max_decoding_message_size = self.max_decoding_message_size;
8832 let max_encoding_message_size = self.max_encoding_message_size;
8833 let inner = self.inner.clone();
8834 let fut = async move {
8835 let method = QueryBatchSvc(inner);
8836 let codec = tonic_prost::ProstCodec::default();
8837 let mut grpc = tonic::server::Grpc::new(codec)
8838 .apply_compression_config(
8839 accept_compression_encodings,
8840 send_compression_encodings,
8841 )
8842 .apply_max_message_size_config(
8843 max_decoding_message_size,
8844 max_encoding_message_size,
8845 );
8846 let res = grpc.unary(method, req).await;
8847 Ok(res)
8848 };
8849 Box::pin(fut)
8850 }
8851 "/qdrant.Points/QueryGroups" => {
8852 #[allow(non_camel_case_types)]
8853 struct QueryGroupsSvc<T: Points>(pub Arc<T>);
8854 impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
8855 for QueryGroupsSvc<T> {
8856 type Response = super::QueryGroupsResponse;
8857 type Future = BoxFuture<
8858 tonic::Response<Self::Response>,
8859 tonic::Status,
8860 >;
8861 fn call(
8862 &mut self,
8863 request: tonic::Request<super::QueryPointGroups>,
8864 ) -> Self::Future {
8865 let inner = Arc::clone(&self.0);
8866 let fut = async move {
8867 <T as Points>::query_groups(&inner, request).await
8868 };
8869 Box::pin(fut)
8870 }
8871 }
8872 let accept_compression_encodings = self.accept_compression_encodings;
8873 let send_compression_encodings = self.send_compression_encodings;
8874 let max_decoding_message_size = self.max_decoding_message_size;
8875 let max_encoding_message_size = self.max_encoding_message_size;
8876 let inner = self.inner.clone();
8877 let fut = async move {
8878 let method = QueryGroupsSvc(inner);
8879 let codec = tonic_prost::ProstCodec::default();
8880 let mut grpc = tonic::server::Grpc::new(codec)
8881 .apply_compression_config(
8882 accept_compression_encodings,
8883 send_compression_encodings,
8884 )
8885 .apply_max_message_size_config(
8886 max_decoding_message_size,
8887 max_encoding_message_size,
8888 );
8889 let res = grpc.unary(method, req).await;
8890 Ok(res)
8891 };
8892 Box::pin(fut)
8893 }
8894 "/qdrant.Points/Facet" => {
8895 #[allow(non_camel_case_types)]
8896 struct FacetSvc<T: Points>(pub Arc<T>);
8897 impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
8898 for FacetSvc<T> {
8899 type Response = super::FacetResponse;
8900 type Future = BoxFuture<
8901 tonic::Response<Self::Response>,
8902 tonic::Status,
8903 >;
8904 fn call(
8905 &mut self,
8906 request: tonic::Request<super::FacetCounts>,
8907 ) -> Self::Future {
8908 let inner = Arc::clone(&self.0);
8909 let fut = async move {
8910 <T as Points>::facet(&inner, request).await
8911 };
8912 Box::pin(fut)
8913 }
8914 }
8915 let accept_compression_encodings = self.accept_compression_encodings;
8916 let send_compression_encodings = self.send_compression_encodings;
8917 let max_decoding_message_size = self.max_decoding_message_size;
8918 let max_encoding_message_size = self.max_encoding_message_size;
8919 let inner = self.inner.clone();
8920 let fut = async move {
8921 let method = FacetSvc(inner);
8922 let codec = tonic_prost::ProstCodec::default();
8923 let mut grpc = tonic::server::Grpc::new(codec)
8924 .apply_compression_config(
8925 accept_compression_encodings,
8926 send_compression_encodings,
8927 )
8928 .apply_max_message_size_config(
8929 max_decoding_message_size,
8930 max_encoding_message_size,
8931 );
8932 let res = grpc.unary(method, req).await;
8933 Ok(res)
8934 };
8935 Box::pin(fut)
8936 }
8937 "/qdrant.Points/SearchMatrixPairs" => {
8938 #[allow(non_camel_case_types)]
8939 struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
8940 impl<
8941 T: Points,
8942 > tonic::server::UnaryService<super::SearchMatrixPoints>
8943 for SearchMatrixPairsSvc<T> {
8944 type Response = super::SearchMatrixPairsResponse;
8945 type Future = BoxFuture<
8946 tonic::Response<Self::Response>,
8947 tonic::Status,
8948 >;
8949 fn call(
8950 &mut self,
8951 request: tonic::Request<super::SearchMatrixPoints>,
8952 ) -> Self::Future {
8953 let inner = Arc::clone(&self.0);
8954 let fut = async move {
8955 <T as Points>::search_matrix_pairs(&inner, request).await
8956 };
8957 Box::pin(fut)
8958 }
8959 }
8960 let accept_compression_encodings = self.accept_compression_encodings;
8961 let send_compression_encodings = self.send_compression_encodings;
8962 let max_decoding_message_size = self.max_decoding_message_size;
8963 let max_encoding_message_size = self.max_encoding_message_size;
8964 let inner = self.inner.clone();
8965 let fut = async move {
8966 let method = SearchMatrixPairsSvc(inner);
8967 let codec = tonic_prost::ProstCodec::default();
8968 let mut grpc = tonic::server::Grpc::new(codec)
8969 .apply_compression_config(
8970 accept_compression_encodings,
8971 send_compression_encodings,
8972 )
8973 .apply_max_message_size_config(
8974 max_decoding_message_size,
8975 max_encoding_message_size,
8976 );
8977 let res = grpc.unary(method, req).await;
8978 Ok(res)
8979 };
8980 Box::pin(fut)
8981 }
8982 "/qdrant.Points/SearchMatrixOffsets" => {
8983 #[allow(non_camel_case_types)]
8984 struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
8985 impl<
8986 T: Points,
8987 > tonic::server::UnaryService<super::SearchMatrixPoints>
8988 for SearchMatrixOffsetsSvc<T> {
8989 type Response = super::SearchMatrixOffsetsResponse;
8990 type Future = BoxFuture<
8991 tonic::Response<Self::Response>,
8992 tonic::Status,
8993 >;
8994 fn call(
8995 &mut self,
8996 request: tonic::Request<super::SearchMatrixPoints>,
8997 ) -> Self::Future {
8998 let inner = Arc::clone(&self.0);
8999 let fut = async move {
9000 <T as Points>::search_matrix_offsets(&inner, request).await
9001 };
9002 Box::pin(fut)
9003 }
9004 }
9005 let accept_compression_encodings = self.accept_compression_encodings;
9006 let send_compression_encodings = self.send_compression_encodings;
9007 let max_decoding_message_size = self.max_decoding_message_size;
9008 let max_encoding_message_size = self.max_encoding_message_size;
9009 let inner = self.inner.clone();
9010 let fut = async move {
9011 let method = SearchMatrixOffsetsSvc(inner);
9012 let codec = tonic_prost::ProstCodec::default();
9013 let mut grpc = tonic::server::Grpc::new(codec)
9014 .apply_compression_config(
9015 accept_compression_encodings,
9016 send_compression_encodings,
9017 )
9018 .apply_max_message_size_config(
9019 max_decoding_message_size,
9020 max_encoding_message_size,
9021 );
9022 let res = grpc.unary(method, req).await;
9023 Ok(res)
9024 };
9025 Box::pin(fut)
9026 }
9027 _ => {
9028 Box::pin(async move {
9029 let mut response = http::Response::new(
9030 tonic::body::Body::default(),
9031 );
9032 let headers = response.headers_mut();
9033 headers
9034 .insert(
9035 tonic::Status::GRPC_STATUS,
9036 (tonic::Code::Unimplemented as i32).into(),
9037 );
9038 headers
9039 .insert(
9040 http::header::CONTENT_TYPE,
9041 tonic::metadata::GRPC_CONTENT_TYPE,
9042 );
9043 Ok(response)
9044 })
9045 }
9046 }
9047 }
9048 }
9049 impl<T> Clone for PointsServer<T> {
9050 fn clone(&self) -> Self {
9051 let inner = self.inner.clone();
9052 Self {
9053 inner,
9054 accept_compression_encodings: self.accept_compression_encodings,
9055 send_compression_encodings: self.send_compression_encodings,
9056 max_decoding_message_size: self.max_decoding_message_size,
9057 max_encoding_message_size: self.max_encoding_message_size,
9058 }
9059 }
9060 }
9061 pub const SERVICE_NAME: &str = "qdrant.Points";
9063 impl<T> tonic::server::NamedService for PointsServer<T> {
9064 const NAME: &'static str = SERVICE_NAME;
9065 }
9066}
9067#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9068pub struct CreateFullSnapshotRequest {}
9069#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9070pub struct ListFullSnapshotsRequest {}
9071#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9072pub struct DeleteFullSnapshotRequest {
9073 #[prost(string, tag = "1")]
9075 pub snapshot_name: ::prost::alloc::string::String,
9076}
9077#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9078pub struct CreateSnapshotRequest {
9079 #[prost(string, tag = "1")]
9081 pub collection_name: ::prost::alloc::string::String,
9082}
9083#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9084pub struct ListSnapshotsRequest {
9085 #[prost(string, tag = "1")]
9087 pub collection_name: ::prost::alloc::string::String,
9088}
9089#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9090pub struct DeleteSnapshotRequest {
9091 #[prost(string, tag = "1")]
9093 pub collection_name: ::prost::alloc::string::String,
9094 #[prost(string, tag = "2")]
9096 pub snapshot_name: ::prost::alloc::string::String,
9097}
9098#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9099pub struct SnapshotDescription {
9100 #[prost(string, tag = "1")]
9102 pub name: ::prost::alloc::string::String,
9103 #[prost(message, optional, tag = "2")]
9105 pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
9106 #[prost(int64, tag = "3")]
9108 pub size: i64,
9109 #[prost(string, optional, tag = "4")]
9111 pub checksum: ::core::option::Option<::prost::alloc::string::String>,
9112}
9113#[derive(Clone, PartialEq, ::prost::Message)]
9114pub struct CreateSnapshotResponse {
9115 #[prost(message, optional, tag = "1")]
9116 pub snapshot_description: ::core::option::Option<SnapshotDescription>,
9117 #[prost(double, tag = "2")]
9119 pub time: f64,
9120}
9121#[derive(Clone, PartialEq, ::prost::Message)]
9122pub struct ListSnapshotsResponse {
9123 #[prost(message, repeated, tag = "1")]
9124 pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
9125 #[prost(double, tag = "2")]
9127 pub time: f64,
9128}
9129#[derive(Clone, Copy, PartialEq, ::prost::Message)]
9130pub struct DeleteSnapshotResponse {
9131 #[prost(double, tag = "1")]
9133 pub time: f64,
9134}
9135pub mod snapshots_client {
9137 #![allow(
9138 unused_variables,
9139 dead_code,
9140 missing_docs,
9141 clippy::wildcard_imports,
9142 clippy::let_unit_value,
9143 )]
9144 use tonic::codegen::*;
9145 use tonic::codegen::http::Uri;
9146 #[derive(Debug, Clone)]
9147 pub struct SnapshotsClient<T> {
9148 inner: tonic::client::Grpc<T>,
9149 }
9150 impl SnapshotsClient<tonic::transport::Channel> {
9151 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9153 where
9154 D: TryInto<tonic::transport::Endpoint>,
9155 D::Error: Into<StdError>,
9156 {
9157 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
9158 Ok(Self::new(conn))
9159 }
9160 }
9161 impl<T> SnapshotsClient<T>
9162 where
9163 T: tonic::client::GrpcService<tonic::body::Body>,
9164 T::Error: Into<StdError>,
9165 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9166 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9167 {
9168 pub fn new(inner: T) -> Self {
9169 let inner = tonic::client::Grpc::new(inner);
9170 Self { inner }
9171 }
9172 pub fn with_origin(inner: T, origin: Uri) -> Self {
9173 let inner = tonic::client::Grpc::with_origin(inner, origin);
9174 Self { inner }
9175 }
9176 pub fn with_interceptor<F>(
9177 inner: T,
9178 interceptor: F,
9179 ) -> SnapshotsClient<InterceptedService<T, F>>
9180 where
9181 F: tonic::service::Interceptor,
9182 T::ResponseBody: Default,
9183 T: tonic::codegen::Service<
9184 http::Request<tonic::body::Body>,
9185 Response = http::Response<
9186 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9187 >,
9188 >,
9189 <T as tonic::codegen::Service<
9190 http::Request<tonic::body::Body>,
9191 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9192 {
9193 SnapshotsClient::new(InterceptedService::new(inner, interceptor))
9194 }
9195 #[must_use]
9200 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9201 self.inner = self.inner.send_compressed(encoding);
9202 self
9203 }
9204 #[must_use]
9206 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9207 self.inner = self.inner.accept_compressed(encoding);
9208 self
9209 }
9210 #[must_use]
9214 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9215 self.inner = self.inner.max_decoding_message_size(limit);
9216 self
9217 }
9218 #[must_use]
9222 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9223 self.inner = self.inner.max_encoding_message_size(limit);
9224 self
9225 }
9226 pub async fn create(
9228 &mut self,
9229 request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
9230 ) -> std::result::Result<
9231 tonic::Response<super::CreateSnapshotResponse>,
9232 tonic::Status,
9233 > {
9234 self.inner
9235 .ready()
9236 .await
9237 .map_err(|e| {
9238 tonic::Status::unknown(
9239 format!("Service was not ready: {}", e.into()),
9240 )
9241 })?;
9242 let codec = tonic_prost::ProstCodec::default();
9243 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
9244 let mut req = request.into_request();
9245 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
9246 self.inner.unary(req, path, codec).await
9247 }
9248 pub async fn list(
9250 &mut self,
9251 request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
9252 ) -> std::result::Result<
9253 tonic::Response<super::ListSnapshotsResponse>,
9254 tonic::Status,
9255 > {
9256 self.inner
9257 .ready()
9258 .await
9259 .map_err(|e| {
9260 tonic::Status::unknown(
9261 format!("Service was not ready: {}", e.into()),
9262 )
9263 })?;
9264 let codec = tonic_prost::ProstCodec::default();
9265 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
9266 let mut req = request.into_request();
9267 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
9268 self.inner.unary(req, path, codec).await
9269 }
9270 pub async fn delete(
9272 &mut self,
9273 request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
9274 ) -> std::result::Result<
9275 tonic::Response<super::DeleteSnapshotResponse>,
9276 tonic::Status,
9277 > {
9278 self.inner
9279 .ready()
9280 .await
9281 .map_err(|e| {
9282 tonic::Status::unknown(
9283 format!("Service was not ready: {}", e.into()),
9284 )
9285 })?;
9286 let codec = tonic_prost::ProstCodec::default();
9287 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
9288 let mut req = request.into_request();
9289 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
9290 self.inner.unary(req, path, codec).await
9291 }
9292 pub async fn create_full(
9294 &mut self,
9295 request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
9296 ) -> std::result::Result<
9297 tonic::Response<super::CreateSnapshotResponse>,
9298 tonic::Status,
9299 > {
9300 self.inner
9301 .ready()
9302 .await
9303 .map_err(|e| {
9304 tonic::Status::unknown(
9305 format!("Service was not ready: {}", e.into()),
9306 )
9307 })?;
9308 let codec = tonic_prost::ProstCodec::default();
9309 let path = http::uri::PathAndQuery::from_static(
9310 "/qdrant.Snapshots/CreateFull",
9311 );
9312 let mut req = request.into_request();
9313 req.extensions_mut()
9314 .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
9315 self.inner.unary(req, path, codec).await
9316 }
9317 pub async fn list_full(
9319 &mut self,
9320 request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
9321 ) -> std::result::Result<
9322 tonic::Response<super::ListSnapshotsResponse>,
9323 tonic::Status,
9324 > {
9325 self.inner
9326 .ready()
9327 .await
9328 .map_err(|e| {
9329 tonic::Status::unknown(
9330 format!("Service was not ready: {}", e.into()),
9331 )
9332 })?;
9333 let codec = tonic_prost::ProstCodec::default();
9334 let path = http::uri::PathAndQuery::from_static(
9335 "/qdrant.Snapshots/ListFull",
9336 );
9337 let mut req = request.into_request();
9338 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
9339 self.inner.unary(req, path, codec).await
9340 }
9341 pub async fn delete_full(
9343 &mut self,
9344 request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
9345 ) -> std::result::Result<
9346 tonic::Response<super::DeleteSnapshotResponse>,
9347 tonic::Status,
9348 > {
9349 self.inner
9350 .ready()
9351 .await
9352 .map_err(|e| {
9353 tonic::Status::unknown(
9354 format!("Service was not ready: {}", e.into()),
9355 )
9356 })?;
9357 let codec = tonic_prost::ProstCodec::default();
9358 let path = http::uri::PathAndQuery::from_static(
9359 "/qdrant.Snapshots/DeleteFull",
9360 );
9361 let mut req = request.into_request();
9362 req.extensions_mut()
9363 .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
9364 self.inner.unary(req, path, codec).await
9365 }
9366 }
9367}
9368pub mod snapshots_server {
9370 #![allow(
9371 unused_variables,
9372 dead_code,
9373 missing_docs,
9374 clippy::wildcard_imports,
9375 clippy::let_unit_value,
9376 )]
9377 use tonic::codegen::*;
9378 #[async_trait]
9380 pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
9381 async fn create(
9383 &self,
9384 request: tonic::Request<super::CreateSnapshotRequest>,
9385 ) -> std::result::Result<
9386 tonic::Response<super::CreateSnapshotResponse>,
9387 tonic::Status,
9388 >;
9389 async fn list(
9391 &self,
9392 request: tonic::Request<super::ListSnapshotsRequest>,
9393 ) -> std::result::Result<
9394 tonic::Response<super::ListSnapshotsResponse>,
9395 tonic::Status,
9396 >;
9397 async fn delete(
9399 &self,
9400 request: tonic::Request<super::DeleteSnapshotRequest>,
9401 ) -> std::result::Result<
9402 tonic::Response<super::DeleteSnapshotResponse>,
9403 tonic::Status,
9404 >;
9405 async fn create_full(
9407 &self,
9408 request: tonic::Request<super::CreateFullSnapshotRequest>,
9409 ) -> std::result::Result<
9410 tonic::Response<super::CreateSnapshotResponse>,
9411 tonic::Status,
9412 >;
9413 async fn list_full(
9415 &self,
9416 request: tonic::Request<super::ListFullSnapshotsRequest>,
9417 ) -> std::result::Result<
9418 tonic::Response<super::ListSnapshotsResponse>,
9419 tonic::Status,
9420 >;
9421 async fn delete_full(
9423 &self,
9424 request: tonic::Request<super::DeleteFullSnapshotRequest>,
9425 ) -> std::result::Result<
9426 tonic::Response<super::DeleteSnapshotResponse>,
9427 tonic::Status,
9428 >;
9429 }
9430 #[derive(Debug)]
9431 pub struct SnapshotsServer<T> {
9432 inner: Arc<T>,
9433 accept_compression_encodings: EnabledCompressionEncodings,
9434 send_compression_encodings: EnabledCompressionEncodings,
9435 max_decoding_message_size: Option<usize>,
9436 max_encoding_message_size: Option<usize>,
9437 }
9438 impl<T> SnapshotsServer<T> {
9439 pub fn new(inner: T) -> Self {
9440 Self::from_arc(Arc::new(inner))
9441 }
9442 pub fn from_arc(inner: Arc<T>) -> Self {
9443 Self {
9444 inner,
9445 accept_compression_encodings: Default::default(),
9446 send_compression_encodings: Default::default(),
9447 max_decoding_message_size: None,
9448 max_encoding_message_size: None,
9449 }
9450 }
9451 pub fn with_interceptor<F>(
9452 inner: T,
9453 interceptor: F,
9454 ) -> InterceptedService<Self, F>
9455 where
9456 F: tonic::service::Interceptor,
9457 {
9458 InterceptedService::new(Self::new(inner), interceptor)
9459 }
9460 #[must_use]
9462 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9463 self.accept_compression_encodings.enable(encoding);
9464 self
9465 }
9466 #[must_use]
9468 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9469 self.send_compression_encodings.enable(encoding);
9470 self
9471 }
9472 #[must_use]
9476 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9477 self.max_decoding_message_size = Some(limit);
9478 self
9479 }
9480 #[must_use]
9484 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9485 self.max_encoding_message_size = Some(limit);
9486 self
9487 }
9488 }
9489 impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
9490 where
9491 T: Snapshots,
9492 B: Body + std::marker::Send + 'static,
9493 B::Error: Into<StdError> + std::marker::Send + 'static,
9494 {
9495 type Response = http::Response<tonic::body::Body>;
9496 type Error = std::convert::Infallible;
9497 type Future = BoxFuture<Self::Response, Self::Error>;
9498 fn poll_ready(
9499 &mut self,
9500 _cx: &mut Context<'_>,
9501 ) -> Poll<std::result::Result<(), Self::Error>> {
9502 Poll::Ready(Ok(()))
9503 }
9504 fn call(&mut self, req: http::Request<B>) -> Self::Future {
9505 match req.uri().path() {
9506 "/qdrant.Snapshots/Create" => {
9507 #[allow(non_camel_case_types)]
9508 struct CreateSvc<T: Snapshots>(pub Arc<T>);
9509 impl<
9510 T: Snapshots,
9511 > tonic::server::UnaryService<super::CreateSnapshotRequest>
9512 for CreateSvc<T> {
9513 type Response = super::CreateSnapshotResponse;
9514 type Future = BoxFuture<
9515 tonic::Response<Self::Response>,
9516 tonic::Status,
9517 >;
9518 fn call(
9519 &mut self,
9520 request: tonic::Request<super::CreateSnapshotRequest>,
9521 ) -> Self::Future {
9522 let inner = Arc::clone(&self.0);
9523 let fut = async move {
9524 <T as Snapshots>::create(&inner, request).await
9525 };
9526 Box::pin(fut)
9527 }
9528 }
9529 let accept_compression_encodings = self.accept_compression_encodings;
9530 let send_compression_encodings = self.send_compression_encodings;
9531 let max_decoding_message_size = self.max_decoding_message_size;
9532 let max_encoding_message_size = self.max_encoding_message_size;
9533 let inner = self.inner.clone();
9534 let fut = async move {
9535 let method = CreateSvc(inner);
9536 let codec = tonic_prost::ProstCodec::default();
9537 let mut grpc = tonic::server::Grpc::new(codec)
9538 .apply_compression_config(
9539 accept_compression_encodings,
9540 send_compression_encodings,
9541 )
9542 .apply_max_message_size_config(
9543 max_decoding_message_size,
9544 max_encoding_message_size,
9545 );
9546 let res = grpc.unary(method, req).await;
9547 Ok(res)
9548 };
9549 Box::pin(fut)
9550 }
9551 "/qdrant.Snapshots/List" => {
9552 #[allow(non_camel_case_types)]
9553 struct ListSvc<T: Snapshots>(pub Arc<T>);
9554 impl<
9555 T: Snapshots,
9556 > tonic::server::UnaryService<super::ListSnapshotsRequest>
9557 for ListSvc<T> {
9558 type Response = super::ListSnapshotsResponse;
9559 type Future = BoxFuture<
9560 tonic::Response<Self::Response>,
9561 tonic::Status,
9562 >;
9563 fn call(
9564 &mut self,
9565 request: tonic::Request<super::ListSnapshotsRequest>,
9566 ) -> Self::Future {
9567 let inner = Arc::clone(&self.0);
9568 let fut = async move {
9569 <T as Snapshots>::list(&inner, request).await
9570 };
9571 Box::pin(fut)
9572 }
9573 }
9574 let accept_compression_encodings = self.accept_compression_encodings;
9575 let send_compression_encodings = self.send_compression_encodings;
9576 let max_decoding_message_size = self.max_decoding_message_size;
9577 let max_encoding_message_size = self.max_encoding_message_size;
9578 let inner = self.inner.clone();
9579 let fut = async move {
9580 let method = ListSvc(inner);
9581 let codec = tonic_prost::ProstCodec::default();
9582 let mut grpc = tonic::server::Grpc::new(codec)
9583 .apply_compression_config(
9584 accept_compression_encodings,
9585 send_compression_encodings,
9586 )
9587 .apply_max_message_size_config(
9588 max_decoding_message_size,
9589 max_encoding_message_size,
9590 );
9591 let res = grpc.unary(method, req).await;
9592 Ok(res)
9593 };
9594 Box::pin(fut)
9595 }
9596 "/qdrant.Snapshots/Delete" => {
9597 #[allow(non_camel_case_types)]
9598 struct DeleteSvc<T: Snapshots>(pub Arc<T>);
9599 impl<
9600 T: Snapshots,
9601 > tonic::server::UnaryService<super::DeleteSnapshotRequest>
9602 for DeleteSvc<T> {
9603 type Response = super::DeleteSnapshotResponse;
9604 type Future = BoxFuture<
9605 tonic::Response<Self::Response>,
9606 tonic::Status,
9607 >;
9608 fn call(
9609 &mut self,
9610 request: tonic::Request<super::DeleteSnapshotRequest>,
9611 ) -> Self::Future {
9612 let inner = Arc::clone(&self.0);
9613 let fut = async move {
9614 <T as Snapshots>::delete(&inner, request).await
9615 };
9616 Box::pin(fut)
9617 }
9618 }
9619 let accept_compression_encodings = self.accept_compression_encodings;
9620 let send_compression_encodings = self.send_compression_encodings;
9621 let max_decoding_message_size = self.max_decoding_message_size;
9622 let max_encoding_message_size = self.max_encoding_message_size;
9623 let inner = self.inner.clone();
9624 let fut = async move {
9625 let method = DeleteSvc(inner);
9626 let codec = tonic_prost::ProstCodec::default();
9627 let mut grpc = tonic::server::Grpc::new(codec)
9628 .apply_compression_config(
9629 accept_compression_encodings,
9630 send_compression_encodings,
9631 )
9632 .apply_max_message_size_config(
9633 max_decoding_message_size,
9634 max_encoding_message_size,
9635 );
9636 let res = grpc.unary(method, req).await;
9637 Ok(res)
9638 };
9639 Box::pin(fut)
9640 }
9641 "/qdrant.Snapshots/CreateFull" => {
9642 #[allow(non_camel_case_types)]
9643 struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
9644 impl<
9645 T: Snapshots,
9646 > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
9647 for CreateFullSvc<T> {
9648 type Response = super::CreateSnapshotResponse;
9649 type Future = BoxFuture<
9650 tonic::Response<Self::Response>,
9651 tonic::Status,
9652 >;
9653 fn call(
9654 &mut self,
9655 request: tonic::Request<super::CreateFullSnapshotRequest>,
9656 ) -> Self::Future {
9657 let inner = Arc::clone(&self.0);
9658 let fut = async move {
9659 <T as Snapshots>::create_full(&inner, request).await
9660 };
9661 Box::pin(fut)
9662 }
9663 }
9664 let accept_compression_encodings = self.accept_compression_encodings;
9665 let send_compression_encodings = self.send_compression_encodings;
9666 let max_decoding_message_size = self.max_decoding_message_size;
9667 let max_encoding_message_size = self.max_encoding_message_size;
9668 let inner = self.inner.clone();
9669 let fut = async move {
9670 let method = CreateFullSvc(inner);
9671 let codec = tonic_prost::ProstCodec::default();
9672 let mut grpc = tonic::server::Grpc::new(codec)
9673 .apply_compression_config(
9674 accept_compression_encodings,
9675 send_compression_encodings,
9676 )
9677 .apply_max_message_size_config(
9678 max_decoding_message_size,
9679 max_encoding_message_size,
9680 );
9681 let res = grpc.unary(method, req).await;
9682 Ok(res)
9683 };
9684 Box::pin(fut)
9685 }
9686 "/qdrant.Snapshots/ListFull" => {
9687 #[allow(non_camel_case_types)]
9688 struct ListFullSvc<T: Snapshots>(pub Arc<T>);
9689 impl<
9690 T: Snapshots,
9691 > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
9692 for ListFullSvc<T> {
9693 type Response = super::ListSnapshotsResponse;
9694 type Future = BoxFuture<
9695 tonic::Response<Self::Response>,
9696 tonic::Status,
9697 >;
9698 fn call(
9699 &mut self,
9700 request: tonic::Request<super::ListFullSnapshotsRequest>,
9701 ) -> Self::Future {
9702 let inner = Arc::clone(&self.0);
9703 let fut = async move {
9704 <T as Snapshots>::list_full(&inner, request).await
9705 };
9706 Box::pin(fut)
9707 }
9708 }
9709 let accept_compression_encodings = self.accept_compression_encodings;
9710 let send_compression_encodings = self.send_compression_encodings;
9711 let max_decoding_message_size = self.max_decoding_message_size;
9712 let max_encoding_message_size = self.max_encoding_message_size;
9713 let inner = self.inner.clone();
9714 let fut = async move {
9715 let method = ListFullSvc(inner);
9716 let codec = tonic_prost::ProstCodec::default();
9717 let mut grpc = tonic::server::Grpc::new(codec)
9718 .apply_compression_config(
9719 accept_compression_encodings,
9720 send_compression_encodings,
9721 )
9722 .apply_max_message_size_config(
9723 max_decoding_message_size,
9724 max_encoding_message_size,
9725 );
9726 let res = grpc.unary(method, req).await;
9727 Ok(res)
9728 };
9729 Box::pin(fut)
9730 }
9731 "/qdrant.Snapshots/DeleteFull" => {
9732 #[allow(non_camel_case_types)]
9733 struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
9734 impl<
9735 T: Snapshots,
9736 > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
9737 for DeleteFullSvc<T> {
9738 type Response = super::DeleteSnapshotResponse;
9739 type Future = BoxFuture<
9740 tonic::Response<Self::Response>,
9741 tonic::Status,
9742 >;
9743 fn call(
9744 &mut self,
9745 request: tonic::Request<super::DeleteFullSnapshotRequest>,
9746 ) -> Self::Future {
9747 let inner = Arc::clone(&self.0);
9748 let fut = async move {
9749 <T as Snapshots>::delete_full(&inner, request).await
9750 };
9751 Box::pin(fut)
9752 }
9753 }
9754 let accept_compression_encodings = self.accept_compression_encodings;
9755 let send_compression_encodings = self.send_compression_encodings;
9756 let max_decoding_message_size = self.max_decoding_message_size;
9757 let max_encoding_message_size = self.max_encoding_message_size;
9758 let inner = self.inner.clone();
9759 let fut = async move {
9760 let method = DeleteFullSvc(inner);
9761 let codec = tonic_prost::ProstCodec::default();
9762 let mut grpc = tonic::server::Grpc::new(codec)
9763 .apply_compression_config(
9764 accept_compression_encodings,
9765 send_compression_encodings,
9766 )
9767 .apply_max_message_size_config(
9768 max_decoding_message_size,
9769 max_encoding_message_size,
9770 );
9771 let res = grpc.unary(method, req).await;
9772 Ok(res)
9773 };
9774 Box::pin(fut)
9775 }
9776 _ => {
9777 Box::pin(async move {
9778 let mut response = http::Response::new(
9779 tonic::body::Body::default(),
9780 );
9781 let headers = response.headers_mut();
9782 headers
9783 .insert(
9784 tonic::Status::GRPC_STATUS,
9785 (tonic::Code::Unimplemented as i32).into(),
9786 );
9787 headers
9788 .insert(
9789 http::header::CONTENT_TYPE,
9790 tonic::metadata::GRPC_CONTENT_TYPE,
9791 );
9792 Ok(response)
9793 })
9794 }
9795 }
9796 }
9797 }
9798 impl<T> Clone for SnapshotsServer<T> {
9799 fn clone(&self) -> Self {
9800 let inner = self.inner.clone();
9801 Self {
9802 inner,
9803 accept_compression_encodings: self.accept_compression_encodings,
9804 send_compression_encodings: self.send_compression_encodings,
9805 max_decoding_message_size: self.max_decoding_message_size,
9806 max_encoding_message_size: self.max_encoding_message_size,
9807 }
9808 }
9809 }
9810 pub const SERVICE_NAME: &str = "qdrant.Snapshots";
9812 impl<T> tonic::server::NamedService for SnapshotsServer<T> {
9813 const NAME: &'static str = SERVICE_NAME;
9814 }
9815}
9816#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
9817pub struct HealthCheckRequest {}
9818#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9819pub struct HealthCheckReply {
9820 #[prost(string, tag = "1")]
9821 pub title: ::prost::alloc::string::String,
9822 #[prost(string, tag = "2")]
9823 pub version: ::prost::alloc::string::String,
9824 #[prost(string, optional, tag = "3")]
9825 pub commit: ::core::option::Option<::prost::alloc::string::String>,
9826}
9827pub mod qdrant_client {
9829 #![allow(
9830 unused_variables,
9831 dead_code,
9832 missing_docs,
9833 clippy::wildcard_imports,
9834 clippy::let_unit_value,
9835 )]
9836 use tonic::codegen::*;
9837 use tonic::codegen::http::Uri;
9838 #[derive(Debug, Clone)]
9839 pub struct QdrantClient<T> {
9840 inner: tonic::client::Grpc<T>,
9841 }
9842 impl QdrantClient<tonic::transport::Channel> {
9843 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9845 where
9846 D: TryInto<tonic::transport::Endpoint>,
9847 D::Error: Into<StdError>,
9848 {
9849 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
9850 Ok(Self::new(conn))
9851 }
9852 }
9853 impl<T> QdrantClient<T>
9854 where
9855 T: tonic::client::GrpcService<tonic::body::Body>,
9856 T::Error: Into<StdError>,
9857 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9858 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9859 {
9860 pub fn new(inner: T) -> Self {
9861 let inner = tonic::client::Grpc::new(inner);
9862 Self { inner }
9863 }
9864 pub fn with_origin(inner: T, origin: Uri) -> Self {
9865 let inner = tonic::client::Grpc::with_origin(inner, origin);
9866 Self { inner }
9867 }
9868 pub fn with_interceptor<F>(
9869 inner: T,
9870 interceptor: F,
9871 ) -> QdrantClient<InterceptedService<T, F>>
9872 where
9873 F: tonic::service::Interceptor,
9874 T::ResponseBody: Default,
9875 T: tonic::codegen::Service<
9876 http::Request<tonic::body::Body>,
9877 Response = http::Response<
9878 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9879 >,
9880 >,
9881 <T as tonic::codegen::Service<
9882 http::Request<tonic::body::Body>,
9883 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9884 {
9885 QdrantClient::new(InterceptedService::new(inner, interceptor))
9886 }
9887 #[must_use]
9892 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9893 self.inner = self.inner.send_compressed(encoding);
9894 self
9895 }
9896 #[must_use]
9898 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9899 self.inner = self.inner.accept_compressed(encoding);
9900 self
9901 }
9902 #[must_use]
9906 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9907 self.inner = self.inner.max_decoding_message_size(limit);
9908 self
9909 }
9910 #[must_use]
9914 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9915 self.inner = self.inner.max_encoding_message_size(limit);
9916 self
9917 }
9918 pub async fn health_check(
9919 &mut self,
9920 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
9921 ) -> std::result::Result<
9922 tonic::Response<super::HealthCheckReply>,
9923 tonic::Status,
9924 > {
9925 self.inner
9926 .ready()
9927 .await
9928 .map_err(|e| {
9929 tonic::Status::unknown(
9930 format!("Service was not ready: {}", e.into()),
9931 )
9932 })?;
9933 let codec = tonic_prost::ProstCodec::default();
9934 let path = http::uri::PathAndQuery::from_static(
9935 "/qdrant.Qdrant/HealthCheck",
9936 );
9937 let mut req = request.into_request();
9938 req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
9939 self.inner.unary(req, path, codec).await
9940 }
9941 }
9942}
9943pub mod qdrant_server {
9945 #![allow(
9946 unused_variables,
9947 dead_code,
9948 missing_docs,
9949 clippy::wildcard_imports,
9950 clippy::let_unit_value,
9951 )]
9952 use tonic::codegen::*;
9953 #[async_trait]
9955 pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static {
9956 async fn health_check(
9957 &self,
9958 request: tonic::Request<super::HealthCheckRequest>,
9959 ) -> std::result::Result<
9960 tonic::Response<super::HealthCheckReply>,
9961 tonic::Status,
9962 >;
9963 }
9964 #[derive(Debug)]
9965 pub struct QdrantServer<T> {
9966 inner: Arc<T>,
9967 accept_compression_encodings: EnabledCompressionEncodings,
9968 send_compression_encodings: EnabledCompressionEncodings,
9969 max_decoding_message_size: Option<usize>,
9970 max_encoding_message_size: Option<usize>,
9971 }
9972 impl<T> QdrantServer<T> {
9973 pub fn new(inner: T) -> Self {
9974 Self::from_arc(Arc::new(inner))
9975 }
9976 pub fn from_arc(inner: Arc<T>) -> Self {
9977 Self {
9978 inner,
9979 accept_compression_encodings: Default::default(),
9980 send_compression_encodings: Default::default(),
9981 max_decoding_message_size: None,
9982 max_encoding_message_size: None,
9983 }
9984 }
9985 pub fn with_interceptor<F>(
9986 inner: T,
9987 interceptor: F,
9988 ) -> InterceptedService<Self, F>
9989 where
9990 F: tonic::service::Interceptor,
9991 {
9992 InterceptedService::new(Self::new(inner), interceptor)
9993 }
9994 #[must_use]
9996 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9997 self.accept_compression_encodings.enable(encoding);
9998 self
9999 }
10000 #[must_use]
10002 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10003 self.send_compression_encodings.enable(encoding);
10004 self
10005 }
10006 #[must_use]
10010 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10011 self.max_decoding_message_size = Some(limit);
10012 self
10013 }
10014 #[must_use]
10018 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10019 self.max_encoding_message_size = Some(limit);
10020 self
10021 }
10022 }
10023 impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
10024 where
10025 T: Qdrant,
10026 B: Body + std::marker::Send + 'static,
10027 B::Error: Into<StdError> + std::marker::Send + 'static,
10028 {
10029 type Response = http::Response<tonic::body::Body>;
10030 type Error = std::convert::Infallible;
10031 type Future = BoxFuture<Self::Response, Self::Error>;
10032 fn poll_ready(
10033 &mut self,
10034 _cx: &mut Context<'_>,
10035 ) -> Poll<std::result::Result<(), Self::Error>> {
10036 Poll::Ready(Ok(()))
10037 }
10038 fn call(&mut self, req: http::Request<B>) -> Self::Future {
10039 match req.uri().path() {
10040 "/qdrant.Qdrant/HealthCheck" => {
10041 #[allow(non_camel_case_types)]
10042 struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
10043 impl<
10044 T: Qdrant,
10045 > tonic::server::UnaryService<super::HealthCheckRequest>
10046 for HealthCheckSvc<T> {
10047 type Response = super::HealthCheckReply;
10048 type Future = BoxFuture<
10049 tonic::Response<Self::Response>,
10050 tonic::Status,
10051 >;
10052 fn call(
10053 &mut self,
10054 request: tonic::Request<super::HealthCheckRequest>,
10055 ) -> Self::Future {
10056 let inner = Arc::clone(&self.0);
10057 let fut = async move {
10058 <T as Qdrant>::health_check(&inner, request).await
10059 };
10060 Box::pin(fut)
10061 }
10062 }
10063 let accept_compression_encodings = self.accept_compression_encodings;
10064 let send_compression_encodings = self.send_compression_encodings;
10065 let max_decoding_message_size = self.max_decoding_message_size;
10066 let max_encoding_message_size = self.max_encoding_message_size;
10067 let inner = self.inner.clone();
10068 let fut = async move {
10069 let method = HealthCheckSvc(inner);
10070 let codec = tonic_prost::ProstCodec::default();
10071 let mut grpc = tonic::server::Grpc::new(codec)
10072 .apply_compression_config(
10073 accept_compression_encodings,
10074 send_compression_encodings,
10075 )
10076 .apply_max_message_size_config(
10077 max_decoding_message_size,
10078 max_encoding_message_size,
10079 );
10080 let res = grpc.unary(method, req).await;
10081 Ok(res)
10082 };
10083 Box::pin(fut)
10084 }
10085 _ => {
10086 Box::pin(async move {
10087 let mut response = http::Response::new(
10088 tonic::body::Body::default(),
10089 );
10090 let headers = response.headers_mut();
10091 headers
10092 .insert(
10093 tonic::Status::GRPC_STATUS,
10094 (tonic::Code::Unimplemented as i32).into(),
10095 );
10096 headers
10097 .insert(
10098 http::header::CONTENT_TYPE,
10099 tonic::metadata::GRPC_CONTENT_TYPE,
10100 );
10101 Ok(response)
10102 })
10103 }
10104 }
10105 }
10106 }
10107 impl<T> Clone for QdrantServer<T> {
10108 fn clone(&self) -> Self {
10109 let inner = self.inner.clone();
10110 Self {
10111 inner,
10112 accept_compression_encodings: self.accept_compression_encodings,
10113 send_compression_encodings: self.send_compression_encodings,
10114 max_decoding_message_size: self.max_decoding_message_size,
10115 max_encoding_message_size: self.max_encoding_message_size,
10116 }
10117 }
10118 }
10119 pub const SERVICE_NAME: &str = "qdrant.Qdrant";
10121 impl<T> tonic::server::NamedService for QdrantServer<T> {
10122 const NAME: &'static str = SERVICE_NAME;
10123 }
10124}
10125pub use crate::manual_builder::*;
10126pub use crate::builder_types::*;
10127pub use crate::qdrant_client::builders::*;
10128pub use crate::builders::*;
10129pub use prost_types::Timestamp;