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, ::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, ::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")]
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 }
163}
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct IsEmptyCondition {
166 #[prost(string, tag = "1")]
167 pub key: ::prost::alloc::string::String,
168}
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct IsNullCondition {
171 #[prost(string, tag = "1")]
172 pub key: ::prost::alloc::string::String,
173}
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct HasIdCondition {
176 #[prost(message, repeated, tag = "1")]
177 pub has_id: ::prost::alloc::vec::Vec<PointId>,
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct HasVectorCondition {
181 #[prost(string, tag = "1")]
182 pub has_vector: ::prost::alloc::string::String,
183}
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct NestedCondition {
186 #[prost(string, tag = "1")]
188 pub key: ::prost::alloc::string::String,
189 #[prost(message, optional, tag = "2")]
191 pub filter: ::core::option::Option<Filter>,
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct FieldCondition {
195 #[prost(string, tag = "1")]
196 pub key: ::prost::alloc::string::String,
197 #[prost(message, optional, tag = "2")]
199 pub r#match: ::core::option::Option<Match>,
200 #[prost(message, optional, tag = "3")]
202 pub range: ::core::option::Option<Range>,
203 #[prost(message, optional, tag = "4")]
205 pub geo_bounding_box: ::core::option::Option<GeoBoundingBox>,
206 #[prost(message, optional, tag = "5")]
208 pub geo_radius: ::core::option::Option<GeoRadius>,
209 #[prost(message, optional, tag = "6")]
211 pub values_count: ::core::option::Option<ValuesCount>,
212 #[prost(message, optional, tag = "7")]
214 pub geo_polygon: ::core::option::Option<GeoPolygon>,
215 #[prost(message, optional, tag = "8")]
217 pub datetime_range: ::core::option::Option<DatetimeRange>,
218 #[prost(bool, optional, tag = "9")]
220 pub is_empty: ::core::option::Option<bool>,
221 #[prost(bool, optional, tag = "10")]
223 pub is_null: ::core::option::Option<bool>,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct Match {
227 #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
228 pub match_value: ::core::option::Option<r#match::MatchValue>,
229}
230pub mod r#match {
232 #[derive(Clone, PartialEq, ::prost::Oneof)]
233 pub enum MatchValue {
234 #[prost(string, tag = "1")]
236 Keyword(::prost::alloc::string::String),
237 #[prost(int64, tag = "2")]
239 Integer(i64),
240 #[prost(bool, tag = "3")]
242 Boolean(bool),
243 #[prost(string, tag = "4")]
245 Text(::prost::alloc::string::String),
246 #[prost(message, tag = "5")]
248 Keywords(super::RepeatedStrings),
249 #[prost(message, tag = "6")]
251 Integers(super::RepeatedIntegers),
252 #[prost(message, tag = "7")]
254 ExceptIntegers(super::RepeatedIntegers),
255 #[prost(message, tag = "8")]
257 ExceptKeywords(super::RepeatedStrings),
258 #[prost(string, tag = "9")]
260 Phrase(::prost::alloc::string::String),
261 #[prost(string, tag = "10")]
263 TextAny(::prost::alloc::string::String),
264 }
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct RepeatedStrings {
268 #[prost(string, repeated, tag = "1")]
269 pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
270}
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct RepeatedIntegers {
273 #[prost(int64, repeated, tag = "1")]
274 pub integers: ::prost::alloc::vec::Vec<i64>,
275}
276#[derive(Clone, Copy, PartialEq, ::prost::Message)]
277pub struct Range {
278 #[prost(double, optional, tag = "1")]
279 pub lt: ::core::option::Option<f64>,
280 #[prost(double, optional, tag = "2")]
281 pub gt: ::core::option::Option<f64>,
282 #[prost(double, optional, tag = "3")]
283 pub gte: ::core::option::Option<f64>,
284 #[prost(double, optional, tag = "4")]
285 pub lte: ::core::option::Option<f64>,
286}
287#[derive(Clone, Copy, PartialEq, ::prost::Message)]
288pub struct DatetimeRange {
289 #[prost(message, optional, tag = "1")]
290 pub lt: ::core::option::Option<::prost_types::Timestamp>,
291 #[prost(message, optional, tag = "2")]
292 pub gt: ::core::option::Option<::prost_types::Timestamp>,
293 #[prost(message, optional, tag = "3")]
294 pub gte: ::core::option::Option<::prost_types::Timestamp>,
295 #[prost(message, optional, tag = "4")]
296 pub lte: ::core::option::Option<::prost_types::Timestamp>,
297}
298#[derive(Clone, Copy, PartialEq, ::prost::Message)]
299pub struct GeoBoundingBox {
300 #[prost(message, optional, tag = "1")]
302 pub top_left: ::core::option::Option<GeoPoint>,
303 #[prost(message, optional, tag = "2")]
305 pub bottom_right: ::core::option::Option<GeoPoint>,
306}
307#[derive(Clone, Copy, PartialEq, ::prost::Message)]
308pub struct GeoRadius {
309 #[prost(message, optional, tag = "1")]
311 pub center: ::core::option::Option<GeoPoint>,
312 #[prost(float, tag = "2")]
314 pub radius: f32,
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct GeoLineString {
318 #[prost(message, repeated, tag = "1")]
320 pub points: ::prost::alloc::vec::Vec<GeoPoint>,
321}
322#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct GeoPolygon {
326 #[prost(message, optional, tag = "1")]
328 pub exterior: ::core::option::Option<GeoLineString>,
329 #[prost(message, repeated, tag = "2")]
331 pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
332}
333#[derive(Clone, Copy, PartialEq, ::prost::Message)]
334pub struct ValuesCount {
335 #[prost(uint64, optional, tag = "1")]
336 pub lt: ::core::option::Option<u64>,
337 #[prost(uint64, optional, tag = "2")]
338 pub gt: ::core::option::Option<u64>,
339 #[prost(uint64, optional, tag = "3")]
340 pub gte: ::core::option::Option<u64>,
341 #[prost(uint64, optional, tag = "4")]
342 pub lte: ::core::option::Option<u64>,
343}
344#[derive(Clone, Copy, PartialEq, ::prost::Message)]
345pub struct VectorParams {
346 #[prost(uint64, tag = "1")]
348 pub size: u64,
349 #[prost(enumeration = "Distance", tag = "2")]
351 pub distance: i32,
352 #[prost(message, optional, tag = "3")]
354 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
355 #[prost(message, optional, tag = "4")]
357 pub quantization_config: ::core::option::Option<QuantizationConfig>,
358 #[prost(bool, optional, tag = "5")]
360 pub on_disk: ::core::option::Option<bool>,
361 #[prost(enumeration = "Datatype", optional, tag = "6")]
363 pub datatype: ::core::option::Option<i32>,
364 #[prost(message, optional, tag = "7")]
366 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
367}
368#[derive(Clone, Copy, PartialEq, ::prost::Message)]
369pub struct VectorParamsDiff {
370 #[prost(message, optional, tag = "1")]
372 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
373 #[prost(message, optional, tag = "2")]
375 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
376 #[prost(bool, optional, tag = "3")]
378 pub on_disk: ::core::option::Option<bool>,
379}
380#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct VectorParamsMap {
382 #[prost(map = "string, message", tag = "1")]
383 pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
384}
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct VectorParamsDiffMap {
387 #[prost(map = "string, message", tag = "1")]
388 pub map: ::std::collections::HashMap<
389 ::prost::alloc::string::String,
390 VectorParamsDiff,
391 >,
392}
393#[derive(Clone, PartialEq, ::prost::Message)]
394pub struct VectorsConfig {
395 #[prost(oneof = "vectors_config::Config", tags = "1, 2")]
396 pub config: ::core::option::Option<vectors_config::Config>,
397}
398pub mod vectors_config {
400 #[derive(Clone, PartialEq, ::prost::Oneof)]
401 pub enum Config {
402 #[prost(message, tag = "1")]
403 Params(super::VectorParams),
404 #[prost(message, tag = "2")]
405 ParamsMap(super::VectorParamsMap),
406 }
407}
408#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct VectorsConfigDiff {
410 #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
411 pub config: ::core::option::Option<vectors_config_diff::Config>,
412}
413pub mod vectors_config_diff {
415 #[derive(Clone, PartialEq, ::prost::Oneof)]
416 pub enum Config {
417 #[prost(message, tag = "1")]
418 Params(super::VectorParamsDiff),
419 #[prost(message, tag = "2")]
420 ParamsMap(super::VectorParamsDiffMap),
421 }
422}
423#[derive(Clone, Copy, PartialEq, ::prost::Message)]
424pub struct SparseVectorParams {
425 #[prost(message, optional, tag = "1")]
427 pub index: ::core::option::Option<SparseIndexConfig>,
428 #[prost(enumeration = "Modifier", optional, tag = "2")]
430 pub modifier: ::core::option::Option<i32>,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct SparseVectorConfig {
434 #[prost(map = "string, message", tag = "1")]
435 pub map: ::std::collections::HashMap<
436 ::prost::alloc::string::String,
437 SparseVectorParams,
438 >,
439}
440#[derive(Clone, Copy, PartialEq, ::prost::Message)]
441pub struct MultiVectorConfig {
442 #[prost(enumeration = "MultiVectorComparator", tag = "1")]
444 pub comparator: i32,
445}
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct GetCollectionInfoRequest {
448 #[prost(string, tag = "1")]
450 pub collection_name: ::prost::alloc::string::String,
451}
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct CollectionExistsRequest {
454 #[prost(string, tag = "1")]
455 pub collection_name: ::prost::alloc::string::String,
456}
457#[derive(Clone, Copy, PartialEq, ::prost::Message)]
458pub struct CollectionExists {
459 #[prost(bool, tag = "1")]
460 pub exists: bool,
461}
462#[derive(Clone, Copy, PartialEq, ::prost::Message)]
463pub struct CollectionExistsResponse {
464 #[prost(message, optional, tag = "1")]
465 pub result: ::core::option::Option<CollectionExists>,
466 #[prost(double, tag = "2")]
468 pub time: f64,
469}
470#[derive(Clone, Copy, PartialEq, ::prost::Message)]
471pub struct ListCollectionsRequest {}
472#[derive(Clone, PartialEq, ::prost::Message)]
473pub struct CollectionDescription {
474 #[prost(string, tag = "1")]
476 pub name: ::prost::alloc::string::String,
477}
478#[derive(Clone, PartialEq, ::prost::Message)]
479pub struct GetCollectionInfoResponse {
480 #[prost(message, optional, tag = "1")]
481 pub result: ::core::option::Option<CollectionInfo>,
482 #[prost(double, tag = "2")]
484 pub time: f64,
485}
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct ListCollectionsResponse {
488 #[prost(message, repeated, tag = "1")]
489 pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
490 #[prost(double, tag = "2")]
492 pub time: f64,
493}
494#[derive(Clone, Copy, PartialEq, ::prost::Message)]
495pub struct MaxOptimizationThreads {
496 #[prost(oneof = "max_optimization_threads::Variant", tags = "1, 2")]
497 pub variant: ::core::option::Option<max_optimization_threads::Variant>,
498}
499pub mod max_optimization_threads {
501 #[derive(
502 Clone,
503 Copy,
504 Debug,
505 PartialEq,
506 Eq,
507 Hash,
508 PartialOrd,
509 Ord,
510 ::prost::Enumeration
511 )]
512 #[repr(i32)]
513 pub enum Setting {
514 Auto = 0,
515 }
516 impl Setting {
517 pub fn as_str_name(&self) -> &'static str {
522 match self {
523 Self::Auto => "Auto",
524 }
525 }
526 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
528 match value {
529 "Auto" => Some(Self::Auto),
530 _ => None,
531 }
532 }
533 }
534 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
535 pub enum Variant {
536 #[prost(uint64, tag = "1")]
537 Value(u64),
538 #[prost(enumeration = "Setting", tag = "2")]
539 Setting(i32),
540 }
541}
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct OptimizerStatus {
544 #[prost(bool, tag = "1")]
545 pub ok: bool,
546 #[prost(string, tag = "2")]
547 pub error: ::prost::alloc::string::String,
548}
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct CollectionWarning {
551 #[prost(string, tag = "1")]
552 pub message: ::prost::alloc::string::String,
553}
554#[derive(Clone, Copy, PartialEq, ::prost::Message)]
555pub struct HnswConfigDiff {
556 #[prost(uint64, optional, tag = "1")]
559 pub m: ::core::option::Option<u64>,
560 #[prost(uint64, optional, tag = "2")]
563 pub ef_construct: ::core::option::Option<u64>,
564 #[prost(uint64, optional, tag = "3")]
572 pub full_scan_threshold: ::core::option::Option<u64>,
573 #[prost(uint64, optional, tag = "4")]
579 pub max_indexing_threads: ::core::option::Option<u64>,
580 #[prost(bool, optional, tag = "5")]
583 pub on_disk: ::core::option::Option<bool>,
584 #[prost(uint64, optional, tag = "6")]
587 pub payload_m: ::core::option::Option<u64>,
588 #[prost(bool, optional, tag = "7")]
594 pub inline_storage: ::core::option::Option<bool>,
595}
596#[derive(Clone, Copy, PartialEq, ::prost::Message)]
597pub struct SparseIndexConfig {
598 #[prost(uint64, optional, tag = "1")]
602 pub full_scan_threshold: ::core::option::Option<u64>,
603 #[prost(bool, optional, tag = "2")]
606 pub on_disk: ::core::option::Option<bool>,
607 #[prost(enumeration = "Datatype", optional, tag = "3")]
610 pub datatype: ::core::option::Option<i32>,
611}
612#[derive(Clone, Copy, PartialEq, ::prost::Message)]
613pub struct WalConfigDiff {
614 #[prost(uint64, optional, tag = "1")]
616 pub wal_capacity_mb: ::core::option::Option<u64>,
617 #[prost(uint64, optional, tag = "2")]
619 pub wal_segments_ahead: ::core::option::Option<u64>,
620 #[prost(uint64, optional, tag = "3")]
622 pub wal_retain_closed: ::core::option::Option<u64>,
623}
624#[derive(Clone, Copy, PartialEq, ::prost::Message)]
625pub struct OptimizersConfigDiff {
626 #[prost(double, optional, tag = "1")]
629 pub deleted_threshold: ::core::option::Option<f64>,
630 #[prost(uint64, optional, tag = "2")]
633 pub vacuum_min_vector_number: ::core::option::Option<u64>,
634 #[prost(uint64, optional, tag = "3")]
644 pub default_segment_number: ::core::option::Option<u64>,
645 #[prost(uint64, optional, tag = "4")]
657 pub max_segment_size: ::core::option::Option<u64>,
658 #[prost(uint64, optional, tag = "5")]
668 pub memmap_threshold: ::core::option::Option<u64>,
669 #[prost(uint64, optional, tag = "6")]
678 pub indexing_threshold: ::core::option::Option<u64>,
679 #[prost(uint64, optional, tag = "7")]
682 pub flush_interval_sec: ::core::option::Option<u64>,
683 #[prost(uint64, optional, tag = "8")]
685 pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
686 #[prost(message, optional, tag = "9")]
692 pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
693}
694#[derive(Clone, Copy, PartialEq, ::prost::Message)]
695pub struct ScalarQuantization {
696 #[prost(enumeration = "QuantizationType", tag = "1")]
698 pub r#type: i32,
699 #[prost(float, optional, tag = "2")]
701 pub quantile: ::core::option::Option<f32>,
702 #[prost(bool, optional, tag = "3")]
704 pub always_ram: ::core::option::Option<bool>,
705}
706#[derive(Clone, Copy, PartialEq, ::prost::Message)]
707pub struct ProductQuantization {
708 #[prost(enumeration = "CompressionRatio", tag = "1")]
710 pub compression: i32,
711 #[prost(bool, optional, tag = "2")]
713 pub always_ram: ::core::option::Option<bool>,
714}
715#[derive(Clone, Copy, PartialEq, ::prost::Message)]
716pub struct BinaryQuantizationQueryEncoding {
717 #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
718 pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
719}
720pub mod binary_quantization_query_encoding {
722 #[derive(
723 Clone,
724 Copy,
725 Debug,
726 PartialEq,
727 Eq,
728 Hash,
729 PartialOrd,
730 Ord,
731 ::prost::Enumeration
732 )]
733 #[repr(i32)]
734 pub enum Setting {
735 Default = 0,
736 Binary = 1,
737 Scalar4Bits = 2,
738 Scalar8Bits = 3,
739 }
740 impl Setting {
741 pub fn as_str_name(&self) -> &'static str {
746 match self {
747 Self::Default => "Default",
748 Self::Binary => "Binary",
749 Self::Scalar4Bits => "Scalar4Bits",
750 Self::Scalar8Bits => "Scalar8Bits",
751 }
752 }
753 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
755 match value {
756 "Default" => Some(Self::Default),
757 "Binary" => Some(Self::Binary),
758 "Scalar4Bits" => Some(Self::Scalar4Bits),
759 "Scalar8Bits" => Some(Self::Scalar8Bits),
760 _ => None,
761 }
762 }
763 }
764 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
765 pub enum Variant {
766 #[prost(enumeration = "Setting", tag = "4")]
767 Setting(i32),
768 }
769}
770#[derive(Clone, Copy, PartialEq, ::prost::Message)]
771pub struct BinaryQuantization {
772 #[prost(bool, optional, tag = "1")]
774 pub always_ram: ::core::option::Option<bool>,
775 #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
777 pub encoding: ::core::option::Option<i32>,
778 #[prost(message, optional, tag = "3")]
782 pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
783}
784#[derive(Clone, Copy, PartialEq, ::prost::Message)]
785pub struct QuantizationConfig {
786 #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")]
787 pub quantization: ::core::option::Option<quantization_config::Quantization>,
788}
789pub mod quantization_config {
791 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
792 pub enum Quantization {
793 #[prost(message, tag = "1")]
794 Scalar(super::ScalarQuantization),
795 #[prost(message, tag = "2")]
796 Product(super::ProductQuantization),
797 #[prost(message, tag = "3")]
798 Binary(super::BinaryQuantization),
799 }
800}
801#[derive(Clone, Copy, PartialEq, ::prost::Message)]
802pub struct Disabled {}
803#[derive(Clone, Copy, PartialEq, ::prost::Message)]
804pub struct QuantizationConfigDiff {
805 #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")]
806 pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
807}
808pub mod quantization_config_diff {
810 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
811 pub enum Quantization {
812 #[prost(message, tag = "1")]
813 Scalar(super::ScalarQuantization),
814 #[prost(message, tag = "2")]
815 Product(super::ProductQuantization),
816 #[prost(message, tag = "3")]
817 Disabled(super::Disabled),
818 #[prost(message, tag = "4")]
819 Binary(super::BinaryQuantization),
820 }
821}
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct StrictModeConfig {
824 #[prost(bool, optional, tag = "1")]
826 pub enabled: ::core::option::Option<bool>,
827 #[prost(uint32, optional, tag = "2")]
829 pub max_query_limit: ::core::option::Option<u32>,
830 #[prost(uint32, optional, tag = "3")]
832 pub max_timeout: ::core::option::Option<u32>,
833 #[prost(bool, optional, tag = "4")]
835 pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
836 #[prost(bool, optional, tag = "5")]
838 pub unindexed_filtering_update: ::core::option::Option<bool>,
839 #[prost(uint32, optional, tag = "6")]
841 pub search_max_hnsw_ef: ::core::option::Option<u32>,
842 #[prost(bool, optional, tag = "7")]
844 pub search_allow_exact: ::core::option::Option<bool>,
845 #[prost(float, optional, tag = "8")]
847 pub search_max_oversampling: ::core::option::Option<f32>,
848 #[prost(uint64, optional, tag = "9")]
850 pub upsert_max_batchsize: ::core::option::Option<u64>,
851 #[prost(uint64, optional, tag = "10")]
853 pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
854 #[prost(uint32, optional, tag = "11")]
856 pub read_rate_limit: ::core::option::Option<u32>,
857 #[prost(uint32, optional, tag = "12")]
859 pub write_rate_limit: ::core::option::Option<u32>,
860 #[prost(uint64, optional, tag = "13")]
862 pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
863 #[prost(uint64, optional, tag = "14")]
865 pub filter_max_conditions: ::core::option::Option<u64>,
866 #[prost(uint64, optional, tag = "15")]
868 pub condition_max_size: ::core::option::Option<u64>,
869 #[prost(message, optional, tag = "16")]
871 pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
872 #[prost(message, optional, tag = "17")]
874 pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
875 #[prost(uint64, optional, tag = "18")]
877 pub max_points_count: ::core::option::Option<u64>,
878 #[prost(uint64, optional, tag = "19")]
880 pub max_payload_index_count: ::core::option::Option<u64>,
881}
882#[derive(Clone, PartialEq, ::prost::Message)]
883pub struct StrictModeSparseConfig {
884 #[prost(map = "string, message", tag = "1")]
885 pub sparse_config: ::std::collections::HashMap<
886 ::prost::alloc::string::String,
887 StrictModeSparse,
888 >,
889}
890#[derive(Clone, Copy, PartialEq, ::prost::Message)]
891pub struct StrictModeSparse {
892 #[prost(uint64, optional, tag = "10")]
894 pub max_length: ::core::option::Option<u64>,
895}
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct StrictModeMultivectorConfig {
898 #[prost(map = "string, message", tag = "1")]
899 pub multivector_config: ::std::collections::HashMap<
900 ::prost::alloc::string::String,
901 StrictModeMultivector,
902 >,
903}
904#[derive(Clone, Copy, PartialEq, ::prost::Message)]
905pub struct StrictModeMultivector {
906 #[prost(uint64, optional, tag = "1")]
908 pub max_vectors: ::core::option::Option<u64>,
909}
910#[derive(Clone, PartialEq, ::prost::Message)]
911pub struct CreateCollection {
912 #[prost(string, tag = "1")]
914 pub collection_name: ::prost::alloc::string::String,
915 #[prost(message, optional, tag = "4")]
917 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
918 #[prost(message, optional, tag = "5")]
920 pub wal_config: ::core::option::Option<WalConfigDiff>,
921 #[prost(message, optional, tag = "6")]
923 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
924 #[prost(uint32, optional, tag = "7")]
926 pub shard_number: ::core::option::Option<u32>,
927 #[prost(bool, optional, tag = "8")]
929 pub on_disk_payload: ::core::option::Option<bool>,
930 #[prost(uint64, optional, tag = "9")]
932 pub timeout: ::core::option::Option<u64>,
933 #[prost(message, optional, tag = "10")]
935 pub vectors_config: ::core::option::Option<VectorsConfig>,
936 #[prost(uint32, optional, tag = "11")]
938 pub replication_factor: ::core::option::Option<u32>,
939 #[prost(uint32, optional, tag = "12")]
941 pub write_consistency_factor: ::core::option::Option<u32>,
942 #[prost(message, optional, tag = "14")]
944 pub quantization_config: ::core::option::Option<QuantizationConfig>,
945 #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
947 pub sharding_method: ::core::option::Option<i32>,
948 #[prost(message, optional, tag = "16")]
950 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
951 #[prost(message, optional, tag = "17")]
953 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
954 #[prost(map = "string, message", tag = "18")]
956 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
957}
958#[derive(Clone, PartialEq, ::prost::Message)]
959pub struct UpdateCollection {
960 #[prost(string, tag = "1")]
962 pub collection_name: ::prost::alloc::string::String,
963 #[prost(message, optional, tag = "2")]
965 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
966 #[prost(uint64, optional, tag = "3")]
968 pub timeout: ::core::option::Option<u64>,
969 #[prost(message, optional, tag = "4")]
971 pub params: ::core::option::Option<CollectionParamsDiff>,
972 #[prost(message, optional, tag = "5")]
974 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
975 #[prost(message, optional, tag = "6")]
977 pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
978 #[prost(message, optional, tag = "7")]
980 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
981 #[prost(message, optional, tag = "8")]
983 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
984 #[prost(message, optional, tag = "9")]
986 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
987 #[prost(map = "string, message", tag = "10")]
989 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
990}
991#[derive(Clone, PartialEq, ::prost::Message)]
992pub struct DeleteCollection {
993 #[prost(string, tag = "1")]
995 pub collection_name: ::prost::alloc::string::String,
996 #[prost(uint64, optional, tag = "2")]
998 pub timeout: ::core::option::Option<u64>,
999}
1000#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1001pub struct CollectionOperationResponse {
1002 #[prost(bool, tag = "1")]
1004 pub result: bool,
1005 #[prost(double, tag = "2")]
1007 pub time: f64,
1008}
1009#[derive(Clone, PartialEq, ::prost::Message)]
1010pub struct CollectionParams {
1011 #[prost(uint32, tag = "3")]
1013 pub shard_number: u32,
1014 #[prost(bool, tag = "4")]
1016 pub on_disk_payload: bool,
1017 #[prost(message, optional, tag = "5")]
1019 pub vectors_config: ::core::option::Option<VectorsConfig>,
1020 #[prost(uint32, optional, tag = "6")]
1022 pub replication_factor: ::core::option::Option<u32>,
1023 #[prost(uint32, optional, tag = "7")]
1025 pub write_consistency_factor: ::core::option::Option<u32>,
1026 #[prost(uint32, optional, tag = "8")]
1028 pub read_fan_out_factor: ::core::option::Option<u32>,
1029 #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
1031 pub sharding_method: ::core::option::Option<i32>,
1032 #[prost(message, optional, tag = "10")]
1034 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1035}
1036#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1037pub struct CollectionParamsDiff {
1038 #[prost(uint32, optional, tag = "1")]
1040 pub replication_factor: ::core::option::Option<u32>,
1041 #[prost(uint32, optional, tag = "2")]
1043 pub write_consistency_factor: ::core::option::Option<u32>,
1044 #[prost(bool, optional, tag = "3")]
1046 pub on_disk_payload: ::core::option::Option<bool>,
1047 #[prost(uint32, optional, tag = "4")]
1049 pub read_fan_out_factor: ::core::option::Option<u32>,
1050}
1051#[derive(Clone, PartialEq, ::prost::Message)]
1052pub struct CollectionConfig {
1053 #[prost(message, optional, tag = "1")]
1055 pub params: ::core::option::Option<CollectionParams>,
1056 #[prost(message, optional, tag = "2")]
1058 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1059 #[prost(message, optional, tag = "3")]
1061 pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
1062 #[prost(message, optional, tag = "4")]
1064 pub wal_config: ::core::option::Option<WalConfigDiff>,
1065 #[prost(message, optional, tag = "5")]
1067 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1068 #[prost(message, optional, tag = "6")]
1070 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1071 #[prost(map = "string, message", tag = "7")]
1073 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1074}
1075#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1076pub struct KeywordIndexParams {
1077 #[prost(bool, optional, tag = "1")]
1079 pub is_tenant: ::core::option::Option<bool>,
1080 #[prost(bool, optional, tag = "2")]
1082 pub on_disk: ::core::option::Option<bool>,
1083}
1084#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1085pub struct IntegerIndexParams {
1086 #[prost(bool, optional, tag = "1")]
1088 pub lookup: ::core::option::Option<bool>,
1089 #[prost(bool, optional, tag = "2")]
1091 pub range: ::core::option::Option<bool>,
1092 #[prost(bool, optional, tag = "3")]
1094 pub is_principal: ::core::option::Option<bool>,
1095 #[prost(bool, optional, tag = "4")]
1097 pub on_disk: ::core::option::Option<bool>,
1098}
1099#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1100pub struct FloatIndexParams {
1101 #[prost(bool, optional, tag = "1")]
1103 pub on_disk: ::core::option::Option<bool>,
1104 #[prost(bool, optional, tag = "2")]
1106 pub is_principal: ::core::option::Option<bool>,
1107}
1108#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1109pub struct GeoIndexParams {
1110 #[prost(bool, optional, tag = "1")]
1112 pub on_disk: ::core::option::Option<bool>,
1113}
1114#[derive(Clone, PartialEq, ::prost::Message)]
1115pub struct StopwordsSet {
1116 #[prost(string, repeated, tag = "1")]
1118 pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1119 #[prost(string, repeated, tag = "2")]
1121 pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1122}
1123#[derive(Clone, PartialEq, ::prost::Message)]
1124pub struct TextIndexParams {
1125 #[prost(enumeration = "TokenizerType", tag = "1")]
1127 pub tokenizer: i32,
1128 #[prost(bool, optional, tag = "2")]
1130 pub lowercase: ::core::option::Option<bool>,
1131 #[prost(uint64, optional, tag = "3")]
1133 pub min_token_len: ::core::option::Option<u64>,
1134 #[prost(uint64, optional, tag = "4")]
1136 pub max_token_len: ::core::option::Option<u64>,
1137 #[prost(bool, optional, tag = "5")]
1139 pub on_disk: ::core::option::Option<bool>,
1140 #[prost(message, optional, tag = "6")]
1142 pub stopwords: ::core::option::Option<StopwordsSet>,
1143 #[prost(bool, optional, tag = "7")]
1145 pub phrase_matching: ::core::option::Option<bool>,
1146 #[prost(message, optional, tag = "8")]
1148 pub stemmer: ::core::option::Option<StemmingAlgorithm>,
1149 #[prost(bool, optional, tag = "9")]
1151 pub ascii_folding: ::core::option::Option<bool>,
1152}
1153#[derive(Clone, PartialEq, ::prost::Message)]
1154pub struct StemmingAlgorithm {
1155 #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1")]
1156 pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
1157}
1158pub mod stemming_algorithm {
1160 #[derive(Clone, PartialEq, ::prost::Oneof)]
1161 pub enum StemmingParams {
1162 #[prost(message, tag = "1")]
1164 Snowball(super::SnowballParams),
1165 }
1166}
1167#[derive(Clone, PartialEq, ::prost::Message)]
1168pub struct SnowballParams {
1169 #[prost(string, tag = "1")]
1171 pub language: ::prost::alloc::string::String,
1172}
1173#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1174pub struct BoolIndexParams {
1175 #[prost(bool, optional, tag = "1")]
1177 pub on_disk: ::core::option::Option<bool>,
1178}
1179#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1180pub struct DatetimeIndexParams {
1181 #[prost(bool, optional, tag = "1")]
1183 pub on_disk: ::core::option::Option<bool>,
1184 #[prost(bool, optional, tag = "2")]
1186 pub is_principal: ::core::option::Option<bool>,
1187}
1188#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1189pub struct UuidIndexParams {
1190 #[prost(bool, optional, tag = "1")]
1192 pub is_tenant: ::core::option::Option<bool>,
1193 #[prost(bool, optional, tag = "2")]
1195 pub on_disk: ::core::option::Option<bool>,
1196}
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct PayloadIndexParams {
1199 #[prost(
1200 oneof = "payload_index_params::IndexParams",
1201 tags = "3, 2, 4, 5, 1, 6, 7, 8"
1202 )]
1203 pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
1204}
1205pub mod payload_index_params {
1207 #[derive(Clone, PartialEq, ::prost::Oneof)]
1208 pub enum IndexParams {
1209 #[prost(message, tag = "3")]
1211 KeywordIndexParams(super::KeywordIndexParams),
1212 #[prost(message, tag = "2")]
1214 IntegerIndexParams(super::IntegerIndexParams),
1215 #[prost(message, tag = "4")]
1217 FloatIndexParams(super::FloatIndexParams),
1218 #[prost(message, tag = "5")]
1220 GeoIndexParams(super::GeoIndexParams),
1221 #[prost(message, tag = "1")]
1223 TextIndexParams(super::TextIndexParams),
1224 #[prost(message, tag = "6")]
1226 BoolIndexParams(super::BoolIndexParams),
1227 #[prost(message, tag = "7")]
1229 DatetimeIndexParams(super::DatetimeIndexParams),
1230 #[prost(message, tag = "8")]
1232 UuidIndexParams(super::UuidIndexParams),
1233 }
1234}
1235#[derive(Clone, PartialEq, ::prost::Message)]
1236pub struct PayloadSchemaInfo {
1237 #[prost(enumeration = "PayloadSchemaType", tag = "1")]
1239 pub data_type: i32,
1240 #[prost(message, optional, tag = "2")]
1242 pub params: ::core::option::Option<PayloadIndexParams>,
1243 #[prost(uint64, optional, tag = "3")]
1245 pub points: ::core::option::Option<u64>,
1246}
1247#[derive(Clone, PartialEq, ::prost::Message)]
1248pub struct CollectionInfo {
1249 #[prost(enumeration = "CollectionStatus", tag = "1")]
1251 pub status: i32,
1252 #[prost(message, optional, tag = "2")]
1254 pub optimizer_status: ::core::option::Option<OptimizerStatus>,
1255 #[prost(uint64, tag = "4")]
1257 pub segments_count: u64,
1258 #[prost(message, optional, tag = "7")]
1260 pub config: ::core::option::Option<CollectionConfig>,
1261 #[prost(map = "string, message", tag = "8")]
1263 pub payload_schema: ::std::collections::HashMap<
1264 ::prost::alloc::string::String,
1265 PayloadSchemaInfo,
1266 >,
1267 #[prost(uint64, optional, tag = "9")]
1269 pub points_count: ::core::option::Option<u64>,
1270 #[prost(uint64, optional, tag = "10")]
1272 pub indexed_vectors_count: ::core::option::Option<u64>,
1273 #[prost(message, repeated, tag = "11")]
1275 pub warnings: ::prost::alloc::vec::Vec<CollectionWarning>,
1276}
1277#[derive(Clone, PartialEq, ::prost::Message)]
1278pub struct ChangeAliases {
1279 #[prost(message, repeated, tag = "1")]
1281 pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
1282 #[prost(uint64, optional, tag = "2")]
1284 pub timeout: ::core::option::Option<u64>,
1285}
1286#[derive(Clone, PartialEq, ::prost::Message)]
1287pub struct AliasOperations {
1288 #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
1289 pub action: ::core::option::Option<alias_operations::Action>,
1290}
1291pub mod alias_operations {
1293 #[derive(Clone, PartialEq, ::prost::Oneof)]
1294 pub enum Action {
1295 #[prost(message, tag = "1")]
1296 CreateAlias(super::CreateAlias),
1297 #[prost(message, tag = "2")]
1298 RenameAlias(super::RenameAlias),
1299 #[prost(message, tag = "3")]
1300 DeleteAlias(super::DeleteAlias),
1301 }
1302}
1303#[derive(Clone, PartialEq, ::prost::Message)]
1304pub struct CreateAlias {
1305 #[prost(string, tag = "1")]
1307 pub collection_name: ::prost::alloc::string::String,
1308 #[prost(string, tag = "2")]
1310 pub alias_name: ::prost::alloc::string::String,
1311}
1312#[derive(Clone, PartialEq, ::prost::Message)]
1313pub struct RenameAlias {
1314 #[prost(string, tag = "1")]
1316 pub old_alias_name: ::prost::alloc::string::String,
1317 #[prost(string, tag = "2")]
1319 pub new_alias_name: ::prost::alloc::string::String,
1320}
1321#[derive(Clone, PartialEq, ::prost::Message)]
1322pub struct DeleteAlias {
1323 #[prost(string, tag = "1")]
1325 pub alias_name: ::prost::alloc::string::String,
1326}
1327#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1328pub struct ListAliasesRequest {}
1329#[derive(Clone, PartialEq, ::prost::Message)]
1330pub struct ListCollectionAliasesRequest {
1331 #[prost(string, tag = "1")]
1333 pub collection_name: ::prost::alloc::string::String,
1334}
1335#[derive(Clone, PartialEq, ::prost::Message)]
1336pub struct AliasDescription {
1337 #[prost(string, tag = "1")]
1339 pub alias_name: ::prost::alloc::string::String,
1340 #[prost(string, tag = "2")]
1342 pub collection_name: ::prost::alloc::string::String,
1343}
1344#[derive(Clone, PartialEq, ::prost::Message)]
1345pub struct ListAliasesResponse {
1346 #[prost(message, repeated, tag = "1")]
1347 pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
1348 #[prost(double, tag = "2")]
1350 pub time: f64,
1351}
1352#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct CollectionClusterInfoRequest {
1354 #[prost(string, tag = "1")]
1356 pub collection_name: ::prost::alloc::string::String,
1357}
1358#[derive(Clone, PartialEq, ::prost::Message)]
1359pub struct ShardKey {
1360 #[prost(oneof = "shard_key::Key", tags = "1, 2")]
1361 pub key: ::core::option::Option<shard_key::Key>,
1362}
1363pub mod shard_key {
1365 #[derive(Clone, PartialEq, ::prost::Oneof)]
1366 pub enum Key {
1367 #[prost(string, tag = "1")]
1369 Keyword(::prost::alloc::string::String),
1370 #[prost(uint64, tag = "2")]
1372 Number(u64),
1373 }
1374}
1375#[derive(Clone, PartialEq, ::prost::Message)]
1376pub struct LocalShardInfo {
1377 #[prost(uint32, tag = "1")]
1379 pub shard_id: u32,
1380 #[prost(uint64, tag = "2")]
1382 pub points_count: u64,
1383 #[prost(enumeration = "ReplicaState", tag = "3")]
1385 pub state: i32,
1386 #[prost(message, optional, tag = "4")]
1388 pub shard_key: ::core::option::Option<ShardKey>,
1389}
1390#[derive(Clone, PartialEq, ::prost::Message)]
1391pub struct RemoteShardInfo {
1392 #[prost(uint32, tag = "1")]
1394 pub shard_id: u32,
1395 #[prost(uint64, tag = "2")]
1397 pub peer_id: u64,
1398 #[prost(enumeration = "ReplicaState", tag = "3")]
1400 pub state: i32,
1401 #[prost(message, optional, tag = "4")]
1403 pub shard_key: ::core::option::Option<ShardKey>,
1404}
1405#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1406pub struct ShardTransferInfo {
1407 #[prost(uint32, tag = "1")]
1409 pub shard_id: u32,
1410 #[prost(uint32, optional, tag = "5")]
1411 pub to_shard_id: ::core::option::Option<u32>,
1412 #[prost(uint64, tag = "2")]
1413 pub from: u64,
1414 #[prost(uint64, tag = "3")]
1415 pub to: u64,
1416 #[prost(bool, tag = "4")]
1418 pub sync: bool,
1419}
1420#[derive(Clone, PartialEq, ::prost::Message)]
1421pub struct ReshardingInfo {
1422 #[prost(uint32, tag = "1")]
1423 pub shard_id: u32,
1424 #[prost(uint64, tag = "2")]
1425 pub peer_id: u64,
1426 #[prost(message, optional, tag = "3")]
1427 pub shard_key: ::core::option::Option<ShardKey>,
1428 #[prost(enumeration = "ReshardingDirection", tag = "4")]
1429 pub direction: i32,
1430}
1431#[derive(Clone, PartialEq, ::prost::Message)]
1432pub struct CollectionClusterInfoResponse {
1433 #[prost(uint64, tag = "1")]
1435 pub peer_id: u64,
1436 #[prost(uint64, tag = "2")]
1438 pub shard_count: u64,
1439 #[prost(message, repeated, tag = "3")]
1441 pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1442 #[prost(message, repeated, tag = "4")]
1444 pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1445 #[prost(message, repeated, tag = "5")]
1447 pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1448 #[prost(message, repeated, tag = "6")]
1450 pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1451}
1452#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1453pub struct MoveShard {
1454 #[prost(uint32, tag = "1")]
1456 pub shard_id: u32,
1457 #[prost(uint32, optional, tag = "5")]
1458 pub to_shard_id: ::core::option::Option<u32>,
1459 #[prost(uint64, tag = "2")]
1460 pub from_peer_id: u64,
1461 #[prost(uint64, tag = "3")]
1462 pub to_peer_id: u64,
1463 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1464 pub method: ::core::option::Option<i32>,
1465}
1466#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1467pub struct ReplicateShard {
1468 #[prost(uint32, tag = "1")]
1470 pub shard_id: u32,
1471 #[prost(uint32, optional, tag = "5")]
1472 pub to_shard_id: ::core::option::Option<u32>,
1473 #[prost(uint64, tag = "2")]
1474 pub from_peer_id: u64,
1475 #[prost(uint64, tag = "3")]
1476 pub to_peer_id: u64,
1477 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1478 pub method: ::core::option::Option<i32>,
1479}
1480#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1481pub struct AbortShardTransfer {
1482 #[prost(uint32, tag = "1")]
1484 pub shard_id: u32,
1485 #[prost(uint32, optional, tag = "4")]
1486 pub to_shard_id: ::core::option::Option<u32>,
1487 #[prost(uint64, tag = "2")]
1488 pub from_peer_id: u64,
1489 #[prost(uint64, tag = "3")]
1490 pub to_peer_id: u64,
1491}
1492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1493pub struct RestartTransfer {
1494 #[prost(uint32, tag = "1")]
1496 pub shard_id: u32,
1497 #[prost(uint32, optional, tag = "5")]
1498 pub to_shard_id: ::core::option::Option<u32>,
1499 #[prost(uint64, tag = "2")]
1500 pub from_peer_id: u64,
1501 #[prost(uint64, tag = "3")]
1502 pub to_peer_id: u64,
1503 #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1504 pub method: i32,
1505}
1506#[derive(Clone, PartialEq, ::prost::Message)]
1507pub struct ReplicatePoints {
1508 #[prost(message, optional, tag = "1")]
1510 pub from_shard_key: ::core::option::Option<ShardKey>,
1511 #[prost(message, optional, tag = "2")]
1513 pub to_shard_key: ::core::option::Option<ShardKey>,
1514 #[prost(message, optional, tag = "3")]
1516 pub filter: ::core::option::Option<Filter>,
1517}
1518#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1519pub struct Replica {
1520 #[prost(uint32, tag = "1")]
1521 pub shard_id: u32,
1522 #[prost(uint64, tag = "2")]
1523 pub peer_id: u64,
1524}
1525#[derive(Clone, PartialEq, ::prost::Message)]
1526pub struct CreateShardKey {
1527 #[prost(message, optional, tag = "1")]
1529 pub shard_key: ::core::option::Option<ShardKey>,
1530 #[prost(uint32, optional, tag = "2")]
1532 pub shards_number: ::core::option::Option<u32>,
1533 #[prost(uint32, optional, tag = "3")]
1535 pub replication_factor: ::core::option::Option<u32>,
1536 #[prost(uint64, repeated, tag = "4")]
1538 pub placement: ::prost::alloc::vec::Vec<u64>,
1539 #[prost(enumeration = "ReplicaState", optional, tag = "5")]
1541 pub initial_state: ::core::option::Option<i32>,
1542}
1543#[derive(Clone, PartialEq, ::prost::Message)]
1544pub struct DeleteShardKey {
1545 #[prost(message, optional, tag = "1")]
1547 pub shard_key: ::core::option::Option<ShardKey>,
1548}
1549#[derive(Clone, PartialEq, ::prost::Message)]
1550pub struct UpdateCollectionClusterSetupRequest {
1551 #[prost(string, tag = "1")]
1553 pub collection_name: ::prost::alloc::string::String,
1554 #[prost(uint64, optional, tag = "6")]
1556 pub timeout: ::core::option::Option<u64>,
1557 #[prost(
1558 oneof = "update_collection_cluster_setup_request::Operation",
1559 tags = "2, 3, 4, 5, 7, 8, 9, 10"
1560 )]
1561 pub operation: ::core::option::Option<
1562 update_collection_cluster_setup_request::Operation,
1563 >,
1564}
1565pub mod update_collection_cluster_setup_request {
1567 #[derive(Clone, PartialEq, ::prost::Oneof)]
1568 pub enum Operation {
1569 #[prost(message, tag = "2")]
1570 MoveShard(super::MoveShard),
1571 #[prost(message, tag = "3")]
1572 ReplicateShard(super::ReplicateShard),
1573 #[prost(message, tag = "4")]
1574 AbortTransfer(super::AbortShardTransfer),
1575 #[prost(message, tag = "5")]
1576 DropReplica(super::Replica),
1577 #[prost(message, tag = "7")]
1578 CreateShardKey(super::CreateShardKey),
1579 #[prost(message, tag = "8")]
1580 DeleteShardKey(super::DeleteShardKey),
1581 #[prost(message, tag = "9")]
1582 RestartTransfer(super::RestartTransfer),
1583 #[prost(message, tag = "10")]
1584 ReplicatePoints(super::ReplicatePoints),
1585 }
1586}
1587#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1588pub struct UpdateCollectionClusterSetupResponse {
1589 #[prost(bool, tag = "1")]
1590 pub result: bool,
1591}
1592#[derive(Clone, PartialEq, ::prost::Message)]
1593pub struct CreateShardKeyRequest {
1594 #[prost(string, tag = "1")]
1596 pub collection_name: ::prost::alloc::string::String,
1597 #[prost(message, optional, tag = "2")]
1599 pub request: ::core::option::Option<CreateShardKey>,
1600 #[prost(uint64, optional, tag = "3")]
1602 pub timeout: ::core::option::Option<u64>,
1603}
1604#[derive(Clone, PartialEq, ::prost::Message)]
1605pub struct DeleteShardKeyRequest {
1606 #[prost(string, tag = "1")]
1608 pub collection_name: ::prost::alloc::string::String,
1609 #[prost(message, optional, tag = "2")]
1611 pub request: ::core::option::Option<DeleteShardKey>,
1612 #[prost(uint64, optional, tag = "3")]
1614 pub timeout: ::core::option::Option<u64>,
1615}
1616#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1617pub struct CreateShardKeyResponse {
1618 #[prost(bool, tag = "1")]
1619 pub result: bool,
1620}
1621#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1622pub struct DeleteShardKeyResponse {
1623 #[prost(bool, tag = "1")]
1624 pub result: bool,
1625}
1626#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1627#[repr(i32)]
1628pub enum Datatype {
1629 Default = 0,
1630 Float32 = 1,
1631 Uint8 = 2,
1632 Float16 = 3,
1633}
1634impl Datatype {
1635 pub fn as_str_name(&self) -> &'static str {
1640 match self {
1641 Self::Default => "Default",
1642 Self::Float32 => "Float32",
1643 Self::Uint8 => "Uint8",
1644 Self::Float16 => "Float16",
1645 }
1646 }
1647 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1649 match value {
1650 "Default" => Some(Self::Default),
1651 "Float32" => Some(Self::Float32),
1652 "Uint8" => Some(Self::Uint8),
1653 "Float16" => Some(Self::Float16),
1654 _ => None,
1655 }
1656 }
1657}
1658#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1659#[repr(i32)]
1660pub enum Modifier {
1661 None = 0,
1662 Idf = 1,
1664}
1665impl Modifier {
1666 pub fn as_str_name(&self) -> &'static str {
1671 match self {
1672 Self::None => "None",
1673 Self::Idf => "Idf",
1674 }
1675 }
1676 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1678 match value {
1679 "None" => Some(Self::None),
1680 "Idf" => Some(Self::Idf),
1681 _ => None,
1682 }
1683 }
1684}
1685#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1686#[repr(i32)]
1687pub enum MultiVectorComparator {
1688 MaxSim = 0,
1689}
1690impl MultiVectorComparator {
1691 pub fn as_str_name(&self) -> &'static str {
1696 match self {
1697 Self::MaxSim => "MaxSim",
1698 }
1699 }
1700 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1702 match value {
1703 "MaxSim" => Some(Self::MaxSim),
1704 _ => None,
1705 }
1706 }
1707}
1708#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1709#[repr(i32)]
1710pub enum Distance {
1711 UnknownDistance = 0,
1712 Cosine = 1,
1713 Euclid = 2,
1714 Dot = 3,
1715 Manhattan = 4,
1716}
1717impl Distance {
1718 pub fn as_str_name(&self) -> &'static str {
1723 match self {
1724 Self::UnknownDistance => "UnknownDistance",
1725 Self::Cosine => "Cosine",
1726 Self::Euclid => "Euclid",
1727 Self::Dot => "Dot",
1728 Self::Manhattan => "Manhattan",
1729 }
1730 }
1731 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1733 match value {
1734 "UnknownDistance" => Some(Self::UnknownDistance),
1735 "Cosine" => Some(Self::Cosine),
1736 "Euclid" => Some(Self::Euclid),
1737 "Dot" => Some(Self::Dot),
1738 "Manhattan" => Some(Self::Manhattan),
1739 _ => None,
1740 }
1741 }
1742}
1743#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1744#[repr(i32)]
1745pub enum CollectionStatus {
1746 UnknownCollectionStatus = 0,
1747 Green = 1,
1749 Yellow = 2,
1751 Red = 3,
1753 Grey = 4,
1755}
1756impl CollectionStatus {
1757 pub fn as_str_name(&self) -> &'static str {
1762 match self {
1763 Self::UnknownCollectionStatus => "UnknownCollectionStatus",
1764 Self::Green => "Green",
1765 Self::Yellow => "Yellow",
1766 Self::Red => "Red",
1767 Self::Grey => "Grey",
1768 }
1769 }
1770 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1772 match value {
1773 "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
1774 "Green" => Some(Self::Green),
1775 "Yellow" => Some(Self::Yellow),
1776 "Red" => Some(Self::Red),
1777 "Grey" => Some(Self::Grey),
1778 _ => None,
1779 }
1780 }
1781}
1782#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1783#[repr(i32)]
1784pub enum PayloadSchemaType {
1785 UnknownType = 0,
1786 Keyword = 1,
1787 Integer = 2,
1788 Float = 3,
1789 Geo = 4,
1790 Text = 5,
1791 Bool = 6,
1792 Datetime = 7,
1793 Uuid = 8,
1794}
1795impl PayloadSchemaType {
1796 pub fn as_str_name(&self) -> &'static str {
1801 match self {
1802 Self::UnknownType => "UnknownType",
1803 Self::Keyword => "Keyword",
1804 Self::Integer => "Integer",
1805 Self::Float => "Float",
1806 Self::Geo => "Geo",
1807 Self::Text => "Text",
1808 Self::Bool => "Bool",
1809 Self::Datetime => "Datetime",
1810 Self::Uuid => "Uuid",
1811 }
1812 }
1813 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1815 match value {
1816 "UnknownType" => Some(Self::UnknownType),
1817 "Keyword" => Some(Self::Keyword),
1818 "Integer" => Some(Self::Integer),
1819 "Float" => Some(Self::Float),
1820 "Geo" => Some(Self::Geo),
1821 "Text" => Some(Self::Text),
1822 "Bool" => Some(Self::Bool),
1823 "Datetime" => Some(Self::Datetime),
1824 "Uuid" => Some(Self::Uuid),
1825 _ => None,
1826 }
1827 }
1828}
1829#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1830#[repr(i32)]
1831pub enum QuantizationType {
1832 UnknownQuantization = 0,
1833 Int8 = 1,
1834}
1835impl QuantizationType {
1836 pub fn as_str_name(&self) -> &'static str {
1841 match self {
1842 Self::UnknownQuantization => "UnknownQuantization",
1843 Self::Int8 => "Int8",
1844 }
1845 }
1846 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1848 match value {
1849 "UnknownQuantization" => Some(Self::UnknownQuantization),
1850 "Int8" => Some(Self::Int8),
1851 _ => None,
1852 }
1853 }
1854}
1855#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1856#[repr(i32)]
1857pub enum CompressionRatio {
1858 X4 = 0,
1859 X8 = 1,
1860 X16 = 2,
1861 X32 = 3,
1862 X64 = 4,
1863}
1864impl CompressionRatio {
1865 pub fn as_str_name(&self) -> &'static str {
1870 match self {
1871 Self::X4 => "x4",
1872 Self::X8 => "x8",
1873 Self::X16 => "x16",
1874 Self::X32 => "x32",
1875 Self::X64 => "x64",
1876 }
1877 }
1878 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1880 match value {
1881 "x4" => Some(Self::X4),
1882 "x8" => Some(Self::X8),
1883 "x16" => Some(Self::X16),
1884 "x32" => Some(Self::X32),
1885 "x64" => Some(Self::X64),
1886 _ => None,
1887 }
1888 }
1889}
1890#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1891#[repr(i32)]
1892pub enum BinaryQuantizationEncoding {
1893 OneBit = 0,
1894 TwoBits = 1,
1895 OneAndHalfBits = 2,
1896}
1897impl BinaryQuantizationEncoding {
1898 pub fn as_str_name(&self) -> &'static str {
1903 match self {
1904 Self::OneBit => "OneBit",
1905 Self::TwoBits => "TwoBits",
1906 Self::OneAndHalfBits => "OneAndHalfBits",
1907 }
1908 }
1909 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1911 match value {
1912 "OneBit" => Some(Self::OneBit),
1913 "TwoBits" => Some(Self::TwoBits),
1914 "OneAndHalfBits" => Some(Self::OneAndHalfBits),
1915 _ => None,
1916 }
1917 }
1918}
1919#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1920#[repr(i32)]
1921pub enum ShardingMethod {
1922 Auto = 0,
1924 Custom = 1,
1926}
1927impl ShardingMethod {
1928 pub fn as_str_name(&self) -> &'static str {
1933 match self {
1934 Self::Auto => "Auto",
1935 Self::Custom => "Custom",
1936 }
1937 }
1938 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1940 match value {
1941 "Auto" => Some(Self::Auto),
1942 "Custom" => Some(Self::Custom),
1943 _ => None,
1944 }
1945 }
1946}
1947#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1948#[repr(i32)]
1949pub enum TokenizerType {
1950 Unknown = 0,
1951 Prefix = 1,
1952 Whitespace = 2,
1953 Word = 3,
1954 Multilingual = 4,
1955}
1956impl TokenizerType {
1957 pub fn as_str_name(&self) -> &'static str {
1962 match self {
1963 Self::Unknown => "Unknown",
1964 Self::Prefix => "Prefix",
1965 Self::Whitespace => "Whitespace",
1966 Self::Word => "Word",
1967 Self::Multilingual => "Multilingual",
1968 }
1969 }
1970 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1972 match value {
1973 "Unknown" => Some(Self::Unknown),
1974 "Prefix" => Some(Self::Prefix),
1975 "Whitespace" => Some(Self::Whitespace),
1976 "Word" => Some(Self::Word),
1977 "Multilingual" => Some(Self::Multilingual),
1978 _ => None,
1979 }
1980 }
1981}
1982#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1983#[repr(i32)]
1984pub enum ReplicaState {
1985 Active = 0,
1987 Dead = 1,
1989 Partial = 2,
1991 Initializing = 3,
1993 Listener = 4,
1995 PartialSnapshot = 5,
1997 Recovery = 6,
1999 Resharding = 7,
2001 ReshardingScaleDown = 8,
2003 ActiveRead = 9,
2005}
2006impl ReplicaState {
2007 pub fn as_str_name(&self) -> &'static str {
2012 match self {
2013 Self::Active => "Active",
2014 Self::Dead => "Dead",
2015 Self::Partial => "Partial",
2016 Self::Initializing => "Initializing",
2017 Self::Listener => "Listener",
2018 Self::PartialSnapshot => "PartialSnapshot",
2019 Self::Recovery => "Recovery",
2020 Self::Resharding => "Resharding",
2021 Self::ReshardingScaleDown => "ReshardingScaleDown",
2022 Self::ActiveRead => "ActiveRead",
2023 }
2024 }
2025 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2027 match value {
2028 "Active" => Some(Self::Active),
2029 "Dead" => Some(Self::Dead),
2030 "Partial" => Some(Self::Partial),
2031 "Initializing" => Some(Self::Initializing),
2032 "Listener" => Some(Self::Listener),
2033 "PartialSnapshot" => Some(Self::PartialSnapshot),
2034 "Recovery" => Some(Self::Recovery),
2035 "Resharding" => Some(Self::Resharding),
2036 "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
2037 "ActiveRead" => Some(Self::ActiveRead),
2038 _ => None,
2039 }
2040 }
2041}
2042#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2045#[repr(i32)]
2046pub enum ReshardingDirection {
2047 Up = 0,
2049 Down = 1,
2051}
2052impl ReshardingDirection {
2053 pub fn as_str_name(&self) -> &'static str {
2058 match self {
2059 Self::Up => "Up",
2060 Self::Down => "Down",
2061 }
2062 }
2063 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2065 match value {
2066 "Up" => Some(Self::Up),
2067 "Down" => Some(Self::Down),
2068 _ => None,
2069 }
2070 }
2071}
2072#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2073#[repr(i32)]
2074pub enum ShardTransferMethod {
2075 StreamRecords = 0,
2077 Snapshot = 1,
2079 WalDelta = 2,
2081 ReshardingStreamRecords = 3,
2083}
2084impl ShardTransferMethod {
2085 pub fn as_str_name(&self) -> &'static str {
2090 match self {
2091 Self::StreamRecords => "StreamRecords",
2092 Self::Snapshot => "Snapshot",
2093 Self::WalDelta => "WalDelta",
2094 Self::ReshardingStreamRecords => "ReshardingStreamRecords",
2095 }
2096 }
2097 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2099 match value {
2100 "StreamRecords" => Some(Self::StreamRecords),
2101 "Snapshot" => Some(Self::Snapshot),
2102 "WalDelta" => Some(Self::WalDelta),
2103 "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
2104 _ => None,
2105 }
2106 }
2107}
2108pub mod collections_client {
2110 #![allow(
2111 unused_variables,
2112 dead_code,
2113 missing_docs,
2114 clippy::wildcard_imports,
2115 clippy::let_unit_value,
2116 )]
2117 use tonic::codegen::*;
2118 use tonic::codegen::http::Uri;
2119 #[derive(Debug, Clone)]
2120 pub struct CollectionsClient<T> {
2121 inner: tonic::client::Grpc<T>,
2122 }
2123 impl CollectionsClient<tonic::transport::Channel> {
2124 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2126 where
2127 D: TryInto<tonic::transport::Endpoint>,
2128 D::Error: Into<StdError>,
2129 {
2130 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2131 Ok(Self::new(conn))
2132 }
2133 }
2134 impl<T> CollectionsClient<T>
2135 where
2136 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2137 T::Error: Into<StdError>,
2138 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2139 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2140 {
2141 pub fn new(inner: T) -> Self {
2142 let inner = tonic::client::Grpc::new(inner);
2143 Self { inner }
2144 }
2145 pub fn with_origin(inner: T, origin: Uri) -> Self {
2146 let inner = tonic::client::Grpc::with_origin(inner, origin);
2147 Self { inner }
2148 }
2149 pub fn with_interceptor<F>(
2150 inner: T,
2151 interceptor: F,
2152 ) -> CollectionsClient<InterceptedService<T, F>>
2153 where
2154 F: tonic::service::Interceptor,
2155 T::ResponseBody: Default,
2156 T: tonic::codegen::Service<
2157 http::Request<tonic::body::BoxBody>,
2158 Response = http::Response<
2159 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2160 >,
2161 >,
2162 <T as tonic::codegen::Service<
2163 http::Request<tonic::body::BoxBody>,
2164 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2165 {
2166 CollectionsClient::new(InterceptedService::new(inner, interceptor))
2167 }
2168 #[must_use]
2173 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2174 self.inner = self.inner.send_compressed(encoding);
2175 self
2176 }
2177 #[must_use]
2179 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2180 self.inner = self.inner.accept_compressed(encoding);
2181 self
2182 }
2183 #[must_use]
2187 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2188 self.inner = self.inner.max_decoding_message_size(limit);
2189 self
2190 }
2191 #[must_use]
2195 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2196 self.inner = self.inner.max_encoding_message_size(limit);
2197 self
2198 }
2199 pub async fn get(
2202 &mut self,
2203 request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
2204 ) -> std::result::Result<
2205 tonic::Response<super::GetCollectionInfoResponse>,
2206 tonic::Status,
2207 > {
2208 self.inner
2209 .ready()
2210 .await
2211 .map_err(|e| {
2212 tonic::Status::unknown(
2213 format!("Service was not ready: {}", e.into()),
2214 )
2215 })?;
2216 let codec = tonic::codec::ProstCodec::default();
2217 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
2218 let mut req = request.into_request();
2219 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
2220 self.inner.unary(req, path, codec).await
2221 }
2222 pub async fn list(
2225 &mut self,
2226 request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
2227 ) -> std::result::Result<
2228 tonic::Response<super::ListCollectionsResponse>,
2229 tonic::Status,
2230 > {
2231 self.inner
2232 .ready()
2233 .await
2234 .map_err(|e| {
2235 tonic::Status::unknown(
2236 format!("Service was not ready: {}", e.into()),
2237 )
2238 })?;
2239 let codec = tonic::codec::ProstCodec::default();
2240 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
2241 let mut req = request.into_request();
2242 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
2243 self.inner.unary(req, path, codec).await
2244 }
2245 pub async fn create(
2248 &mut self,
2249 request: impl tonic::IntoRequest<super::CreateCollection>,
2250 ) -> std::result::Result<
2251 tonic::Response<super::CollectionOperationResponse>,
2252 tonic::Status,
2253 > {
2254 self.inner
2255 .ready()
2256 .await
2257 .map_err(|e| {
2258 tonic::Status::unknown(
2259 format!("Service was not ready: {}", e.into()),
2260 )
2261 })?;
2262 let codec = tonic::codec::ProstCodec::default();
2263 let path = http::uri::PathAndQuery::from_static(
2264 "/qdrant.Collections/Create",
2265 );
2266 let mut req = request.into_request();
2267 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
2268 self.inner.unary(req, path, codec).await
2269 }
2270 pub async fn update(
2273 &mut self,
2274 request: impl tonic::IntoRequest<super::UpdateCollection>,
2275 ) -> std::result::Result<
2276 tonic::Response<super::CollectionOperationResponse>,
2277 tonic::Status,
2278 > {
2279 self.inner
2280 .ready()
2281 .await
2282 .map_err(|e| {
2283 tonic::Status::unknown(
2284 format!("Service was not ready: {}", e.into()),
2285 )
2286 })?;
2287 let codec = tonic::codec::ProstCodec::default();
2288 let path = http::uri::PathAndQuery::from_static(
2289 "/qdrant.Collections/Update",
2290 );
2291 let mut req = request.into_request();
2292 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
2293 self.inner.unary(req, path, codec).await
2294 }
2295 pub async fn delete(
2298 &mut self,
2299 request: impl tonic::IntoRequest<super::DeleteCollection>,
2300 ) -> std::result::Result<
2301 tonic::Response<super::CollectionOperationResponse>,
2302 tonic::Status,
2303 > {
2304 self.inner
2305 .ready()
2306 .await
2307 .map_err(|e| {
2308 tonic::Status::unknown(
2309 format!("Service was not ready: {}", e.into()),
2310 )
2311 })?;
2312 let codec = tonic::codec::ProstCodec::default();
2313 let path = http::uri::PathAndQuery::from_static(
2314 "/qdrant.Collections/Delete",
2315 );
2316 let mut req = request.into_request();
2317 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
2318 self.inner.unary(req, path, codec).await
2319 }
2320 pub async fn update_aliases(
2323 &mut self,
2324 request: impl tonic::IntoRequest<super::ChangeAliases>,
2325 ) -> std::result::Result<
2326 tonic::Response<super::CollectionOperationResponse>,
2327 tonic::Status,
2328 > {
2329 self.inner
2330 .ready()
2331 .await
2332 .map_err(|e| {
2333 tonic::Status::unknown(
2334 format!("Service was not ready: {}", e.into()),
2335 )
2336 })?;
2337 let codec = tonic::codec::ProstCodec::default();
2338 let path = http::uri::PathAndQuery::from_static(
2339 "/qdrant.Collections/UpdateAliases",
2340 );
2341 let mut req = request.into_request();
2342 req.extensions_mut()
2343 .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
2344 self.inner.unary(req, path, codec).await
2345 }
2346 pub async fn list_collection_aliases(
2349 &mut self,
2350 request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
2351 ) -> std::result::Result<
2352 tonic::Response<super::ListAliasesResponse>,
2353 tonic::Status,
2354 > {
2355 self.inner
2356 .ready()
2357 .await
2358 .map_err(|e| {
2359 tonic::Status::unknown(
2360 format!("Service was not ready: {}", e.into()),
2361 )
2362 })?;
2363 let codec = tonic::codec::ProstCodec::default();
2364 let path = http::uri::PathAndQuery::from_static(
2365 "/qdrant.Collections/ListCollectionAliases",
2366 );
2367 let mut req = request.into_request();
2368 req.extensions_mut()
2369 .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
2370 self.inner.unary(req, path, codec).await
2371 }
2372 pub async fn list_aliases(
2375 &mut self,
2376 request: impl tonic::IntoRequest<super::ListAliasesRequest>,
2377 ) -> std::result::Result<
2378 tonic::Response<super::ListAliasesResponse>,
2379 tonic::Status,
2380 > {
2381 self.inner
2382 .ready()
2383 .await
2384 .map_err(|e| {
2385 tonic::Status::unknown(
2386 format!("Service was not ready: {}", e.into()),
2387 )
2388 })?;
2389 let codec = tonic::codec::ProstCodec::default();
2390 let path = http::uri::PathAndQuery::from_static(
2391 "/qdrant.Collections/ListAliases",
2392 );
2393 let mut req = request.into_request();
2394 req.extensions_mut()
2395 .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
2396 self.inner.unary(req, path, codec).await
2397 }
2398 pub async fn collection_cluster_info(
2401 &mut self,
2402 request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
2403 ) -> std::result::Result<
2404 tonic::Response<super::CollectionClusterInfoResponse>,
2405 tonic::Status,
2406 > {
2407 self.inner
2408 .ready()
2409 .await
2410 .map_err(|e| {
2411 tonic::Status::unknown(
2412 format!("Service was not ready: {}", e.into()),
2413 )
2414 })?;
2415 let codec = tonic::codec::ProstCodec::default();
2416 let path = http::uri::PathAndQuery::from_static(
2417 "/qdrant.Collections/CollectionClusterInfo",
2418 );
2419 let mut req = request.into_request();
2420 req.extensions_mut()
2421 .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2422 self.inner.unary(req, path, codec).await
2423 }
2424 pub async fn collection_exists(
2427 &mut self,
2428 request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2429 ) -> std::result::Result<
2430 tonic::Response<super::CollectionExistsResponse>,
2431 tonic::Status,
2432 > {
2433 self.inner
2434 .ready()
2435 .await
2436 .map_err(|e| {
2437 tonic::Status::unknown(
2438 format!("Service was not ready: {}", e.into()),
2439 )
2440 })?;
2441 let codec = tonic::codec::ProstCodec::default();
2442 let path = http::uri::PathAndQuery::from_static(
2443 "/qdrant.Collections/CollectionExists",
2444 );
2445 let mut req = request.into_request();
2446 req.extensions_mut()
2447 .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2448 self.inner.unary(req, path, codec).await
2449 }
2450 pub async fn update_collection_cluster_setup(
2453 &mut self,
2454 request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2455 ) -> std::result::Result<
2456 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2457 tonic::Status,
2458 > {
2459 self.inner
2460 .ready()
2461 .await
2462 .map_err(|e| {
2463 tonic::Status::unknown(
2464 format!("Service was not ready: {}", e.into()),
2465 )
2466 })?;
2467 let codec = tonic::codec::ProstCodec::default();
2468 let path = http::uri::PathAndQuery::from_static(
2469 "/qdrant.Collections/UpdateCollectionClusterSetup",
2470 );
2471 let mut req = request.into_request();
2472 req.extensions_mut()
2473 .insert(
2474 GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2475 );
2476 self.inner.unary(req, path, codec).await
2477 }
2478 pub async fn create_shard_key(
2481 &mut self,
2482 request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2483 ) -> std::result::Result<
2484 tonic::Response<super::CreateShardKeyResponse>,
2485 tonic::Status,
2486 > {
2487 self.inner
2488 .ready()
2489 .await
2490 .map_err(|e| {
2491 tonic::Status::unknown(
2492 format!("Service was not ready: {}", e.into()),
2493 )
2494 })?;
2495 let codec = tonic::codec::ProstCodec::default();
2496 let path = http::uri::PathAndQuery::from_static(
2497 "/qdrant.Collections/CreateShardKey",
2498 );
2499 let mut req = request.into_request();
2500 req.extensions_mut()
2501 .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2502 self.inner.unary(req, path, codec).await
2503 }
2504 pub async fn delete_shard_key(
2507 &mut self,
2508 request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2509 ) -> std::result::Result<
2510 tonic::Response<super::DeleteShardKeyResponse>,
2511 tonic::Status,
2512 > {
2513 self.inner
2514 .ready()
2515 .await
2516 .map_err(|e| {
2517 tonic::Status::unknown(
2518 format!("Service was not ready: {}", e.into()),
2519 )
2520 })?;
2521 let codec = tonic::codec::ProstCodec::default();
2522 let path = http::uri::PathAndQuery::from_static(
2523 "/qdrant.Collections/DeleteShardKey",
2524 );
2525 let mut req = request.into_request();
2526 req.extensions_mut()
2527 .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2528 self.inner.unary(req, path, codec).await
2529 }
2530 }
2531}
2532pub mod collections_server {
2534 #![allow(
2535 unused_variables,
2536 dead_code,
2537 missing_docs,
2538 clippy::wildcard_imports,
2539 clippy::let_unit_value,
2540 )]
2541 use tonic::codegen::*;
2542 #[async_trait]
2544 pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
2545 async fn get(
2548 &self,
2549 request: tonic::Request<super::GetCollectionInfoRequest>,
2550 ) -> std::result::Result<
2551 tonic::Response<super::GetCollectionInfoResponse>,
2552 tonic::Status,
2553 >;
2554 async fn list(
2557 &self,
2558 request: tonic::Request<super::ListCollectionsRequest>,
2559 ) -> std::result::Result<
2560 tonic::Response<super::ListCollectionsResponse>,
2561 tonic::Status,
2562 >;
2563 async fn create(
2566 &self,
2567 request: tonic::Request<super::CreateCollection>,
2568 ) -> std::result::Result<
2569 tonic::Response<super::CollectionOperationResponse>,
2570 tonic::Status,
2571 >;
2572 async fn update(
2575 &self,
2576 request: tonic::Request<super::UpdateCollection>,
2577 ) -> std::result::Result<
2578 tonic::Response<super::CollectionOperationResponse>,
2579 tonic::Status,
2580 >;
2581 async fn delete(
2584 &self,
2585 request: tonic::Request<super::DeleteCollection>,
2586 ) -> std::result::Result<
2587 tonic::Response<super::CollectionOperationResponse>,
2588 tonic::Status,
2589 >;
2590 async fn update_aliases(
2593 &self,
2594 request: tonic::Request<super::ChangeAliases>,
2595 ) -> std::result::Result<
2596 tonic::Response<super::CollectionOperationResponse>,
2597 tonic::Status,
2598 >;
2599 async fn list_collection_aliases(
2602 &self,
2603 request: tonic::Request<super::ListCollectionAliasesRequest>,
2604 ) -> std::result::Result<
2605 tonic::Response<super::ListAliasesResponse>,
2606 tonic::Status,
2607 >;
2608 async fn list_aliases(
2611 &self,
2612 request: tonic::Request<super::ListAliasesRequest>,
2613 ) -> std::result::Result<
2614 tonic::Response<super::ListAliasesResponse>,
2615 tonic::Status,
2616 >;
2617 async fn collection_cluster_info(
2620 &self,
2621 request: tonic::Request<super::CollectionClusterInfoRequest>,
2622 ) -> std::result::Result<
2623 tonic::Response<super::CollectionClusterInfoResponse>,
2624 tonic::Status,
2625 >;
2626 async fn collection_exists(
2629 &self,
2630 request: tonic::Request<super::CollectionExistsRequest>,
2631 ) -> std::result::Result<
2632 tonic::Response<super::CollectionExistsResponse>,
2633 tonic::Status,
2634 >;
2635 async fn update_collection_cluster_setup(
2638 &self,
2639 request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
2640 ) -> std::result::Result<
2641 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2642 tonic::Status,
2643 >;
2644 async fn create_shard_key(
2647 &self,
2648 request: tonic::Request<super::CreateShardKeyRequest>,
2649 ) -> std::result::Result<
2650 tonic::Response<super::CreateShardKeyResponse>,
2651 tonic::Status,
2652 >;
2653 async fn delete_shard_key(
2656 &self,
2657 request: tonic::Request<super::DeleteShardKeyRequest>,
2658 ) -> std::result::Result<
2659 tonic::Response<super::DeleteShardKeyResponse>,
2660 tonic::Status,
2661 >;
2662 }
2663 #[derive(Debug)]
2664 pub struct CollectionsServer<T> {
2665 inner: Arc<T>,
2666 accept_compression_encodings: EnabledCompressionEncodings,
2667 send_compression_encodings: EnabledCompressionEncodings,
2668 max_decoding_message_size: Option<usize>,
2669 max_encoding_message_size: Option<usize>,
2670 }
2671 impl<T> CollectionsServer<T> {
2672 pub fn new(inner: T) -> Self {
2673 Self::from_arc(Arc::new(inner))
2674 }
2675 pub fn from_arc(inner: Arc<T>) -> Self {
2676 Self {
2677 inner,
2678 accept_compression_encodings: Default::default(),
2679 send_compression_encodings: Default::default(),
2680 max_decoding_message_size: None,
2681 max_encoding_message_size: None,
2682 }
2683 }
2684 pub fn with_interceptor<F>(
2685 inner: T,
2686 interceptor: F,
2687 ) -> InterceptedService<Self, F>
2688 where
2689 F: tonic::service::Interceptor,
2690 {
2691 InterceptedService::new(Self::new(inner), interceptor)
2692 }
2693 #[must_use]
2695 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2696 self.accept_compression_encodings.enable(encoding);
2697 self
2698 }
2699 #[must_use]
2701 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2702 self.send_compression_encodings.enable(encoding);
2703 self
2704 }
2705 #[must_use]
2709 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2710 self.max_decoding_message_size = Some(limit);
2711 self
2712 }
2713 #[must_use]
2717 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2718 self.max_encoding_message_size = Some(limit);
2719 self
2720 }
2721 }
2722 impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
2723 where
2724 T: Collections,
2725 B: Body + std::marker::Send + 'static,
2726 B::Error: Into<StdError> + std::marker::Send + 'static,
2727 {
2728 type Response = http::Response<tonic::body::BoxBody>;
2729 type Error = std::convert::Infallible;
2730 type Future = BoxFuture<Self::Response, Self::Error>;
2731 fn poll_ready(
2732 &mut self,
2733 _cx: &mut Context<'_>,
2734 ) -> Poll<std::result::Result<(), Self::Error>> {
2735 Poll::Ready(Ok(()))
2736 }
2737 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2738 match req.uri().path() {
2739 "/qdrant.Collections/Get" => {
2740 #[allow(non_camel_case_types)]
2741 struct GetSvc<T: Collections>(pub Arc<T>);
2742 impl<
2743 T: Collections,
2744 > tonic::server::UnaryService<super::GetCollectionInfoRequest>
2745 for GetSvc<T> {
2746 type Response = super::GetCollectionInfoResponse;
2747 type Future = BoxFuture<
2748 tonic::Response<Self::Response>,
2749 tonic::Status,
2750 >;
2751 fn call(
2752 &mut self,
2753 request: tonic::Request<super::GetCollectionInfoRequest>,
2754 ) -> Self::Future {
2755 let inner = Arc::clone(&self.0);
2756 let fut = async move {
2757 <T as Collections>::get(&inner, request).await
2758 };
2759 Box::pin(fut)
2760 }
2761 }
2762 let accept_compression_encodings = self.accept_compression_encodings;
2763 let send_compression_encodings = self.send_compression_encodings;
2764 let max_decoding_message_size = self.max_decoding_message_size;
2765 let max_encoding_message_size = self.max_encoding_message_size;
2766 let inner = self.inner.clone();
2767 let fut = async move {
2768 let method = GetSvc(inner);
2769 let codec = tonic::codec::ProstCodec::default();
2770 let mut grpc = tonic::server::Grpc::new(codec)
2771 .apply_compression_config(
2772 accept_compression_encodings,
2773 send_compression_encodings,
2774 )
2775 .apply_max_message_size_config(
2776 max_decoding_message_size,
2777 max_encoding_message_size,
2778 );
2779 let res = grpc.unary(method, req).await;
2780 Ok(res)
2781 };
2782 Box::pin(fut)
2783 }
2784 "/qdrant.Collections/List" => {
2785 #[allow(non_camel_case_types)]
2786 struct ListSvc<T: Collections>(pub Arc<T>);
2787 impl<
2788 T: Collections,
2789 > tonic::server::UnaryService<super::ListCollectionsRequest>
2790 for ListSvc<T> {
2791 type Response = super::ListCollectionsResponse;
2792 type Future = BoxFuture<
2793 tonic::Response<Self::Response>,
2794 tonic::Status,
2795 >;
2796 fn call(
2797 &mut self,
2798 request: tonic::Request<super::ListCollectionsRequest>,
2799 ) -> Self::Future {
2800 let inner = Arc::clone(&self.0);
2801 let fut = async move {
2802 <T as Collections>::list(&inner, request).await
2803 };
2804 Box::pin(fut)
2805 }
2806 }
2807 let accept_compression_encodings = self.accept_compression_encodings;
2808 let send_compression_encodings = self.send_compression_encodings;
2809 let max_decoding_message_size = self.max_decoding_message_size;
2810 let max_encoding_message_size = self.max_encoding_message_size;
2811 let inner = self.inner.clone();
2812 let fut = async move {
2813 let method = ListSvc(inner);
2814 let codec = tonic::codec::ProstCodec::default();
2815 let mut grpc = tonic::server::Grpc::new(codec)
2816 .apply_compression_config(
2817 accept_compression_encodings,
2818 send_compression_encodings,
2819 )
2820 .apply_max_message_size_config(
2821 max_decoding_message_size,
2822 max_encoding_message_size,
2823 );
2824 let res = grpc.unary(method, req).await;
2825 Ok(res)
2826 };
2827 Box::pin(fut)
2828 }
2829 "/qdrant.Collections/Create" => {
2830 #[allow(non_camel_case_types)]
2831 struct CreateSvc<T: Collections>(pub Arc<T>);
2832 impl<
2833 T: Collections,
2834 > tonic::server::UnaryService<super::CreateCollection>
2835 for CreateSvc<T> {
2836 type Response = super::CollectionOperationResponse;
2837 type Future = BoxFuture<
2838 tonic::Response<Self::Response>,
2839 tonic::Status,
2840 >;
2841 fn call(
2842 &mut self,
2843 request: tonic::Request<super::CreateCollection>,
2844 ) -> Self::Future {
2845 let inner = Arc::clone(&self.0);
2846 let fut = async move {
2847 <T as Collections>::create(&inner, request).await
2848 };
2849 Box::pin(fut)
2850 }
2851 }
2852 let accept_compression_encodings = self.accept_compression_encodings;
2853 let send_compression_encodings = self.send_compression_encodings;
2854 let max_decoding_message_size = self.max_decoding_message_size;
2855 let max_encoding_message_size = self.max_encoding_message_size;
2856 let inner = self.inner.clone();
2857 let fut = async move {
2858 let method = CreateSvc(inner);
2859 let codec = tonic::codec::ProstCodec::default();
2860 let mut grpc = tonic::server::Grpc::new(codec)
2861 .apply_compression_config(
2862 accept_compression_encodings,
2863 send_compression_encodings,
2864 )
2865 .apply_max_message_size_config(
2866 max_decoding_message_size,
2867 max_encoding_message_size,
2868 );
2869 let res = grpc.unary(method, req).await;
2870 Ok(res)
2871 };
2872 Box::pin(fut)
2873 }
2874 "/qdrant.Collections/Update" => {
2875 #[allow(non_camel_case_types)]
2876 struct UpdateSvc<T: Collections>(pub Arc<T>);
2877 impl<
2878 T: Collections,
2879 > tonic::server::UnaryService<super::UpdateCollection>
2880 for UpdateSvc<T> {
2881 type Response = super::CollectionOperationResponse;
2882 type Future = BoxFuture<
2883 tonic::Response<Self::Response>,
2884 tonic::Status,
2885 >;
2886 fn call(
2887 &mut self,
2888 request: tonic::Request<super::UpdateCollection>,
2889 ) -> Self::Future {
2890 let inner = Arc::clone(&self.0);
2891 let fut = async move {
2892 <T as Collections>::update(&inner, request).await
2893 };
2894 Box::pin(fut)
2895 }
2896 }
2897 let accept_compression_encodings = self.accept_compression_encodings;
2898 let send_compression_encodings = self.send_compression_encodings;
2899 let max_decoding_message_size = self.max_decoding_message_size;
2900 let max_encoding_message_size = self.max_encoding_message_size;
2901 let inner = self.inner.clone();
2902 let fut = async move {
2903 let method = UpdateSvc(inner);
2904 let codec = tonic::codec::ProstCodec::default();
2905 let mut grpc = tonic::server::Grpc::new(codec)
2906 .apply_compression_config(
2907 accept_compression_encodings,
2908 send_compression_encodings,
2909 )
2910 .apply_max_message_size_config(
2911 max_decoding_message_size,
2912 max_encoding_message_size,
2913 );
2914 let res = grpc.unary(method, req).await;
2915 Ok(res)
2916 };
2917 Box::pin(fut)
2918 }
2919 "/qdrant.Collections/Delete" => {
2920 #[allow(non_camel_case_types)]
2921 struct DeleteSvc<T: Collections>(pub Arc<T>);
2922 impl<
2923 T: Collections,
2924 > tonic::server::UnaryService<super::DeleteCollection>
2925 for DeleteSvc<T> {
2926 type Response = super::CollectionOperationResponse;
2927 type Future = BoxFuture<
2928 tonic::Response<Self::Response>,
2929 tonic::Status,
2930 >;
2931 fn call(
2932 &mut self,
2933 request: tonic::Request<super::DeleteCollection>,
2934 ) -> Self::Future {
2935 let inner = Arc::clone(&self.0);
2936 let fut = async move {
2937 <T as Collections>::delete(&inner, request).await
2938 };
2939 Box::pin(fut)
2940 }
2941 }
2942 let accept_compression_encodings = self.accept_compression_encodings;
2943 let send_compression_encodings = self.send_compression_encodings;
2944 let max_decoding_message_size = self.max_decoding_message_size;
2945 let max_encoding_message_size = self.max_encoding_message_size;
2946 let inner = self.inner.clone();
2947 let fut = async move {
2948 let method = DeleteSvc(inner);
2949 let codec = tonic::codec::ProstCodec::default();
2950 let mut grpc = tonic::server::Grpc::new(codec)
2951 .apply_compression_config(
2952 accept_compression_encodings,
2953 send_compression_encodings,
2954 )
2955 .apply_max_message_size_config(
2956 max_decoding_message_size,
2957 max_encoding_message_size,
2958 );
2959 let res = grpc.unary(method, req).await;
2960 Ok(res)
2961 };
2962 Box::pin(fut)
2963 }
2964 "/qdrant.Collections/UpdateAliases" => {
2965 #[allow(non_camel_case_types)]
2966 struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
2967 impl<
2968 T: Collections,
2969 > tonic::server::UnaryService<super::ChangeAliases>
2970 for UpdateAliasesSvc<T> {
2971 type Response = super::CollectionOperationResponse;
2972 type Future = BoxFuture<
2973 tonic::Response<Self::Response>,
2974 tonic::Status,
2975 >;
2976 fn call(
2977 &mut self,
2978 request: tonic::Request<super::ChangeAliases>,
2979 ) -> Self::Future {
2980 let inner = Arc::clone(&self.0);
2981 let fut = async move {
2982 <T as Collections>::update_aliases(&inner, request).await
2983 };
2984 Box::pin(fut)
2985 }
2986 }
2987 let accept_compression_encodings = self.accept_compression_encodings;
2988 let send_compression_encodings = self.send_compression_encodings;
2989 let max_decoding_message_size = self.max_decoding_message_size;
2990 let max_encoding_message_size = self.max_encoding_message_size;
2991 let inner = self.inner.clone();
2992 let fut = async move {
2993 let method = UpdateAliasesSvc(inner);
2994 let codec = tonic::codec::ProstCodec::default();
2995 let mut grpc = tonic::server::Grpc::new(codec)
2996 .apply_compression_config(
2997 accept_compression_encodings,
2998 send_compression_encodings,
2999 )
3000 .apply_max_message_size_config(
3001 max_decoding_message_size,
3002 max_encoding_message_size,
3003 );
3004 let res = grpc.unary(method, req).await;
3005 Ok(res)
3006 };
3007 Box::pin(fut)
3008 }
3009 "/qdrant.Collections/ListCollectionAliases" => {
3010 #[allow(non_camel_case_types)]
3011 struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
3012 impl<
3013 T: Collections,
3014 > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
3015 for ListCollectionAliasesSvc<T> {
3016 type Response = super::ListAliasesResponse;
3017 type Future = BoxFuture<
3018 tonic::Response<Self::Response>,
3019 tonic::Status,
3020 >;
3021 fn call(
3022 &mut self,
3023 request: tonic::Request<super::ListCollectionAliasesRequest>,
3024 ) -> Self::Future {
3025 let inner = Arc::clone(&self.0);
3026 let fut = async move {
3027 <T as Collections>::list_collection_aliases(&inner, request)
3028 .await
3029 };
3030 Box::pin(fut)
3031 }
3032 }
3033 let accept_compression_encodings = self.accept_compression_encodings;
3034 let send_compression_encodings = self.send_compression_encodings;
3035 let max_decoding_message_size = self.max_decoding_message_size;
3036 let max_encoding_message_size = self.max_encoding_message_size;
3037 let inner = self.inner.clone();
3038 let fut = async move {
3039 let method = ListCollectionAliasesSvc(inner);
3040 let codec = tonic::codec::ProstCodec::default();
3041 let mut grpc = tonic::server::Grpc::new(codec)
3042 .apply_compression_config(
3043 accept_compression_encodings,
3044 send_compression_encodings,
3045 )
3046 .apply_max_message_size_config(
3047 max_decoding_message_size,
3048 max_encoding_message_size,
3049 );
3050 let res = grpc.unary(method, req).await;
3051 Ok(res)
3052 };
3053 Box::pin(fut)
3054 }
3055 "/qdrant.Collections/ListAliases" => {
3056 #[allow(non_camel_case_types)]
3057 struct ListAliasesSvc<T: Collections>(pub Arc<T>);
3058 impl<
3059 T: Collections,
3060 > tonic::server::UnaryService<super::ListAliasesRequest>
3061 for ListAliasesSvc<T> {
3062 type Response = super::ListAliasesResponse;
3063 type Future = BoxFuture<
3064 tonic::Response<Self::Response>,
3065 tonic::Status,
3066 >;
3067 fn call(
3068 &mut self,
3069 request: tonic::Request<super::ListAliasesRequest>,
3070 ) -> Self::Future {
3071 let inner = Arc::clone(&self.0);
3072 let fut = async move {
3073 <T as Collections>::list_aliases(&inner, request).await
3074 };
3075 Box::pin(fut)
3076 }
3077 }
3078 let accept_compression_encodings = self.accept_compression_encodings;
3079 let send_compression_encodings = self.send_compression_encodings;
3080 let max_decoding_message_size = self.max_decoding_message_size;
3081 let max_encoding_message_size = self.max_encoding_message_size;
3082 let inner = self.inner.clone();
3083 let fut = async move {
3084 let method = ListAliasesSvc(inner);
3085 let codec = tonic::codec::ProstCodec::default();
3086 let mut grpc = tonic::server::Grpc::new(codec)
3087 .apply_compression_config(
3088 accept_compression_encodings,
3089 send_compression_encodings,
3090 )
3091 .apply_max_message_size_config(
3092 max_decoding_message_size,
3093 max_encoding_message_size,
3094 );
3095 let res = grpc.unary(method, req).await;
3096 Ok(res)
3097 };
3098 Box::pin(fut)
3099 }
3100 "/qdrant.Collections/CollectionClusterInfo" => {
3101 #[allow(non_camel_case_types)]
3102 struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
3103 impl<
3104 T: Collections,
3105 > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
3106 for CollectionClusterInfoSvc<T> {
3107 type Response = super::CollectionClusterInfoResponse;
3108 type Future = BoxFuture<
3109 tonic::Response<Self::Response>,
3110 tonic::Status,
3111 >;
3112 fn call(
3113 &mut self,
3114 request: tonic::Request<super::CollectionClusterInfoRequest>,
3115 ) -> Self::Future {
3116 let inner = Arc::clone(&self.0);
3117 let fut = async move {
3118 <T as Collections>::collection_cluster_info(&inner, request)
3119 .await
3120 };
3121 Box::pin(fut)
3122 }
3123 }
3124 let accept_compression_encodings = self.accept_compression_encodings;
3125 let send_compression_encodings = self.send_compression_encodings;
3126 let max_decoding_message_size = self.max_decoding_message_size;
3127 let max_encoding_message_size = self.max_encoding_message_size;
3128 let inner = self.inner.clone();
3129 let fut = async move {
3130 let method = CollectionClusterInfoSvc(inner);
3131 let codec = tonic::codec::ProstCodec::default();
3132 let mut grpc = tonic::server::Grpc::new(codec)
3133 .apply_compression_config(
3134 accept_compression_encodings,
3135 send_compression_encodings,
3136 )
3137 .apply_max_message_size_config(
3138 max_decoding_message_size,
3139 max_encoding_message_size,
3140 );
3141 let res = grpc.unary(method, req).await;
3142 Ok(res)
3143 };
3144 Box::pin(fut)
3145 }
3146 "/qdrant.Collections/CollectionExists" => {
3147 #[allow(non_camel_case_types)]
3148 struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
3149 impl<
3150 T: Collections,
3151 > tonic::server::UnaryService<super::CollectionExistsRequest>
3152 for CollectionExistsSvc<T> {
3153 type Response = super::CollectionExistsResponse;
3154 type Future = BoxFuture<
3155 tonic::Response<Self::Response>,
3156 tonic::Status,
3157 >;
3158 fn call(
3159 &mut self,
3160 request: tonic::Request<super::CollectionExistsRequest>,
3161 ) -> Self::Future {
3162 let inner = Arc::clone(&self.0);
3163 let fut = async move {
3164 <T as Collections>::collection_exists(&inner, request).await
3165 };
3166 Box::pin(fut)
3167 }
3168 }
3169 let accept_compression_encodings = self.accept_compression_encodings;
3170 let send_compression_encodings = self.send_compression_encodings;
3171 let max_decoding_message_size = self.max_decoding_message_size;
3172 let max_encoding_message_size = self.max_encoding_message_size;
3173 let inner = self.inner.clone();
3174 let fut = async move {
3175 let method = CollectionExistsSvc(inner);
3176 let codec = tonic::codec::ProstCodec::default();
3177 let mut grpc = tonic::server::Grpc::new(codec)
3178 .apply_compression_config(
3179 accept_compression_encodings,
3180 send_compression_encodings,
3181 )
3182 .apply_max_message_size_config(
3183 max_decoding_message_size,
3184 max_encoding_message_size,
3185 );
3186 let res = grpc.unary(method, req).await;
3187 Ok(res)
3188 };
3189 Box::pin(fut)
3190 }
3191 "/qdrant.Collections/UpdateCollectionClusterSetup" => {
3192 #[allow(non_camel_case_types)]
3193 struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
3194 impl<
3195 T: Collections,
3196 > tonic::server::UnaryService<
3197 super::UpdateCollectionClusterSetupRequest,
3198 > for UpdateCollectionClusterSetupSvc<T> {
3199 type Response = super::UpdateCollectionClusterSetupResponse;
3200 type Future = BoxFuture<
3201 tonic::Response<Self::Response>,
3202 tonic::Status,
3203 >;
3204 fn call(
3205 &mut self,
3206 request: tonic::Request<
3207 super::UpdateCollectionClusterSetupRequest,
3208 >,
3209 ) -> Self::Future {
3210 let inner = Arc::clone(&self.0);
3211 let fut = async move {
3212 <T as Collections>::update_collection_cluster_setup(
3213 &inner,
3214 request,
3215 )
3216 .await
3217 };
3218 Box::pin(fut)
3219 }
3220 }
3221 let accept_compression_encodings = self.accept_compression_encodings;
3222 let send_compression_encodings = self.send_compression_encodings;
3223 let max_decoding_message_size = self.max_decoding_message_size;
3224 let max_encoding_message_size = self.max_encoding_message_size;
3225 let inner = self.inner.clone();
3226 let fut = async move {
3227 let method = UpdateCollectionClusterSetupSvc(inner);
3228 let codec = tonic::codec::ProstCodec::default();
3229 let mut grpc = tonic::server::Grpc::new(codec)
3230 .apply_compression_config(
3231 accept_compression_encodings,
3232 send_compression_encodings,
3233 )
3234 .apply_max_message_size_config(
3235 max_decoding_message_size,
3236 max_encoding_message_size,
3237 );
3238 let res = grpc.unary(method, req).await;
3239 Ok(res)
3240 };
3241 Box::pin(fut)
3242 }
3243 "/qdrant.Collections/CreateShardKey" => {
3244 #[allow(non_camel_case_types)]
3245 struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
3246 impl<
3247 T: Collections,
3248 > tonic::server::UnaryService<super::CreateShardKeyRequest>
3249 for CreateShardKeySvc<T> {
3250 type Response = super::CreateShardKeyResponse;
3251 type Future = BoxFuture<
3252 tonic::Response<Self::Response>,
3253 tonic::Status,
3254 >;
3255 fn call(
3256 &mut self,
3257 request: tonic::Request<super::CreateShardKeyRequest>,
3258 ) -> Self::Future {
3259 let inner = Arc::clone(&self.0);
3260 let fut = async move {
3261 <T as Collections>::create_shard_key(&inner, request).await
3262 };
3263 Box::pin(fut)
3264 }
3265 }
3266 let accept_compression_encodings = self.accept_compression_encodings;
3267 let send_compression_encodings = self.send_compression_encodings;
3268 let max_decoding_message_size = self.max_decoding_message_size;
3269 let max_encoding_message_size = self.max_encoding_message_size;
3270 let inner = self.inner.clone();
3271 let fut = async move {
3272 let method = CreateShardKeySvc(inner);
3273 let codec = tonic::codec::ProstCodec::default();
3274 let mut grpc = tonic::server::Grpc::new(codec)
3275 .apply_compression_config(
3276 accept_compression_encodings,
3277 send_compression_encodings,
3278 )
3279 .apply_max_message_size_config(
3280 max_decoding_message_size,
3281 max_encoding_message_size,
3282 );
3283 let res = grpc.unary(method, req).await;
3284 Ok(res)
3285 };
3286 Box::pin(fut)
3287 }
3288 "/qdrant.Collections/DeleteShardKey" => {
3289 #[allow(non_camel_case_types)]
3290 struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
3291 impl<
3292 T: Collections,
3293 > tonic::server::UnaryService<super::DeleteShardKeyRequest>
3294 for DeleteShardKeySvc<T> {
3295 type Response = super::DeleteShardKeyResponse;
3296 type Future = BoxFuture<
3297 tonic::Response<Self::Response>,
3298 tonic::Status,
3299 >;
3300 fn call(
3301 &mut self,
3302 request: tonic::Request<super::DeleteShardKeyRequest>,
3303 ) -> Self::Future {
3304 let inner = Arc::clone(&self.0);
3305 let fut = async move {
3306 <T as Collections>::delete_shard_key(&inner, request).await
3307 };
3308 Box::pin(fut)
3309 }
3310 }
3311 let accept_compression_encodings = self.accept_compression_encodings;
3312 let send_compression_encodings = self.send_compression_encodings;
3313 let max_decoding_message_size = self.max_decoding_message_size;
3314 let max_encoding_message_size = self.max_encoding_message_size;
3315 let inner = self.inner.clone();
3316 let fut = async move {
3317 let method = DeleteShardKeySvc(inner);
3318 let codec = tonic::codec::ProstCodec::default();
3319 let mut grpc = tonic::server::Grpc::new(codec)
3320 .apply_compression_config(
3321 accept_compression_encodings,
3322 send_compression_encodings,
3323 )
3324 .apply_max_message_size_config(
3325 max_decoding_message_size,
3326 max_encoding_message_size,
3327 );
3328 let res = grpc.unary(method, req).await;
3329 Ok(res)
3330 };
3331 Box::pin(fut)
3332 }
3333 _ => {
3334 Box::pin(async move {
3335 let mut response = http::Response::new(empty_body());
3336 let headers = response.headers_mut();
3337 headers
3338 .insert(
3339 tonic::Status::GRPC_STATUS,
3340 (tonic::Code::Unimplemented as i32).into(),
3341 );
3342 headers
3343 .insert(
3344 http::header::CONTENT_TYPE,
3345 tonic::metadata::GRPC_CONTENT_TYPE,
3346 );
3347 Ok(response)
3348 })
3349 }
3350 }
3351 }
3352 }
3353 impl<T> Clone for CollectionsServer<T> {
3354 fn clone(&self) -> Self {
3355 let inner = self.inner.clone();
3356 Self {
3357 inner,
3358 accept_compression_encodings: self.accept_compression_encodings,
3359 send_compression_encodings: self.send_compression_encodings,
3360 max_decoding_message_size: self.max_decoding_message_size,
3361 max_encoding_message_size: self.max_encoding_message_size,
3362 }
3363 }
3364 }
3365 pub const SERVICE_NAME: &str = "qdrant.Collections";
3367 impl<T> tonic::server::NamedService for CollectionsServer<T> {
3368 const NAME: &'static str = SERVICE_NAME;
3369 }
3370}
3371#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3372pub struct WriteOrdering {
3373 #[prost(enumeration = "WriteOrderingType", tag = "1")]
3375 pub r#type: i32,
3376}
3377#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3378pub struct ReadConsistency {
3379 #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3380 pub value: ::core::option::Option<read_consistency::Value>,
3381}
3382pub mod read_consistency {
3384 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3385 pub enum Value {
3386 #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3388 Type(i32),
3389 #[prost(uint64, tag = "2")]
3391 Factor(u64),
3392 }
3393}
3394#[derive(Clone, PartialEq, ::prost::Message)]
3395pub struct SparseIndices {
3396 #[prost(uint32, repeated, tag = "1")]
3397 pub data: ::prost::alloc::vec::Vec<u32>,
3398}
3399#[derive(Clone, PartialEq, ::prost::Message)]
3400pub struct Document {
3401 #[prost(string, tag = "1")]
3403 pub text: ::prost::alloc::string::String,
3404 #[prost(string, tag = "3")]
3406 pub model: ::prost::alloc::string::String,
3407 #[prost(map = "string, message", tag = "4")]
3409 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3410}
3411#[derive(Clone, PartialEq, ::prost::Message)]
3412pub struct Image {
3413 #[prost(message, optional, tag = "1")]
3415 pub image: ::core::option::Option<Value>,
3416 #[prost(string, tag = "2")]
3418 pub model: ::prost::alloc::string::String,
3419 #[prost(map = "string, message", tag = "3")]
3421 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3422}
3423#[derive(Clone, PartialEq, ::prost::Message)]
3424pub struct InferenceObject {
3425 #[prost(message, optional, tag = "1")]
3427 pub object: ::core::option::Option<Value>,
3428 #[prost(string, tag = "2")]
3430 pub model: ::prost::alloc::string::String,
3431 #[prost(map = "string, message", tag = "3")]
3433 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3434}
3435#[derive(Clone, PartialEq, ::prost::Message)]
3436pub struct Vector {
3437 #[deprecated]
3439 #[prost(float, repeated, packed = "false", tag = "1")]
3440
3441 pub data: ::prost::alloc::vec::Vec<f32>,
3442 #[deprecated]
3444 #[prost(message, optional, tag = "2")]
3445 pub indices: ::core::option::Option<SparseIndices>,
3449 #[deprecated]
3451 #[prost(uint32, optional, tag = "3")]
3452 pub vectors_count: ::core::option::Option<u32>,
3456 #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3457 pub vector: ::core::option::Option<vector::Vector>,
3458}
3459pub mod vector {
3461 #[derive(Clone, PartialEq, ::prost::Oneof)]
3462 pub enum Vector {
3463 #[prost(message, tag = "101")]
3465 Dense(super::DenseVector),
3466 #[prost(message, tag = "102")]
3468 Sparse(super::SparseVector),
3469 #[prost(message, tag = "103")]
3471 MultiDense(super::MultiDenseVector),
3472 #[prost(message, tag = "104")]
3473 Document(super::Document),
3474 #[prost(message, tag = "105")]
3475 Image(super::Image),
3476 #[prost(message, tag = "106")]
3477 Object(super::InferenceObject),
3478 }
3479}
3480#[derive(Clone, PartialEq, ::prost::Message)]
3481pub struct VectorOutput {
3482 #[deprecated]
3484 #[prost(float, repeated, packed = "false", tag = "1")]
3485 pub data: ::prost::alloc::vec::Vec<f32>,
3489 #[deprecated]
3491 #[prost(message, optional, tag = "2")]
3492 pub indices: ::core::option::Option<SparseIndices>,
3496 #[deprecated]
3498 #[prost(uint32, optional, tag = "3")]
3499 pub vectors_count: ::core::option::Option<u32>,
3503 #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
3504 pub vector: ::core::option::Option<vector_output::Vector>,
3505}
3506pub mod vector_output {
3508 #[derive(Clone, PartialEq, ::prost::Oneof)]
3509 pub enum Vector {
3510 #[prost(message, tag = "101")]
3512 Dense(super::DenseVector),
3513 #[prost(message, tag = "102")]
3515 Sparse(super::SparseVector),
3516 #[prost(message, tag = "103")]
3518 MultiDense(super::MultiDenseVector),
3519 }
3520}
3521#[derive(Clone, PartialEq, ::prost::Message)]
3522pub struct DenseVector {
3523 #[prost(float, repeated, tag = "1")]
3524 pub data: ::prost::alloc::vec::Vec<f32>,
3525}
3526#[derive(Clone, PartialEq, ::prost::Message)]
3527pub struct SparseVector {
3528 #[prost(float, repeated, tag = "1")]
3529 pub values: ::prost::alloc::vec::Vec<f32>,
3530 #[prost(uint32, repeated, tag = "2")]
3531 pub indices: ::prost::alloc::vec::Vec<u32>,
3532}
3533#[derive(Clone, PartialEq, ::prost::Message)]
3534pub struct MultiDenseVector {
3535 #[prost(message, repeated, tag = "1")]
3536 pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
3537}
3538#[derive(Clone, PartialEq, ::prost::Message)]
3540pub struct VectorInput {
3541 #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
3542 pub variant: ::core::option::Option<vector_input::Variant>,
3543}
3544pub mod vector_input {
3546 #[derive(Clone, PartialEq, ::prost::Oneof)]
3547 pub enum Variant {
3548 #[prost(message, tag = "1")]
3549 Id(super::PointId),
3550 #[prost(message, tag = "2")]
3551 Dense(super::DenseVector),
3552 #[prost(message, tag = "3")]
3553 Sparse(super::SparseVector),
3554 #[prost(message, tag = "4")]
3555 MultiDense(super::MultiDenseVector),
3556 #[prost(message, tag = "5")]
3557 Document(super::Document),
3558 #[prost(message, tag = "6")]
3559 Image(super::Image),
3560 #[prost(message, tag = "7")]
3561 Object(super::InferenceObject),
3562 }
3563}
3564#[derive(Clone, PartialEq, ::prost::Message)]
3565pub struct ShardKeySelector {
3566 #[prost(message, repeated, tag = "1")]
3568 pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
3569 #[prost(message, optional, tag = "2")]
3570 pub fallback: ::core::option::Option<ShardKey>,
3571}
3572#[derive(Clone, PartialEq, ::prost::Message)]
3573pub struct UpsertPoints {
3574 #[prost(string, tag = "1")]
3576 pub collection_name: ::prost::alloc::string::String,
3577 #[prost(bool, optional, tag = "2")]
3579 pub wait: ::core::option::Option<bool>,
3580 #[prost(message, repeated, tag = "3")]
3581 pub points: ::prost::alloc::vec::Vec<PointStruct>,
3582 #[prost(message, optional, tag = "4")]
3584 pub ordering: ::core::option::Option<WriteOrdering>,
3585 #[prost(message, optional, tag = "5")]
3587 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3588 #[prost(message, optional, tag = "6")]
3590 pub update_filter: ::core::option::Option<Filter>,
3591}
3592#[derive(Clone, PartialEq, ::prost::Message)]
3593pub struct DeletePoints {
3594 #[prost(string, tag = "1")]
3596 pub collection_name: ::prost::alloc::string::String,
3597 #[prost(bool, optional, tag = "2")]
3599 pub wait: ::core::option::Option<bool>,
3600 #[prost(message, optional, tag = "3")]
3602 pub points: ::core::option::Option<PointsSelector>,
3603 #[prost(message, optional, tag = "4")]
3605 pub ordering: ::core::option::Option<WriteOrdering>,
3606 #[prost(message, optional, tag = "5")]
3608 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3609}
3610#[derive(Clone, PartialEq, ::prost::Message)]
3611pub struct GetPoints {
3612 #[prost(string, tag = "1")]
3614 pub collection_name: ::prost::alloc::string::String,
3615 #[prost(message, repeated, tag = "2")]
3617 pub ids: ::prost::alloc::vec::Vec<PointId>,
3618 #[prost(message, optional, tag = "4")]
3620 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3621 #[prost(message, optional, tag = "5")]
3623 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3624 #[prost(message, optional, tag = "6")]
3626 pub read_consistency: ::core::option::Option<ReadConsistency>,
3627 #[prost(message, optional, tag = "7")]
3629 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3630 #[prost(uint64, optional, tag = "8")]
3632 pub timeout: ::core::option::Option<u64>,
3633}
3634#[derive(Clone, PartialEq, ::prost::Message)]
3635pub struct UpdatePointVectors {
3636 #[prost(string, tag = "1")]
3638 pub collection_name: ::prost::alloc::string::String,
3639 #[prost(bool, optional, tag = "2")]
3641 pub wait: ::core::option::Option<bool>,
3642 #[prost(message, repeated, tag = "3")]
3644 pub points: ::prost::alloc::vec::Vec<PointVectors>,
3645 #[prost(message, optional, tag = "4")]
3647 pub ordering: ::core::option::Option<WriteOrdering>,
3648 #[prost(message, optional, tag = "5")]
3650 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3651 #[prost(message, optional, tag = "6")]
3653 pub update_filter: ::core::option::Option<Filter>,
3654}
3655#[derive(Clone, PartialEq, ::prost::Message)]
3656pub struct PointVectors {
3657 #[prost(message, optional, tag = "1")]
3659 pub id: ::core::option::Option<PointId>,
3660 #[prost(message, optional, tag = "2")]
3662 pub vectors: ::core::option::Option<Vectors>,
3663}
3664#[derive(Clone, PartialEq, ::prost::Message)]
3665pub struct DeletePointVectors {
3666 #[prost(string, tag = "1")]
3668 pub collection_name: ::prost::alloc::string::String,
3669 #[prost(bool, optional, tag = "2")]
3671 pub wait: ::core::option::Option<bool>,
3672 #[prost(message, optional, tag = "3")]
3674 pub points_selector: ::core::option::Option<PointsSelector>,
3675 #[prost(message, optional, tag = "4")]
3677 pub vectors: ::core::option::Option<VectorsSelector>,
3678 #[prost(message, optional, tag = "5")]
3680 pub ordering: ::core::option::Option<WriteOrdering>,
3681 #[prost(message, optional, tag = "6")]
3683 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3684}
3685#[derive(Clone, PartialEq, ::prost::Message)]
3686pub struct SetPayloadPoints {
3687 #[prost(string, tag = "1")]
3689 pub collection_name: ::prost::alloc::string::String,
3690 #[prost(bool, optional, tag = "2")]
3692 pub wait: ::core::option::Option<bool>,
3693 #[prost(map = "string, message", tag = "3")]
3695 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3696 #[prost(message, optional, tag = "5")]
3698 pub points_selector: ::core::option::Option<PointsSelector>,
3699 #[prost(message, optional, tag = "6")]
3701 pub ordering: ::core::option::Option<WriteOrdering>,
3702 #[prost(message, optional, tag = "7")]
3704 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3705 #[prost(string, optional, tag = "8")]
3707 pub key: ::core::option::Option<::prost::alloc::string::String>,
3708}
3709#[derive(Clone, PartialEq, ::prost::Message)]
3710pub struct DeletePayloadPoints {
3711 #[prost(string, tag = "1")]
3713 pub collection_name: ::prost::alloc::string::String,
3714 #[prost(bool, optional, tag = "2")]
3716 pub wait: ::core::option::Option<bool>,
3717 #[prost(string, repeated, tag = "3")]
3719 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3720 #[prost(message, optional, tag = "5")]
3722 pub points_selector: ::core::option::Option<PointsSelector>,
3723 #[prost(message, optional, tag = "6")]
3725 pub ordering: ::core::option::Option<WriteOrdering>,
3726 #[prost(message, optional, tag = "7")]
3728 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3729}
3730#[derive(Clone, PartialEq, ::prost::Message)]
3731pub struct ClearPayloadPoints {
3732 #[prost(string, tag = "1")]
3734 pub collection_name: ::prost::alloc::string::String,
3735 #[prost(bool, optional, tag = "2")]
3737 pub wait: ::core::option::Option<bool>,
3738 #[prost(message, optional, tag = "3")]
3740 pub points: ::core::option::Option<PointsSelector>,
3741 #[prost(message, optional, tag = "4")]
3743 pub ordering: ::core::option::Option<WriteOrdering>,
3744 #[prost(message, optional, tag = "5")]
3746 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3747}
3748#[derive(Clone, PartialEq, ::prost::Message)]
3749pub struct CreateFieldIndexCollection {
3750 #[prost(string, tag = "1")]
3752 pub collection_name: ::prost::alloc::string::String,
3753 #[prost(bool, optional, tag = "2")]
3755 pub wait: ::core::option::Option<bool>,
3756 #[prost(string, tag = "3")]
3758 pub field_name: ::prost::alloc::string::String,
3759 #[prost(enumeration = "FieldType", optional, tag = "4")]
3761 pub field_type: ::core::option::Option<i32>,
3762 #[prost(message, optional, tag = "5")]
3764 pub field_index_params: ::core::option::Option<PayloadIndexParams>,
3765 #[prost(message, optional, tag = "6")]
3767 pub ordering: ::core::option::Option<WriteOrdering>,
3768}
3769#[derive(Clone, PartialEq, ::prost::Message)]
3770pub struct DeleteFieldIndexCollection {
3771 #[prost(string, tag = "1")]
3773 pub collection_name: ::prost::alloc::string::String,
3774 #[prost(bool, optional, tag = "2")]
3776 pub wait: ::core::option::Option<bool>,
3777 #[prost(string, tag = "3")]
3779 pub field_name: ::prost::alloc::string::String,
3780 #[prost(message, optional, tag = "4")]
3782 pub ordering: ::core::option::Option<WriteOrdering>,
3783}
3784#[derive(Clone, PartialEq, ::prost::Message)]
3785pub struct PayloadIncludeSelector {
3786 #[prost(string, repeated, tag = "1")]
3788 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3789}
3790#[derive(Clone, PartialEq, ::prost::Message)]
3791pub struct PayloadExcludeSelector {
3792 #[prost(string, repeated, tag = "1")]
3794 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3795}
3796#[derive(Clone, PartialEq, ::prost::Message)]
3797pub struct WithPayloadSelector {
3798 #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
3799 pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
3800}
3801pub mod with_payload_selector {
3803 #[derive(Clone, PartialEq, ::prost::Oneof)]
3804 pub enum SelectorOptions {
3805 #[prost(bool, tag = "1")]
3807 Enable(bool),
3808 #[prost(message, tag = "2")]
3809 Include(super::PayloadIncludeSelector),
3810 #[prost(message, tag = "3")]
3811 Exclude(super::PayloadExcludeSelector),
3812 }
3813}
3814#[derive(Clone, PartialEq, ::prost::Message)]
3815pub struct NamedVectors {
3816 #[prost(map = "string, message", tag = "1")]
3817 pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
3818}
3819#[derive(Clone, PartialEq, ::prost::Message)]
3820pub struct NamedVectorsOutput {
3821 #[prost(map = "string, message", tag = "1")]
3822 pub vectors: ::std::collections::HashMap<
3823 ::prost::alloc::string::String,
3824 VectorOutput,
3825 >,
3826}
3827#[derive(Clone, PartialEq, ::prost::Message)]
3828pub struct Vectors {
3829 #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
3830 pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
3831}
3832pub mod vectors {
3834 #[derive(Clone, PartialEq, ::prost::Oneof)]
3835 pub enum VectorsOptions {
3836 #[prost(message, tag = "1")]
3837 Vector(super::Vector),
3838 #[prost(message, tag = "2")]
3839 Vectors(super::NamedVectors),
3840 }
3841}
3842#[derive(Clone, PartialEq, ::prost::Message)]
3843pub struct VectorsOutput {
3844 #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
3845 pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
3846}
3847pub mod vectors_output {
3849 #[derive(Clone, PartialEq, ::prost::Oneof)]
3850 pub enum VectorsOptions {
3851 #[prost(message, tag = "1")]
3852 Vector(super::VectorOutput),
3853 #[prost(message, tag = "2")]
3854 Vectors(super::NamedVectorsOutput),
3855 }
3856}
3857#[derive(Clone, PartialEq, ::prost::Message)]
3858pub struct VectorsSelector {
3859 #[prost(string, repeated, tag = "1")]
3861 pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3862}
3863#[derive(Clone, PartialEq, ::prost::Message)]
3864pub struct WithVectorsSelector {
3865 #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
3866 pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
3867}
3868pub mod with_vectors_selector {
3870 #[derive(Clone, PartialEq, ::prost::Oneof)]
3871 pub enum SelectorOptions {
3872 #[prost(bool, tag = "1")]
3874 Enable(bool),
3875 #[prost(message, tag = "2")]
3877 Include(super::VectorsSelector),
3878 }
3879}
3880#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3881pub struct QuantizationSearchParams {
3882 #[prost(bool, optional, tag = "1")]
3885 pub ignore: ::core::option::Option<bool>,
3886 #[prost(bool, optional, tag = "2")]
3889 pub rescore: ::core::option::Option<bool>,
3890 #[prost(double, optional, tag = "3")]
3899 pub oversampling: ::core::option::Option<f64>,
3900}
3901#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3902pub struct AcornSearchParams {
3903 #[prost(bool, optional, tag = "1")]
3910 pub enable: ::core::option::Option<bool>,
3911 #[prost(double, optional, tag = "2")]
3920 pub max_selectivity: ::core::option::Option<f64>,
3921}
3922#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3923pub struct SearchParams {
3924 #[prost(uint64, optional, tag = "1")]
3928 pub hnsw_ef: ::core::option::Option<u64>,
3929 #[prost(bool, optional, tag = "2")]
3932 pub exact: ::core::option::Option<bool>,
3933 #[prost(message, optional, tag = "3")]
3936 pub quantization: ::core::option::Option<QuantizationSearchParams>,
3937 #[prost(bool, optional, tag = "4")]
3942 pub indexed_only: ::core::option::Option<bool>,
3943 #[prost(message, optional, tag = "5")]
3946 pub acorn: ::core::option::Option<AcornSearchParams>,
3947}
3948#[derive(Clone, PartialEq, ::prost::Message)]
3949pub struct SearchPoints {
3950 #[prost(string, tag = "1")]
3952 pub collection_name: ::prost::alloc::string::String,
3953 #[prost(float, repeated, tag = "2")]
3955 pub vector: ::prost::alloc::vec::Vec<f32>,
3956 #[prost(message, optional, tag = "3")]
3958 pub filter: ::core::option::Option<Filter>,
3959 #[prost(uint64, tag = "4")]
3961 pub limit: u64,
3962 #[prost(message, optional, tag = "6")]
3964 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3965 #[prost(message, optional, tag = "7")]
3967 pub params: ::core::option::Option<SearchParams>,
3968 #[prost(float, optional, tag = "8")]
3970 pub score_threshold: ::core::option::Option<f32>,
3971 #[prost(uint64, optional, tag = "9")]
3973 pub offset: ::core::option::Option<u64>,
3974 #[prost(string, optional, tag = "10")]
3976 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3977 #[prost(message, optional, tag = "11")]
3979 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3980 #[prost(message, optional, tag = "12")]
3982 pub read_consistency: ::core::option::Option<ReadConsistency>,
3983 #[prost(uint64, optional, tag = "13")]
3985 pub timeout: ::core::option::Option<u64>,
3986 #[prost(message, optional, tag = "14")]
3988 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3989 #[prost(message, optional, tag = "15")]
3990 pub sparse_indices: ::core::option::Option<SparseIndices>,
3991}
3992#[derive(Clone, PartialEq, ::prost::Message)]
3993pub struct SearchBatchPoints {
3994 #[prost(string, tag = "1")]
3996 pub collection_name: ::prost::alloc::string::String,
3997 #[prost(message, repeated, tag = "2")]
3998 pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
3999 #[prost(message, optional, tag = "3")]
4001 pub read_consistency: ::core::option::Option<ReadConsistency>,
4002 #[prost(uint64, optional, tag = "4")]
4004 pub timeout: ::core::option::Option<u64>,
4005}
4006#[derive(Clone, PartialEq, ::prost::Message)]
4007pub struct WithLookup {
4008 #[prost(string, tag = "1")]
4010 pub collection: ::prost::alloc::string::String,
4011 #[prost(message, optional, tag = "2")]
4013 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4014 #[prost(message, optional, tag = "3")]
4016 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4017}
4018#[derive(Clone, PartialEq, ::prost::Message)]
4019pub struct SearchPointGroups {
4020 #[prost(string, tag = "1")]
4022 pub collection_name: ::prost::alloc::string::String,
4023 #[prost(float, repeated, tag = "2")]
4025 pub vector: ::prost::alloc::vec::Vec<f32>,
4026 #[prost(message, optional, tag = "3")]
4028 pub filter: ::core::option::Option<Filter>,
4029 #[prost(uint32, tag = "4")]
4031 pub limit: u32,
4032 #[prost(message, optional, tag = "5")]
4034 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4035 #[prost(message, optional, tag = "6")]
4037 pub params: ::core::option::Option<SearchParams>,
4038 #[prost(float, optional, tag = "7")]
4040 pub score_threshold: ::core::option::Option<f32>,
4041 #[prost(string, optional, tag = "8")]
4043 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4044 #[prost(message, optional, tag = "9")]
4046 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4047 #[prost(string, tag = "10")]
4049 pub group_by: ::prost::alloc::string::String,
4050 #[prost(uint32, tag = "11")]
4052 pub group_size: u32,
4053 #[prost(message, optional, tag = "12")]
4055 pub read_consistency: ::core::option::Option<ReadConsistency>,
4056 #[prost(message, optional, tag = "13")]
4058 pub with_lookup: ::core::option::Option<WithLookup>,
4059 #[prost(uint64, optional, tag = "14")]
4061 pub timeout: ::core::option::Option<u64>,
4062 #[prost(message, optional, tag = "15")]
4064 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4065 #[prost(message, optional, tag = "16")]
4066 pub sparse_indices: ::core::option::Option<SparseIndices>,
4067}
4068#[derive(Clone, PartialEq, ::prost::Message)]
4069pub struct StartFrom {
4070 #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
4071 pub value: ::core::option::Option<start_from::Value>,
4072}
4073pub mod start_from {
4075 #[derive(Clone, PartialEq, ::prost::Oneof)]
4076 pub enum Value {
4077 #[prost(double, tag = "1")]
4078 Float(f64),
4079 #[prost(int64, tag = "2")]
4080 Integer(i64),
4081 #[prost(message, tag = "3")]
4082 Timestamp(::prost_types::Timestamp),
4083 #[prost(string, tag = "4")]
4084 Datetime(::prost::alloc::string::String),
4085 }
4086}
4087#[derive(Clone, PartialEq, ::prost::Message)]
4088pub struct OrderBy {
4089 #[prost(string, tag = "1")]
4091 pub key: ::prost::alloc::string::String,
4092 #[prost(enumeration = "Direction", optional, tag = "2")]
4094 pub direction: ::core::option::Option<i32>,
4095 #[prost(message, optional, tag = "3")]
4097 pub start_from: ::core::option::Option<StartFrom>,
4098}
4099#[derive(Clone, PartialEq, ::prost::Message)]
4100pub struct ScrollPoints {
4101 #[prost(string, tag = "1")]
4102 pub collection_name: ::prost::alloc::string::String,
4103 #[prost(message, optional, tag = "2")]
4105 pub filter: ::core::option::Option<Filter>,
4106 #[prost(message, optional, tag = "3")]
4108 pub offset: ::core::option::Option<PointId>,
4109 #[prost(uint32, optional, tag = "4")]
4111 pub limit: ::core::option::Option<u32>,
4112 #[prost(message, optional, tag = "6")]
4114 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4115 #[prost(message, optional, tag = "7")]
4117 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4118 #[prost(message, optional, tag = "8")]
4120 pub read_consistency: ::core::option::Option<ReadConsistency>,
4121 #[prost(message, optional, tag = "9")]
4123 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4124 #[prost(message, optional, tag = "10")]
4126 pub order_by: ::core::option::Option<OrderBy>,
4127 #[prost(uint64, optional, tag = "11")]
4129 pub timeout: ::core::option::Option<u64>,
4130}
4131#[derive(Clone, PartialEq, ::prost::Message)]
4132pub struct LookupLocation {
4133 #[prost(string, tag = "1")]
4134 pub collection_name: ::prost::alloc::string::String,
4135 #[prost(string, optional, tag = "2")]
4137 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4138 #[prost(message, optional, tag = "3")]
4140 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4141}
4142#[derive(Clone, PartialEq, ::prost::Message)]
4143pub struct RecommendPoints {
4144 #[prost(string, tag = "1")]
4146 pub collection_name: ::prost::alloc::string::String,
4147 #[prost(message, repeated, tag = "2")]
4149 pub positive: ::prost::alloc::vec::Vec<PointId>,
4150 #[prost(message, repeated, tag = "3")]
4152 pub negative: ::prost::alloc::vec::Vec<PointId>,
4153 #[prost(message, optional, tag = "4")]
4155 pub filter: ::core::option::Option<Filter>,
4156 #[prost(uint64, tag = "5")]
4158 pub limit: u64,
4159 #[prost(message, optional, tag = "7")]
4161 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4162 #[prost(message, optional, tag = "8")]
4164 pub params: ::core::option::Option<SearchParams>,
4165 #[prost(float, optional, tag = "9")]
4167 pub score_threshold: ::core::option::Option<f32>,
4168 #[prost(uint64, optional, tag = "10")]
4170 pub offset: ::core::option::Option<u64>,
4171 #[prost(string, optional, tag = "11")]
4173 pub using: ::core::option::Option<::prost::alloc::string::String>,
4174 #[prost(message, optional, tag = "12")]
4176 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4177 #[prost(message, optional, tag = "13")]
4179 pub lookup_from: ::core::option::Option<LookupLocation>,
4180 #[prost(message, optional, tag = "14")]
4182 pub read_consistency: ::core::option::Option<ReadConsistency>,
4183 #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
4185 pub strategy: ::core::option::Option<i32>,
4186 #[prost(message, repeated, tag = "17")]
4188 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4189 #[prost(message, repeated, tag = "18")]
4191 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4192 #[prost(uint64, optional, tag = "19")]
4194 pub timeout: ::core::option::Option<u64>,
4195 #[prost(message, optional, tag = "20")]
4197 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4198}
4199#[derive(Clone, PartialEq, ::prost::Message)]
4200pub struct RecommendBatchPoints {
4201 #[prost(string, tag = "1")]
4203 pub collection_name: ::prost::alloc::string::String,
4204 #[prost(message, repeated, tag = "2")]
4205 pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
4206 #[prost(message, optional, tag = "3")]
4208 pub read_consistency: ::core::option::Option<ReadConsistency>,
4209 #[prost(uint64, optional, tag = "4")]
4211 pub timeout: ::core::option::Option<u64>,
4212}
4213#[derive(Clone, PartialEq, ::prost::Message)]
4214pub struct RecommendPointGroups {
4215 #[prost(string, tag = "1")]
4217 pub collection_name: ::prost::alloc::string::String,
4218 #[prost(message, repeated, tag = "2")]
4220 pub positive: ::prost::alloc::vec::Vec<PointId>,
4221 #[prost(message, repeated, tag = "3")]
4223 pub negative: ::prost::alloc::vec::Vec<PointId>,
4224 #[prost(message, optional, tag = "4")]
4226 pub filter: ::core::option::Option<Filter>,
4227 #[prost(uint32, tag = "5")]
4229 pub limit: u32,
4230 #[prost(message, optional, tag = "6")]
4232 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4233 #[prost(message, optional, tag = "7")]
4235 pub params: ::core::option::Option<SearchParams>,
4236 #[prost(float, optional, tag = "8")]
4238 pub score_threshold: ::core::option::Option<f32>,
4239 #[prost(string, optional, tag = "9")]
4241 pub using: ::core::option::Option<::prost::alloc::string::String>,
4242 #[prost(message, optional, tag = "10")]
4244 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4245 #[prost(message, optional, tag = "11")]
4247 pub lookup_from: ::core::option::Option<LookupLocation>,
4248 #[prost(string, tag = "12")]
4250 pub group_by: ::prost::alloc::string::String,
4251 #[prost(uint32, tag = "13")]
4253 pub group_size: u32,
4254 #[prost(message, optional, tag = "14")]
4256 pub read_consistency: ::core::option::Option<ReadConsistency>,
4257 #[prost(message, optional, tag = "15")]
4259 pub with_lookup: ::core::option::Option<WithLookup>,
4260 #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
4262 pub strategy: ::core::option::Option<i32>,
4263 #[prost(message, repeated, tag = "18")]
4265 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4266 #[prost(message, repeated, tag = "19")]
4268 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4269 #[prost(uint64, optional, tag = "20")]
4271 pub timeout: ::core::option::Option<u64>,
4272 #[prost(message, optional, tag = "21")]
4274 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4275}
4276#[derive(Clone, PartialEq, ::prost::Message)]
4277pub struct TargetVector {
4278 #[prost(oneof = "target_vector::Target", tags = "1")]
4279 pub target: ::core::option::Option<target_vector::Target>,
4280}
4281pub mod target_vector {
4283 #[derive(Clone, PartialEq, ::prost::Oneof)]
4284 pub enum Target {
4285 #[prost(message, tag = "1")]
4286 Single(super::VectorExample),
4287 }
4288}
4289#[derive(Clone, PartialEq, ::prost::Message)]
4290pub struct VectorExample {
4291 #[prost(oneof = "vector_example::Example", tags = "1, 2")]
4292 pub example: ::core::option::Option<vector_example::Example>,
4293}
4294pub mod vector_example {
4296 #[derive(Clone, PartialEq, ::prost::Oneof)]
4297 pub enum Example {
4298 #[prost(message, tag = "1")]
4299 Id(super::PointId),
4300 #[prost(message, tag = "2")]
4301 Vector(super::Vector),
4302 }
4303}
4304#[derive(Clone, PartialEq, ::prost::Message)]
4305pub struct ContextExamplePair {
4306 #[prost(message, optional, tag = "1")]
4307 pub positive: ::core::option::Option<VectorExample>,
4308 #[prost(message, optional, tag = "2")]
4309 pub negative: ::core::option::Option<VectorExample>,
4310}
4311#[derive(Clone, PartialEq, ::prost::Message)]
4312pub struct DiscoverPoints {
4313 #[prost(string, tag = "1")]
4315 pub collection_name: ::prost::alloc::string::String,
4316 #[prost(message, optional, tag = "2")]
4318 pub target: ::core::option::Option<TargetVector>,
4319 #[prost(message, repeated, tag = "3")]
4321 pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
4322 #[prost(message, optional, tag = "4")]
4324 pub filter: ::core::option::Option<Filter>,
4325 #[prost(uint64, tag = "5")]
4327 pub limit: u64,
4328 #[prost(message, optional, tag = "6")]
4330 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4331 #[prost(message, optional, tag = "7")]
4333 pub params: ::core::option::Option<SearchParams>,
4334 #[prost(uint64, optional, tag = "8")]
4336 pub offset: ::core::option::Option<u64>,
4337 #[prost(string, optional, tag = "9")]
4339 pub using: ::core::option::Option<::prost::alloc::string::String>,
4340 #[prost(message, optional, tag = "10")]
4342 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4343 #[prost(message, optional, tag = "11")]
4345 pub lookup_from: ::core::option::Option<LookupLocation>,
4346 #[prost(message, optional, tag = "12")]
4348 pub read_consistency: ::core::option::Option<ReadConsistency>,
4349 #[prost(uint64, optional, tag = "13")]
4351 pub timeout: ::core::option::Option<u64>,
4352 #[prost(message, optional, tag = "14")]
4354 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4355}
4356#[derive(Clone, PartialEq, ::prost::Message)]
4357pub struct DiscoverBatchPoints {
4358 #[prost(string, tag = "1")]
4360 pub collection_name: ::prost::alloc::string::String,
4361 #[prost(message, repeated, tag = "2")]
4362 pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
4363 #[prost(message, optional, tag = "3")]
4365 pub read_consistency: ::core::option::Option<ReadConsistency>,
4366 #[prost(uint64, optional, tag = "4")]
4368 pub timeout: ::core::option::Option<u64>,
4369}
4370#[derive(Clone, PartialEq, ::prost::Message)]
4371pub struct CountPoints {
4372 #[prost(string, tag = "1")]
4374 pub collection_name: ::prost::alloc::string::String,
4375 #[prost(message, optional, tag = "2")]
4377 pub filter: ::core::option::Option<Filter>,
4378 #[prost(bool, optional, tag = "3")]
4380 pub exact: ::core::option::Option<bool>,
4381 #[prost(message, optional, tag = "4")]
4383 pub read_consistency: ::core::option::Option<ReadConsistency>,
4384 #[prost(message, optional, tag = "5")]
4386 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4387 #[prost(uint64, optional, tag = "6")]
4389 pub timeout: ::core::option::Option<u64>,
4390}
4391#[derive(Clone, PartialEq, ::prost::Message)]
4392pub struct RecommendInput {
4393 #[prost(message, repeated, tag = "1")]
4395 pub positive: ::prost::alloc::vec::Vec<VectorInput>,
4396 #[prost(message, repeated, tag = "2")]
4398 pub negative: ::prost::alloc::vec::Vec<VectorInput>,
4399 #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
4401 pub strategy: ::core::option::Option<i32>,
4402}
4403#[derive(Clone, PartialEq, ::prost::Message)]
4404pub struct ContextInputPair {
4405 #[prost(message, optional, tag = "1")]
4407 pub positive: ::core::option::Option<VectorInput>,
4408 #[prost(message, optional, tag = "2")]
4410 pub negative: ::core::option::Option<VectorInput>,
4411}
4412#[derive(Clone, PartialEq, ::prost::Message)]
4413pub struct DiscoverInput {
4414 #[prost(message, optional, tag = "1")]
4416 pub target: ::core::option::Option<VectorInput>,
4417 #[prost(message, optional, tag = "2")]
4419 pub context: ::core::option::Option<ContextInput>,
4420}
4421#[derive(Clone, PartialEq, ::prost::Message)]
4422pub struct ContextInput {
4423 #[prost(message, repeated, tag = "1")]
4425 pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
4426}
4427#[derive(Clone, PartialEq, ::prost::Message)]
4428pub struct Formula {
4429 #[prost(message, optional, tag = "1")]
4430 pub expression: ::core::option::Option<Expression>,
4431 #[prost(map = "string, message", tag = "2")]
4432 pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4433}
4434#[derive(Clone, PartialEq, ::prost::Message)]
4435pub struct Expression {
4436 #[prost(
4437 oneof = "expression::Variant",
4438 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
4439 )]
4440 pub variant: ::core::option::Option<expression::Variant>,
4441}
4442pub mod expression {
4444 #[derive(Clone, PartialEq, ::prost::Oneof)]
4445 pub enum Variant {
4446 #[prost(float, tag = "1")]
4447 Constant(f32),
4448 #[prost(string, tag = "2")]
4450 Variable(::prost::alloc::string::String),
4451 #[prost(message, tag = "3")]
4453 Condition(super::Condition),
4454 #[prost(message, tag = "4")]
4456 GeoDistance(super::GeoDistance),
4457 #[prost(string, tag = "5")]
4459 Datetime(::prost::alloc::string::String),
4460 #[prost(string, tag = "6")]
4462 DatetimeKey(::prost::alloc::string::String),
4463 #[prost(message, tag = "7")]
4465 Mult(super::MultExpression),
4466 #[prost(message, tag = "8")]
4468 Sum(super::SumExpression),
4469 #[prost(message, tag = "9")]
4471 Div(::prost::alloc::boxed::Box<super::DivExpression>),
4472 #[prost(message, tag = "10")]
4474 Neg(::prost::alloc::boxed::Box<super::Expression>),
4475 #[prost(message, tag = "11")]
4477 Abs(::prost::alloc::boxed::Box<super::Expression>),
4478 #[prost(message, tag = "12")]
4480 Sqrt(::prost::alloc::boxed::Box<super::Expression>),
4481 #[prost(message, tag = "13")]
4483 Pow(::prost::alloc::boxed::Box<super::PowExpression>),
4484 #[prost(message, tag = "14")]
4486 Exp(::prost::alloc::boxed::Box<super::Expression>),
4487 #[prost(message, tag = "15")]
4489 Log10(::prost::alloc::boxed::Box<super::Expression>),
4490 #[prost(message, tag = "16")]
4492 Ln(::prost::alloc::boxed::Box<super::Expression>),
4493 #[prost(message, tag = "17")]
4495 ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4496 #[prost(message, tag = "18")]
4498 GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4499 #[prost(message, tag = "19")]
4501 LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4502 }
4503}
4504#[derive(Clone, PartialEq, ::prost::Message)]
4505pub struct GeoDistance {
4506 #[prost(message, optional, tag = "1")]
4507 pub origin: ::core::option::Option<GeoPoint>,
4508 #[prost(string, tag = "2")]
4509 pub to: ::prost::alloc::string::String,
4510}
4511#[derive(Clone, PartialEq, ::prost::Message)]
4512pub struct MultExpression {
4513 #[prost(message, repeated, tag = "1")]
4514 pub mult: ::prost::alloc::vec::Vec<Expression>,
4515}
4516#[derive(Clone, PartialEq, ::prost::Message)]
4517pub struct SumExpression {
4518 #[prost(message, repeated, tag = "1")]
4519 pub sum: ::prost::alloc::vec::Vec<Expression>,
4520}
4521#[derive(Clone, PartialEq, ::prost::Message)]
4522pub struct DivExpression {
4523 #[prost(message, optional, boxed, tag = "1")]
4524 pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4525 #[prost(message, optional, boxed, tag = "2")]
4526 pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4527 #[prost(float, optional, tag = "3")]
4528 pub by_zero_default: ::core::option::Option<f32>,
4529}
4530#[derive(Clone, PartialEq, ::prost::Message)]
4531pub struct PowExpression {
4532 #[prost(message, optional, boxed, tag = "1")]
4533 pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4534 #[prost(message, optional, boxed, tag = "2")]
4535 pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4536}
4537#[derive(Clone, PartialEq, ::prost::Message)]
4538pub struct DecayParamsExpression {
4539 #[prost(message, optional, boxed, tag = "1")]
4541 pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4542 #[prost(message, optional, boxed, tag = "2")]
4544 pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4545 #[prost(float, optional, tag = "3")]
4547 pub scale: ::core::option::Option<f32>,
4548 #[prost(float, optional, tag = "4")]
4550 pub midpoint: ::core::option::Option<f32>,
4551}
4552#[derive(Clone, PartialEq, ::prost::Message)]
4553pub struct NearestInputWithMmr {
4554 #[prost(message, optional, tag = "1")]
4556 pub nearest: ::core::option::Option<VectorInput>,
4557 #[prost(message, optional, tag = "2")]
4560 pub mmr: ::core::option::Option<Mmr>,
4561}
4562#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4564pub struct Mmr {
4565 #[prost(float, optional, tag = "2")]
4574 pub diversity: ::core::option::Option<f32>,
4575 #[prost(uint32, optional, tag = "3")]
4579 pub candidates_limit: ::core::option::Option<u32>,
4580}
4581#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4583pub struct Rrf {
4584 #[prost(uint32, optional, tag = "1")]
4586 pub k: ::core::option::Option<u32>,
4587}
4588#[derive(Clone, PartialEq, ::prost::Message)]
4589pub struct Query {
4590 #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
4591 pub variant: ::core::option::Option<query::Variant>,
4592}
4593pub mod query {
4595 #[derive(Clone, PartialEq, ::prost::Oneof)]
4596 pub enum Variant {
4597 #[prost(message, tag = "1")]
4599 Nearest(super::VectorInput),
4600 #[prost(message, tag = "2")]
4602 Recommend(super::RecommendInput),
4603 #[prost(message, tag = "3")]
4605 Discover(super::DiscoverInput),
4606 #[prost(message, tag = "4")]
4608 Context(super::ContextInput),
4609 #[prost(message, tag = "5")]
4611 OrderBy(super::OrderBy),
4612 #[prost(enumeration = "super::Fusion", tag = "6")]
4614 Fusion(i32),
4615 #[prost(enumeration = "super::Sample", tag = "7")]
4617 Sample(i32),
4618 #[prost(message, tag = "8")]
4620 Formula(super::Formula),
4621 #[prost(message, tag = "9")]
4623 NearestWithMmr(super::NearestInputWithMmr),
4624 #[prost(message, tag = "10")]
4626 Rrf(super::Rrf),
4627 }
4628}
4629#[derive(Clone, PartialEq, ::prost::Message)]
4630pub struct PrefetchQuery {
4631 #[prost(message, repeated, tag = "1")]
4633 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4634 #[prost(message, optional, tag = "2")]
4636 pub query: ::core::option::Option<Query>,
4637 #[prost(string, optional, tag = "3")]
4639 pub using: ::core::option::Option<::prost::alloc::string::String>,
4640 #[prost(message, optional, tag = "4")]
4642 pub filter: ::core::option::Option<Filter>,
4643 #[prost(message, optional, tag = "5")]
4645 pub params: ::core::option::Option<SearchParams>,
4646 #[prost(float, optional, tag = "6")]
4648 pub score_threshold: ::core::option::Option<f32>,
4649 #[prost(uint64, optional, tag = "7")]
4651 pub limit: ::core::option::Option<u64>,
4652 #[prost(message, optional, tag = "8")]
4654 pub lookup_from: ::core::option::Option<LookupLocation>,
4655}
4656#[derive(Clone, PartialEq, ::prost::Message)]
4657pub struct QueryPoints {
4658 #[prost(string, tag = "1")]
4660 pub collection_name: ::prost::alloc::string::String,
4661 #[prost(message, repeated, tag = "2")]
4663 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4664 #[prost(message, optional, tag = "3")]
4666 pub query: ::core::option::Option<Query>,
4667 #[prost(string, optional, tag = "4")]
4669 pub using: ::core::option::Option<::prost::alloc::string::String>,
4670 #[prost(message, optional, tag = "5")]
4672 pub filter: ::core::option::Option<Filter>,
4673 #[prost(message, optional, tag = "6")]
4675 pub params: ::core::option::Option<SearchParams>,
4676 #[prost(float, optional, tag = "7")]
4678 pub score_threshold: ::core::option::Option<f32>,
4679 #[prost(uint64, optional, tag = "8")]
4681 pub limit: ::core::option::Option<u64>,
4682 #[prost(uint64, optional, tag = "9")]
4684 pub offset: ::core::option::Option<u64>,
4685 #[prost(message, optional, tag = "10")]
4687 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4688 #[prost(message, optional, tag = "11")]
4690 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4691 #[prost(message, optional, tag = "12")]
4693 pub read_consistency: ::core::option::Option<ReadConsistency>,
4694 #[prost(message, optional, tag = "13")]
4696 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4697 #[prost(message, optional, tag = "14")]
4699 pub lookup_from: ::core::option::Option<LookupLocation>,
4700 #[prost(uint64, optional, tag = "15")]
4702 pub timeout: ::core::option::Option<u64>,
4703}
4704#[derive(Clone, PartialEq, ::prost::Message)]
4705pub struct QueryBatchPoints {
4706 #[prost(string, tag = "1")]
4707 pub collection_name: ::prost::alloc::string::String,
4708 #[prost(message, repeated, tag = "2")]
4709 pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
4710 #[prost(message, optional, tag = "3")]
4712 pub read_consistency: ::core::option::Option<ReadConsistency>,
4713 #[prost(uint64, optional, tag = "4")]
4715 pub timeout: ::core::option::Option<u64>,
4716}
4717#[derive(Clone, PartialEq, ::prost::Message)]
4718pub struct QueryPointGroups {
4719 #[prost(string, tag = "1")]
4721 pub collection_name: ::prost::alloc::string::String,
4722 #[prost(message, repeated, tag = "2")]
4724 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4725 #[prost(message, optional, tag = "3")]
4727 pub query: ::core::option::Option<Query>,
4728 #[prost(string, optional, tag = "4")]
4730 pub using: ::core::option::Option<::prost::alloc::string::String>,
4731 #[prost(message, optional, tag = "5")]
4733 pub filter: ::core::option::Option<Filter>,
4734 #[prost(message, optional, tag = "6")]
4736 pub params: ::core::option::Option<SearchParams>,
4737 #[prost(float, optional, tag = "7")]
4739 pub score_threshold: ::core::option::Option<f32>,
4740 #[prost(message, optional, tag = "8")]
4742 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4743 #[prost(message, optional, tag = "9")]
4745 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4746 #[prost(message, optional, tag = "10")]
4748 pub lookup_from: ::core::option::Option<LookupLocation>,
4749 #[prost(uint64, optional, tag = "11")]
4751 pub limit: ::core::option::Option<u64>,
4752 #[prost(uint64, optional, tag = "12")]
4754 pub group_size: ::core::option::Option<u64>,
4755 #[prost(string, tag = "13")]
4757 pub group_by: ::prost::alloc::string::String,
4758 #[prost(message, optional, tag = "14")]
4760 pub read_consistency: ::core::option::Option<ReadConsistency>,
4761 #[prost(message, optional, tag = "15")]
4763 pub with_lookup: ::core::option::Option<WithLookup>,
4764 #[prost(uint64, optional, tag = "16")]
4766 pub timeout: ::core::option::Option<u64>,
4767 #[prost(message, optional, tag = "17")]
4769 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4770}
4771#[derive(Clone, PartialEq, ::prost::Message)]
4772pub struct FacetCounts {
4773 #[prost(string, tag = "1")]
4775 pub collection_name: ::prost::alloc::string::String,
4776 #[prost(string, tag = "2")]
4778 pub key: ::prost::alloc::string::String,
4779 #[prost(message, optional, tag = "3")]
4781 pub filter: ::core::option::Option<Filter>,
4782 #[prost(uint64, optional, tag = "4")]
4784 pub limit: ::core::option::Option<u64>,
4785 #[prost(bool, optional, tag = "5")]
4787 pub exact: ::core::option::Option<bool>,
4788 #[prost(uint64, optional, tag = "6")]
4790 pub timeout: ::core::option::Option<u64>,
4791 #[prost(message, optional, tag = "7")]
4793 pub read_consistency: ::core::option::Option<ReadConsistency>,
4794 #[prost(message, optional, tag = "8")]
4796 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4797}
4798#[derive(Clone, PartialEq, ::prost::Message)]
4799pub struct FacetValue {
4800 #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
4801 pub variant: ::core::option::Option<facet_value::Variant>,
4802}
4803pub mod facet_value {
4805 #[derive(Clone, PartialEq, ::prost::Oneof)]
4806 pub enum Variant {
4807 #[prost(string, tag = "1")]
4809 StringValue(::prost::alloc::string::String),
4810 #[prost(int64, tag = "2")]
4812 IntegerValue(i64),
4813 #[prost(bool, tag = "3")]
4815 BoolValue(bool),
4816 }
4817}
4818#[derive(Clone, PartialEq, ::prost::Message)]
4819pub struct FacetHit {
4820 #[prost(message, optional, tag = "1")]
4822 pub value: ::core::option::Option<FacetValue>,
4823 #[prost(uint64, tag = "2")]
4825 pub count: u64,
4826}
4827#[derive(Clone, PartialEq, ::prost::Message)]
4828pub struct SearchMatrixPoints {
4829 #[prost(string, tag = "1")]
4831 pub collection_name: ::prost::alloc::string::String,
4832 #[prost(message, optional, tag = "2")]
4834 pub filter: ::core::option::Option<Filter>,
4835 #[prost(uint64, optional, tag = "3")]
4837 pub sample: ::core::option::Option<u64>,
4838 #[prost(uint64, optional, tag = "4")]
4840 pub limit: ::core::option::Option<u64>,
4841 #[prost(string, optional, tag = "5")]
4843 pub using: ::core::option::Option<::prost::alloc::string::String>,
4844 #[prost(uint64, optional, tag = "6")]
4846 pub timeout: ::core::option::Option<u64>,
4847 #[prost(message, optional, tag = "7")]
4849 pub read_consistency: ::core::option::Option<ReadConsistency>,
4850 #[prost(message, optional, tag = "8")]
4852 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4853}
4854#[derive(Clone, PartialEq, ::prost::Message)]
4855pub struct SearchMatrixPairs {
4856 #[prost(message, repeated, tag = "1")]
4858 pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
4859}
4860#[derive(Clone, PartialEq, ::prost::Message)]
4861pub struct SearchMatrixPair {
4862 #[prost(message, optional, tag = "1")]
4864 pub a: ::core::option::Option<PointId>,
4865 #[prost(message, optional, tag = "2")]
4867 pub b: ::core::option::Option<PointId>,
4868 #[prost(float, tag = "3")]
4870 pub score: f32,
4871}
4872#[derive(Clone, PartialEq, ::prost::Message)]
4873pub struct SearchMatrixOffsets {
4874 #[prost(uint64, repeated, tag = "1")]
4876 pub offsets_row: ::prost::alloc::vec::Vec<u64>,
4877 #[prost(uint64, repeated, tag = "2")]
4879 pub offsets_col: ::prost::alloc::vec::Vec<u64>,
4880 #[prost(float, repeated, tag = "3")]
4882 pub scores: ::prost::alloc::vec::Vec<f32>,
4883 #[prost(message, repeated, tag = "4")]
4885 pub ids: ::prost::alloc::vec::Vec<PointId>,
4886}
4887#[derive(Clone, PartialEq, ::prost::Message)]
4888pub struct PointsUpdateOperation {
4889 #[prost(
4890 oneof = "points_update_operation::Operation",
4891 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
4892 )]
4893 pub operation: ::core::option::Option<points_update_operation::Operation>,
4894}
4895pub mod points_update_operation {
4897 #[derive(Clone, PartialEq, ::prost::Message)]
4898 pub struct PointStructList {
4899 #[prost(message, repeated, tag = "1")]
4900 pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
4901 #[prost(message, optional, tag = "2")]
4903 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4904 #[prost(message, optional, tag = "3")]
4906 pub update_filter: ::core::option::Option<super::Filter>,
4907 }
4908 #[derive(Clone, PartialEq, ::prost::Message)]
4909 pub struct SetPayload {
4910 #[prost(map = "string, message", tag = "1")]
4911 pub payload: ::std::collections::HashMap<
4912 ::prost::alloc::string::String,
4913 super::Value,
4914 >,
4915 #[prost(message, optional, tag = "2")]
4917 pub points_selector: ::core::option::Option<super::PointsSelector>,
4918 #[prost(message, optional, tag = "3")]
4920 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4921 #[prost(string, optional, tag = "4")]
4923 pub key: ::core::option::Option<::prost::alloc::string::String>,
4924 }
4925 #[derive(Clone, PartialEq, ::prost::Message)]
4926 pub struct OverwritePayload {
4927 #[prost(map = "string, message", tag = "1")]
4928 pub payload: ::std::collections::HashMap<
4929 ::prost::alloc::string::String,
4930 super::Value,
4931 >,
4932 #[prost(message, optional, tag = "2")]
4934 pub points_selector: ::core::option::Option<super::PointsSelector>,
4935 #[prost(message, optional, tag = "3")]
4937 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4938 #[prost(string, optional, tag = "4")]
4940 pub key: ::core::option::Option<::prost::alloc::string::String>,
4941 }
4942 #[derive(Clone, PartialEq, ::prost::Message)]
4943 pub struct DeletePayload {
4944 #[prost(string, repeated, tag = "1")]
4945 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4946 #[prost(message, optional, tag = "2")]
4948 pub points_selector: ::core::option::Option<super::PointsSelector>,
4949 #[prost(message, optional, tag = "3")]
4951 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4952 }
4953 #[derive(Clone, PartialEq, ::prost::Message)]
4954 pub struct UpdateVectors {
4955 #[prost(message, repeated, tag = "1")]
4957 pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
4958 #[prost(message, optional, tag = "2")]
4960 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4961 #[prost(message, optional, tag = "3")]
4963 pub update_filter: ::core::option::Option<super::Filter>,
4964 }
4965 #[derive(Clone, PartialEq, ::prost::Message)]
4966 pub struct DeleteVectors {
4967 #[prost(message, optional, tag = "1")]
4969 pub points_selector: ::core::option::Option<super::PointsSelector>,
4970 #[prost(message, optional, tag = "2")]
4972 pub vectors: ::core::option::Option<super::VectorsSelector>,
4973 #[prost(message, optional, tag = "3")]
4975 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4976 }
4977 #[derive(Clone, PartialEq, ::prost::Message)]
4978 pub struct DeletePoints {
4979 #[prost(message, optional, tag = "1")]
4981 pub points: ::core::option::Option<super::PointsSelector>,
4982 #[prost(message, optional, tag = "2")]
4984 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4985 }
4986 #[derive(Clone, PartialEq, ::prost::Message)]
4987 pub struct ClearPayload {
4988 #[prost(message, optional, tag = "1")]
4990 pub points: ::core::option::Option<super::PointsSelector>,
4991 #[prost(message, optional, tag = "2")]
4993 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4994 }
4995 #[derive(Clone, PartialEq, ::prost::Oneof)]
4996 pub enum Operation {
4997 #[prost(message, tag = "1")]
4998 Upsert(PointStructList),
4999 #[prost(message, tag = "2")]
5000 #[deprecated(since = "1.7.0", note = "use `DeletePoints` instead")]
5001 DeleteDeprecated(super::PointsSelector),
5002 #[prost(message, tag = "3")]
5003 SetPayload(SetPayload),
5004 #[prost(message, tag = "4")]
5005 OverwritePayload(OverwritePayload),
5006 #[prost(message, tag = "5")]
5007 DeletePayload(DeletePayload),
5008 #[prost(message, tag = "6")]
5009 #[deprecated(since = "1.7.0", note = "use `ClearPayload` instead")]
5010 ClearPayloadDeprecated(super::PointsSelector),
5011 #[prost(message, tag = "7")]
5012 UpdateVectors(UpdateVectors),
5013 #[prost(message, tag = "8")]
5014 DeleteVectors(DeleteVectors),
5015 #[prost(message, tag = "9")]
5016 DeletePoints(DeletePoints),
5017 #[prost(message, tag = "10")]
5018 ClearPayload(ClearPayload),
5019 }
5020}
5021#[derive(Clone, PartialEq, ::prost::Message)]
5022pub struct UpdateBatchPoints {
5023 #[prost(string, tag = "1")]
5025 pub collection_name: ::prost::alloc::string::String,
5026 #[prost(bool, optional, tag = "2")]
5028 pub wait: ::core::option::Option<bool>,
5029 #[prost(message, repeated, tag = "3")]
5030 pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
5031 #[prost(message, optional, tag = "4")]
5033 pub ordering: ::core::option::Option<WriteOrdering>,
5034}
5035#[derive(Clone, PartialEq, ::prost::Message)]
5036pub struct PointsOperationResponse {
5037 #[prost(message, optional, tag = "1")]
5038 pub result: ::core::option::Option<UpdateResult>,
5039 #[prost(double, tag = "2")]
5041 pub time: f64,
5042 #[prost(message, optional, tag = "3")]
5043 pub usage: ::core::option::Option<Usage>,
5044}
5045#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5046pub struct UpdateResult {
5047 #[prost(uint64, optional, tag = "1")]
5049 pub operation_id: ::core::option::Option<u64>,
5050 #[prost(enumeration = "UpdateStatus", tag = "2")]
5052 pub status: i32,
5053}
5054#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5055pub struct OrderValue {
5056 #[prost(oneof = "order_value::Variant", tags = "1, 2")]
5057 pub variant: ::core::option::Option<order_value::Variant>,
5058}
5059pub mod order_value {
5061 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5062 pub enum Variant {
5063 #[prost(int64, tag = "1")]
5064 Int(i64),
5065 #[prost(double, tag = "2")]
5066 Float(f64),
5067 }
5068}
5069#[derive(Clone, PartialEq, ::prost::Message)]
5070pub struct ScoredPoint {
5071 #[prost(message, optional, tag = "1")]
5073 pub id: ::core::option::Option<PointId>,
5074 #[prost(map = "string, message", tag = "2")]
5076 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5077 #[prost(float, tag = "3")]
5079 pub score: f32,
5080 #[prost(uint64, tag = "5")]
5082 pub version: u64,
5083 #[prost(message, optional, tag = "6")]
5085 pub vectors: ::core::option::Option<VectorsOutput>,
5086 #[prost(message, optional, tag = "7")]
5088 pub shard_key: ::core::option::Option<ShardKey>,
5089 #[prost(message, optional, tag = "8")]
5091 pub order_value: ::core::option::Option<OrderValue>,
5092}
5093#[derive(Clone, PartialEq, ::prost::Message)]
5094pub struct GroupId {
5095 #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
5096 pub kind: ::core::option::Option<group_id::Kind>,
5097}
5098pub mod group_id {
5100 #[derive(Clone, PartialEq, ::prost::Oneof)]
5101 pub enum Kind {
5102 #[prost(uint64, tag = "1")]
5104 UnsignedValue(u64),
5105 #[prost(int64, tag = "2")]
5107 IntegerValue(i64),
5108 #[prost(string, tag = "3")]
5110 StringValue(::prost::alloc::string::String),
5111 }
5112}
5113#[derive(Clone, PartialEq, ::prost::Message)]
5114pub struct PointGroup {
5115 #[prost(message, optional, tag = "1")]
5117 pub id: ::core::option::Option<GroupId>,
5118 #[prost(message, repeated, tag = "2")]
5120 pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
5121 #[prost(message, optional, tag = "3")]
5123 pub lookup: ::core::option::Option<RetrievedPoint>,
5124}
5125#[derive(Clone, PartialEq, ::prost::Message)]
5126pub struct GroupsResult {
5127 #[prost(message, repeated, tag = "1")]
5129 pub groups: ::prost::alloc::vec::Vec<PointGroup>,
5130}
5131#[derive(Clone, PartialEq, ::prost::Message)]
5132pub struct SearchResponse {
5133 #[prost(message, repeated, tag = "1")]
5134 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5135 #[prost(double, tag = "2")]
5137 pub time: f64,
5138 #[prost(message, optional, tag = "3")]
5139 pub usage: ::core::option::Option<Usage>,
5140}
5141#[derive(Clone, PartialEq, ::prost::Message)]
5142pub struct QueryResponse {
5143 #[prost(message, repeated, tag = "1")]
5144 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5145 #[prost(double, tag = "2")]
5147 pub time: f64,
5148 #[prost(message, optional, tag = "3")]
5149 pub usage: ::core::option::Option<Usage>,
5150}
5151#[derive(Clone, PartialEq, ::prost::Message)]
5152pub struct QueryBatchResponse {
5153 #[prost(message, repeated, tag = "1")]
5154 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5155 #[prost(double, tag = "2")]
5157 pub time: f64,
5158 #[prost(message, optional, tag = "3")]
5159 pub usage: ::core::option::Option<Usage>,
5160}
5161#[derive(Clone, PartialEq, ::prost::Message)]
5162pub struct QueryGroupsResponse {
5163 #[prost(message, optional, tag = "1")]
5164 pub result: ::core::option::Option<GroupsResult>,
5165 #[prost(double, tag = "2")]
5167 pub time: f64,
5168 #[prost(message, optional, tag = "3")]
5169 pub usage: ::core::option::Option<Usage>,
5170}
5171#[derive(Clone, PartialEq, ::prost::Message)]
5172pub struct BatchResult {
5173 #[prost(message, repeated, tag = "1")]
5174 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5175}
5176#[derive(Clone, PartialEq, ::prost::Message)]
5177pub struct SearchBatchResponse {
5178 #[prost(message, repeated, tag = "1")]
5179 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5180 #[prost(double, tag = "2")]
5182 pub time: f64,
5183 #[prost(message, optional, tag = "3")]
5184 pub usage: ::core::option::Option<Usage>,
5185}
5186#[derive(Clone, PartialEq, ::prost::Message)]
5187pub struct SearchGroupsResponse {
5188 #[prost(message, optional, tag = "1")]
5189 pub result: ::core::option::Option<GroupsResult>,
5190 #[prost(double, tag = "2")]
5192 pub time: f64,
5193 #[prost(message, optional, tag = "3")]
5194 pub usage: ::core::option::Option<Usage>,
5195}
5196#[derive(Clone, PartialEq, ::prost::Message)]
5197pub struct CountResponse {
5198 #[prost(message, optional, tag = "1")]
5199 pub result: ::core::option::Option<CountResult>,
5200 #[prost(double, tag = "2")]
5202 pub time: f64,
5203 #[prost(message, optional, tag = "3")]
5204 pub usage: ::core::option::Option<Usage>,
5205}
5206#[derive(Clone, PartialEq, ::prost::Message)]
5207pub struct ScrollResponse {
5208 #[prost(message, optional, tag = "1")]
5210 pub next_page_offset: ::core::option::Option<PointId>,
5211 #[prost(message, repeated, tag = "2")]
5212 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5213 #[prost(double, tag = "3")]
5215 pub time: f64,
5216 #[prost(message, optional, tag = "4")]
5217 pub usage: ::core::option::Option<Usage>,
5218}
5219#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5220pub struct CountResult {
5221 #[prost(uint64, tag = "1")]
5222 pub count: u64,
5223}
5224#[derive(Clone, PartialEq, ::prost::Message)]
5225pub struct RetrievedPoint {
5226 #[prost(message, optional, tag = "1")]
5227 pub id: ::core::option::Option<PointId>,
5228 #[prost(map = "string, message", tag = "2")]
5229 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5230 #[prost(message, optional, tag = "4")]
5231 pub vectors: ::core::option::Option<VectorsOutput>,
5232 #[prost(message, optional, tag = "5")]
5234 pub shard_key: ::core::option::Option<ShardKey>,
5235 #[prost(message, optional, tag = "6")]
5237 pub order_value: ::core::option::Option<OrderValue>,
5238}
5239#[derive(Clone, PartialEq, ::prost::Message)]
5240pub struct GetResponse {
5241 #[prost(message, repeated, tag = "1")]
5242 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5243 #[prost(double, tag = "2")]
5245 pub time: f64,
5246 #[prost(message, optional, tag = "3")]
5247 pub usage: ::core::option::Option<Usage>,
5248}
5249#[derive(Clone, PartialEq, ::prost::Message)]
5250pub struct RecommendResponse {
5251 #[prost(message, repeated, tag = "1")]
5252 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5253 #[prost(double, tag = "2")]
5255 pub time: f64,
5256 #[prost(message, optional, tag = "3")]
5257 pub usage: ::core::option::Option<Usage>,
5258}
5259#[derive(Clone, PartialEq, ::prost::Message)]
5260pub struct RecommendBatchResponse {
5261 #[prost(message, repeated, tag = "1")]
5262 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5263 #[prost(double, tag = "2")]
5265 pub time: f64,
5266 #[prost(message, optional, tag = "3")]
5267 pub usage: ::core::option::Option<Usage>,
5268}
5269#[derive(Clone, PartialEq, ::prost::Message)]
5270pub struct DiscoverResponse {
5271 #[prost(message, repeated, tag = "1")]
5272 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5273 #[prost(double, tag = "2")]
5275 pub time: f64,
5276 #[prost(message, optional, tag = "3")]
5277 pub usage: ::core::option::Option<Usage>,
5278}
5279#[derive(Clone, PartialEq, ::prost::Message)]
5280pub struct DiscoverBatchResponse {
5281 #[prost(message, repeated, tag = "1")]
5282 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5283 #[prost(double, tag = "2")]
5285 pub time: f64,
5286 #[prost(message, optional, tag = "3")]
5287 pub usage: ::core::option::Option<Usage>,
5288}
5289#[derive(Clone, PartialEq, ::prost::Message)]
5290pub struct RecommendGroupsResponse {
5291 #[prost(message, optional, tag = "1")]
5292 pub result: ::core::option::Option<GroupsResult>,
5293 #[prost(double, tag = "2")]
5295 pub time: f64,
5296 #[prost(message, optional, tag = "3")]
5297 pub usage: ::core::option::Option<Usage>,
5298}
5299#[derive(Clone, PartialEq, ::prost::Message)]
5300pub struct UpdateBatchResponse {
5301 #[prost(message, repeated, tag = "1")]
5302 pub result: ::prost::alloc::vec::Vec<UpdateResult>,
5303 #[prost(double, tag = "2")]
5305 pub time: f64,
5306 #[prost(message, optional, tag = "3")]
5307 pub usage: ::core::option::Option<Usage>,
5308}
5309#[derive(Clone, PartialEq, ::prost::Message)]
5310pub struct FacetResponse {
5311 #[prost(message, repeated, tag = "1")]
5312 pub hits: ::prost::alloc::vec::Vec<FacetHit>,
5313 #[prost(double, tag = "2")]
5315 pub time: f64,
5316 #[prost(message, optional, tag = "3")]
5317 pub usage: ::core::option::Option<Usage>,
5318}
5319#[derive(Clone, PartialEq, ::prost::Message)]
5320pub struct SearchMatrixPairsResponse {
5321 #[prost(message, optional, tag = "1")]
5322 pub result: ::core::option::Option<SearchMatrixPairs>,
5323 #[prost(double, tag = "2")]
5325 pub time: f64,
5326 #[prost(message, optional, tag = "3")]
5327 pub usage: ::core::option::Option<Usage>,
5328}
5329#[derive(Clone, PartialEq, ::prost::Message)]
5330pub struct SearchMatrixOffsetsResponse {
5331 #[prost(message, optional, tag = "1")]
5332 pub result: ::core::option::Option<SearchMatrixOffsets>,
5333 #[prost(double, tag = "2")]
5335 pub time: f64,
5336 #[prost(message, optional, tag = "3")]
5337 pub usage: ::core::option::Option<Usage>,
5338}
5339#[derive(Clone, PartialEq, ::prost::Message)]
5340pub struct PointsSelector {
5341 #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
5342 pub points_selector_one_of: ::core::option::Option<
5343 points_selector::PointsSelectorOneOf,
5344 >,
5345}
5346pub mod points_selector {
5348 #[derive(Clone, PartialEq, ::prost::Oneof)]
5349 pub enum PointsSelectorOneOf {
5350 #[prost(message, tag = "1")]
5351 Points(super::PointsIdsList),
5352 #[prost(message, tag = "2")]
5353 Filter(super::Filter),
5354 }
5355}
5356#[derive(Clone, PartialEq, ::prost::Message)]
5357pub struct PointsIdsList {
5358 #[prost(message, repeated, tag = "1")]
5359 pub ids: ::prost::alloc::vec::Vec<PointId>,
5360}
5361#[derive(Clone, PartialEq, ::prost::Message)]
5362pub struct PointStruct {
5363 #[prost(message, optional, tag = "1")]
5364 pub id: ::core::option::Option<PointId>,
5365 #[prost(map = "string, message", tag = "3")]
5366 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5367 #[prost(message, optional, tag = "4")]
5368 pub vectors: ::core::option::Option<Vectors>,
5369}
5370#[derive(Clone, PartialEq, ::prost::Message)]
5374pub struct Usage {
5375 #[prost(message, optional, tag = "1")]
5376 pub hardware: ::core::option::Option<HardwareUsage>,
5377 #[prost(message, optional, tag = "2")]
5378 pub inference: ::core::option::Option<InferenceUsage>,
5379}
5380#[derive(Clone, PartialEq, ::prost::Message)]
5381pub struct InferenceUsage {
5382 #[prost(map = "string, message", tag = "1")]
5383 pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
5384}
5385#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5386pub struct ModelUsage {
5387 #[prost(uint64, tag = "1")]
5388 pub tokens: u64,
5389}
5390#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5391pub struct HardwareUsage {
5392 #[prost(uint64, tag = "1")]
5393 pub cpu: u64,
5394 #[prost(uint64, tag = "2")]
5395 pub payload_io_read: u64,
5396 #[prost(uint64, tag = "3")]
5397 pub payload_io_write: u64,
5398 #[prost(uint64, tag = "4")]
5399 pub payload_index_io_read: u64,
5400 #[prost(uint64, tag = "5")]
5401 pub payload_index_io_write: u64,
5402 #[prost(uint64, tag = "6")]
5403 pub vector_io_read: u64,
5404 #[prost(uint64, tag = "7")]
5405 pub vector_io_write: u64,
5406}
5407#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5408#[repr(i32)]
5409pub enum WriteOrderingType {
5410 Weak = 0,
5412 Medium = 1,
5414 Strong = 2,
5416}
5417impl WriteOrderingType {
5418 pub fn as_str_name(&self) -> &'static str {
5423 match self {
5424 Self::Weak => "Weak",
5425 Self::Medium => "Medium",
5426 Self::Strong => "Strong",
5427 }
5428 }
5429 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5431 match value {
5432 "Weak" => Some(Self::Weak),
5433 "Medium" => Some(Self::Medium),
5434 "Strong" => Some(Self::Strong),
5435 _ => None,
5436 }
5437 }
5438}
5439#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5440#[repr(i32)]
5441pub enum ReadConsistencyType {
5442 All = 0,
5444 Majority = 1,
5446 Quorum = 2,
5448}
5449impl ReadConsistencyType {
5450 pub fn as_str_name(&self) -> &'static str {
5455 match self {
5456 Self::All => "All",
5457 Self::Majority => "Majority",
5458 Self::Quorum => "Quorum",
5459 }
5460 }
5461 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5463 match value {
5464 "All" => Some(Self::All),
5465 "Majority" => Some(Self::Majority),
5466 "Quorum" => Some(Self::Quorum),
5467 _ => None,
5468 }
5469 }
5470}
5471#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5472#[repr(i32)]
5473pub enum FieldType {
5474 Keyword = 0,
5475 Integer = 1,
5476 Float = 2,
5477 Geo = 3,
5478 Text = 4,
5479 Bool = 5,
5480 Datetime = 6,
5481 Uuid = 7,
5482}
5483impl FieldType {
5484 pub fn as_str_name(&self) -> &'static str {
5489 match self {
5490 Self::Keyword => "FieldTypeKeyword",
5491 Self::Integer => "FieldTypeInteger",
5492 Self::Float => "FieldTypeFloat",
5493 Self::Geo => "FieldTypeGeo",
5494 Self::Text => "FieldTypeText",
5495 Self::Bool => "FieldTypeBool",
5496 Self::Datetime => "FieldTypeDatetime",
5497 Self::Uuid => "FieldTypeUuid",
5498 }
5499 }
5500 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5502 match value {
5503 "FieldTypeKeyword" => Some(Self::Keyword),
5504 "FieldTypeInteger" => Some(Self::Integer),
5505 "FieldTypeFloat" => Some(Self::Float),
5506 "FieldTypeGeo" => Some(Self::Geo),
5507 "FieldTypeText" => Some(Self::Text),
5508 "FieldTypeBool" => Some(Self::Bool),
5509 "FieldTypeDatetime" => Some(Self::Datetime),
5510 "FieldTypeUuid" => Some(Self::Uuid),
5511 _ => None,
5512 }
5513 }
5514}
5515#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5516#[repr(i32)]
5517pub enum Direction {
5518 Asc = 0,
5519 Desc = 1,
5520}
5521impl Direction {
5522 pub fn as_str_name(&self) -> &'static str {
5527 match self {
5528 Self::Asc => "Asc",
5529 Self::Desc => "Desc",
5530 }
5531 }
5532 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5534 match value {
5535 "Asc" => Some(Self::Asc),
5536 "Desc" => Some(Self::Desc),
5537 _ => None,
5538 }
5539 }
5540}
5541#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5543#[repr(i32)]
5544pub enum RecommendStrategy {
5545 AverageVector = 0,
5548 BestScore = 1,
5552 SumScores = 2,
5555}
5556impl RecommendStrategy {
5557 pub fn as_str_name(&self) -> &'static str {
5562 match self {
5563 Self::AverageVector => "AverageVector",
5564 Self::BestScore => "BestScore",
5565 Self::SumScores => "SumScores",
5566 }
5567 }
5568 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5570 match value {
5571 "AverageVector" => Some(Self::AverageVector),
5572 "BestScore" => Some(Self::BestScore),
5573 "SumScores" => Some(Self::SumScores),
5574 _ => None,
5575 }
5576 }
5577}
5578#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5579#[repr(i32)]
5580pub enum Fusion {
5581 Rrf = 0,
5583 Dbsf = 1,
5585}
5586impl Fusion {
5587 pub fn as_str_name(&self) -> &'static str {
5592 match self {
5593 Self::Rrf => "RRF",
5594 Self::Dbsf => "DBSF",
5595 }
5596 }
5597 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5599 match value {
5600 "RRF" => Some(Self::Rrf),
5601 "DBSF" => Some(Self::Dbsf),
5602 _ => None,
5603 }
5604 }
5605}
5606#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5612#[repr(i32)]
5613pub enum Sample {
5614 Random = 0,
5615}
5616impl Sample {
5617 pub fn as_str_name(&self) -> &'static str {
5622 match self {
5623 Self::Random => "Random",
5624 }
5625 }
5626 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5628 match value {
5629 "Random" => Some(Self::Random),
5630 _ => None,
5631 }
5632 }
5633}
5634#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5635#[repr(i32)]
5636pub enum UpdateStatus {
5637 UnknownUpdateStatus = 0,
5638 Acknowledged = 1,
5640 Completed = 2,
5642 ClockRejected = 3,
5644}
5645impl UpdateStatus {
5646 pub fn as_str_name(&self) -> &'static str {
5651 match self {
5652 Self::UnknownUpdateStatus => "UnknownUpdateStatus",
5653 Self::Acknowledged => "Acknowledged",
5654 Self::Completed => "Completed",
5655 Self::ClockRejected => "ClockRejected",
5656 }
5657 }
5658 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5660 match value {
5661 "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
5662 "Acknowledged" => Some(Self::Acknowledged),
5663 "Completed" => Some(Self::Completed),
5664 "ClockRejected" => Some(Self::ClockRejected),
5665 _ => None,
5666 }
5667 }
5668}
5669pub mod points_client {
5671 #![allow(
5672 unused_variables,
5673 dead_code,
5674 missing_docs,
5675 clippy::wildcard_imports,
5676 clippy::let_unit_value,
5677 )]
5678 use tonic::codegen::*;
5679 use tonic::codegen::http::Uri;
5680 #[derive(Debug, Clone)]
5681 pub struct PointsClient<T> {
5682 inner: tonic::client::Grpc<T>,
5683 }
5684 impl PointsClient<tonic::transport::Channel> {
5685 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5687 where
5688 D: TryInto<tonic::transport::Endpoint>,
5689 D::Error: Into<StdError>,
5690 {
5691 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5692 Ok(Self::new(conn))
5693 }
5694 }
5695 impl<T> PointsClient<T>
5696 where
5697 T: tonic::client::GrpcService<tonic::body::BoxBody>,
5698 T::Error: Into<StdError>,
5699 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
5700 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
5701 {
5702 pub fn new(inner: T) -> Self {
5703 let inner = tonic::client::Grpc::new(inner);
5704 Self { inner }
5705 }
5706 pub fn with_origin(inner: T, origin: Uri) -> Self {
5707 let inner = tonic::client::Grpc::with_origin(inner, origin);
5708 Self { inner }
5709 }
5710 pub fn with_interceptor<F>(
5711 inner: T,
5712 interceptor: F,
5713 ) -> PointsClient<InterceptedService<T, F>>
5714 where
5715 F: tonic::service::Interceptor,
5716 T::ResponseBody: Default,
5717 T: tonic::codegen::Service<
5718 http::Request<tonic::body::BoxBody>,
5719 Response = http::Response<
5720 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
5721 >,
5722 >,
5723 <T as tonic::codegen::Service<
5724 http::Request<tonic::body::BoxBody>,
5725 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
5726 {
5727 PointsClient::new(InterceptedService::new(inner, interceptor))
5728 }
5729 #[must_use]
5734 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5735 self.inner = self.inner.send_compressed(encoding);
5736 self
5737 }
5738 #[must_use]
5740 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5741 self.inner = self.inner.accept_compressed(encoding);
5742 self
5743 }
5744 #[must_use]
5748 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5749 self.inner = self.inner.max_decoding_message_size(limit);
5750 self
5751 }
5752 #[must_use]
5756 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5757 self.inner = self.inner.max_encoding_message_size(limit);
5758 self
5759 }
5760 pub async fn upsert(
5763 &mut self,
5764 request: impl tonic::IntoRequest<super::UpsertPoints>,
5765 ) -> std::result::Result<
5766 tonic::Response<super::PointsOperationResponse>,
5767 tonic::Status,
5768 > {
5769 self.inner
5770 .ready()
5771 .await
5772 .map_err(|e| {
5773 tonic::Status::unknown(
5774 format!("Service was not ready: {}", e.into()),
5775 )
5776 })?;
5777 let codec = tonic::codec::ProstCodec::default();
5778 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
5779 let mut req = request.into_request();
5780 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
5781 self.inner.unary(req, path, codec).await
5782 }
5783 pub async fn delete(
5786 &mut self,
5787 request: impl tonic::IntoRequest<super::DeletePoints>,
5788 ) -> std::result::Result<
5789 tonic::Response<super::PointsOperationResponse>,
5790 tonic::Status,
5791 > {
5792 self.inner
5793 .ready()
5794 .await
5795 .map_err(|e| {
5796 tonic::Status::unknown(
5797 format!("Service was not ready: {}", e.into()),
5798 )
5799 })?;
5800 let codec = tonic::codec::ProstCodec::default();
5801 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
5802 let mut req = request.into_request();
5803 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
5804 self.inner.unary(req, path, codec).await
5805 }
5806 pub async fn get(
5809 &mut self,
5810 request: impl tonic::IntoRequest<super::GetPoints>,
5811 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
5812 self.inner
5813 .ready()
5814 .await
5815 .map_err(|e| {
5816 tonic::Status::unknown(
5817 format!("Service was not ready: {}", e.into()),
5818 )
5819 })?;
5820 let codec = tonic::codec::ProstCodec::default();
5821 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
5822 let mut req = request.into_request();
5823 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
5824 self.inner.unary(req, path, codec).await
5825 }
5826 pub async fn update_vectors(
5829 &mut self,
5830 request: impl tonic::IntoRequest<super::UpdatePointVectors>,
5831 ) -> std::result::Result<
5832 tonic::Response<super::PointsOperationResponse>,
5833 tonic::Status,
5834 > {
5835 self.inner
5836 .ready()
5837 .await
5838 .map_err(|e| {
5839 tonic::Status::unknown(
5840 format!("Service was not ready: {}", e.into()),
5841 )
5842 })?;
5843 let codec = tonic::codec::ProstCodec::default();
5844 let path = http::uri::PathAndQuery::from_static(
5845 "/qdrant.Points/UpdateVectors",
5846 );
5847 let mut req = request.into_request();
5848 req.extensions_mut()
5849 .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
5850 self.inner.unary(req, path, codec).await
5851 }
5852 pub async fn delete_vectors(
5855 &mut self,
5856 request: impl tonic::IntoRequest<super::DeletePointVectors>,
5857 ) -> std::result::Result<
5858 tonic::Response<super::PointsOperationResponse>,
5859 tonic::Status,
5860 > {
5861 self.inner
5862 .ready()
5863 .await
5864 .map_err(|e| {
5865 tonic::Status::unknown(
5866 format!("Service was not ready: {}", e.into()),
5867 )
5868 })?;
5869 let codec = tonic::codec::ProstCodec::default();
5870 let path = http::uri::PathAndQuery::from_static(
5871 "/qdrant.Points/DeleteVectors",
5872 );
5873 let mut req = request.into_request();
5874 req.extensions_mut()
5875 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
5876 self.inner.unary(req, path, codec).await
5877 }
5878 pub async fn set_payload(
5881 &mut self,
5882 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5883 ) -> std::result::Result<
5884 tonic::Response<super::PointsOperationResponse>,
5885 tonic::Status,
5886 > {
5887 self.inner
5888 .ready()
5889 .await
5890 .map_err(|e| {
5891 tonic::Status::unknown(
5892 format!("Service was not ready: {}", e.into()),
5893 )
5894 })?;
5895 let codec = tonic::codec::ProstCodec::default();
5896 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
5897 let mut req = request.into_request();
5898 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
5899 self.inner.unary(req, path, codec).await
5900 }
5901 pub async fn overwrite_payload(
5904 &mut self,
5905 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5906 ) -> std::result::Result<
5907 tonic::Response<super::PointsOperationResponse>,
5908 tonic::Status,
5909 > {
5910 self.inner
5911 .ready()
5912 .await
5913 .map_err(|e| {
5914 tonic::Status::unknown(
5915 format!("Service was not ready: {}", e.into()),
5916 )
5917 })?;
5918 let codec = tonic::codec::ProstCodec::default();
5919 let path = http::uri::PathAndQuery::from_static(
5920 "/qdrant.Points/OverwritePayload",
5921 );
5922 let mut req = request.into_request();
5923 req.extensions_mut()
5924 .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
5925 self.inner.unary(req, path, codec).await
5926 }
5927 pub async fn delete_payload(
5930 &mut self,
5931 request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
5932 ) -> std::result::Result<
5933 tonic::Response<super::PointsOperationResponse>,
5934 tonic::Status,
5935 > {
5936 self.inner
5937 .ready()
5938 .await
5939 .map_err(|e| {
5940 tonic::Status::unknown(
5941 format!("Service was not ready: {}", e.into()),
5942 )
5943 })?;
5944 let codec = tonic::codec::ProstCodec::default();
5945 let path = http::uri::PathAndQuery::from_static(
5946 "/qdrant.Points/DeletePayload",
5947 );
5948 let mut req = request.into_request();
5949 req.extensions_mut()
5950 .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
5951 self.inner.unary(req, path, codec).await
5952 }
5953 pub async fn clear_payload(
5956 &mut self,
5957 request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
5958 ) -> std::result::Result<
5959 tonic::Response<super::PointsOperationResponse>,
5960 tonic::Status,
5961 > {
5962 self.inner
5963 .ready()
5964 .await
5965 .map_err(|e| {
5966 tonic::Status::unknown(
5967 format!("Service was not ready: {}", e.into()),
5968 )
5969 })?;
5970 let codec = tonic::codec::ProstCodec::default();
5971 let path = http::uri::PathAndQuery::from_static(
5972 "/qdrant.Points/ClearPayload",
5973 );
5974 let mut req = request.into_request();
5975 req.extensions_mut()
5976 .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
5977 self.inner.unary(req, path, codec).await
5978 }
5979 pub async fn create_field_index(
5982 &mut self,
5983 request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
5984 ) -> std::result::Result<
5985 tonic::Response<super::PointsOperationResponse>,
5986 tonic::Status,
5987 > {
5988 self.inner
5989 .ready()
5990 .await
5991 .map_err(|e| {
5992 tonic::Status::unknown(
5993 format!("Service was not ready: {}", e.into()),
5994 )
5995 })?;
5996 let codec = tonic::codec::ProstCodec::default();
5997 let path = http::uri::PathAndQuery::from_static(
5998 "/qdrant.Points/CreateFieldIndex",
5999 );
6000 let mut req = request.into_request();
6001 req.extensions_mut()
6002 .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
6003 self.inner.unary(req, path, codec).await
6004 }
6005 pub async fn delete_field_index(
6008 &mut self,
6009 request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
6010 ) -> std::result::Result<
6011 tonic::Response<super::PointsOperationResponse>,
6012 tonic::Status,
6013 > {
6014 self.inner
6015 .ready()
6016 .await
6017 .map_err(|e| {
6018 tonic::Status::unknown(
6019 format!("Service was not ready: {}", e.into()),
6020 )
6021 })?;
6022 let codec = tonic::codec::ProstCodec::default();
6023 let path = http::uri::PathAndQuery::from_static(
6024 "/qdrant.Points/DeleteFieldIndex",
6025 );
6026 let mut req = request.into_request();
6027 req.extensions_mut()
6028 .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
6029 self.inner.unary(req, path, codec).await
6030 }
6031 pub async fn search(
6034 &mut self,
6035 request: impl tonic::IntoRequest<super::SearchPoints>,
6036 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
6037 self.inner
6038 .ready()
6039 .await
6040 .map_err(|e| {
6041 tonic::Status::unknown(
6042 format!("Service was not ready: {}", e.into()),
6043 )
6044 })?;
6045 let codec = tonic::codec::ProstCodec::default();
6046 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
6047 let mut req = request.into_request();
6048 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
6049 self.inner.unary(req, path, codec).await
6050 }
6051 pub async fn search_batch(
6054 &mut self,
6055 request: impl tonic::IntoRequest<super::SearchBatchPoints>,
6056 ) -> std::result::Result<
6057 tonic::Response<super::SearchBatchResponse>,
6058 tonic::Status,
6059 > {
6060 self.inner
6061 .ready()
6062 .await
6063 .map_err(|e| {
6064 tonic::Status::unknown(
6065 format!("Service was not ready: {}", e.into()),
6066 )
6067 })?;
6068 let codec = tonic::codec::ProstCodec::default();
6069 let path = http::uri::PathAndQuery::from_static(
6070 "/qdrant.Points/SearchBatch",
6071 );
6072 let mut req = request.into_request();
6073 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
6074 self.inner.unary(req, path, codec).await
6075 }
6076 pub async fn search_groups(
6079 &mut self,
6080 request: impl tonic::IntoRequest<super::SearchPointGroups>,
6081 ) -> std::result::Result<
6082 tonic::Response<super::SearchGroupsResponse>,
6083 tonic::Status,
6084 > {
6085 self.inner
6086 .ready()
6087 .await
6088 .map_err(|e| {
6089 tonic::Status::unknown(
6090 format!("Service was not ready: {}", e.into()),
6091 )
6092 })?;
6093 let codec = tonic::codec::ProstCodec::default();
6094 let path = http::uri::PathAndQuery::from_static(
6095 "/qdrant.Points/SearchGroups",
6096 );
6097 let mut req = request.into_request();
6098 req.extensions_mut()
6099 .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
6100 self.inner.unary(req, path, codec).await
6101 }
6102 pub async fn scroll(
6105 &mut self,
6106 request: impl tonic::IntoRequest<super::ScrollPoints>,
6107 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
6108 self.inner
6109 .ready()
6110 .await
6111 .map_err(|e| {
6112 tonic::Status::unknown(
6113 format!("Service was not ready: {}", e.into()),
6114 )
6115 })?;
6116 let codec = tonic::codec::ProstCodec::default();
6117 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
6118 let mut req = request.into_request();
6119 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
6120 self.inner.unary(req, path, codec).await
6121 }
6122 pub async fn recommend(
6125 &mut self,
6126 request: impl tonic::IntoRequest<super::RecommendPoints>,
6127 ) -> std::result::Result<
6128 tonic::Response<super::RecommendResponse>,
6129 tonic::Status,
6130 > {
6131 self.inner
6132 .ready()
6133 .await
6134 .map_err(|e| {
6135 tonic::Status::unknown(
6136 format!("Service was not ready: {}", e.into()),
6137 )
6138 })?;
6139 let codec = tonic::codec::ProstCodec::default();
6140 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
6141 let mut req = request.into_request();
6142 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
6143 self.inner.unary(req, path, codec).await
6144 }
6145 pub async fn recommend_batch(
6148 &mut self,
6149 request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
6150 ) -> std::result::Result<
6151 tonic::Response<super::RecommendBatchResponse>,
6152 tonic::Status,
6153 > {
6154 self.inner
6155 .ready()
6156 .await
6157 .map_err(|e| {
6158 tonic::Status::unknown(
6159 format!("Service was not ready: {}", e.into()),
6160 )
6161 })?;
6162 let codec = tonic::codec::ProstCodec::default();
6163 let path = http::uri::PathAndQuery::from_static(
6164 "/qdrant.Points/RecommendBatch",
6165 );
6166 let mut req = request.into_request();
6167 req.extensions_mut()
6168 .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
6169 self.inner.unary(req, path, codec).await
6170 }
6171 pub async fn recommend_groups(
6174 &mut self,
6175 request: impl tonic::IntoRequest<super::RecommendPointGroups>,
6176 ) -> std::result::Result<
6177 tonic::Response<super::RecommendGroupsResponse>,
6178 tonic::Status,
6179 > {
6180 self.inner
6181 .ready()
6182 .await
6183 .map_err(|e| {
6184 tonic::Status::unknown(
6185 format!("Service was not ready: {}", e.into()),
6186 )
6187 })?;
6188 let codec = tonic::codec::ProstCodec::default();
6189 let path = http::uri::PathAndQuery::from_static(
6190 "/qdrant.Points/RecommendGroups",
6191 );
6192 let mut req = request.into_request();
6193 req.extensions_mut()
6194 .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
6195 self.inner.unary(req, path, codec).await
6196 }
6197 pub async fn discover(
6214 &mut self,
6215 request: impl tonic::IntoRequest<super::DiscoverPoints>,
6216 ) -> std::result::Result<
6217 tonic::Response<super::DiscoverResponse>,
6218 tonic::Status,
6219 > {
6220 self.inner
6221 .ready()
6222 .await
6223 .map_err(|e| {
6224 tonic::Status::unknown(
6225 format!("Service was not ready: {}", e.into()),
6226 )
6227 })?;
6228 let codec = tonic::codec::ProstCodec::default();
6229 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
6230 let mut req = request.into_request();
6231 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
6232 self.inner.unary(req, path, codec).await
6233 }
6234 pub async fn discover_batch(
6237 &mut self,
6238 request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
6239 ) -> std::result::Result<
6240 tonic::Response<super::DiscoverBatchResponse>,
6241 tonic::Status,
6242 > {
6243 self.inner
6244 .ready()
6245 .await
6246 .map_err(|e| {
6247 tonic::Status::unknown(
6248 format!("Service was not ready: {}", e.into()),
6249 )
6250 })?;
6251 let codec = tonic::codec::ProstCodec::default();
6252 let path = http::uri::PathAndQuery::from_static(
6253 "/qdrant.Points/DiscoverBatch",
6254 );
6255 let mut req = request.into_request();
6256 req.extensions_mut()
6257 .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
6258 self.inner.unary(req, path, codec).await
6259 }
6260 pub async fn count(
6263 &mut self,
6264 request: impl tonic::IntoRequest<super::CountPoints>,
6265 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
6266 self.inner
6267 .ready()
6268 .await
6269 .map_err(|e| {
6270 tonic::Status::unknown(
6271 format!("Service was not ready: {}", e.into()),
6272 )
6273 })?;
6274 let codec = tonic::codec::ProstCodec::default();
6275 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
6276 let mut req = request.into_request();
6277 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
6278 self.inner.unary(req, path, codec).await
6279 }
6280 pub async fn update_batch(
6283 &mut self,
6284 request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
6285 ) -> std::result::Result<
6286 tonic::Response<super::UpdateBatchResponse>,
6287 tonic::Status,
6288 > {
6289 self.inner
6290 .ready()
6291 .await
6292 .map_err(|e| {
6293 tonic::Status::unknown(
6294 format!("Service was not ready: {}", e.into()),
6295 )
6296 })?;
6297 let codec = tonic::codec::ProstCodec::default();
6298 let path = http::uri::PathAndQuery::from_static(
6299 "/qdrant.Points/UpdateBatch",
6300 );
6301 let mut req = request.into_request();
6302 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
6303 self.inner.unary(req, path, codec).await
6304 }
6305 pub async fn query(
6308 &mut self,
6309 request: impl tonic::IntoRequest<super::QueryPoints>,
6310 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
6311 self.inner
6312 .ready()
6313 .await
6314 .map_err(|e| {
6315 tonic::Status::unknown(
6316 format!("Service was not ready: {}", e.into()),
6317 )
6318 })?;
6319 let codec = tonic::codec::ProstCodec::default();
6320 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
6321 let mut req = request.into_request();
6322 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
6323 self.inner.unary(req, path, codec).await
6324 }
6325 pub async fn query_batch(
6328 &mut self,
6329 request: impl tonic::IntoRequest<super::QueryBatchPoints>,
6330 ) -> std::result::Result<
6331 tonic::Response<super::QueryBatchResponse>,
6332 tonic::Status,
6333 > {
6334 self.inner
6335 .ready()
6336 .await
6337 .map_err(|e| {
6338 tonic::Status::unknown(
6339 format!("Service was not ready: {}", e.into()),
6340 )
6341 })?;
6342 let codec = tonic::codec::ProstCodec::default();
6343 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
6344 let mut req = request.into_request();
6345 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
6346 self.inner.unary(req, path, codec).await
6347 }
6348 pub async fn query_groups(
6351 &mut self,
6352 request: impl tonic::IntoRequest<super::QueryPointGroups>,
6353 ) -> std::result::Result<
6354 tonic::Response<super::QueryGroupsResponse>,
6355 tonic::Status,
6356 > {
6357 self.inner
6358 .ready()
6359 .await
6360 .map_err(|e| {
6361 tonic::Status::unknown(
6362 format!("Service was not ready: {}", e.into()),
6363 )
6364 })?;
6365 let codec = tonic::codec::ProstCodec::default();
6366 let path = http::uri::PathAndQuery::from_static(
6367 "/qdrant.Points/QueryGroups",
6368 );
6369 let mut req = request.into_request();
6370 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
6371 self.inner.unary(req, path, codec).await
6372 }
6373 pub async fn facet(
6376 &mut self,
6377 request: impl tonic::IntoRequest<super::FacetCounts>,
6378 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
6379 self.inner
6380 .ready()
6381 .await
6382 .map_err(|e| {
6383 tonic::Status::unknown(
6384 format!("Service was not ready: {}", e.into()),
6385 )
6386 })?;
6387 let codec = tonic::codec::ProstCodec::default();
6388 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
6389 let mut req = request.into_request();
6390 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
6391 self.inner.unary(req, path, codec).await
6392 }
6393 pub async fn search_matrix_pairs(
6396 &mut self,
6397 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6398 ) -> std::result::Result<
6399 tonic::Response<super::SearchMatrixPairsResponse>,
6400 tonic::Status,
6401 > {
6402 self.inner
6403 .ready()
6404 .await
6405 .map_err(|e| {
6406 tonic::Status::unknown(
6407 format!("Service was not ready: {}", e.into()),
6408 )
6409 })?;
6410 let codec = tonic::codec::ProstCodec::default();
6411 let path = http::uri::PathAndQuery::from_static(
6412 "/qdrant.Points/SearchMatrixPairs",
6413 );
6414 let mut req = request.into_request();
6415 req.extensions_mut()
6416 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
6417 self.inner.unary(req, path, codec).await
6418 }
6419 pub async fn search_matrix_offsets(
6422 &mut self,
6423 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6424 ) -> std::result::Result<
6425 tonic::Response<super::SearchMatrixOffsetsResponse>,
6426 tonic::Status,
6427 > {
6428 self.inner
6429 .ready()
6430 .await
6431 .map_err(|e| {
6432 tonic::Status::unknown(
6433 format!("Service was not ready: {}", e.into()),
6434 )
6435 })?;
6436 let codec = tonic::codec::ProstCodec::default();
6437 let path = http::uri::PathAndQuery::from_static(
6438 "/qdrant.Points/SearchMatrixOffsets",
6439 );
6440 let mut req = request.into_request();
6441 req.extensions_mut()
6442 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
6443 self.inner.unary(req, path, codec).await
6444 }
6445 }
6446}
6447pub mod points_server {
6449 #![allow(
6450 unused_variables,
6451 dead_code,
6452 missing_docs,
6453 clippy::wildcard_imports,
6454 clippy::let_unit_value,
6455 )]
6456 use tonic::codegen::*;
6457 #[async_trait]
6459 pub trait Points: std::marker::Send + std::marker::Sync + 'static {
6460 async fn upsert(
6463 &self,
6464 request: tonic::Request<super::UpsertPoints>,
6465 ) -> std::result::Result<
6466 tonic::Response<super::PointsOperationResponse>,
6467 tonic::Status,
6468 >;
6469 async fn delete(
6472 &self,
6473 request: tonic::Request<super::DeletePoints>,
6474 ) -> std::result::Result<
6475 tonic::Response<super::PointsOperationResponse>,
6476 tonic::Status,
6477 >;
6478 async fn get(
6481 &self,
6482 request: tonic::Request<super::GetPoints>,
6483 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
6484 async fn update_vectors(
6487 &self,
6488 request: tonic::Request<super::UpdatePointVectors>,
6489 ) -> std::result::Result<
6490 tonic::Response<super::PointsOperationResponse>,
6491 tonic::Status,
6492 >;
6493 async fn delete_vectors(
6496 &self,
6497 request: tonic::Request<super::DeletePointVectors>,
6498 ) -> std::result::Result<
6499 tonic::Response<super::PointsOperationResponse>,
6500 tonic::Status,
6501 >;
6502 async fn set_payload(
6505 &self,
6506 request: tonic::Request<super::SetPayloadPoints>,
6507 ) -> std::result::Result<
6508 tonic::Response<super::PointsOperationResponse>,
6509 tonic::Status,
6510 >;
6511 async fn overwrite_payload(
6514 &self,
6515 request: tonic::Request<super::SetPayloadPoints>,
6516 ) -> std::result::Result<
6517 tonic::Response<super::PointsOperationResponse>,
6518 tonic::Status,
6519 >;
6520 async fn delete_payload(
6523 &self,
6524 request: tonic::Request<super::DeletePayloadPoints>,
6525 ) -> std::result::Result<
6526 tonic::Response<super::PointsOperationResponse>,
6527 tonic::Status,
6528 >;
6529 async fn clear_payload(
6532 &self,
6533 request: tonic::Request<super::ClearPayloadPoints>,
6534 ) -> std::result::Result<
6535 tonic::Response<super::PointsOperationResponse>,
6536 tonic::Status,
6537 >;
6538 async fn create_field_index(
6541 &self,
6542 request: tonic::Request<super::CreateFieldIndexCollection>,
6543 ) -> std::result::Result<
6544 tonic::Response<super::PointsOperationResponse>,
6545 tonic::Status,
6546 >;
6547 async fn delete_field_index(
6550 &self,
6551 request: tonic::Request<super::DeleteFieldIndexCollection>,
6552 ) -> std::result::Result<
6553 tonic::Response<super::PointsOperationResponse>,
6554 tonic::Status,
6555 >;
6556 async fn search(
6559 &self,
6560 request: tonic::Request<super::SearchPoints>,
6561 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
6562 async fn search_batch(
6565 &self,
6566 request: tonic::Request<super::SearchBatchPoints>,
6567 ) -> std::result::Result<
6568 tonic::Response<super::SearchBatchResponse>,
6569 tonic::Status,
6570 >;
6571 async fn search_groups(
6574 &self,
6575 request: tonic::Request<super::SearchPointGroups>,
6576 ) -> std::result::Result<
6577 tonic::Response<super::SearchGroupsResponse>,
6578 tonic::Status,
6579 >;
6580 async fn scroll(
6583 &self,
6584 request: tonic::Request<super::ScrollPoints>,
6585 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
6586 async fn recommend(
6589 &self,
6590 request: tonic::Request<super::RecommendPoints>,
6591 ) -> std::result::Result<
6592 tonic::Response<super::RecommendResponse>,
6593 tonic::Status,
6594 >;
6595 async fn recommend_batch(
6598 &self,
6599 request: tonic::Request<super::RecommendBatchPoints>,
6600 ) -> std::result::Result<
6601 tonic::Response<super::RecommendBatchResponse>,
6602 tonic::Status,
6603 >;
6604 async fn recommend_groups(
6607 &self,
6608 request: tonic::Request<super::RecommendPointGroups>,
6609 ) -> std::result::Result<
6610 tonic::Response<super::RecommendGroupsResponse>,
6611 tonic::Status,
6612 >;
6613 async fn discover(
6630 &self,
6631 request: tonic::Request<super::DiscoverPoints>,
6632 ) -> std::result::Result<
6633 tonic::Response<super::DiscoverResponse>,
6634 tonic::Status,
6635 >;
6636 async fn discover_batch(
6639 &self,
6640 request: tonic::Request<super::DiscoverBatchPoints>,
6641 ) -> std::result::Result<
6642 tonic::Response<super::DiscoverBatchResponse>,
6643 tonic::Status,
6644 >;
6645 async fn count(
6648 &self,
6649 request: tonic::Request<super::CountPoints>,
6650 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
6651 async fn update_batch(
6654 &self,
6655 request: tonic::Request<super::UpdateBatchPoints>,
6656 ) -> std::result::Result<
6657 tonic::Response<super::UpdateBatchResponse>,
6658 tonic::Status,
6659 >;
6660 async fn query(
6663 &self,
6664 request: tonic::Request<super::QueryPoints>,
6665 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
6666 async fn query_batch(
6669 &self,
6670 request: tonic::Request<super::QueryBatchPoints>,
6671 ) -> std::result::Result<
6672 tonic::Response<super::QueryBatchResponse>,
6673 tonic::Status,
6674 >;
6675 async fn query_groups(
6678 &self,
6679 request: tonic::Request<super::QueryPointGroups>,
6680 ) -> std::result::Result<
6681 tonic::Response<super::QueryGroupsResponse>,
6682 tonic::Status,
6683 >;
6684 async fn facet(
6687 &self,
6688 request: tonic::Request<super::FacetCounts>,
6689 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
6690 async fn search_matrix_pairs(
6693 &self,
6694 request: tonic::Request<super::SearchMatrixPoints>,
6695 ) -> std::result::Result<
6696 tonic::Response<super::SearchMatrixPairsResponse>,
6697 tonic::Status,
6698 >;
6699 async fn search_matrix_offsets(
6702 &self,
6703 request: tonic::Request<super::SearchMatrixPoints>,
6704 ) -> std::result::Result<
6705 tonic::Response<super::SearchMatrixOffsetsResponse>,
6706 tonic::Status,
6707 >;
6708 }
6709 #[derive(Debug)]
6710 pub struct PointsServer<T> {
6711 inner: Arc<T>,
6712 accept_compression_encodings: EnabledCompressionEncodings,
6713 send_compression_encodings: EnabledCompressionEncodings,
6714 max_decoding_message_size: Option<usize>,
6715 max_encoding_message_size: Option<usize>,
6716 }
6717 impl<T> PointsServer<T> {
6718 pub fn new(inner: T) -> Self {
6719 Self::from_arc(Arc::new(inner))
6720 }
6721 pub fn from_arc(inner: Arc<T>) -> Self {
6722 Self {
6723 inner,
6724 accept_compression_encodings: Default::default(),
6725 send_compression_encodings: Default::default(),
6726 max_decoding_message_size: None,
6727 max_encoding_message_size: None,
6728 }
6729 }
6730 pub fn with_interceptor<F>(
6731 inner: T,
6732 interceptor: F,
6733 ) -> InterceptedService<Self, F>
6734 where
6735 F: tonic::service::Interceptor,
6736 {
6737 InterceptedService::new(Self::new(inner), interceptor)
6738 }
6739 #[must_use]
6741 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6742 self.accept_compression_encodings.enable(encoding);
6743 self
6744 }
6745 #[must_use]
6747 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6748 self.send_compression_encodings.enable(encoding);
6749 self
6750 }
6751 #[must_use]
6755 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6756 self.max_decoding_message_size = Some(limit);
6757 self
6758 }
6759 #[must_use]
6763 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6764 self.max_encoding_message_size = Some(limit);
6765 self
6766 }
6767 }
6768 impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
6769 where
6770 T: Points,
6771 B: Body + std::marker::Send + 'static,
6772 B::Error: Into<StdError> + std::marker::Send + 'static,
6773 {
6774 type Response = http::Response<tonic::body::BoxBody>;
6775 type Error = std::convert::Infallible;
6776 type Future = BoxFuture<Self::Response, Self::Error>;
6777 fn poll_ready(
6778 &mut self,
6779 _cx: &mut Context<'_>,
6780 ) -> Poll<std::result::Result<(), Self::Error>> {
6781 Poll::Ready(Ok(()))
6782 }
6783 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6784 match req.uri().path() {
6785 "/qdrant.Points/Upsert" => {
6786 #[allow(non_camel_case_types)]
6787 struct UpsertSvc<T: Points>(pub Arc<T>);
6788 impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
6789 for UpsertSvc<T> {
6790 type Response = super::PointsOperationResponse;
6791 type Future = BoxFuture<
6792 tonic::Response<Self::Response>,
6793 tonic::Status,
6794 >;
6795 fn call(
6796 &mut self,
6797 request: tonic::Request<super::UpsertPoints>,
6798 ) -> Self::Future {
6799 let inner = Arc::clone(&self.0);
6800 let fut = async move {
6801 <T as Points>::upsert(&inner, request).await
6802 };
6803 Box::pin(fut)
6804 }
6805 }
6806 let accept_compression_encodings = self.accept_compression_encodings;
6807 let send_compression_encodings = self.send_compression_encodings;
6808 let max_decoding_message_size = self.max_decoding_message_size;
6809 let max_encoding_message_size = self.max_encoding_message_size;
6810 let inner = self.inner.clone();
6811 let fut = async move {
6812 let method = UpsertSvc(inner);
6813 let codec = tonic::codec::ProstCodec::default();
6814 let mut grpc = tonic::server::Grpc::new(codec)
6815 .apply_compression_config(
6816 accept_compression_encodings,
6817 send_compression_encodings,
6818 )
6819 .apply_max_message_size_config(
6820 max_decoding_message_size,
6821 max_encoding_message_size,
6822 );
6823 let res = grpc.unary(method, req).await;
6824 Ok(res)
6825 };
6826 Box::pin(fut)
6827 }
6828 "/qdrant.Points/Delete" => {
6829 #[allow(non_camel_case_types)]
6830 struct DeleteSvc<T: Points>(pub Arc<T>);
6831 impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
6832 for DeleteSvc<T> {
6833 type Response = super::PointsOperationResponse;
6834 type Future = BoxFuture<
6835 tonic::Response<Self::Response>,
6836 tonic::Status,
6837 >;
6838 fn call(
6839 &mut self,
6840 request: tonic::Request<super::DeletePoints>,
6841 ) -> Self::Future {
6842 let inner = Arc::clone(&self.0);
6843 let fut = async move {
6844 <T as Points>::delete(&inner, request).await
6845 };
6846 Box::pin(fut)
6847 }
6848 }
6849 let accept_compression_encodings = self.accept_compression_encodings;
6850 let send_compression_encodings = self.send_compression_encodings;
6851 let max_decoding_message_size = self.max_decoding_message_size;
6852 let max_encoding_message_size = self.max_encoding_message_size;
6853 let inner = self.inner.clone();
6854 let fut = async move {
6855 let method = DeleteSvc(inner);
6856 let codec = tonic::codec::ProstCodec::default();
6857 let mut grpc = tonic::server::Grpc::new(codec)
6858 .apply_compression_config(
6859 accept_compression_encodings,
6860 send_compression_encodings,
6861 )
6862 .apply_max_message_size_config(
6863 max_decoding_message_size,
6864 max_encoding_message_size,
6865 );
6866 let res = grpc.unary(method, req).await;
6867 Ok(res)
6868 };
6869 Box::pin(fut)
6870 }
6871 "/qdrant.Points/Get" => {
6872 #[allow(non_camel_case_types)]
6873 struct GetSvc<T: Points>(pub Arc<T>);
6874 impl<T: Points> tonic::server::UnaryService<super::GetPoints>
6875 for GetSvc<T> {
6876 type Response = super::GetResponse;
6877 type Future = BoxFuture<
6878 tonic::Response<Self::Response>,
6879 tonic::Status,
6880 >;
6881 fn call(
6882 &mut self,
6883 request: tonic::Request<super::GetPoints>,
6884 ) -> Self::Future {
6885 let inner = Arc::clone(&self.0);
6886 let fut = async move {
6887 <T as Points>::get(&inner, request).await
6888 };
6889 Box::pin(fut)
6890 }
6891 }
6892 let accept_compression_encodings = self.accept_compression_encodings;
6893 let send_compression_encodings = self.send_compression_encodings;
6894 let max_decoding_message_size = self.max_decoding_message_size;
6895 let max_encoding_message_size = self.max_encoding_message_size;
6896 let inner = self.inner.clone();
6897 let fut = async move {
6898 let method = GetSvc(inner);
6899 let codec = tonic::codec::ProstCodec::default();
6900 let mut grpc = tonic::server::Grpc::new(codec)
6901 .apply_compression_config(
6902 accept_compression_encodings,
6903 send_compression_encodings,
6904 )
6905 .apply_max_message_size_config(
6906 max_decoding_message_size,
6907 max_encoding_message_size,
6908 );
6909 let res = grpc.unary(method, req).await;
6910 Ok(res)
6911 };
6912 Box::pin(fut)
6913 }
6914 "/qdrant.Points/UpdateVectors" => {
6915 #[allow(non_camel_case_types)]
6916 struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
6917 impl<
6918 T: Points,
6919 > tonic::server::UnaryService<super::UpdatePointVectors>
6920 for UpdateVectorsSvc<T> {
6921 type Response = super::PointsOperationResponse;
6922 type Future = BoxFuture<
6923 tonic::Response<Self::Response>,
6924 tonic::Status,
6925 >;
6926 fn call(
6927 &mut self,
6928 request: tonic::Request<super::UpdatePointVectors>,
6929 ) -> Self::Future {
6930 let inner = Arc::clone(&self.0);
6931 let fut = async move {
6932 <T as Points>::update_vectors(&inner, request).await
6933 };
6934 Box::pin(fut)
6935 }
6936 }
6937 let accept_compression_encodings = self.accept_compression_encodings;
6938 let send_compression_encodings = self.send_compression_encodings;
6939 let max_decoding_message_size = self.max_decoding_message_size;
6940 let max_encoding_message_size = self.max_encoding_message_size;
6941 let inner = self.inner.clone();
6942 let fut = async move {
6943 let method = UpdateVectorsSvc(inner);
6944 let codec = tonic::codec::ProstCodec::default();
6945 let mut grpc = tonic::server::Grpc::new(codec)
6946 .apply_compression_config(
6947 accept_compression_encodings,
6948 send_compression_encodings,
6949 )
6950 .apply_max_message_size_config(
6951 max_decoding_message_size,
6952 max_encoding_message_size,
6953 );
6954 let res = grpc.unary(method, req).await;
6955 Ok(res)
6956 };
6957 Box::pin(fut)
6958 }
6959 "/qdrant.Points/DeleteVectors" => {
6960 #[allow(non_camel_case_types)]
6961 struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
6962 impl<
6963 T: Points,
6964 > tonic::server::UnaryService<super::DeletePointVectors>
6965 for DeleteVectorsSvc<T> {
6966 type Response = super::PointsOperationResponse;
6967 type Future = BoxFuture<
6968 tonic::Response<Self::Response>,
6969 tonic::Status,
6970 >;
6971 fn call(
6972 &mut self,
6973 request: tonic::Request<super::DeletePointVectors>,
6974 ) -> Self::Future {
6975 let inner = Arc::clone(&self.0);
6976 let fut = async move {
6977 <T as Points>::delete_vectors(&inner, request).await
6978 };
6979 Box::pin(fut)
6980 }
6981 }
6982 let accept_compression_encodings = self.accept_compression_encodings;
6983 let send_compression_encodings = self.send_compression_encodings;
6984 let max_decoding_message_size = self.max_decoding_message_size;
6985 let max_encoding_message_size = self.max_encoding_message_size;
6986 let inner = self.inner.clone();
6987 let fut = async move {
6988 let method = DeleteVectorsSvc(inner);
6989 let codec = tonic::codec::ProstCodec::default();
6990 let mut grpc = tonic::server::Grpc::new(codec)
6991 .apply_compression_config(
6992 accept_compression_encodings,
6993 send_compression_encodings,
6994 )
6995 .apply_max_message_size_config(
6996 max_decoding_message_size,
6997 max_encoding_message_size,
6998 );
6999 let res = grpc.unary(method, req).await;
7000 Ok(res)
7001 };
7002 Box::pin(fut)
7003 }
7004 "/qdrant.Points/SetPayload" => {
7005 #[allow(non_camel_case_types)]
7006 struct SetPayloadSvc<T: Points>(pub Arc<T>);
7007 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7008 for SetPayloadSvc<T> {
7009 type Response = super::PointsOperationResponse;
7010 type Future = BoxFuture<
7011 tonic::Response<Self::Response>,
7012 tonic::Status,
7013 >;
7014 fn call(
7015 &mut self,
7016 request: tonic::Request<super::SetPayloadPoints>,
7017 ) -> Self::Future {
7018 let inner = Arc::clone(&self.0);
7019 let fut = async move {
7020 <T as Points>::set_payload(&inner, request).await
7021 };
7022 Box::pin(fut)
7023 }
7024 }
7025 let accept_compression_encodings = self.accept_compression_encodings;
7026 let send_compression_encodings = self.send_compression_encodings;
7027 let max_decoding_message_size = self.max_decoding_message_size;
7028 let max_encoding_message_size = self.max_encoding_message_size;
7029 let inner = self.inner.clone();
7030 let fut = async move {
7031 let method = SetPayloadSvc(inner);
7032 let codec = tonic::codec::ProstCodec::default();
7033 let mut grpc = tonic::server::Grpc::new(codec)
7034 .apply_compression_config(
7035 accept_compression_encodings,
7036 send_compression_encodings,
7037 )
7038 .apply_max_message_size_config(
7039 max_decoding_message_size,
7040 max_encoding_message_size,
7041 );
7042 let res = grpc.unary(method, req).await;
7043 Ok(res)
7044 };
7045 Box::pin(fut)
7046 }
7047 "/qdrant.Points/OverwritePayload" => {
7048 #[allow(non_camel_case_types)]
7049 struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
7050 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7051 for OverwritePayloadSvc<T> {
7052 type Response = super::PointsOperationResponse;
7053 type Future = BoxFuture<
7054 tonic::Response<Self::Response>,
7055 tonic::Status,
7056 >;
7057 fn call(
7058 &mut self,
7059 request: tonic::Request<super::SetPayloadPoints>,
7060 ) -> Self::Future {
7061 let inner = Arc::clone(&self.0);
7062 let fut = async move {
7063 <T as Points>::overwrite_payload(&inner, request).await
7064 };
7065 Box::pin(fut)
7066 }
7067 }
7068 let accept_compression_encodings = self.accept_compression_encodings;
7069 let send_compression_encodings = self.send_compression_encodings;
7070 let max_decoding_message_size = self.max_decoding_message_size;
7071 let max_encoding_message_size = self.max_encoding_message_size;
7072 let inner = self.inner.clone();
7073 let fut = async move {
7074 let method = OverwritePayloadSvc(inner);
7075 let codec = tonic::codec::ProstCodec::default();
7076 let mut grpc = tonic::server::Grpc::new(codec)
7077 .apply_compression_config(
7078 accept_compression_encodings,
7079 send_compression_encodings,
7080 )
7081 .apply_max_message_size_config(
7082 max_decoding_message_size,
7083 max_encoding_message_size,
7084 );
7085 let res = grpc.unary(method, req).await;
7086 Ok(res)
7087 };
7088 Box::pin(fut)
7089 }
7090 "/qdrant.Points/DeletePayload" => {
7091 #[allow(non_camel_case_types)]
7092 struct DeletePayloadSvc<T: Points>(pub Arc<T>);
7093 impl<
7094 T: Points,
7095 > tonic::server::UnaryService<super::DeletePayloadPoints>
7096 for DeletePayloadSvc<T> {
7097 type Response = super::PointsOperationResponse;
7098 type Future = BoxFuture<
7099 tonic::Response<Self::Response>,
7100 tonic::Status,
7101 >;
7102 fn call(
7103 &mut self,
7104 request: tonic::Request<super::DeletePayloadPoints>,
7105 ) -> Self::Future {
7106 let inner = Arc::clone(&self.0);
7107 let fut = async move {
7108 <T as Points>::delete_payload(&inner, request).await
7109 };
7110 Box::pin(fut)
7111 }
7112 }
7113 let accept_compression_encodings = self.accept_compression_encodings;
7114 let send_compression_encodings = self.send_compression_encodings;
7115 let max_decoding_message_size = self.max_decoding_message_size;
7116 let max_encoding_message_size = self.max_encoding_message_size;
7117 let inner = self.inner.clone();
7118 let fut = async move {
7119 let method = DeletePayloadSvc(inner);
7120 let codec = tonic::codec::ProstCodec::default();
7121 let mut grpc = tonic::server::Grpc::new(codec)
7122 .apply_compression_config(
7123 accept_compression_encodings,
7124 send_compression_encodings,
7125 )
7126 .apply_max_message_size_config(
7127 max_decoding_message_size,
7128 max_encoding_message_size,
7129 );
7130 let res = grpc.unary(method, req).await;
7131 Ok(res)
7132 };
7133 Box::pin(fut)
7134 }
7135 "/qdrant.Points/ClearPayload" => {
7136 #[allow(non_camel_case_types)]
7137 struct ClearPayloadSvc<T: Points>(pub Arc<T>);
7138 impl<
7139 T: Points,
7140 > tonic::server::UnaryService<super::ClearPayloadPoints>
7141 for ClearPayloadSvc<T> {
7142 type Response = super::PointsOperationResponse;
7143 type Future = BoxFuture<
7144 tonic::Response<Self::Response>,
7145 tonic::Status,
7146 >;
7147 fn call(
7148 &mut self,
7149 request: tonic::Request<super::ClearPayloadPoints>,
7150 ) -> Self::Future {
7151 let inner = Arc::clone(&self.0);
7152 let fut = async move {
7153 <T as Points>::clear_payload(&inner, request).await
7154 };
7155 Box::pin(fut)
7156 }
7157 }
7158 let accept_compression_encodings = self.accept_compression_encodings;
7159 let send_compression_encodings = self.send_compression_encodings;
7160 let max_decoding_message_size = self.max_decoding_message_size;
7161 let max_encoding_message_size = self.max_encoding_message_size;
7162 let inner = self.inner.clone();
7163 let fut = async move {
7164 let method = ClearPayloadSvc(inner);
7165 let codec = tonic::codec::ProstCodec::default();
7166 let mut grpc = tonic::server::Grpc::new(codec)
7167 .apply_compression_config(
7168 accept_compression_encodings,
7169 send_compression_encodings,
7170 )
7171 .apply_max_message_size_config(
7172 max_decoding_message_size,
7173 max_encoding_message_size,
7174 );
7175 let res = grpc.unary(method, req).await;
7176 Ok(res)
7177 };
7178 Box::pin(fut)
7179 }
7180 "/qdrant.Points/CreateFieldIndex" => {
7181 #[allow(non_camel_case_types)]
7182 struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
7183 impl<
7184 T: Points,
7185 > tonic::server::UnaryService<super::CreateFieldIndexCollection>
7186 for CreateFieldIndexSvc<T> {
7187 type Response = super::PointsOperationResponse;
7188 type Future = BoxFuture<
7189 tonic::Response<Self::Response>,
7190 tonic::Status,
7191 >;
7192 fn call(
7193 &mut self,
7194 request: tonic::Request<super::CreateFieldIndexCollection>,
7195 ) -> Self::Future {
7196 let inner = Arc::clone(&self.0);
7197 let fut = async move {
7198 <T as Points>::create_field_index(&inner, request).await
7199 };
7200 Box::pin(fut)
7201 }
7202 }
7203 let accept_compression_encodings = self.accept_compression_encodings;
7204 let send_compression_encodings = self.send_compression_encodings;
7205 let max_decoding_message_size = self.max_decoding_message_size;
7206 let max_encoding_message_size = self.max_encoding_message_size;
7207 let inner = self.inner.clone();
7208 let fut = async move {
7209 let method = CreateFieldIndexSvc(inner);
7210 let codec = tonic::codec::ProstCodec::default();
7211 let mut grpc = tonic::server::Grpc::new(codec)
7212 .apply_compression_config(
7213 accept_compression_encodings,
7214 send_compression_encodings,
7215 )
7216 .apply_max_message_size_config(
7217 max_decoding_message_size,
7218 max_encoding_message_size,
7219 );
7220 let res = grpc.unary(method, req).await;
7221 Ok(res)
7222 };
7223 Box::pin(fut)
7224 }
7225 "/qdrant.Points/DeleteFieldIndex" => {
7226 #[allow(non_camel_case_types)]
7227 struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
7228 impl<
7229 T: Points,
7230 > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
7231 for DeleteFieldIndexSvc<T> {
7232 type Response = super::PointsOperationResponse;
7233 type Future = BoxFuture<
7234 tonic::Response<Self::Response>,
7235 tonic::Status,
7236 >;
7237 fn call(
7238 &mut self,
7239 request: tonic::Request<super::DeleteFieldIndexCollection>,
7240 ) -> Self::Future {
7241 let inner = Arc::clone(&self.0);
7242 let fut = async move {
7243 <T as Points>::delete_field_index(&inner, request).await
7244 };
7245 Box::pin(fut)
7246 }
7247 }
7248 let accept_compression_encodings = self.accept_compression_encodings;
7249 let send_compression_encodings = self.send_compression_encodings;
7250 let max_decoding_message_size = self.max_decoding_message_size;
7251 let max_encoding_message_size = self.max_encoding_message_size;
7252 let inner = self.inner.clone();
7253 let fut = async move {
7254 let method = DeleteFieldIndexSvc(inner);
7255 let codec = tonic::codec::ProstCodec::default();
7256 let mut grpc = tonic::server::Grpc::new(codec)
7257 .apply_compression_config(
7258 accept_compression_encodings,
7259 send_compression_encodings,
7260 )
7261 .apply_max_message_size_config(
7262 max_decoding_message_size,
7263 max_encoding_message_size,
7264 );
7265 let res = grpc.unary(method, req).await;
7266 Ok(res)
7267 };
7268 Box::pin(fut)
7269 }
7270 "/qdrant.Points/Search" => {
7271 #[allow(non_camel_case_types)]
7272 struct SearchSvc<T: Points>(pub Arc<T>);
7273 impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
7274 for SearchSvc<T> {
7275 type Response = super::SearchResponse;
7276 type Future = BoxFuture<
7277 tonic::Response<Self::Response>,
7278 tonic::Status,
7279 >;
7280 fn call(
7281 &mut self,
7282 request: tonic::Request<super::SearchPoints>,
7283 ) -> Self::Future {
7284 let inner = Arc::clone(&self.0);
7285 let fut = async move {
7286 <T as Points>::search(&inner, request).await
7287 };
7288 Box::pin(fut)
7289 }
7290 }
7291 let accept_compression_encodings = self.accept_compression_encodings;
7292 let send_compression_encodings = self.send_compression_encodings;
7293 let max_decoding_message_size = self.max_decoding_message_size;
7294 let max_encoding_message_size = self.max_encoding_message_size;
7295 let inner = self.inner.clone();
7296 let fut = async move {
7297 let method = SearchSvc(inner);
7298 let codec = tonic::codec::ProstCodec::default();
7299 let mut grpc = tonic::server::Grpc::new(codec)
7300 .apply_compression_config(
7301 accept_compression_encodings,
7302 send_compression_encodings,
7303 )
7304 .apply_max_message_size_config(
7305 max_decoding_message_size,
7306 max_encoding_message_size,
7307 );
7308 let res = grpc.unary(method, req).await;
7309 Ok(res)
7310 };
7311 Box::pin(fut)
7312 }
7313 "/qdrant.Points/SearchBatch" => {
7314 #[allow(non_camel_case_types)]
7315 struct SearchBatchSvc<T: Points>(pub Arc<T>);
7316 impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
7317 for SearchBatchSvc<T> {
7318 type Response = super::SearchBatchResponse;
7319 type Future = BoxFuture<
7320 tonic::Response<Self::Response>,
7321 tonic::Status,
7322 >;
7323 fn call(
7324 &mut self,
7325 request: tonic::Request<super::SearchBatchPoints>,
7326 ) -> Self::Future {
7327 let inner = Arc::clone(&self.0);
7328 let fut = async move {
7329 <T as Points>::search_batch(&inner, request).await
7330 };
7331 Box::pin(fut)
7332 }
7333 }
7334 let accept_compression_encodings = self.accept_compression_encodings;
7335 let send_compression_encodings = self.send_compression_encodings;
7336 let max_decoding_message_size = self.max_decoding_message_size;
7337 let max_encoding_message_size = self.max_encoding_message_size;
7338 let inner = self.inner.clone();
7339 let fut = async move {
7340 let method = SearchBatchSvc(inner);
7341 let codec = tonic::codec::ProstCodec::default();
7342 let mut grpc = tonic::server::Grpc::new(codec)
7343 .apply_compression_config(
7344 accept_compression_encodings,
7345 send_compression_encodings,
7346 )
7347 .apply_max_message_size_config(
7348 max_decoding_message_size,
7349 max_encoding_message_size,
7350 );
7351 let res = grpc.unary(method, req).await;
7352 Ok(res)
7353 };
7354 Box::pin(fut)
7355 }
7356 "/qdrant.Points/SearchGroups" => {
7357 #[allow(non_camel_case_types)]
7358 struct SearchGroupsSvc<T: Points>(pub Arc<T>);
7359 impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
7360 for SearchGroupsSvc<T> {
7361 type Response = super::SearchGroupsResponse;
7362 type Future = BoxFuture<
7363 tonic::Response<Self::Response>,
7364 tonic::Status,
7365 >;
7366 fn call(
7367 &mut self,
7368 request: tonic::Request<super::SearchPointGroups>,
7369 ) -> Self::Future {
7370 let inner = Arc::clone(&self.0);
7371 let fut = async move {
7372 <T as Points>::search_groups(&inner, request).await
7373 };
7374 Box::pin(fut)
7375 }
7376 }
7377 let accept_compression_encodings = self.accept_compression_encodings;
7378 let send_compression_encodings = self.send_compression_encodings;
7379 let max_decoding_message_size = self.max_decoding_message_size;
7380 let max_encoding_message_size = self.max_encoding_message_size;
7381 let inner = self.inner.clone();
7382 let fut = async move {
7383 let method = SearchGroupsSvc(inner);
7384 let codec = tonic::codec::ProstCodec::default();
7385 let mut grpc = tonic::server::Grpc::new(codec)
7386 .apply_compression_config(
7387 accept_compression_encodings,
7388 send_compression_encodings,
7389 )
7390 .apply_max_message_size_config(
7391 max_decoding_message_size,
7392 max_encoding_message_size,
7393 );
7394 let res = grpc.unary(method, req).await;
7395 Ok(res)
7396 };
7397 Box::pin(fut)
7398 }
7399 "/qdrant.Points/Scroll" => {
7400 #[allow(non_camel_case_types)]
7401 struct ScrollSvc<T: Points>(pub Arc<T>);
7402 impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
7403 for ScrollSvc<T> {
7404 type Response = super::ScrollResponse;
7405 type Future = BoxFuture<
7406 tonic::Response<Self::Response>,
7407 tonic::Status,
7408 >;
7409 fn call(
7410 &mut self,
7411 request: tonic::Request<super::ScrollPoints>,
7412 ) -> Self::Future {
7413 let inner = Arc::clone(&self.0);
7414 let fut = async move {
7415 <T as Points>::scroll(&inner, request).await
7416 };
7417 Box::pin(fut)
7418 }
7419 }
7420 let accept_compression_encodings = self.accept_compression_encodings;
7421 let send_compression_encodings = self.send_compression_encodings;
7422 let max_decoding_message_size = self.max_decoding_message_size;
7423 let max_encoding_message_size = self.max_encoding_message_size;
7424 let inner = self.inner.clone();
7425 let fut = async move {
7426 let method = ScrollSvc(inner);
7427 let codec = tonic::codec::ProstCodec::default();
7428 let mut grpc = tonic::server::Grpc::new(codec)
7429 .apply_compression_config(
7430 accept_compression_encodings,
7431 send_compression_encodings,
7432 )
7433 .apply_max_message_size_config(
7434 max_decoding_message_size,
7435 max_encoding_message_size,
7436 );
7437 let res = grpc.unary(method, req).await;
7438 Ok(res)
7439 };
7440 Box::pin(fut)
7441 }
7442 "/qdrant.Points/Recommend" => {
7443 #[allow(non_camel_case_types)]
7444 struct RecommendSvc<T: Points>(pub Arc<T>);
7445 impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
7446 for RecommendSvc<T> {
7447 type Response = super::RecommendResponse;
7448 type Future = BoxFuture<
7449 tonic::Response<Self::Response>,
7450 tonic::Status,
7451 >;
7452 fn call(
7453 &mut self,
7454 request: tonic::Request<super::RecommendPoints>,
7455 ) -> Self::Future {
7456 let inner = Arc::clone(&self.0);
7457 let fut = async move {
7458 <T as Points>::recommend(&inner, request).await
7459 };
7460 Box::pin(fut)
7461 }
7462 }
7463 let accept_compression_encodings = self.accept_compression_encodings;
7464 let send_compression_encodings = self.send_compression_encodings;
7465 let max_decoding_message_size = self.max_decoding_message_size;
7466 let max_encoding_message_size = self.max_encoding_message_size;
7467 let inner = self.inner.clone();
7468 let fut = async move {
7469 let method = RecommendSvc(inner);
7470 let codec = tonic::codec::ProstCodec::default();
7471 let mut grpc = tonic::server::Grpc::new(codec)
7472 .apply_compression_config(
7473 accept_compression_encodings,
7474 send_compression_encodings,
7475 )
7476 .apply_max_message_size_config(
7477 max_decoding_message_size,
7478 max_encoding_message_size,
7479 );
7480 let res = grpc.unary(method, req).await;
7481 Ok(res)
7482 };
7483 Box::pin(fut)
7484 }
7485 "/qdrant.Points/RecommendBatch" => {
7486 #[allow(non_camel_case_types)]
7487 struct RecommendBatchSvc<T: Points>(pub Arc<T>);
7488 impl<
7489 T: Points,
7490 > tonic::server::UnaryService<super::RecommendBatchPoints>
7491 for RecommendBatchSvc<T> {
7492 type Response = super::RecommendBatchResponse;
7493 type Future = BoxFuture<
7494 tonic::Response<Self::Response>,
7495 tonic::Status,
7496 >;
7497 fn call(
7498 &mut self,
7499 request: tonic::Request<super::RecommendBatchPoints>,
7500 ) -> Self::Future {
7501 let inner = Arc::clone(&self.0);
7502 let fut = async move {
7503 <T as Points>::recommend_batch(&inner, request).await
7504 };
7505 Box::pin(fut)
7506 }
7507 }
7508 let accept_compression_encodings = self.accept_compression_encodings;
7509 let send_compression_encodings = self.send_compression_encodings;
7510 let max_decoding_message_size = self.max_decoding_message_size;
7511 let max_encoding_message_size = self.max_encoding_message_size;
7512 let inner = self.inner.clone();
7513 let fut = async move {
7514 let method = RecommendBatchSvc(inner);
7515 let codec = tonic::codec::ProstCodec::default();
7516 let mut grpc = tonic::server::Grpc::new(codec)
7517 .apply_compression_config(
7518 accept_compression_encodings,
7519 send_compression_encodings,
7520 )
7521 .apply_max_message_size_config(
7522 max_decoding_message_size,
7523 max_encoding_message_size,
7524 );
7525 let res = grpc.unary(method, req).await;
7526 Ok(res)
7527 };
7528 Box::pin(fut)
7529 }
7530 "/qdrant.Points/RecommendGroups" => {
7531 #[allow(non_camel_case_types)]
7532 struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
7533 impl<
7534 T: Points,
7535 > tonic::server::UnaryService<super::RecommendPointGroups>
7536 for RecommendGroupsSvc<T> {
7537 type Response = super::RecommendGroupsResponse;
7538 type Future = BoxFuture<
7539 tonic::Response<Self::Response>,
7540 tonic::Status,
7541 >;
7542 fn call(
7543 &mut self,
7544 request: tonic::Request<super::RecommendPointGroups>,
7545 ) -> Self::Future {
7546 let inner = Arc::clone(&self.0);
7547 let fut = async move {
7548 <T as Points>::recommend_groups(&inner, request).await
7549 };
7550 Box::pin(fut)
7551 }
7552 }
7553 let accept_compression_encodings = self.accept_compression_encodings;
7554 let send_compression_encodings = self.send_compression_encodings;
7555 let max_decoding_message_size = self.max_decoding_message_size;
7556 let max_encoding_message_size = self.max_encoding_message_size;
7557 let inner = self.inner.clone();
7558 let fut = async move {
7559 let method = RecommendGroupsSvc(inner);
7560 let codec = tonic::codec::ProstCodec::default();
7561 let mut grpc = tonic::server::Grpc::new(codec)
7562 .apply_compression_config(
7563 accept_compression_encodings,
7564 send_compression_encodings,
7565 )
7566 .apply_max_message_size_config(
7567 max_decoding_message_size,
7568 max_encoding_message_size,
7569 );
7570 let res = grpc.unary(method, req).await;
7571 Ok(res)
7572 };
7573 Box::pin(fut)
7574 }
7575 "/qdrant.Points/Discover" => {
7576 #[allow(non_camel_case_types)]
7577 struct DiscoverSvc<T: Points>(pub Arc<T>);
7578 impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
7579 for DiscoverSvc<T> {
7580 type Response = super::DiscoverResponse;
7581 type Future = BoxFuture<
7582 tonic::Response<Self::Response>,
7583 tonic::Status,
7584 >;
7585 fn call(
7586 &mut self,
7587 request: tonic::Request<super::DiscoverPoints>,
7588 ) -> Self::Future {
7589 let inner = Arc::clone(&self.0);
7590 let fut = async move {
7591 <T as Points>::discover(&inner, request).await
7592 };
7593 Box::pin(fut)
7594 }
7595 }
7596 let accept_compression_encodings = self.accept_compression_encodings;
7597 let send_compression_encodings = self.send_compression_encodings;
7598 let max_decoding_message_size = self.max_decoding_message_size;
7599 let max_encoding_message_size = self.max_encoding_message_size;
7600 let inner = self.inner.clone();
7601 let fut = async move {
7602 let method = DiscoverSvc(inner);
7603 let codec = tonic::codec::ProstCodec::default();
7604 let mut grpc = tonic::server::Grpc::new(codec)
7605 .apply_compression_config(
7606 accept_compression_encodings,
7607 send_compression_encodings,
7608 )
7609 .apply_max_message_size_config(
7610 max_decoding_message_size,
7611 max_encoding_message_size,
7612 );
7613 let res = grpc.unary(method, req).await;
7614 Ok(res)
7615 };
7616 Box::pin(fut)
7617 }
7618 "/qdrant.Points/DiscoverBatch" => {
7619 #[allow(non_camel_case_types)]
7620 struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
7621 impl<
7622 T: Points,
7623 > tonic::server::UnaryService<super::DiscoverBatchPoints>
7624 for DiscoverBatchSvc<T> {
7625 type Response = super::DiscoverBatchResponse;
7626 type Future = BoxFuture<
7627 tonic::Response<Self::Response>,
7628 tonic::Status,
7629 >;
7630 fn call(
7631 &mut self,
7632 request: tonic::Request<super::DiscoverBatchPoints>,
7633 ) -> Self::Future {
7634 let inner = Arc::clone(&self.0);
7635 let fut = async move {
7636 <T as Points>::discover_batch(&inner, request).await
7637 };
7638 Box::pin(fut)
7639 }
7640 }
7641 let accept_compression_encodings = self.accept_compression_encodings;
7642 let send_compression_encodings = self.send_compression_encodings;
7643 let max_decoding_message_size = self.max_decoding_message_size;
7644 let max_encoding_message_size = self.max_encoding_message_size;
7645 let inner = self.inner.clone();
7646 let fut = async move {
7647 let method = DiscoverBatchSvc(inner);
7648 let codec = tonic::codec::ProstCodec::default();
7649 let mut grpc = tonic::server::Grpc::new(codec)
7650 .apply_compression_config(
7651 accept_compression_encodings,
7652 send_compression_encodings,
7653 )
7654 .apply_max_message_size_config(
7655 max_decoding_message_size,
7656 max_encoding_message_size,
7657 );
7658 let res = grpc.unary(method, req).await;
7659 Ok(res)
7660 };
7661 Box::pin(fut)
7662 }
7663 "/qdrant.Points/Count" => {
7664 #[allow(non_camel_case_types)]
7665 struct CountSvc<T: Points>(pub Arc<T>);
7666 impl<T: Points> tonic::server::UnaryService<super::CountPoints>
7667 for CountSvc<T> {
7668 type Response = super::CountResponse;
7669 type Future = BoxFuture<
7670 tonic::Response<Self::Response>,
7671 tonic::Status,
7672 >;
7673 fn call(
7674 &mut self,
7675 request: tonic::Request<super::CountPoints>,
7676 ) -> Self::Future {
7677 let inner = Arc::clone(&self.0);
7678 let fut = async move {
7679 <T as Points>::count(&inner, request).await
7680 };
7681 Box::pin(fut)
7682 }
7683 }
7684 let accept_compression_encodings = self.accept_compression_encodings;
7685 let send_compression_encodings = self.send_compression_encodings;
7686 let max_decoding_message_size = self.max_decoding_message_size;
7687 let max_encoding_message_size = self.max_encoding_message_size;
7688 let inner = self.inner.clone();
7689 let fut = async move {
7690 let method = CountSvc(inner);
7691 let codec = tonic::codec::ProstCodec::default();
7692 let mut grpc = tonic::server::Grpc::new(codec)
7693 .apply_compression_config(
7694 accept_compression_encodings,
7695 send_compression_encodings,
7696 )
7697 .apply_max_message_size_config(
7698 max_decoding_message_size,
7699 max_encoding_message_size,
7700 );
7701 let res = grpc.unary(method, req).await;
7702 Ok(res)
7703 };
7704 Box::pin(fut)
7705 }
7706 "/qdrant.Points/UpdateBatch" => {
7707 #[allow(non_camel_case_types)]
7708 struct UpdateBatchSvc<T: Points>(pub Arc<T>);
7709 impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
7710 for UpdateBatchSvc<T> {
7711 type Response = super::UpdateBatchResponse;
7712 type Future = BoxFuture<
7713 tonic::Response<Self::Response>,
7714 tonic::Status,
7715 >;
7716 fn call(
7717 &mut self,
7718 request: tonic::Request<super::UpdateBatchPoints>,
7719 ) -> Self::Future {
7720 let inner = Arc::clone(&self.0);
7721 let fut = async move {
7722 <T as Points>::update_batch(&inner, request).await
7723 };
7724 Box::pin(fut)
7725 }
7726 }
7727 let accept_compression_encodings = self.accept_compression_encodings;
7728 let send_compression_encodings = self.send_compression_encodings;
7729 let max_decoding_message_size = self.max_decoding_message_size;
7730 let max_encoding_message_size = self.max_encoding_message_size;
7731 let inner = self.inner.clone();
7732 let fut = async move {
7733 let method = UpdateBatchSvc(inner);
7734 let codec = tonic::codec::ProstCodec::default();
7735 let mut grpc = tonic::server::Grpc::new(codec)
7736 .apply_compression_config(
7737 accept_compression_encodings,
7738 send_compression_encodings,
7739 )
7740 .apply_max_message_size_config(
7741 max_decoding_message_size,
7742 max_encoding_message_size,
7743 );
7744 let res = grpc.unary(method, req).await;
7745 Ok(res)
7746 };
7747 Box::pin(fut)
7748 }
7749 "/qdrant.Points/Query" => {
7750 #[allow(non_camel_case_types)]
7751 struct QuerySvc<T: Points>(pub Arc<T>);
7752 impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
7753 for QuerySvc<T> {
7754 type Response = super::QueryResponse;
7755 type Future = BoxFuture<
7756 tonic::Response<Self::Response>,
7757 tonic::Status,
7758 >;
7759 fn call(
7760 &mut self,
7761 request: tonic::Request<super::QueryPoints>,
7762 ) -> Self::Future {
7763 let inner = Arc::clone(&self.0);
7764 let fut = async move {
7765 <T as Points>::query(&inner, request).await
7766 };
7767 Box::pin(fut)
7768 }
7769 }
7770 let accept_compression_encodings = self.accept_compression_encodings;
7771 let send_compression_encodings = self.send_compression_encodings;
7772 let max_decoding_message_size = self.max_decoding_message_size;
7773 let max_encoding_message_size = self.max_encoding_message_size;
7774 let inner = self.inner.clone();
7775 let fut = async move {
7776 let method = QuerySvc(inner);
7777 let codec = tonic::codec::ProstCodec::default();
7778 let mut grpc = tonic::server::Grpc::new(codec)
7779 .apply_compression_config(
7780 accept_compression_encodings,
7781 send_compression_encodings,
7782 )
7783 .apply_max_message_size_config(
7784 max_decoding_message_size,
7785 max_encoding_message_size,
7786 );
7787 let res = grpc.unary(method, req).await;
7788 Ok(res)
7789 };
7790 Box::pin(fut)
7791 }
7792 "/qdrant.Points/QueryBatch" => {
7793 #[allow(non_camel_case_types)]
7794 struct QueryBatchSvc<T: Points>(pub Arc<T>);
7795 impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
7796 for QueryBatchSvc<T> {
7797 type Response = super::QueryBatchResponse;
7798 type Future = BoxFuture<
7799 tonic::Response<Self::Response>,
7800 tonic::Status,
7801 >;
7802 fn call(
7803 &mut self,
7804 request: tonic::Request<super::QueryBatchPoints>,
7805 ) -> Self::Future {
7806 let inner = Arc::clone(&self.0);
7807 let fut = async move {
7808 <T as Points>::query_batch(&inner, request).await
7809 };
7810 Box::pin(fut)
7811 }
7812 }
7813 let accept_compression_encodings = self.accept_compression_encodings;
7814 let send_compression_encodings = self.send_compression_encodings;
7815 let max_decoding_message_size = self.max_decoding_message_size;
7816 let max_encoding_message_size = self.max_encoding_message_size;
7817 let inner = self.inner.clone();
7818 let fut = async move {
7819 let method = QueryBatchSvc(inner);
7820 let codec = tonic::codec::ProstCodec::default();
7821 let mut grpc = tonic::server::Grpc::new(codec)
7822 .apply_compression_config(
7823 accept_compression_encodings,
7824 send_compression_encodings,
7825 )
7826 .apply_max_message_size_config(
7827 max_decoding_message_size,
7828 max_encoding_message_size,
7829 );
7830 let res = grpc.unary(method, req).await;
7831 Ok(res)
7832 };
7833 Box::pin(fut)
7834 }
7835 "/qdrant.Points/QueryGroups" => {
7836 #[allow(non_camel_case_types)]
7837 struct QueryGroupsSvc<T: Points>(pub Arc<T>);
7838 impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
7839 for QueryGroupsSvc<T> {
7840 type Response = super::QueryGroupsResponse;
7841 type Future = BoxFuture<
7842 tonic::Response<Self::Response>,
7843 tonic::Status,
7844 >;
7845 fn call(
7846 &mut self,
7847 request: tonic::Request<super::QueryPointGroups>,
7848 ) -> Self::Future {
7849 let inner = Arc::clone(&self.0);
7850 let fut = async move {
7851 <T as Points>::query_groups(&inner, request).await
7852 };
7853 Box::pin(fut)
7854 }
7855 }
7856 let accept_compression_encodings = self.accept_compression_encodings;
7857 let send_compression_encodings = self.send_compression_encodings;
7858 let max_decoding_message_size = self.max_decoding_message_size;
7859 let max_encoding_message_size = self.max_encoding_message_size;
7860 let inner = self.inner.clone();
7861 let fut = async move {
7862 let method = QueryGroupsSvc(inner);
7863 let codec = tonic::codec::ProstCodec::default();
7864 let mut grpc = tonic::server::Grpc::new(codec)
7865 .apply_compression_config(
7866 accept_compression_encodings,
7867 send_compression_encodings,
7868 )
7869 .apply_max_message_size_config(
7870 max_decoding_message_size,
7871 max_encoding_message_size,
7872 );
7873 let res = grpc.unary(method, req).await;
7874 Ok(res)
7875 };
7876 Box::pin(fut)
7877 }
7878 "/qdrant.Points/Facet" => {
7879 #[allow(non_camel_case_types)]
7880 struct FacetSvc<T: Points>(pub Arc<T>);
7881 impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
7882 for FacetSvc<T> {
7883 type Response = super::FacetResponse;
7884 type Future = BoxFuture<
7885 tonic::Response<Self::Response>,
7886 tonic::Status,
7887 >;
7888 fn call(
7889 &mut self,
7890 request: tonic::Request<super::FacetCounts>,
7891 ) -> Self::Future {
7892 let inner = Arc::clone(&self.0);
7893 let fut = async move {
7894 <T as Points>::facet(&inner, request).await
7895 };
7896 Box::pin(fut)
7897 }
7898 }
7899 let accept_compression_encodings = self.accept_compression_encodings;
7900 let send_compression_encodings = self.send_compression_encodings;
7901 let max_decoding_message_size = self.max_decoding_message_size;
7902 let max_encoding_message_size = self.max_encoding_message_size;
7903 let inner = self.inner.clone();
7904 let fut = async move {
7905 let method = FacetSvc(inner);
7906 let codec = tonic::codec::ProstCodec::default();
7907 let mut grpc = tonic::server::Grpc::new(codec)
7908 .apply_compression_config(
7909 accept_compression_encodings,
7910 send_compression_encodings,
7911 )
7912 .apply_max_message_size_config(
7913 max_decoding_message_size,
7914 max_encoding_message_size,
7915 );
7916 let res = grpc.unary(method, req).await;
7917 Ok(res)
7918 };
7919 Box::pin(fut)
7920 }
7921 "/qdrant.Points/SearchMatrixPairs" => {
7922 #[allow(non_camel_case_types)]
7923 struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
7924 impl<
7925 T: Points,
7926 > tonic::server::UnaryService<super::SearchMatrixPoints>
7927 for SearchMatrixPairsSvc<T> {
7928 type Response = super::SearchMatrixPairsResponse;
7929 type Future = BoxFuture<
7930 tonic::Response<Self::Response>,
7931 tonic::Status,
7932 >;
7933 fn call(
7934 &mut self,
7935 request: tonic::Request<super::SearchMatrixPoints>,
7936 ) -> Self::Future {
7937 let inner = Arc::clone(&self.0);
7938 let fut = async move {
7939 <T as Points>::search_matrix_pairs(&inner, request).await
7940 };
7941 Box::pin(fut)
7942 }
7943 }
7944 let accept_compression_encodings = self.accept_compression_encodings;
7945 let send_compression_encodings = self.send_compression_encodings;
7946 let max_decoding_message_size = self.max_decoding_message_size;
7947 let max_encoding_message_size = self.max_encoding_message_size;
7948 let inner = self.inner.clone();
7949 let fut = async move {
7950 let method = SearchMatrixPairsSvc(inner);
7951 let codec = tonic::codec::ProstCodec::default();
7952 let mut grpc = tonic::server::Grpc::new(codec)
7953 .apply_compression_config(
7954 accept_compression_encodings,
7955 send_compression_encodings,
7956 )
7957 .apply_max_message_size_config(
7958 max_decoding_message_size,
7959 max_encoding_message_size,
7960 );
7961 let res = grpc.unary(method, req).await;
7962 Ok(res)
7963 };
7964 Box::pin(fut)
7965 }
7966 "/qdrant.Points/SearchMatrixOffsets" => {
7967 #[allow(non_camel_case_types)]
7968 struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
7969 impl<
7970 T: Points,
7971 > tonic::server::UnaryService<super::SearchMatrixPoints>
7972 for SearchMatrixOffsetsSvc<T> {
7973 type Response = super::SearchMatrixOffsetsResponse;
7974 type Future = BoxFuture<
7975 tonic::Response<Self::Response>,
7976 tonic::Status,
7977 >;
7978 fn call(
7979 &mut self,
7980 request: tonic::Request<super::SearchMatrixPoints>,
7981 ) -> Self::Future {
7982 let inner = Arc::clone(&self.0);
7983 let fut = async move {
7984 <T as Points>::search_matrix_offsets(&inner, request).await
7985 };
7986 Box::pin(fut)
7987 }
7988 }
7989 let accept_compression_encodings = self.accept_compression_encodings;
7990 let send_compression_encodings = self.send_compression_encodings;
7991 let max_decoding_message_size = self.max_decoding_message_size;
7992 let max_encoding_message_size = self.max_encoding_message_size;
7993 let inner = self.inner.clone();
7994 let fut = async move {
7995 let method = SearchMatrixOffsetsSvc(inner);
7996 let codec = tonic::codec::ProstCodec::default();
7997 let mut grpc = tonic::server::Grpc::new(codec)
7998 .apply_compression_config(
7999 accept_compression_encodings,
8000 send_compression_encodings,
8001 )
8002 .apply_max_message_size_config(
8003 max_decoding_message_size,
8004 max_encoding_message_size,
8005 );
8006 let res = grpc.unary(method, req).await;
8007 Ok(res)
8008 };
8009 Box::pin(fut)
8010 }
8011 _ => {
8012 Box::pin(async move {
8013 let mut response = http::Response::new(empty_body());
8014 let headers = response.headers_mut();
8015 headers
8016 .insert(
8017 tonic::Status::GRPC_STATUS,
8018 (tonic::Code::Unimplemented as i32).into(),
8019 );
8020 headers
8021 .insert(
8022 http::header::CONTENT_TYPE,
8023 tonic::metadata::GRPC_CONTENT_TYPE,
8024 );
8025 Ok(response)
8026 })
8027 }
8028 }
8029 }
8030 }
8031 impl<T> Clone for PointsServer<T> {
8032 fn clone(&self) -> Self {
8033 let inner = self.inner.clone();
8034 Self {
8035 inner,
8036 accept_compression_encodings: self.accept_compression_encodings,
8037 send_compression_encodings: self.send_compression_encodings,
8038 max_decoding_message_size: self.max_decoding_message_size,
8039 max_encoding_message_size: self.max_encoding_message_size,
8040 }
8041 }
8042 }
8043 pub const SERVICE_NAME: &str = "qdrant.Points";
8045 impl<T> tonic::server::NamedService for PointsServer<T> {
8046 const NAME: &'static str = SERVICE_NAME;
8047 }
8048}
8049#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8050pub struct CreateFullSnapshotRequest {}
8051#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8052pub struct ListFullSnapshotsRequest {}
8053#[derive(Clone, PartialEq, ::prost::Message)]
8054pub struct DeleteFullSnapshotRequest {
8055 #[prost(string, tag = "1")]
8057 pub snapshot_name: ::prost::alloc::string::String,
8058}
8059#[derive(Clone, PartialEq, ::prost::Message)]
8060pub struct CreateSnapshotRequest {
8061 #[prost(string, tag = "1")]
8063 pub collection_name: ::prost::alloc::string::String,
8064}
8065#[derive(Clone, PartialEq, ::prost::Message)]
8066pub struct ListSnapshotsRequest {
8067 #[prost(string, tag = "1")]
8069 pub collection_name: ::prost::alloc::string::String,
8070}
8071#[derive(Clone, PartialEq, ::prost::Message)]
8072pub struct DeleteSnapshotRequest {
8073 #[prost(string, tag = "1")]
8075 pub collection_name: ::prost::alloc::string::String,
8076 #[prost(string, tag = "2")]
8078 pub snapshot_name: ::prost::alloc::string::String,
8079}
8080#[derive(Clone, PartialEq, ::prost::Message)]
8081pub struct SnapshotDescription {
8082 #[prost(string, tag = "1")]
8084 pub name: ::prost::alloc::string::String,
8085 #[prost(message, optional, tag = "2")]
8087 pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
8088 #[prost(int64, tag = "3")]
8090 pub size: i64,
8091 #[prost(string, optional, tag = "4")]
8093 pub checksum: ::core::option::Option<::prost::alloc::string::String>,
8094}
8095#[derive(Clone, PartialEq, ::prost::Message)]
8096pub struct CreateSnapshotResponse {
8097 #[prost(message, optional, tag = "1")]
8098 pub snapshot_description: ::core::option::Option<SnapshotDescription>,
8099 #[prost(double, tag = "2")]
8101 pub time: f64,
8102}
8103#[derive(Clone, PartialEq, ::prost::Message)]
8104pub struct ListSnapshotsResponse {
8105 #[prost(message, repeated, tag = "1")]
8106 pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
8107 #[prost(double, tag = "2")]
8109 pub time: f64,
8110}
8111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8112pub struct DeleteSnapshotResponse {
8113 #[prost(double, tag = "1")]
8115 pub time: f64,
8116}
8117pub mod snapshots_client {
8119 #![allow(
8120 unused_variables,
8121 dead_code,
8122 missing_docs,
8123 clippy::wildcard_imports,
8124 clippy::let_unit_value,
8125 )]
8126 use tonic::codegen::*;
8127 use tonic::codegen::http::Uri;
8128 #[derive(Debug, Clone)]
8129 pub struct SnapshotsClient<T> {
8130 inner: tonic::client::Grpc<T>,
8131 }
8132 impl SnapshotsClient<tonic::transport::Channel> {
8133 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8135 where
8136 D: TryInto<tonic::transport::Endpoint>,
8137 D::Error: Into<StdError>,
8138 {
8139 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8140 Ok(Self::new(conn))
8141 }
8142 }
8143 impl<T> SnapshotsClient<T>
8144 where
8145 T: tonic::client::GrpcService<tonic::body::BoxBody>,
8146 T::Error: Into<StdError>,
8147 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8148 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8149 {
8150 pub fn new(inner: T) -> Self {
8151 let inner = tonic::client::Grpc::new(inner);
8152 Self { inner }
8153 }
8154 pub fn with_origin(inner: T, origin: Uri) -> Self {
8155 let inner = tonic::client::Grpc::with_origin(inner, origin);
8156 Self { inner }
8157 }
8158 pub fn with_interceptor<F>(
8159 inner: T,
8160 interceptor: F,
8161 ) -> SnapshotsClient<InterceptedService<T, F>>
8162 where
8163 F: tonic::service::Interceptor,
8164 T::ResponseBody: Default,
8165 T: tonic::codegen::Service<
8166 http::Request<tonic::body::BoxBody>,
8167 Response = http::Response<
8168 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
8169 >,
8170 >,
8171 <T as tonic::codegen::Service<
8172 http::Request<tonic::body::BoxBody>,
8173 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8174 {
8175 SnapshotsClient::new(InterceptedService::new(inner, interceptor))
8176 }
8177 #[must_use]
8182 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8183 self.inner = self.inner.send_compressed(encoding);
8184 self
8185 }
8186 #[must_use]
8188 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8189 self.inner = self.inner.accept_compressed(encoding);
8190 self
8191 }
8192 #[must_use]
8196 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8197 self.inner = self.inner.max_decoding_message_size(limit);
8198 self
8199 }
8200 #[must_use]
8204 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8205 self.inner = self.inner.max_encoding_message_size(limit);
8206 self
8207 }
8208 pub async fn create(
8211 &mut self,
8212 request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
8213 ) -> std::result::Result<
8214 tonic::Response<super::CreateSnapshotResponse>,
8215 tonic::Status,
8216 > {
8217 self.inner
8218 .ready()
8219 .await
8220 .map_err(|e| {
8221 tonic::Status::unknown(
8222 format!("Service was not ready: {}", e.into()),
8223 )
8224 })?;
8225 let codec = tonic::codec::ProstCodec::default();
8226 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
8227 let mut req = request.into_request();
8228 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
8229 self.inner.unary(req, path, codec).await
8230 }
8231 pub async fn list(
8234 &mut self,
8235 request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
8236 ) -> std::result::Result<
8237 tonic::Response<super::ListSnapshotsResponse>,
8238 tonic::Status,
8239 > {
8240 self.inner
8241 .ready()
8242 .await
8243 .map_err(|e| {
8244 tonic::Status::unknown(
8245 format!("Service was not ready: {}", e.into()),
8246 )
8247 })?;
8248 let codec = tonic::codec::ProstCodec::default();
8249 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
8250 let mut req = request.into_request();
8251 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
8252 self.inner.unary(req, path, codec).await
8253 }
8254 pub async fn delete(
8257 &mut self,
8258 request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
8259 ) -> std::result::Result<
8260 tonic::Response<super::DeleteSnapshotResponse>,
8261 tonic::Status,
8262 > {
8263 self.inner
8264 .ready()
8265 .await
8266 .map_err(|e| {
8267 tonic::Status::unknown(
8268 format!("Service was not ready: {}", e.into()),
8269 )
8270 })?;
8271 let codec = tonic::codec::ProstCodec::default();
8272 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
8273 let mut req = request.into_request();
8274 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
8275 self.inner.unary(req, path, codec).await
8276 }
8277 pub async fn create_full(
8280 &mut self,
8281 request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
8282 ) -> std::result::Result<
8283 tonic::Response<super::CreateSnapshotResponse>,
8284 tonic::Status,
8285 > {
8286 self.inner
8287 .ready()
8288 .await
8289 .map_err(|e| {
8290 tonic::Status::unknown(
8291 format!("Service was not ready: {}", e.into()),
8292 )
8293 })?;
8294 let codec = tonic::codec::ProstCodec::default();
8295 let path = http::uri::PathAndQuery::from_static(
8296 "/qdrant.Snapshots/CreateFull",
8297 );
8298 let mut req = request.into_request();
8299 req.extensions_mut()
8300 .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
8301 self.inner.unary(req, path, codec).await
8302 }
8303 pub async fn list_full(
8306 &mut self,
8307 request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
8308 ) -> std::result::Result<
8309 tonic::Response<super::ListSnapshotsResponse>,
8310 tonic::Status,
8311 > {
8312 self.inner
8313 .ready()
8314 .await
8315 .map_err(|e| {
8316 tonic::Status::unknown(
8317 format!("Service was not ready: {}", e.into()),
8318 )
8319 })?;
8320 let codec = tonic::codec::ProstCodec::default();
8321 let path = http::uri::PathAndQuery::from_static(
8322 "/qdrant.Snapshots/ListFull",
8323 );
8324 let mut req = request.into_request();
8325 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
8326 self.inner.unary(req, path, codec).await
8327 }
8328 pub async fn delete_full(
8331 &mut self,
8332 request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
8333 ) -> std::result::Result<
8334 tonic::Response<super::DeleteSnapshotResponse>,
8335 tonic::Status,
8336 > {
8337 self.inner
8338 .ready()
8339 .await
8340 .map_err(|e| {
8341 tonic::Status::unknown(
8342 format!("Service was not ready: {}", e.into()),
8343 )
8344 })?;
8345 let codec = tonic::codec::ProstCodec::default();
8346 let path = http::uri::PathAndQuery::from_static(
8347 "/qdrant.Snapshots/DeleteFull",
8348 );
8349 let mut req = request.into_request();
8350 req.extensions_mut()
8351 .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
8352 self.inner.unary(req, path, codec).await
8353 }
8354 }
8355}
8356pub mod snapshots_server {
8358 #![allow(
8359 unused_variables,
8360 dead_code,
8361 missing_docs,
8362 clippy::wildcard_imports,
8363 clippy::let_unit_value,
8364 )]
8365 use tonic::codegen::*;
8366 #[async_trait]
8368 pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
8369 async fn create(
8372 &self,
8373 request: tonic::Request<super::CreateSnapshotRequest>,
8374 ) -> std::result::Result<
8375 tonic::Response<super::CreateSnapshotResponse>,
8376 tonic::Status,
8377 >;
8378 async fn list(
8381 &self,
8382 request: tonic::Request<super::ListSnapshotsRequest>,
8383 ) -> std::result::Result<
8384 tonic::Response<super::ListSnapshotsResponse>,
8385 tonic::Status,
8386 >;
8387 async fn delete(
8390 &self,
8391 request: tonic::Request<super::DeleteSnapshotRequest>,
8392 ) -> std::result::Result<
8393 tonic::Response<super::DeleteSnapshotResponse>,
8394 tonic::Status,
8395 >;
8396 async fn create_full(
8399 &self,
8400 request: tonic::Request<super::CreateFullSnapshotRequest>,
8401 ) -> std::result::Result<
8402 tonic::Response<super::CreateSnapshotResponse>,
8403 tonic::Status,
8404 >;
8405 async fn list_full(
8408 &self,
8409 request: tonic::Request<super::ListFullSnapshotsRequest>,
8410 ) -> std::result::Result<
8411 tonic::Response<super::ListSnapshotsResponse>,
8412 tonic::Status,
8413 >;
8414 async fn delete_full(
8417 &self,
8418 request: tonic::Request<super::DeleteFullSnapshotRequest>,
8419 ) -> std::result::Result<
8420 tonic::Response<super::DeleteSnapshotResponse>,
8421 tonic::Status,
8422 >;
8423 }
8424 #[derive(Debug)]
8425 pub struct SnapshotsServer<T> {
8426 inner: Arc<T>,
8427 accept_compression_encodings: EnabledCompressionEncodings,
8428 send_compression_encodings: EnabledCompressionEncodings,
8429 max_decoding_message_size: Option<usize>,
8430 max_encoding_message_size: Option<usize>,
8431 }
8432 impl<T> SnapshotsServer<T> {
8433 pub fn new(inner: T) -> Self {
8434 Self::from_arc(Arc::new(inner))
8435 }
8436 pub fn from_arc(inner: Arc<T>) -> Self {
8437 Self {
8438 inner,
8439 accept_compression_encodings: Default::default(),
8440 send_compression_encodings: Default::default(),
8441 max_decoding_message_size: None,
8442 max_encoding_message_size: None,
8443 }
8444 }
8445 pub fn with_interceptor<F>(
8446 inner: T,
8447 interceptor: F,
8448 ) -> InterceptedService<Self, F>
8449 where
8450 F: tonic::service::Interceptor,
8451 {
8452 InterceptedService::new(Self::new(inner), interceptor)
8453 }
8454 #[must_use]
8456 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8457 self.accept_compression_encodings.enable(encoding);
8458 self
8459 }
8460 #[must_use]
8462 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8463 self.send_compression_encodings.enable(encoding);
8464 self
8465 }
8466 #[must_use]
8470 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8471 self.max_decoding_message_size = Some(limit);
8472 self
8473 }
8474 #[must_use]
8478 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8479 self.max_encoding_message_size = Some(limit);
8480 self
8481 }
8482 }
8483 impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
8484 where
8485 T: Snapshots,
8486 B: Body + std::marker::Send + 'static,
8487 B::Error: Into<StdError> + std::marker::Send + 'static,
8488 {
8489 type Response = http::Response<tonic::body::BoxBody>;
8490 type Error = std::convert::Infallible;
8491 type Future = BoxFuture<Self::Response, Self::Error>;
8492 fn poll_ready(
8493 &mut self,
8494 _cx: &mut Context<'_>,
8495 ) -> Poll<std::result::Result<(), Self::Error>> {
8496 Poll::Ready(Ok(()))
8497 }
8498 fn call(&mut self, req: http::Request<B>) -> Self::Future {
8499 match req.uri().path() {
8500 "/qdrant.Snapshots/Create" => {
8501 #[allow(non_camel_case_types)]
8502 struct CreateSvc<T: Snapshots>(pub Arc<T>);
8503 impl<
8504 T: Snapshots,
8505 > tonic::server::UnaryService<super::CreateSnapshotRequest>
8506 for CreateSvc<T> {
8507 type Response = super::CreateSnapshotResponse;
8508 type Future = BoxFuture<
8509 tonic::Response<Self::Response>,
8510 tonic::Status,
8511 >;
8512 fn call(
8513 &mut self,
8514 request: tonic::Request<super::CreateSnapshotRequest>,
8515 ) -> Self::Future {
8516 let inner = Arc::clone(&self.0);
8517 let fut = async move {
8518 <T as Snapshots>::create(&inner, request).await
8519 };
8520 Box::pin(fut)
8521 }
8522 }
8523 let accept_compression_encodings = self.accept_compression_encodings;
8524 let send_compression_encodings = self.send_compression_encodings;
8525 let max_decoding_message_size = self.max_decoding_message_size;
8526 let max_encoding_message_size = self.max_encoding_message_size;
8527 let inner = self.inner.clone();
8528 let fut = async move {
8529 let method = CreateSvc(inner);
8530 let codec = tonic::codec::ProstCodec::default();
8531 let mut grpc = tonic::server::Grpc::new(codec)
8532 .apply_compression_config(
8533 accept_compression_encodings,
8534 send_compression_encodings,
8535 )
8536 .apply_max_message_size_config(
8537 max_decoding_message_size,
8538 max_encoding_message_size,
8539 );
8540 let res = grpc.unary(method, req).await;
8541 Ok(res)
8542 };
8543 Box::pin(fut)
8544 }
8545 "/qdrant.Snapshots/List" => {
8546 #[allow(non_camel_case_types)]
8547 struct ListSvc<T: Snapshots>(pub Arc<T>);
8548 impl<
8549 T: Snapshots,
8550 > tonic::server::UnaryService<super::ListSnapshotsRequest>
8551 for ListSvc<T> {
8552 type Response = super::ListSnapshotsResponse;
8553 type Future = BoxFuture<
8554 tonic::Response<Self::Response>,
8555 tonic::Status,
8556 >;
8557 fn call(
8558 &mut self,
8559 request: tonic::Request<super::ListSnapshotsRequest>,
8560 ) -> Self::Future {
8561 let inner = Arc::clone(&self.0);
8562 let fut = async move {
8563 <T as Snapshots>::list(&inner, request).await
8564 };
8565 Box::pin(fut)
8566 }
8567 }
8568 let accept_compression_encodings = self.accept_compression_encodings;
8569 let send_compression_encodings = self.send_compression_encodings;
8570 let max_decoding_message_size = self.max_decoding_message_size;
8571 let max_encoding_message_size = self.max_encoding_message_size;
8572 let inner = self.inner.clone();
8573 let fut = async move {
8574 let method = ListSvc(inner);
8575 let codec = tonic::codec::ProstCodec::default();
8576 let mut grpc = tonic::server::Grpc::new(codec)
8577 .apply_compression_config(
8578 accept_compression_encodings,
8579 send_compression_encodings,
8580 )
8581 .apply_max_message_size_config(
8582 max_decoding_message_size,
8583 max_encoding_message_size,
8584 );
8585 let res = grpc.unary(method, req).await;
8586 Ok(res)
8587 };
8588 Box::pin(fut)
8589 }
8590 "/qdrant.Snapshots/Delete" => {
8591 #[allow(non_camel_case_types)]
8592 struct DeleteSvc<T: Snapshots>(pub Arc<T>);
8593 impl<
8594 T: Snapshots,
8595 > tonic::server::UnaryService<super::DeleteSnapshotRequest>
8596 for DeleteSvc<T> {
8597 type Response = super::DeleteSnapshotResponse;
8598 type Future = BoxFuture<
8599 tonic::Response<Self::Response>,
8600 tonic::Status,
8601 >;
8602 fn call(
8603 &mut self,
8604 request: tonic::Request<super::DeleteSnapshotRequest>,
8605 ) -> Self::Future {
8606 let inner = Arc::clone(&self.0);
8607 let fut = async move {
8608 <T as Snapshots>::delete(&inner, request).await
8609 };
8610 Box::pin(fut)
8611 }
8612 }
8613 let accept_compression_encodings = self.accept_compression_encodings;
8614 let send_compression_encodings = self.send_compression_encodings;
8615 let max_decoding_message_size = self.max_decoding_message_size;
8616 let max_encoding_message_size = self.max_encoding_message_size;
8617 let inner = self.inner.clone();
8618 let fut = async move {
8619 let method = DeleteSvc(inner);
8620 let codec = tonic::codec::ProstCodec::default();
8621 let mut grpc = tonic::server::Grpc::new(codec)
8622 .apply_compression_config(
8623 accept_compression_encodings,
8624 send_compression_encodings,
8625 )
8626 .apply_max_message_size_config(
8627 max_decoding_message_size,
8628 max_encoding_message_size,
8629 );
8630 let res = grpc.unary(method, req).await;
8631 Ok(res)
8632 };
8633 Box::pin(fut)
8634 }
8635 "/qdrant.Snapshots/CreateFull" => {
8636 #[allow(non_camel_case_types)]
8637 struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
8638 impl<
8639 T: Snapshots,
8640 > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
8641 for CreateFullSvc<T> {
8642 type Response = super::CreateSnapshotResponse;
8643 type Future = BoxFuture<
8644 tonic::Response<Self::Response>,
8645 tonic::Status,
8646 >;
8647 fn call(
8648 &mut self,
8649 request: tonic::Request<super::CreateFullSnapshotRequest>,
8650 ) -> Self::Future {
8651 let inner = Arc::clone(&self.0);
8652 let fut = async move {
8653 <T as Snapshots>::create_full(&inner, request).await
8654 };
8655 Box::pin(fut)
8656 }
8657 }
8658 let accept_compression_encodings = self.accept_compression_encodings;
8659 let send_compression_encodings = self.send_compression_encodings;
8660 let max_decoding_message_size = self.max_decoding_message_size;
8661 let max_encoding_message_size = self.max_encoding_message_size;
8662 let inner = self.inner.clone();
8663 let fut = async move {
8664 let method = CreateFullSvc(inner);
8665 let codec = tonic::codec::ProstCodec::default();
8666 let mut grpc = tonic::server::Grpc::new(codec)
8667 .apply_compression_config(
8668 accept_compression_encodings,
8669 send_compression_encodings,
8670 )
8671 .apply_max_message_size_config(
8672 max_decoding_message_size,
8673 max_encoding_message_size,
8674 );
8675 let res = grpc.unary(method, req).await;
8676 Ok(res)
8677 };
8678 Box::pin(fut)
8679 }
8680 "/qdrant.Snapshots/ListFull" => {
8681 #[allow(non_camel_case_types)]
8682 struct ListFullSvc<T: Snapshots>(pub Arc<T>);
8683 impl<
8684 T: Snapshots,
8685 > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
8686 for ListFullSvc<T> {
8687 type Response = super::ListSnapshotsResponse;
8688 type Future = BoxFuture<
8689 tonic::Response<Self::Response>,
8690 tonic::Status,
8691 >;
8692 fn call(
8693 &mut self,
8694 request: tonic::Request<super::ListFullSnapshotsRequest>,
8695 ) -> Self::Future {
8696 let inner = Arc::clone(&self.0);
8697 let fut = async move {
8698 <T as Snapshots>::list_full(&inner, request).await
8699 };
8700 Box::pin(fut)
8701 }
8702 }
8703 let accept_compression_encodings = self.accept_compression_encodings;
8704 let send_compression_encodings = self.send_compression_encodings;
8705 let max_decoding_message_size = self.max_decoding_message_size;
8706 let max_encoding_message_size = self.max_encoding_message_size;
8707 let inner = self.inner.clone();
8708 let fut = async move {
8709 let method = ListFullSvc(inner);
8710 let codec = tonic::codec::ProstCodec::default();
8711 let mut grpc = tonic::server::Grpc::new(codec)
8712 .apply_compression_config(
8713 accept_compression_encodings,
8714 send_compression_encodings,
8715 )
8716 .apply_max_message_size_config(
8717 max_decoding_message_size,
8718 max_encoding_message_size,
8719 );
8720 let res = grpc.unary(method, req).await;
8721 Ok(res)
8722 };
8723 Box::pin(fut)
8724 }
8725 "/qdrant.Snapshots/DeleteFull" => {
8726 #[allow(non_camel_case_types)]
8727 struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
8728 impl<
8729 T: Snapshots,
8730 > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
8731 for DeleteFullSvc<T> {
8732 type Response = super::DeleteSnapshotResponse;
8733 type Future = BoxFuture<
8734 tonic::Response<Self::Response>,
8735 tonic::Status,
8736 >;
8737 fn call(
8738 &mut self,
8739 request: tonic::Request<super::DeleteFullSnapshotRequest>,
8740 ) -> Self::Future {
8741 let inner = Arc::clone(&self.0);
8742 let fut = async move {
8743 <T as Snapshots>::delete_full(&inner, request).await
8744 };
8745 Box::pin(fut)
8746 }
8747 }
8748 let accept_compression_encodings = self.accept_compression_encodings;
8749 let send_compression_encodings = self.send_compression_encodings;
8750 let max_decoding_message_size = self.max_decoding_message_size;
8751 let max_encoding_message_size = self.max_encoding_message_size;
8752 let inner = self.inner.clone();
8753 let fut = async move {
8754 let method = DeleteFullSvc(inner);
8755 let codec = tonic::codec::ProstCodec::default();
8756 let mut grpc = tonic::server::Grpc::new(codec)
8757 .apply_compression_config(
8758 accept_compression_encodings,
8759 send_compression_encodings,
8760 )
8761 .apply_max_message_size_config(
8762 max_decoding_message_size,
8763 max_encoding_message_size,
8764 );
8765 let res = grpc.unary(method, req).await;
8766 Ok(res)
8767 };
8768 Box::pin(fut)
8769 }
8770 _ => {
8771 Box::pin(async move {
8772 let mut response = http::Response::new(empty_body());
8773 let headers = response.headers_mut();
8774 headers
8775 .insert(
8776 tonic::Status::GRPC_STATUS,
8777 (tonic::Code::Unimplemented as i32).into(),
8778 );
8779 headers
8780 .insert(
8781 http::header::CONTENT_TYPE,
8782 tonic::metadata::GRPC_CONTENT_TYPE,
8783 );
8784 Ok(response)
8785 })
8786 }
8787 }
8788 }
8789 }
8790 impl<T> Clone for SnapshotsServer<T> {
8791 fn clone(&self) -> Self {
8792 let inner = self.inner.clone();
8793 Self {
8794 inner,
8795 accept_compression_encodings: self.accept_compression_encodings,
8796 send_compression_encodings: self.send_compression_encodings,
8797 max_decoding_message_size: self.max_decoding_message_size,
8798 max_encoding_message_size: self.max_encoding_message_size,
8799 }
8800 }
8801 }
8802 pub const SERVICE_NAME: &str = "qdrant.Snapshots";
8804 impl<T> tonic::server::NamedService for SnapshotsServer<T> {
8805 const NAME: &'static str = SERVICE_NAME;
8806 }
8807}
8808#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8809pub struct HealthCheckRequest {}
8810#[derive(Clone, PartialEq, ::prost::Message)]
8811pub struct HealthCheckReply {
8812 #[prost(string, tag = "1")]
8813 pub title: ::prost::alloc::string::String,
8814 #[prost(string, tag = "2")]
8815 pub version: ::prost::alloc::string::String,
8816 #[prost(string, optional, tag = "3")]
8817 pub commit: ::core::option::Option<::prost::alloc::string::String>,
8818}
8819pub mod qdrant_client {
8821 #![allow(
8822 unused_variables,
8823 dead_code,
8824 missing_docs,
8825 clippy::wildcard_imports,
8826 clippy::let_unit_value,
8827 )]
8828 use tonic::codegen::*;
8829 use tonic::codegen::http::Uri;
8830 #[derive(Debug, Clone)]
8831 pub struct QdrantClient<T> {
8832 inner: tonic::client::Grpc<T>,
8833 }
8834 impl QdrantClient<tonic::transport::Channel> {
8835 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8837 where
8838 D: TryInto<tonic::transport::Endpoint>,
8839 D::Error: Into<StdError>,
8840 {
8841 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8842 Ok(Self::new(conn))
8843 }
8844 }
8845 impl<T> QdrantClient<T>
8846 where
8847 T: tonic::client::GrpcService<tonic::body::BoxBody>,
8848 T::Error: Into<StdError>,
8849 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8850 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8851 {
8852 pub fn new(inner: T) -> Self {
8853 let inner = tonic::client::Grpc::new(inner);
8854 Self { inner }
8855 }
8856 pub fn with_origin(inner: T, origin: Uri) -> Self {
8857 let inner = tonic::client::Grpc::with_origin(inner, origin);
8858 Self { inner }
8859 }
8860 pub fn with_interceptor<F>(
8861 inner: T,
8862 interceptor: F,
8863 ) -> QdrantClient<InterceptedService<T, F>>
8864 where
8865 F: tonic::service::Interceptor,
8866 T::ResponseBody: Default,
8867 T: tonic::codegen::Service<
8868 http::Request<tonic::body::BoxBody>,
8869 Response = http::Response<
8870 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
8871 >,
8872 >,
8873 <T as tonic::codegen::Service<
8874 http::Request<tonic::body::BoxBody>,
8875 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8876 {
8877 QdrantClient::new(InterceptedService::new(inner, interceptor))
8878 }
8879 #[must_use]
8884 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8885 self.inner = self.inner.send_compressed(encoding);
8886 self
8887 }
8888 #[must_use]
8890 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8891 self.inner = self.inner.accept_compressed(encoding);
8892 self
8893 }
8894 #[must_use]
8898 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8899 self.inner = self.inner.max_decoding_message_size(limit);
8900 self
8901 }
8902 #[must_use]
8906 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8907 self.inner = self.inner.max_encoding_message_size(limit);
8908 self
8909 }
8910 pub async fn health_check(
8911 &mut self,
8912 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
8913 ) -> std::result::Result<
8914 tonic::Response<super::HealthCheckReply>,
8915 tonic::Status,
8916 > {
8917 self.inner
8918 .ready()
8919 .await
8920 .map_err(|e| {
8921 tonic::Status::unknown(
8922 format!("Service was not ready: {}", e.into()),
8923 )
8924 })?;
8925 let codec = tonic::codec::ProstCodec::default();
8926 let path = http::uri::PathAndQuery::from_static(
8927 "/qdrant.Qdrant/HealthCheck",
8928 );
8929 let mut req = request.into_request();
8930 req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
8931 self.inner.unary(req, path, codec).await
8932 }
8933 }
8934}
8935pub mod qdrant_server {
8937 #![allow(
8938 unused_variables,
8939 dead_code,
8940 missing_docs,
8941 clippy::wildcard_imports,
8942 clippy::let_unit_value,
8943 )]
8944 use tonic::codegen::*;
8945 #[async_trait]
8947 pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static {
8948 async fn health_check(
8949 &self,
8950 request: tonic::Request<super::HealthCheckRequest>,
8951 ) -> std::result::Result<
8952 tonic::Response<super::HealthCheckReply>,
8953 tonic::Status,
8954 >;
8955 }
8956 #[derive(Debug)]
8957 pub struct QdrantServer<T> {
8958 inner: Arc<T>,
8959 accept_compression_encodings: EnabledCompressionEncodings,
8960 send_compression_encodings: EnabledCompressionEncodings,
8961 max_decoding_message_size: Option<usize>,
8962 max_encoding_message_size: Option<usize>,
8963 }
8964 impl<T> QdrantServer<T> {
8965 pub fn new(inner: T) -> Self {
8966 Self::from_arc(Arc::new(inner))
8967 }
8968 pub fn from_arc(inner: Arc<T>) -> Self {
8969 Self {
8970 inner,
8971 accept_compression_encodings: Default::default(),
8972 send_compression_encodings: Default::default(),
8973 max_decoding_message_size: None,
8974 max_encoding_message_size: None,
8975 }
8976 }
8977 pub fn with_interceptor<F>(
8978 inner: T,
8979 interceptor: F,
8980 ) -> InterceptedService<Self, F>
8981 where
8982 F: tonic::service::Interceptor,
8983 {
8984 InterceptedService::new(Self::new(inner), interceptor)
8985 }
8986 #[must_use]
8988 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8989 self.accept_compression_encodings.enable(encoding);
8990 self
8991 }
8992 #[must_use]
8994 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8995 self.send_compression_encodings.enable(encoding);
8996 self
8997 }
8998 #[must_use]
9002 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9003 self.max_decoding_message_size = Some(limit);
9004 self
9005 }
9006 #[must_use]
9010 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9011 self.max_encoding_message_size = Some(limit);
9012 self
9013 }
9014 }
9015 impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
9016 where
9017 T: Qdrant,
9018 B: Body + std::marker::Send + 'static,
9019 B::Error: Into<StdError> + std::marker::Send + 'static,
9020 {
9021 type Response = http::Response<tonic::body::BoxBody>;
9022 type Error = std::convert::Infallible;
9023 type Future = BoxFuture<Self::Response, Self::Error>;
9024 fn poll_ready(
9025 &mut self,
9026 _cx: &mut Context<'_>,
9027 ) -> Poll<std::result::Result<(), Self::Error>> {
9028 Poll::Ready(Ok(()))
9029 }
9030 fn call(&mut self, req: http::Request<B>) -> Self::Future {
9031 match req.uri().path() {
9032 "/qdrant.Qdrant/HealthCheck" => {
9033 #[allow(non_camel_case_types)]
9034 struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
9035 impl<
9036 T: Qdrant,
9037 > tonic::server::UnaryService<super::HealthCheckRequest>
9038 for HealthCheckSvc<T> {
9039 type Response = super::HealthCheckReply;
9040 type Future = BoxFuture<
9041 tonic::Response<Self::Response>,
9042 tonic::Status,
9043 >;
9044 fn call(
9045 &mut self,
9046 request: tonic::Request<super::HealthCheckRequest>,
9047 ) -> Self::Future {
9048 let inner = Arc::clone(&self.0);
9049 let fut = async move {
9050 <T as Qdrant>::health_check(&inner, request).await
9051 };
9052 Box::pin(fut)
9053 }
9054 }
9055 let accept_compression_encodings = self.accept_compression_encodings;
9056 let send_compression_encodings = self.send_compression_encodings;
9057 let max_decoding_message_size = self.max_decoding_message_size;
9058 let max_encoding_message_size = self.max_encoding_message_size;
9059 let inner = self.inner.clone();
9060 let fut = async move {
9061 let method = HealthCheckSvc(inner);
9062 let codec = tonic::codec::ProstCodec::default();
9063 let mut grpc = tonic::server::Grpc::new(codec)
9064 .apply_compression_config(
9065 accept_compression_encodings,
9066 send_compression_encodings,
9067 )
9068 .apply_max_message_size_config(
9069 max_decoding_message_size,
9070 max_encoding_message_size,
9071 );
9072 let res = grpc.unary(method, req).await;
9073 Ok(res)
9074 };
9075 Box::pin(fut)
9076 }
9077 _ => {
9078 Box::pin(async move {
9079 let mut response = http::Response::new(empty_body());
9080 let headers = response.headers_mut();
9081 headers
9082 .insert(
9083 tonic::Status::GRPC_STATUS,
9084 (tonic::Code::Unimplemented as i32).into(),
9085 );
9086 headers
9087 .insert(
9088 http::header::CONTENT_TYPE,
9089 tonic::metadata::GRPC_CONTENT_TYPE,
9090 );
9091 Ok(response)
9092 })
9093 }
9094 }
9095 }
9096 }
9097 impl<T> Clone for QdrantServer<T> {
9098 fn clone(&self) -> Self {
9099 let inner = self.inner.clone();
9100 Self {
9101 inner,
9102 accept_compression_encodings: self.accept_compression_encodings,
9103 send_compression_encodings: self.send_compression_encodings,
9104 max_decoding_message_size: self.max_decoding_message_size,
9105 max_encoding_message_size: self.max_encoding_message_size,
9106 }
9107 }
9108 }
9109 pub const SERVICE_NAME: &str = "qdrant.Qdrant";
9111 impl<T> tonic::server::NamedService for QdrantServer<T> {
9112 const NAME: &'static str = SERVICE_NAME;
9113 }
9114}
9115pub use crate::manual_builder::*;
9116pub use crate::builder_types::*;
9117pub use crate::qdrant_client::builders::*;
9118pub use crate::builders::*;
9119pub use prost_types::Timestamp;