1#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Struct {
12 #[prost(map = "string, message", tag = "1")]
14 pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct Value {
24 #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
26 pub kind: ::core::option::Option<value::Kind>,
27}
28pub mod value {
30 #[derive(Clone, PartialEq, ::prost::Oneof)]
32 pub enum Kind {
33 #[prost(enumeration = "super::NullValue", tag = "1")]
35 NullValue(i32),
36 #[prost(double, tag = "2")]
38 DoubleValue(f64),
39 #[prost(int64, tag = "3")]
41 IntegerValue(i64),
42 #[prost(string, tag = "4")]
44 StringValue(::prost::alloc::string::String),
45 #[prost(bool, tag = "5")]
47 BoolValue(bool),
48 #[prost(message, tag = "6")]
50 StructValue(super::Struct),
51 #[prost(message, tag = "7")]
53 ListValue(super::ListValue),
54 }
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct ListValue {
61 #[prost(message, repeated, tag = "1")]
63 pub values: ::prost::alloc::vec::Vec<Value>,
64}
65#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
70#[repr(i32)]
71pub enum NullValue {
72 NullValue = 0,
74}
75impl NullValue {
76 pub fn as_str_name(&self) -> &'static str {
81 match self {
82 Self::NullValue => "NULL_VALUE",
83 }
84 }
85 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
87 match value {
88 "NULL_VALUE" => Some(Self::NullValue),
89 _ => None,
90 }
91 }
92}
93#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct PointId {
95 #[prost(oneof = "point_id::PointIdOptions", tags = "1, 2")]
96 pub point_id_options: ::core::option::Option<point_id::PointIdOptions>,
97}
98pub mod point_id {
100 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
101 pub enum PointIdOptions {
102 #[prost(uint64, tag = "1")]
104 Num(u64),
105 #[prost(string, tag = "2")]
107 Uuid(::prost::alloc::string::String),
108 }
109}
110#[derive(Clone, Copy, PartialEq, ::prost::Message)]
111pub struct GeoPoint {
112 #[prost(double, tag = "1")]
113 pub lon: f64,
114 #[prost(double, tag = "2")]
115 pub lat: f64,
116}
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct Filter {
119 #[prost(message, repeated, tag = "1")]
121 pub should: ::prost::alloc::vec::Vec<Condition>,
122 #[prost(message, repeated, tag = "2")]
124 pub must: ::prost::alloc::vec::Vec<Condition>,
125 #[prost(message, repeated, tag = "3")]
127 pub must_not: ::prost::alloc::vec::Vec<Condition>,
128 #[prost(message, optional, tag = "4")]
130 pub min_should: ::core::option::Option<MinShould>,
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct MinShould {
134 #[prost(message, repeated, tag = "1")]
135 pub conditions: ::prost::alloc::vec::Vec<Condition>,
136 #[prost(uint64, tag = "2")]
137 pub min_count: u64,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct Condition {
141 #[prost(oneof = "condition::ConditionOneOf", tags = "1, 2, 3, 4, 5, 6, 7")]
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, Eq, Hash, ::prost::Message)]
165pub struct IsEmptyCondition {
166 #[prost(string, tag = "1")]
167 pub key: ::prost::alloc::string::String,
168}
169#[derive(Clone, PartialEq, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::prost::Message)]
441pub struct MultiVectorConfig {
442 #[prost(enumeration = "MultiVectorComparator", tag = "1")]
444 pub comparator: i32,
445}
446#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
447pub struct GetCollectionInfoRequest {
448 #[prost(string, tag = "1")]
450 pub collection_name: ::prost::alloc::string::String,
451}
452#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
453pub struct CollectionExistsRequest {
454 #[prost(string, tag = "1")]
455 pub collection_name: ::prost::alloc::string::String,
456}
457#[derive(Clone, Copy, PartialEq, Eq, Hash, ::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, Eq, Hash, ::prost::Message)]
471pub struct ListCollectionsRequest {}
472#[derive(Clone, PartialEq, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::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, Eq, Hash, ::prost::Message)]
550pub struct CollectionWarning {
551 #[prost(string, tag = "1")]
552 pub message: ::prost::alloc::string::String,
553}
554#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
555pub struct HnswConfigDiff {
556 #[prost(uint64, optional, tag = "1")]
558 pub m: ::core::option::Option<u64>,
559 #[prost(uint64, optional, tag = "2")]
561 pub ef_construct: ::core::option::Option<u64>,
562 #[prost(uint64, optional, tag = "3")]
569 pub full_scan_threshold: ::core::option::Option<u64>,
570 #[prost(uint64, optional, tag = "4")]
575 pub max_indexing_threads: ::core::option::Option<u64>,
576 #[prost(bool, optional, tag = "5")]
578 pub on_disk: ::core::option::Option<bool>,
579 #[prost(uint64, optional, tag = "6")]
581 pub payload_m: ::core::option::Option<u64>,
582 #[prost(bool, optional, tag = "7")]
587 pub inline_storage: ::core::option::Option<bool>,
588}
589#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
590pub struct SparseIndexConfig {
591 #[prost(uint64, optional, tag = "1")]
594 pub full_scan_threshold: ::core::option::Option<u64>,
595 #[prost(bool, optional, tag = "2")]
597 pub on_disk: ::core::option::Option<bool>,
598 #[prost(enumeration = "Datatype", optional, tag = "3")]
600 pub datatype: ::core::option::Option<i32>,
601}
602#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
603pub struct WalConfigDiff {
604 #[prost(uint64, optional, tag = "1")]
606 pub wal_capacity_mb: ::core::option::Option<u64>,
607 #[prost(uint64, optional, tag = "2")]
609 pub wal_segments_ahead: ::core::option::Option<u64>,
610 #[prost(uint64, optional, tag = "3")]
612 pub wal_retain_closed: ::core::option::Option<u64>,
613}
614#[derive(Clone, Copy, PartialEq, ::prost::Message)]
615pub struct OptimizersConfigDiff {
616 #[prost(double, optional, tag = "1")]
618 pub deleted_threshold: ::core::option::Option<f64>,
619 #[prost(uint64, optional, tag = "2")]
621 pub vacuum_min_vector_number: ::core::option::Option<u64>,
622 #[prost(uint64, optional, tag = "3")]
631 pub default_segment_number: ::core::option::Option<u64>,
632 #[prost(uint64, optional, tag = "4")]
643 pub max_segment_size: ::core::option::Option<u64>,
644 #[prost(uint64, optional, tag = "5")]
653 pub memmap_threshold: ::core::option::Option<u64>,
654 #[prost(uint64, optional, tag = "6")]
662 pub indexing_threshold: ::core::option::Option<u64>,
663 #[prost(uint64, optional, tag = "7")]
665 pub flush_interval_sec: ::core::option::Option<u64>,
666 #[prost(uint64, optional, tag = "8")]
668 pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
669 #[prost(message, optional, tag = "9")]
674 pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
675}
676#[derive(Clone, Copy, PartialEq, ::prost::Message)]
677pub struct ScalarQuantization {
678 #[prost(enumeration = "QuantizationType", tag = "1")]
680 pub r#type: i32,
681 #[prost(float, optional, tag = "2")]
683 pub quantile: ::core::option::Option<f32>,
684 #[prost(bool, optional, tag = "3")]
686 pub always_ram: ::core::option::Option<bool>,
687}
688#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
689pub struct ProductQuantization {
690 #[prost(enumeration = "CompressionRatio", tag = "1")]
692 pub compression: i32,
693 #[prost(bool, optional, tag = "2")]
695 pub always_ram: ::core::option::Option<bool>,
696}
697#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
698pub struct BinaryQuantizationQueryEncoding {
699 #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
700 pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
701}
702pub mod binary_quantization_query_encoding {
704 #[derive(
705 Clone,
706 Copy,
707 Debug,
708 PartialEq,
709 Eq,
710 Hash,
711 PartialOrd,
712 Ord,
713 ::prost::Enumeration
714 )]
715 #[repr(i32)]
716 pub enum Setting {
717 Default = 0,
718 Binary = 1,
719 Scalar4Bits = 2,
720 Scalar8Bits = 3,
721 }
722 impl Setting {
723 pub fn as_str_name(&self) -> &'static str {
728 match self {
729 Self::Default => "Default",
730 Self::Binary => "Binary",
731 Self::Scalar4Bits => "Scalar4Bits",
732 Self::Scalar8Bits => "Scalar8Bits",
733 }
734 }
735 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
737 match value {
738 "Default" => Some(Self::Default),
739 "Binary" => Some(Self::Binary),
740 "Scalar4Bits" => Some(Self::Scalar4Bits),
741 "Scalar8Bits" => Some(Self::Scalar8Bits),
742 _ => None,
743 }
744 }
745 }
746 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
747 pub enum Variant {
748 #[prost(enumeration = "Setting", tag = "4")]
749 Setting(i32),
750 }
751}
752#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
753pub struct BinaryQuantization {
754 #[prost(bool, optional, tag = "1")]
756 pub always_ram: ::core::option::Option<bool>,
757 #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
759 pub encoding: ::core::option::Option<i32>,
760 #[prost(message, optional, tag = "3")]
763 pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
764}
765#[derive(Clone, Copy, PartialEq, ::prost::Message)]
766pub struct QuantizationConfig {
767 #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")]
768 pub quantization: ::core::option::Option<quantization_config::Quantization>,
769}
770pub mod quantization_config {
772 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
773 pub enum Quantization {
774 #[prost(message, tag = "1")]
775 Scalar(super::ScalarQuantization),
776 #[prost(message, tag = "2")]
777 Product(super::ProductQuantization),
778 #[prost(message, tag = "3")]
779 Binary(super::BinaryQuantization),
780 }
781}
782#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
783pub struct Disabled {}
784#[derive(Clone, Copy, PartialEq, ::prost::Message)]
785pub struct QuantizationConfigDiff {
786 #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")]
787 pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
788}
789pub mod quantization_config_diff {
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 Disabled(super::Disabled),
799 #[prost(message, tag = "4")]
800 Binary(super::BinaryQuantization),
801 }
802}
803#[derive(Clone, PartialEq, ::prost::Message)]
804pub struct StrictModeConfig {
805 #[prost(bool, optional, tag = "1")]
807 pub enabled: ::core::option::Option<bool>,
808 #[prost(uint32, optional, tag = "2")]
810 pub max_query_limit: ::core::option::Option<u32>,
811 #[prost(uint32, optional, tag = "3")]
813 pub max_timeout: ::core::option::Option<u32>,
814 #[prost(bool, optional, tag = "4")]
816 pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
817 #[prost(bool, optional, tag = "5")]
819 pub unindexed_filtering_update: ::core::option::Option<bool>,
820 #[prost(uint32, optional, tag = "6")]
822 pub search_max_hnsw_ef: ::core::option::Option<u32>,
823 #[prost(bool, optional, tag = "7")]
825 pub search_allow_exact: ::core::option::Option<bool>,
826 #[prost(float, optional, tag = "8")]
828 pub search_max_oversampling: ::core::option::Option<f32>,
829 #[prost(uint64, optional, tag = "9")]
831 pub upsert_max_batchsize: ::core::option::Option<u64>,
832 #[prost(uint64, optional, tag = "10")]
834 pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
835 #[prost(uint32, optional, tag = "11")]
837 pub read_rate_limit: ::core::option::Option<u32>,
838 #[prost(uint32, optional, tag = "12")]
840 pub write_rate_limit: ::core::option::Option<u32>,
841 #[prost(uint64, optional, tag = "13")]
843 pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
844 #[prost(uint64, optional, tag = "14")]
846 pub filter_max_conditions: ::core::option::Option<u64>,
847 #[prost(uint64, optional, tag = "15")]
849 pub condition_max_size: ::core::option::Option<u64>,
850 #[prost(message, optional, tag = "16")]
852 pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
853 #[prost(message, optional, tag = "17")]
855 pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
856 #[prost(uint64, optional, tag = "18")]
858 pub max_points_count: ::core::option::Option<u64>,
859 #[prost(uint64, optional, tag = "19")]
861 pub max_payload_index_count: ::core::option::Option<u64>,
862}
863#[derive(Clone, PartialEq, ::prost::Message)]
864pub struct StrictModeSparseConfig {
865 #[prost(map = "string, message", tag = "1")]
866 pub sparse_config: ::std::collections::HashMap<
867 ::prost::alloc::string::String,
868 StrictModeSparse,
869 >,
870}
871#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
872pub struct StrictModeSparse {
873 #[prost(uint64, optional, tag = "10")]
875 pub max_length: ::core::option::Option<u64>,
876}
877#[derive(Clone, PartialEq, ::prost::Message)]
878pub struct StrictModeMultivectorConfig {
879 #[prost(map = "string, message", tag = "1")]
880 pub multivector_config: ::std::collections::HashMap<
881 ::prost::alloc::string::String,
882 StrictModeMultivector,
883 >,
884}
885#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
886pub struct StrictModeMultivector {
887 #[prost(uint64, optional, tag = "1")]
889 pub max_vectors: ::core::option::Option<u64>,
890}
891#[derive(Clone, PartialEq, ::prost::Message)]
892pub struct CreateCollection {
893 #[prost(string, tag = "1")]
895 pub collection_name: ::prost::alloc::string::String,
896 #[prost(message, optional, tag = "4")]
898 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
899 #[prost(message, optional, tag = "5")]
901 pub wal_config: ::core::option::Option<WalConfigDiff>,
902 #[prost(message, optional, tag = "6")]
904 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
905 #[prost(uint32, optional, tag = "7")]
907 pub shard_number: ::core::option::Option<u32>,
908 #[prost(bool, optional, tag = "8")]
910 pub on_disk_payload: ::core::option::Option<bool>,
911 #[prost(uint64, optional, tag = "9")]
913 pub timeout: ::core::option::Option<u64>,
914 #[prost(message, optional, tag = "10")]
916 pub vectors_config: ::core::option::Option<VectorsConfig>,
917 #[prost(uint32, optional, tag = "11")]
919 pub replication_factor: ::core::option::Option<u32>,
920 #[prost(uint32, optional, tag = "12")]
922 pub write_consistency_factor: ::core::option::Option<u32>,
923 #[prost(message, optional, tag = "14")]
925 pub quantization_config: ::core::option::Option<QuantizationConfig>,
926 #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
928 pub sharding_method: ::core::option::Option<i32>,
929 #[prost(message, optional, tag = "16")]
931 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
932 #[prost(message, optional, tag = "17")]
934 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
935 #[prost(map = "string, message", tag = "18")]
937 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
938}
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct UpdateCollection {
941 #[prost(string, tag = "1")]
943 pub collection_name: ::prost::alloc::string::String,
944 #[prost(message, optional, tag = "2")]
946 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
947 #[prost(uint64, optional, tag = "3")]
949 pub timeout: ::core::option::Option<u64>,
950 #[prost(message, optional, tag = "4")]
952 pub params: ::core::option::Option<CollectionParamsDiff>,
953 #[prost(message, optional, tag = "5")]
955 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
956 #[prost(message, optional, tag = "6")]
958 pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
959 #[prost(message, optional, tag = "7")]
961 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
962 #[prost(message, optional, tag = "8")]
964 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
965 #[prost(message, optional, tag = "9")]
967 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
968 #[prost(map = "string, message", tag = "10")]
970 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
971}
972#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
973pub struct DeleteCollection {
974 #[prost(string, tag = "1")]
976 pub collection_name: ::prost::alloc::string::String,
977 #[prost(uint64, optional, tag = "2")]
979 pub timeout: ::core::option::Option<u64>,
980}
981#[derive(Clone, Copy, PartialEq, ::prost::Message)]
982pub struct CollectionOperationResponse {
983 #[prost(bool, tag = "1")]
985 pub result: bool,
986 #[prost(double, tag = "2")]
988 pub time: f64,
989}
990#[derive(Clone, PartialEq, ::prost::Message)]
991pub struct CollectionParams {
992 #[prost(uint32, tag = "3")]
994 pub shard_number: u32,
995 #[prost(bool, tag = "4")]
997 pub on_disk_payload: bool,
998 #[prost(message, optional, tag = "5")]
1000 pub vectors_config: ::core::option::Option<VectorsConfig>,
1001 #[prost(uint32, optional, tag = "6")]
1003 pub replication_factor: ::core::option::Option<u32>,
1004 #[prost(uint32, optional, tag = "7")]
1006 pub write_consistency_factor: ::core::option::Option<u32>,
1007 #[prost(uint32, optional, tag = "8")]
1009 pub read_fan_out_factor: ::core::option::Option<u32>,
1010 #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
1012 pub sharding_method: ::core::option::Option<i32>,
1013 #[prost(message, optional, tag = "10")]
1015 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1016}
1017#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1018pub struct CollectionParamsDiff {
1019 #[prost(uint32, optional, tag = "1")]
1021 pub replication_factor: ::core::option::Option<u32>,
1022 #[prost(uint32, optional, tag = "2")]
1024 pub write_consistency_factor: ::core::option::Option<u32>,
1025 #[prost(bool, optional, tag = "3")]
1027 pub on_disk_payload: ::core::option::Option<bool>,
1028 #[prost(uint32, optional, tag = "4")]
1030 pub read_fan_out_factor: ::core::option::Option<u32>,
1031}
1032#[derive(Clone, PartialEq, ::prost::Message)]
1033pub struct CollectionConfig {
1034 #[prost(message, optional, tag = "1")]
1036 pub params: ::core::option::Option<CollectionParams>,
1037 #[prost(message, optional, tag = "2")]
1039 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1040 #[prost(message, optional, tag = "3")]
1042 pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
1043 #[prost(message, optional, tag = "4")]
1045 pub wal_config: ::core::option::Option<WalConfigDiff>,
1046 #[prost(message, optional, tag = "5")]
1048 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1049 #[prost(message, optional, tag = "6")]
1051 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1052 #[prost(map = "string, message", tag = "7")]
1054 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1055}
1056#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1057pub struct KeywordIndexParams {
1058 #[prost(bool, optional, tag = "1")]
1060 pub is_tenant: ::core::option::Option<bool>,
1061 #[prost(bool, optional, tag = "2")]
1063 pub on_disk: ::core::option::Option<bool>,
1064}
1065#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1066pub struct IntegerIndexParams {
1067 #[prost(bool, optional, tag = "1")]
1069 pub lookup: ::core::option::Option<bool>,
1070 #[prost(bool, optional, tag = "2")]
1072 pub range: ::core::option::Option<bool>,
1073 #[prost(bool, optional, tag = "3")]
1075 pub is_principal: ::core::option::Option<bool>,
1076 #[prost(bool, optional, tag = "4")]
1078 pub on_disk: ::core::option::Option<bool>,
1079}
1080#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1081pub struct FloatIndexParams {
1082 #[prost(bool, optional, tag = "1")]
1084 pub on_disk: ::core::option::Option<bool>,
1085 #[prost(bool, optional, tag = "2")]
1087 pub is_principal: ::core::option::Option<bool>,
1088}
1089#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1090pub struct GeoIndexParams {
1091 #[prost(bool, optional, tag = "1")]
1093 pub on_disk: ::core::option::Option<bool>,
1094}
1095#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1096pub struct StopwordsSet {
1097 #[prost(string, repeated, tag = "1")]
1099 pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1100 #[prost(string, repeated, tag = "2")]
1102 pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1103}
1104#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1105pub struct TextIndexParams {
1106 #[prost(enumeration = "TokenizerType", tag = "1")]
1108 pub tokenizer: i32,
1109 #[prost(bool, optional, tag = "2")]
1111 pub lowercase: ::core::option::Option<bool>,
1112 #[prost(uint64, optional, tag = "3")]
1114 pub min_token_len: ::core::option::Option<u64>,
1115 #[prost(uint64, optional, tag = "4")]
1117 pub max_token_len: ::core::option::Option<u64>,
1118 #[prost(bool, optional, tag = "5")]
1120 pub on_disk: ::core::option::Option<bool>,
1121 #[prost(message, optional, tag = "6")]
1123 pub stopwords: ::core::option::Option<StopwordsSet>,
1124 #[prost(bool, optional, tag = "7")]
1126 pub phrase_matching: ::core::option::Option<bool>,
1127 #[prost(message, optional, tag = "8")]
1129 pub stemmer: ::core::option::Option<StemmingAlgorithm>,
1130 #[prost(bool, optional, tag = "9")]
1132 pub ascii_folding: ::core::option::Option<bool>,
1133}
1134#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1135pub struct StemmingAlgorithm {
1136 #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1")]
1137 pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
1138}
1139pub mod stemming_algorithm {
1141 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1142 pub enum StemmingParams {
1143 #[prost(message, tag = "1")]
1145 Snowball(super::SnowballParams),
1146 }
1147}
1148#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1149pub struct SnowballParams {
1150 #[prost(string, tag = "1")]
1152 pub language: ::prost::alloc::string::String,
1153}
1154#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1155pub struct BoolIndexParams {
1156 #[prost(bool, optional, tag = "1")]
1158 pub on_disk: ::core::option::Option<bool>,
1159}
1160#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1161pub struct DatetimeIndexParams {
1162 #[prost(bool, optional, tag = "1")]
1164 pub on_disk: ::core::option::Option<bool>,
1165 #[prost(bool, optional, tag = "2")]
1167 pub is_principal: ::core::option::Option<bool>,
1168}
1169#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1170pub struct UuidIndexParams {
1171 #[prost(bool, optional, tag = "1")]
1173 pub is_tenant: ::core::option::Option<bool>,
1174 #[prost(bool, optional, tag = "2")]
1176 pub on_disk: ::core::option::Option<bool>,
1177}
1178#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1179pub struct PayloadIndexParams {
1180 #[prost(
1181 oneof = "payload_index_params::IndexParams",
1182 tags = "3, 2, 4, 5, 1, 6, 7, 8"
1183 )]
1184 pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
1185}
1186pub mod payload_index_params {
1188 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1189 pub enum IndexParams {
1190 #[prost(message, tag = "3")]
1192 KeywordIndexParams(super::KeywordIndexParams),
1193 #[prost(message, tag = "2")]
1195 IntegerIndexParams(super::IntegerIndexParams),
1196 #[prost(message, tag = "4")]
1198 FloatIndexParams(super::FloatIndexParams),
1199 #[prost(message, tag = "5")]
1201 GeoIndexParams(super::GeoIndexParams),
1202 #[prost(message, tag = "1")]
1204 TextIndexParams(super::TextIndexParams),
1205 #[prost(message, tag = "6")]
1207 BoolIndexParams(super::BoolIndexParams),
1208 #[prost(message, tag = "7")]
1210 DatetimeIndexParams(super::DatetimeIndexParams),
1211 #[prost(message, tag = "8")]
1213 UuidIndexParams(super::UuidIndexParams),
1214 }
1215}
1216#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1217pub struct PayloadSchemaInfo {
1218 #[prost(enumeration = "PayloadSchemaType", tag = "1")]
1220 pub data_type: i32,
1221 #[prost(message, optional, tag = "2")]
1223 pub params: ::core::option::Option<PayloadIndexParams>,
1224 #[prost(uint64, optional, tag = "3")]
1226 pub points: ::core::option::Option<u64>,
1227}
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct CollectionInfo {
1230 #[prost(enumeration = "CollectionStatus", tag = "1")]
1232 pub status: i32,
1233 #[prost(message, optional, tag = "2")]
1235 pub optimizer_status: ::core::option::Option<OptimizerStatus>,
1236 #[prost(uint64, tag = "4")]
1238 pub segments_count: u64,
1239 #[prost(message, optional, tag = "7")]
1241 pub config: ::core::option::Option<CollectionConfig>,
1242 #[prost(map = "string, message", tag = "8")]
1244 pub payload_schema: ::std::collections::HashMap<
1245 ::prost::alloc::string::String,
1246 PayloadSchemaInfo,
1247 >,
1248 #[prost(uint64, optional, tag = "9")]
1250 pub points_count: ::core::option::Option<u64>,
1251 #[prost(uint64, optional, tag = "10")]
1253 pub indexed_vectors_count: ::core::option::Option<u64>,
1254 #[prost(message, repeated, tag = "11")]
1256 pub warnings: ::prost::alloc::vec::Vec<CollectionWarning>,
1257}
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct ChangeAliases {
1260 #[prost(message, repeated, tag = "1")]
1262 pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
1263 #[prost(uint64, optional, tag = "2")]
1265 pub timeout: ::core::option::Option<u64>,
1266}
1267#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1268pub struct AliasOperations {
1269 #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
1270 pub action: ::core::option::Option<alias_operations::Action>,
1271}
1272pub mod alias_operations {
1274 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1275 pub enum Action {
1276 #[prost(message, tag = "1")]
1277 CreateAlias(super::CreateAlias),
1278 #[prost(message, tag = "2")]
1279 RenameAlias(super::RenameAlias),
1280 #[prost(message, tag = "3")]
1281 DeleteAlias(super::DeleteAlias),
1282 }
1283}
1284#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1285pub struct CreateAlias {
1286 #[prost(string, tag = "1")]
1288 pub collection_name: ::prost::alloc::string::String,
1289 #[prost(string, tag = "2")]
1291 pub alias_name: ::prost::alloc::string::String,
1292}
1293#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1294pub struct RenameAlias {
1295 #[prost(string, tag = "1")]
1297 pub old_alias_name: ::prost::alloc::string::String,
1298 #[prost(string, tag = "2")]
1300 pub new_alias_name: ::prost::alloc::string::String,
1301}
1302#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1303pub struct DeleteAlias {
1304 #[prost(string, tag = "1")]
1306 pub alias_name: ::prost::alloc::string::String,
1307}
1308#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1309pub struct ListAliasesRequest {}
1310#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1311pub struct ListCollectionAliasesRequest {
1312 #[prost(string, tag = "1")]
1314 pub collection_name: ::prost::alloc::string::String,
1315}
1316#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1317pub struct AliasDescription {
1318 #[prost(string, tag = "1")]
1320 pub alias_name: ::prost::alloc::string::String,
1321 #[prost(string, tag = "2")]
1323 pub collection_name: ::prost::alloc::string::String,
1324}
1325#[derive(Clone, PartialEq, ::prost::Message)]
1326pub struct ListAliasesResponse {
1327 #[prost(message, repeated, tag = "1")]
1328 pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
1329 #[prost(double, tag = "2")]
1331 pub time: f64,
1332}
1333#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1334pub struct CollectionClusterInfoRequest {
1335 #[prost(string, tag = "1")]
1337 pub collection_name: ::prost::alloc::string::String,
1338}
1339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1340pub struct ShardKey {
1341 #[prost(oneof = "shard_key::Key", tags = "1, 2")]
1342 pub key: ::core::option::Option<shard_key::Key>,
1343}
1344pub mod shard_key {
1346 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1347 pub enum Key {
1348 #[prost(string, tag = "1")]
1350 Keyword(::prost::alloc::string::String),
1351 #[prost(uint64, tag = "2")]
1353 Number(u64),
1354 }
1355}
1356#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1357pub struct LocalShardInfo {
1358 #[prost(uint32, tag = "1")]
1360 pub shard_id: u32,
1361 #[prost(uint64, tag = "2")]
1363 pub points_count: u64,
1364 #[prost(enumeration = "ReplicaState", tag = "3")]
1366 pub state: i32,
1367 #[prost(message, optional, tag = "4")]
1369 pub shard_key: ::core::option::Option<ShardKey>,
1370}
1371#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1372pub struct RemoteShardInfo {
1373 #[prost(uint32, tag = "1")]
1375 pub shard_id: u32,
1376 #[prost(uint64, tag = "2")]
1378 pub peer_id: u64,
1379 #[prost(enumeration = "ReplicaState", tag = "3")]
1381 pub state: i32,
1382 #[prost(message, optional, tag = "4")]
1384 pub shard_key: ::core::option::Option<ShardKey>,
1385}
1386#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1387pub struct ShardTransferInfo {
1388 #[prost(uint32, tag = "1")]
1390 pub shard_id: u32,
1391 #[prost(uint32, optional, tag = "5")]
1392 pub to_shard_id: ::core::option::Option<u32>,
1393 #[prost(uint64, tag = "2")]
1394 pub from: u64,
1395 #[prost(uint64, tag = "3")]
1396 pub to: u64,
1397 #[prost(bool, tag = "4")]
1399 pub sync: bool,
1400}
1401#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1402pub struct ReshardingInfo {
1403 #[prost(uint32, tag = "1")]
1404 pub shard_id: u32,
1405 #[prost(uint64, tag = "2")]
1406 pub peer_id: u64,
1407 #[prost(message, optional, tag = "3")]
1408 pub shard_key: ::core::option::Option<ShardKey>,
1409 #[prost(enumeration = "ReshardingDirection", tag = "4")]
1410 pub direction: i32,
1411}
1412#[derive(Clone, PartialEq, ::prost::Message)]
1413pub struct CollectionClusterInfoResponse {
1414 #[prost(uint64, tag = "1")]
1416 pub peer_id: u64,
1417 #[prost(uint64, tag = "2")]
1419 pub shard_count: u64,
1420 #[prost(message, repeated, tag = "3")]
1422 pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1423 #[prost(message, repeated, tag = "4")]
1425 pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1426 #[prost(message, repeated, tag = "5")]
1428 pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1429 #[prost(message, repeated, tag = "6")]
1431 pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1432}
1433#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1434pub struct MoveShard {
1435 #[prost(uint32, tag = "1")]
1437 pub shard_id: u32,
1438 #[prost(uint32, optional, tag = "5")]
1439 pub to_shard_id: ::core::option::Option<u32>,
1440 #[prost(uint64, tag = "2")]
1441 pub from_peer_id: u64,
1442 #[prost(uint64, tag = "3")]
1443 pub to_peer_id: u64,
1444 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1445 pub method: ::core::option::Option<i32>,
1446}
1447#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1448pub struct ReplicateShard {
1449 #[prost(uint32, tag = "1")]
1451 pub shard_id: u32,
1452 #[prost(uint32, optional, tag = "5")]
1453 pub to_shard_id: ::core::option::Option<u32>,
1454 #[prost(uint64, tag = "2")]
1455 pub from_peer_id: u64,
1456 #[prost(uint64, tag = "3")]
1457 pub to_peer_id: u64,
1458 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1459 pub method: ::core::option::Option<i32>,
1460}
1461#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1462pub struct AbortShardTransfer {
1463 #[prost(uint32, tag = "1")]
1465 pub shard_id: u32,
1466 #[prost(uint32, optional, tag = "4")]
1467 pub to_shard_id: ::core::option::Option<u32>,
1468 #[prost(uint64, tag = "2")]
1469 pub from_peer_id: u64,
1470 #[prost(uint64, tag = "3")]
1471 pub to_peer_id: u64,
1472}
1473#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1474pub struct RestartTransfer {
1475 #[prost(uint32, tag = "1")]
1477 pub shard_id: u32,
1478 #[prost(uint32, optional, tag = "5")]
1479 pub to_shard_id: ::core::option::Option<u32>,
1480 #[prost(uint64, tag = "2")]
1481 pub from_peer_id: u64,
1482 #[prost(uint64, tag = "3")]
1483 pub to_peer_id: u64,
1484 #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1485 pub method: i32,
1486}
1487#[derive(Clone, PartialEq, ::prost::Message)]
1488pub struct ReplicatePoints {
1489 #[prost(message, optional, tag = "1")]
1491 pub from_shard_key: ::core::option::Option<ShardKey>,
1492 #[prost(message, optional, tag = "2")]
1494 pub to_shard_key: ::core::option::Option<ShardKey>,
1495 #[prost(message, optional, tag = "3")]
1497 pub filter: ::core::option::Option<Filter>,
1498}
1499#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1500pub struct Replica {
1501 #[prost(uint32, tag = "1")]
1502 pub shard_id: u32,
1503 #[prost(uint64, tag = "2")]
1504 pub peer_id: u64,
1505}
1506#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1507pub struct CreateShardKey {
1508 #[prost(message, optional, tag = "1")]
1510 pub shard_key: ::core::option::Option<ShardKey>,
1511 #[prost(uint32, optional, tag = "2")]
1513 pub shards_number: ::core::option::Option<u32>,
1514 #[prost(uint32, optional, tag = "3")]
1516 pub replication_factor: ::core::option::Option<u32>,
1517 #[prost(uint64, repeated, tag = "4")]
1519 pub placement: ::prost::alloc::vec::Vec<u64>,
1520 #[prost(enumeration = "ReplicaState", optional, tag = "5")]
1522 pub initial_state: ::core::option::Option<i32>,
1523}
1524#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1525pub struct DeleteShardKey {
1526 #[prost(message, optional, tag = "1")]
1528 pub shard_key: ::core::option::Option<ShardKey>,
1529}
1530#[derive(Clone, PartialEq, ::prost::Message)]
1531pub struct UpdateCollectionClusterSetupRequest {
1532 #[prost(string, tag = "1")]
1534 pub collection_name: ::prost::alloc::string::String,
1535 #[prost(uint64, optional, tag = "6")]
1537 pub timeout: ::core::option::Option<u64>,
1538 #[prost(
1539 oneof = "update_collection_cluster_setup_request::Operation",
1540 tags = "2, 3, 4, 5, 7, 8, 9, 10"
1541 )]
1542 pub operation: ::core::option::Option<
1543 update_collection_cluster_setup_request::Operation,
1544 >,
1545}
1546pub mod update_collection_cluster_setup_request {
1548 #[derive(Clone, PartialEq, ::prost::Oneof)]
1549 pub enum Operation {
1550 #[prost(message, tag = "2")]
1551 MoveShard(super::MoveShard),
1552 #[prost(message, tag = "3")]
1553 ReplicateShard(super::ReplicateShard),
1554 #[prost(message, tag = "4")]
1555 AbortTransfer(super::AbortShardTransfer),
1556 #[prost(message, tag = "5")]
1557 DropReplica(super::Replica),
1558 #[prost(message, tag = "7")]
1559 CreateShardKey(super::CreateShardKey),
1560 #[prost(message, tag = "8")]
1561 DeleteShardKey(super::DeleteShardKey),
1562 #[prost(message, tag = "9")]
1563 RestartTransfer(super::RestartTransfer),
1564 #[prost(message, tag = "10")]
1565 ReplicatePoints(super::ReplicatePoints),
1566 }
1567}
1568#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1569pub struct UpdateCollectionClusterSetupResponse {
1570 #[prost(bool, tag = "1")]
1571 pub result: bool,
1572}
1573#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1574pub struct CreateShardKeyRequest {
1575 #[prost(string, tag = "1")]
1577 pub collection_name: ::prost::alloc::string::String,
1578 #[prost(message, optional, tag = "2")]
1580 pub request: ::core::option::Option<CreateShardKey>,
1581 #[prost(uint64, optional, tag = "3")]
1583 pub timeout: ::core::option::Option<u64>,
1584}
1585#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1586pub struct DeleteShardKeyRequest {
1587 #[prost(string, tag = "1")]
1589 pub collection_name: ::prost::alloc::string::String,
1590 #[prost(message, optional, tag = "2")]
1592 pub request: ::core::option::Option<DeleteShardKey>,
1593 #[prost(uint64, optional, tag = "3")]
1595 pub timeout: ::core::option::Option<u64>,
1596}
1597#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1598pub struct CreateShardKeyResponse {
1599 #[prost(bool, tag = "1")]
1600 pub result: bool,
1601}
1602#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1603pub struct DeleteShardKeyResponse {
1604 #[prost(bool, tag = "1")]
1605 pub result: bool,
1606}
1607#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1608#[repr(i32)]
1609pub enum Datatype {
1610 Default = 0,
1611 Float32 = 1,
1612 Uint8 = 2,
1613 Float16 = 3,
1614}
1615impl Datatype {
1616 pub fn as_str_name(&self) -> &'static str {
1621 match self {
1622 Self::Default => "Default",
1623 Self::Float32 => "Float32",
1624 Self::Uint8 => "Uint8",
1625 Self::Float16 => "Float16",
1626 }
1627 }
1628 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1630 match value {
1631 "Default" => Some(Self::Default),
1632 "Float32" => Some(Self::Float32),
1633 "Uint8" => Some(Self::Uint8),
1634 "Float16" => Some(Self::Float16),
1635 _ => None,
1636 }
1637 }
1638}
1639#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1640#[repr(i32)]
1641pub enum Modifier {
1642 None = 0,
1643 Idf = 1,
1645}
1646impl Modifier {
1647 pub fn as_str_name(&self) -> &'static str {
1652 match self {
1653 Self::None => "None",
1654 Self::Idf => "Idf",
1655 }
1656 }
1657 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1659 match value {
1660 "None" => Some(Self::None),
1661 "Idf" => Some(Self::Idf),
1662 _ => None,
1663 }
1664 }
1665}
1666#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1667#[repr(i32)]
1668pub enum MultiVectorComparator {
1669 MaxSim = 0,
1670}
1671impl MultiVectorComparator {
1672 pub fn as_str_name(&self) -> &'static str {
1677 match self {
1678 Self::MaxSim => "MaxSim",
1679 }
1680 }
1681 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1683 match value {
1684 "MaxSim" => Some(Self::MaxSim),
1685 _ => None,
1686 }
1687 }
1688}
1689#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1690#[repr(i32)]
1691pub enum Distance {
1692 UnknownDistance = 0,
1693 Cosine = 1,
1694 Euclid = 2,
1695 Dot = 3,
1696 Manhattan = 4,
1697}
1698impl Distance {
1699 pub fn as_str_name(&self) -> &'static str {
1704 match self {
1705 Self::UnknownDistance => "UnknownDistance",
1706 Self::Cosine => "Cosine",
1707 Self::Euclid => "Euclid",
1708 Self::Dot => "Dot",
1709 Self::Manhattan => "Manhattan",
1710 }
1711 }
1712 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1714 match value {
1715 "UnknownDistance" => Some(Self::UnknownDistance),
1716 "Cosine" => Some(Self::Cosine),
1717 "Euclid" => Some(Self::Euclid),
1718 "Dot" => Some(Self::Dot),
1719 "Manhattan" => Some(Self::Manhattan),
1720 _ => None,
1721 }
1722 }
1723}
1724#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1725#[repr(i32)]
1726pub enum CollectionStatus {
1727 UnknownCollectionStatus = 0,
1728 Green = 1,
1730 Yellow = 2,
1732 Red = 3,
1734 Grey = 4,
1736}
1737impl CollectionStatus {
1738 pub fn as_str_name(&self) -> &'static str {
1743 match self {
1744 Self::UnknownCollectionStatus => "UnknownCollectionStatus",
1745 Self::Green => "Green",
1746 Self::Yellow => "Yellow",
1747 Self::Red => "Red",
1748 Self::Grey => "Grey",
1749 }
1750 }
1751 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1753 match value {
1754 "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
1755 "Green" => Some(Self::Green),
1756 "Yellow" => Some(Self::Yellow),
1757 "Red" => Some(Self::Red),
1758 "Grey" => Some(Self::Grey),
1759 _ => None,
1760 }
1761 }
1762}
1763#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1764#[repr(i32)]
1765pub enum PayloadSchemaType {
1766 UnknownType = 0,
1767 Keyword = 1,
1768 Integer = 2,
1769 Float = 3,
1770 Geo = 4,
1771 Text = 5,
1772 Bool = 6,
1773 Datetime = 7,
1774 Uuid = 8,
1775}
1776impl PayloadSchemaType {
1777 pub fn as_str_name(&self) -> &'static str {
1782 match self {
1783 Self::UnknownType => "UnknownType",
1784 Self::Keyword => "Keyword",
1785 Self::Integer => "Integer",
1786 Self::Float => "Float",
1787 Self::Geo => "Geo",
1788 Self::Text => "Text",
1789 Self::Bool => "Bool",
1790 Self::Datetime => "Datetime",
1791 Self::Uuid => "Uuid",
1792 }
1793 }
1794 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1796 match value {
1797 "UnknownType" => Some(Self::UnknownType),
1798 "Keyword" => Some(Self::Keyword),
1799 "Integer" => Some(Self::Integer),
1800 "Float" => Some(Self::Float),
1801 "Geo" => Some(Self::Geo),
1802 "Text" => Some(Self::Text),
1803 "Bool" => Some(Self::Bool),
1804 "Datetime" => Some(Self::Datetime),
1805 "Uuid" => Some(Self::Uuid),
1806 _ => None,
1807 }
1808 }
1809}
1810#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1811#[repr(i32)]
1812pub enum QuantizationType {
1813 UnknownQuantization = 0,
1814 Int8 = 1,
1815}
1816impl QuantizationType {
1817 pub fn as_str_name(&self) -> &'static str {
1822 match self {
1823 Self::UnknownQuantization => "UnknownQuantization",
1824 Self::Int8 => "Int8",
1825 }
1826 }
1827 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1829 match value {
1830 "UnknownQuantization" => Some(Self::UnknownQuantization),
1831 "Int8" => Some(Self::Int8),
1832 _ => None,
1833 }
1834 }
1835}
1836#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1837#[repr(i32)]
1838pub enum CompressionRatio {
1839 X4 = 0,
1840 X8 = 1,
1841 X16 = 2,
1842 X32 = 3,
1843 X64 = 4,
1844}
1845impl CompressionRatio {
1846 pub fn as_str_name(&self) -> &'static str {
1851 match self {
1852 Self::X4 => "x4",
1853 Self::X8 => "x8",
1854 Self::X16 => "x16",
1855 Self::X32 => "x32",
1856 Self::X64 => "x64",
1857 }
1858 }
1859 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1861 match value {
1862 "x4" => Some(Self::X4),
1863 "x8" => Some(Self::X8),
1864 "x16" => Some(Self::X16),
1865 "x32" => Some(Self::X32),
1866 "x64" => Some(Self::X64),
1867 _ => None,
1868 }
1869 }
1870}
1871#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1872#[repr(i32)]
1873pub enum BinaryQuantizationEncoding {
1874 OneBit = 0,
1875 TwoBits = 1,
1876 OneAndHalfBits = 2,
1877}
1878impl BinaryQuantizationEncoding {
1879 pub fn as_str_name(&self) -> &'static str {
1884 match self {
1885 Self::OneBit => "OneBit",
1886 Self::TwoBits => "TwoBits",
1887 Self::OneAndHalfBits => "OneAndHalfBits",
1888 }
1889 }
1890 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1892 match value {
1893 "OneBit" => Some(Self::OneBit),
1894 "TwoBits" => Some(Self::TwoBits),
1895 "OneAndHalfBits" => Some(Self::OneAndHalfBits),
1896 _ => None,
1897 }
1898 }
1899}
1900#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1901#[repr(i32)]
1902pub enum ShardingMethod {
1903 Auto = 0,
1905 Custom = 1,
1907}
1908impl ShardingMethod {
1909 pub fn as_str_name(&self) -> &'static str {
1914 match self {
1915 Self::Auto => "Auto",
1916 Self::Custom => "Custom",
1917 }
1918 }
1919 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1921 match value {
1922 "Auto" => Some(Self::Auto),
1923 "Custom" => Some(Self::Custom),
1924 _ => None,
1925 }
1926 }
1927}
1928#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1929#[repr(i32)]
1930pub enum TokenizerType {
1931 Unknown = 0,
1932 Prefix = 1,
1933 Whitespace = 2,
1934 Word = 3,
1935 Multilingual = 4,
1936}
1937impl TokenizerType {
1938 pub fn as_str_name(&self) -> &'static str {
1943 match self {
1944 Self::Unknown => "Unknown",
1945 Self::Prefix => "Prefix",
1946 Self::Whitespace => "Whitespace",
1947 Self::Word => "Word",
1948 Self::Multilingual => "Multilingual",
1949 }
1950 }
1951 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1953 match value {
1954 "Unknown" => Some(Self::Unknown),
1955 "Prefix" => Some(Self::Prefix),
1956 "Whitespace" => Some(Self::Whitespace),
1957 "Word" => Some(Self::Word),
1958 "Multilingual" => Some(Self::Multilingual),
1959 _ => None,
1960 }
1961 }
1962}
1963#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1964#[repr(i32)]
1965pub enum ReplicaState {
1966 Active = 0,
1968 Dead = 1,
1970 Partial = 2,
1972 Initializing = 3,
1974 Listener = 4,
1976 PartialSnapshot = 5,
1978 Recovery = 6,
1980 Resharding = 7,
1982 ReshardingScaleDown = 8,
1984 ActiveRead = 9,
1986}
1987impl ReplicaState {
1988 pub fn as_str_name(&self) -> &'static str {
1993 match self {
1994 Self::Active => "Active",
1995 Self::Dead => "Dead",
1996 Self::Partial => "Partial",
1997 Self::Initializing => "Initializing",
1998 Self::Listener => "Listener",
1999 Self::PartialSnapshot => "PartialSnapshot",
2000 Self::Recovery => "Recovery",
2001 Self::Resharding => "Resharding",
2002 Self::ReshardingScaleDown => "ReshardingScaleDown",
2003 Self::ActiveRead => "ActiveRead",
2004 }
2005 }
2006 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2008 match value {
2009 "Active" => Some(Self::Active),
2010 "Dead" => Some(Self::Dead),
2011 "Partial" => Some(Self::Partial),
2012 "Initializing" => Some(Self::Initializing),
2013 "Listener" => Some(Self::Listener),
2014 "PartialSnapshot" => Some(Self::PartialSnapshot),
2015 "Recovery" => Some(Self::Recovery),
2016 "Resharding" => Some(Self::Resharding),
2017 "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
2018 "ActiveRead" => Some(Self::ActiveRead),
2019 _ => None,
2020 }
2021 }
2022}
2023#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2025#[repr(i32)]
2026pub enum ReshardingDirection {
2027 Up = 0,
2029 Down = 1,
2031}
2032impl ReshardingDirection {
2033 pub fn as_str_name(&self) -> &'static str {
2038 match self {
2039 Self::Up => "Up",
2040 Self::Down => "Down",
2041 }
2042 }
2043 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2045 match value {
2046 "Up" => Some(Self::Up),
2047 "Down" => Some(Self::Down),
2048 _ => None,
2049 }
2050 }
2051}
2052#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2053#[repr(i32)]
2054pub enum ShardTransferMethod {
2055 StreamRecords = 0,
2057 Snapshot = 1,
2059 WalDelta = 2,
2061 ReshardingStreamRecords = 3,
2063}
2064impl ShardTransferMethod {
2065 pub fn as_str_name(&self) -> &'static str {
2070 match self {
2071 Self::StreamRecords => "StreamRecords",
2072 Self::Snapshot => "Snapshot",
2073 Self::WalDelta => "WalDelta",
2074 Self::ReshardingStreamRecords => "ReshardingStreamRecords",
2075 }
2076 }
2077 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2079 match value {
2080 "StreamRecords" => Some(Self::StreamRecords),
2081 "Snapshot" => Some(Self::Snapshot),
2082 "WalDelta" => Some(Self::WalDelta),
2083 "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
2084 _ => None,
2085 }
2086 }
2087}
2088pub mod collections_client {
2090 #![allow(
2091 unused_variables,
2092 dead_code,
2093 missing_docs,
2094 clippy::wildcard_imports,
2095 clippy::let_unit_value,
2096 )]
2097 use tonic::codegen::*;
2098 use tonic::codegen::http::Uri;
2099 #[derive(Debug, Clone)]
2100 pub struct CollectionsClient<T> {
2101 inner: tonic::client::Grpc<T>,
2102 }
2103 impl CollectionsClient<tonic::transport::Channel> {
2104 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2106 where
2107 D: TryInto<tonic::transport::Endpoint>,
2108 D::Error: Into<StdError>,
2109 {
2110 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2111 Ok(Self::new(conn))
2112 }
2113 }
2114 impl<T> CollectionsClient<T>
2115 where
2116 T: tonic::client::GrpcService<tonic::body::Body>,
2117 T::Error: Into<StdError>,
2118 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2119 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2120 {
2121 pub fn new(inner: T) -> Self {
2122 let inner = tonic::client::Grpc::new(inner);
2123 Self { inner }
2124 }
2125 pub fn with_origin(inner: T, origin: Uri) -> Self {
2126 let inner = tonic::client::Grpc::with_origin(inner, origin);
2127 Self { inner }
2128 }
2129 pub fn with_interceptor<F>(
2130 inner: T,
2131 interceptor: F,
2132 ) -> CollectionsClient<InterceptedService<T, F>>
2133 where
2134 F: tonic::service::Interceptor,
2135 T::ResponseBody: Default,
2136 T: tonic::codegen::Service<
2137 http::Request<tonic::body::Body>,
2138 Response = http::Response<
2139 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2140 >,
2141 >,
2142 <T as tonic::codegen::Service<
2143 http::Request<tonic::body::Body>,
2144 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2145 {
2146 CollectionsClient::new(InterceptedService::new(inner, interceptor))
2147 }
2148 #[must_use]
2153 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2154 self.inner = self.inner.send_compressed(encoding);
2155 self
2156 }
2157 #[must_use]
2159 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2160 self.inner = self.inner.accept_compressed(encoding);
2161 self
2162 }
2163 #[must_use]
2167 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2168 self.inner = self.inner.max_decoding_message_size(limit);
2169 self
2170 }
2171 #[must_use]
2175 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2176 self.inner = self.inner.max_encoding_message_size(limit);
2177 self
2178 }
2179 pub async fn get(
2181 &mut self,
2182 request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
2183 ) -> std::result::Result<
2184 tonic::Response<super::GetCollectionInfoResponse>,
2185 tonic::Status,
2186 > {
2187 self.inner
2188 .ready()
2189 .await
2190 .map_err(|e| {
2191 tonic::Status::unknown(
2192 format!("Service was not ready: {}", e.into()),
2193 )
2194 })?;
2195 let codec = tonic_prost::ProstCodec::default();
2196 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
2197 let mut req = request.into_request();
2198 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
2199 self.inner.unary(req, path, codec).await
2200 }
2201 pub async fn list(
2203 &mut self,
2204 request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
2205 ) -> std::result::Result<
2206 tonic::Response<super::ListCollectionsResponse>,
2207 tonic::Status,
2208 > {
2209 self.inner
2210 .ready()
2211 .await
2212 .map_err(|e| {
2213 tonic::Status::unknown(
2214 format!("Service was not ready: {}", e.into()),
2215 )
2216 })?;
2217 let codec = tonic_prost::ProstCodec::default();
2218 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
2219 let mut req = request.into_request();
2220 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
2221 self.inner.unary(req, path, codec).await
2222 }
2223 pub async fn create(
2225 &mut self,
2226 request: impl tonic::IntoRequest<super::CreateCollection>,
2227 ) -> std::result::Result<
2228 tonic::Response<super::CollectionOperationResponse>,
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_prost::ProstCodec::default();
2240 let path = http::uri::PathAndQuery::from_static(
2241 "/qdrant.Collections/Create",
2242 );
2243 let mut req = request.into_request();
2244 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
2245 self.inner.unary(req, path, codec).await
2246 }
2247 pub async fn update(
2249 &mut self,
2250 request: impl tonic::IntoRequest<super::UpdateCollection>,
2251 ) -> std::result::Result<
2252 tonic::Response<super::CollectionOperationResponse>,
2253 tonic::Status,
2254 > {
2255 self.inner
2256 .ready()
2257 .await
2258 .map_err(|e| {
2259 tonic::Status::unknown(
2260 format!("Service was not ready: {}", e.into()),
2261 )
2262 })?;
2263 let codec = tonic_prost::ProstCodec::default();
2264 let path = http::uri::PathAndQuery::from_static(
2265 "/qdrant.Collections/Update",
2266 );
2267 let mut req = request.into_request();
2268 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
2269 self.inner.unary(req, path, codec).await
2270 }
2271 pub async fn delete(
2273 &mut self,
2274 request: impl tonic::IntoRequest<super::DeleteCollection>,
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_prost::ProstCodec::default();
2288 let path = http::uri::PathAndQuery::from_static(
2289 "/qdrant.Collections/Delete",
2290 );
2291 let mut req = request.into_request();
2292 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
2293 self.inner.unary(req, path, codec).await
2294 }
2295 pub async fn update_aliases(
2297 &mut self,
2298 request: impl tonic::IntoRequest<super::ChangeAliases>,
2299 ) -> std::result::Result<
2300 tonic::Response<super::CollectionOperationResponse>,
2301 tonic::Status,
2302 > {
2303 self.inner
2304 .ready()
2305 .await
2306 .map_err(|e| {
2307 tonic::Status::unknown(
2308 format!("Service was not ready: {}", e.into()),
2309 )
2310 })?;
2311 let codec = tonic_prost::ProstCodec::default();
2312 let path = http::uri::PathAndQuery::from_static(
2313 "/qdrant.Collections/UpdateAliases",
2314 );
2315 let mut req = request.into_request();
2316 req.extensions_mut()
2317 .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
2318 self.inner.unary(req, path, codec).await
2319 }
2320 pub async fn list_collection_aliases(
2322 &mut self,
2323 request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
2324 ) -> std::result::Result<
2325 tonic::Response<super::ListAliasesResponse>,
2326 tonic::Status,
2327 > {
2328 self.inner
2329 .ready()
2330 .await
2331 .map_err(|e| {
2332 tonic::Status::unknown(
2333 format!("Service was not ready: {}", e.into()),
2334 )
2335 })?;
2336 let codec = tonic_prost::ProstCodec::default();
2337 let path = http::uri::PathAndQuery::from_static(
2338 "/qdrant.Collections/ListCollectionAliases",
2339 );
2340 let mut req = request.into_request();
2341 req.extensions_mut()
2342 .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
2343 self.inner.unary(req, path, codec).await
2344 }
2345 pub async fn list_aliases(
2347 &mut self,
2348 request: impl tonic::IntoRequest<super::ListAliasesRequest>,
2349 ) -> std::result::Result<
2350 tonic::Response<super::ListAliasesResponse>,
2351 tonic::Status,
2352 > {
2353 self.inner
2354 .ready()
2355 .await
2356 .map_err(|e| {
2357 tonic::Status::unknown(
2358 format!("Service was not ready: {}", e.into()),
2359 )
2360 })?;
2361 let codec = tonic_prost::ProstCodec::default();
2362 let path = http::uri::PathAndQuery::from_static(
2363 "/qdrant.Collections/ListAliases",
2364 );
2365 let mut req = request.into_request();
2366 req.extensions_mut()
2367 .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
2368 self.inner.unary(req, path, codec).await
2369 }
2370 pub async fn collection_cluster_info(
2372 &mut self,
2373 request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
2374 ) -> std::result::Result<
2375 tonic::Response<super::CollectionClusterInfoResponse>,
2376 tonic::Status,
2377 > {
2378 self.inner
2379 .ready()
2380 .await
2381 .map_err(|e| {
2382 tonic::Status::unknown(
2383 format!("Service was not ready: {}", e.into()),
2384 )
2385 })?;
2386 let codec = tonic_prost::ProstCodec::default();
2387 let path = http::uri::PathAndQuery::from_static(
2388 "/qdrant.Collections/CollectionClusterInfo",
2389 );
2390 let mut req = request.into_request();
2391 req.extensions_mut()
2392 .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2393 self.inner.unary(req, path, codec).await
2394 }
2395 pub async fn collection_exists(
2397 &mut self,
2398 request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2399 ) -> std::result::Result<
2400 tonic::Response<super::CollectionExistsResponse>,
2401 tonic::Status,
2402 > {
2403 self.inner
2404 .ready()
2405 .await
2406 .map_err(|e| {
2407 tonic::Status::unknown(
2408 format!("Service was not ready: {}", e.into()),
2409 )
2410 })?;
2411 let codec = tonic_prost::ProstCodec::default();
2412 let path = http::uri::PathAndQuery::from_static(
2413 "/qdrant.Collections/CollectionExists",
2414 );
2415 let mut req = request.into_request();
2416 req.extensions_mut()
2417 .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2418 self.inner.unary(req, path, codec).await
2419 }
2420 pub async fn update_collection_cluster_setup(
2422 &mut self,
2423 request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2424 ) -> std::result::Result<
2425 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2426 tonic::Status,
2427 > {
2428 self.inner
2429 .ready()
2430 .await
2431 .map_err(|e| {
2432 tonic::Status::unknown(
2433 format!("Service was not ready: {}", e.into()),
2434 )
2435 })?;
2436 let codec = tonic_prost::ProstCodec::default();
2437 let path = http::uri::PathAndQuery::from_static(
2438 "/qdrant.Collections/UpdateCollectionClusterSetup",
2439 );
2440 let mut req = request.into_request();
2441 req.extensions_mut()
2442 .insert(
2443 GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2444 );
2445 self.inner.unary(req, path, codec).await
2446 }
2447 pub async fn create_shard_key(
2449 &mut self,
2450 request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2451 ) -> std::result::Result<
2452 tonic::Response<super::CreateShardKeyResponse>,
2453 tonic::Status,
2454 > {
2455 self.inner
2456 .ready()
2457 .await
2458 .map_err(|e| {
2459 tonic::Status::unknown(
2460 format!("Service was not ready: {}", e.into()),
2461 )
2462 })?;
2463 let codec = tonic_prost::ProstCodec::default();
2464 let path = http::uri::PathAndQuery::from_static(
2465 "/qdrant.Collections/CreateShardKey",
2466 );
2467 let mut req = request.into_request();
2468 req.extensions_mut()
2469 .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2470 self.inner.unary(req, path, codec).await
2471 }
2472 pub async fn delete_shard_key(
2474 &mut self,
2475 request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2476 ) -> std::result::Result<
2477 tonic::Response<super::DeleteShardKeyResponse>,
2478 tonic::Status,
2479 > {
2480 self.inner
2481 .ready()
2482 .await
2483 .map_err(|e| {
2484 tonic::Status::unknown(
2485 format!("Service was not ready: {}", e.into()),
2486 )
2487 })?;
2488 let codec = tonic_prost::ProstCodec::default();
2489 let path = http::uri::PathAndQuery::from_static(
2490 "/qdrant.Collections/DeleteShardKey",
2491 );
2492 let mut req = request.into_request();
2493 req.extensions_mut()
2494 .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2495 self.inner.unary(req, path, codec).await
2496 }
2497 }
2498}
2499pub mod collections_server {
2501 #![allow(
2502 unused_variables,
2503 dead_code,
2504 missing_docs,
2505 clippy::wildcard_imports,
2506 clippy::let_unit_value,
2507 )]
2508 use tonic::codegen::*;
2509 #[async_trait]
2511 pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
2512 async fn get(
2514 &self,
2515 request: tonic::Request<super::GetCollectionInfoRequest>,
2516 ) -> std::result::Result<
2517 tonic::Response<super::GetCollectionInfoResponse>,
2518 tonic::Status,
2519 >;
2520 async fn list(
2522 &self,
2523 request: tonic::Request<super::ListCollectionsRequest>,
2524 ) -> std::result::Result<
2525 tonic::Response<super::ListCollectionsResponse>,
2526 tonic::Status,
2527 >;
2528 async fn create(
2530 &self,
2531 request: tonic::Request<super::CreateCollection>,
2532 ) -> std::result::Result<
2533 tonic::Response<super::CollectionOperationResponse>,
2534 tonic::Status,
2535 >;
2536 async fn update(
2538 &self,
2539 request: tonic::Request<super::UpdateCollection>,
2540 ) -> std::result::Result<
2541 tonic::Response<super::CollectionOperationResponse>,
2542 tonic::Status,
2543 >;
2544 async fn delete(
2546 &self,
2547 request: tonic::Request<super::DeleteCollection>,
2548 ) -> std::result::Result<
2549 tonic::Response<super::CollectionOperationResponse>,
2550 tonic::Status,
2551 >;
2552 async fn update_aliases(
2554 &self,
2555 request: tonic::Request<super::ChangeAliases>,
2556 ) -> std::result::Result<
2557 tonic::Response<super::CollectionOperationResponse>,
2558 tonic::Status,
2559 >;
2560 async fn list_collection_aliases(
2562 &self,
2563 request: tonic::Request<super::ListCollectionAliasesRequest>,
2564 ) -> std::result::Result<
2565 tonic::Response<super::ListAliasesResponse>,
2566 tonic::Status,
2567 >;
2568 async fn list_aliases(
2570 &self,
2571 request: tonic::Request<super::ListAliasesRequest>,
2572 ) -> std::result::Result<
2573 tonic::Response<super::ListAliasesResponse>,
2574 tonic::Status,
2575 >;
2576 async fn collection_cluster_info(
2578 &self,
2579 request: tonic::Request<super::CollectionClusterInfoRequest>,
2580 ) -> std::result::Result<
2581 tonic::Response<super::CollectionClusterInfoResponse>,
2582 tonic::Status,
2583 >;
2584 async fn collection_exists(
2586 &self,
2587 request: tonic::Request<super::CollectionExistsRequest>,
2588 ) -> std::result::Result<
2589 tonic::Response<super::CollectionExistsResponse>,
2590 tonic::Status,
2591 >;
2592 async fn update_collection_cluster_setup(
2594 &self,
2595 request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
2596 ) -> std::result::Result<
2597 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2598 tonic::Status,
2599 >;
2600 async fn create_shard_key(
2602 &self,
2603 request: tonic::Request<super::CreateShardKeyRequest>,
2604 ) -> std::result::Result<
2605 tonic::Response<super::CreateShardKeyResponse>,
2606 tonic::Status,
2607 >;
2608 async fn delete_shard_key(
2610 &self,
2611 request: tonic::Request<super::DeleteShardKeyRequest>,
2612 ) -> std::result::Result<
2613 tonic::Response<super::DeleteShardKeyResponse>,
2614 tonic::Status,
2615 >;
2616 }
2617 #[derive(Debug)]
2618 pub struct CollectionsServer<T> {
2619 inner: Arc<T>,
2620 accept_compression_encodings: EnabledCompressionEncodings,
2621 send_compression_encodings: EnabledCompressionEncodings,
2622 max_decoding_message_size: Option<usize>,
2623 max_encoding_message_size: Option<usize>,
2624 }
2625 impl<T> CollectionsServer<T> {
2626 pub fn new(inner: T) -> Self {
2627 Self::from_arc(Arc::new(inner))
2628 }
2629 pub fn from_arc(inner: Arc<T>) -> Self {
2630 Self {
2631 inner,
2632 accept_compression_encodings: Default::default(),
2633 send_compression_encodings: Default::default(),
2634 max_decoding_message_size: None,
2635 max_encoding_message_size: None,
2636 }
2637 }
2638 pub fn with_interceptor<F>(
2639 inner: T,
2640 interceptor: F,
2641 ) -> InterceptedService<Self, F>
2642 where
2643 F: tonic::service::Interceptor,
2644 {
2645 InterceptedService::new(Self::new(inner), interceptor)
2646 }
2647 #[must_use]
2649 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2650 self.accept_compression_encodings.enable(encoding);
2651 self
2652 }
2653 #[must_use]
2655 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2656 self.send_compression_encodings.enable(encoding);
2657 self
2658 }
2659 #[must_use]
2663 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2664 self.max_decoding_message_size = Some(limit);
2665 self
2666 }
2667 #[must_use]
2671 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2672 self.max_encoding_message_size = Some(limit);
2673 self
2674 }
2675 }
2676 impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
2677 where
2678 T: Collections,
2679 B: Body + std::marker::Send + 'static,
2680 B::Error: Into<StdError> + std::marker::Send + 'static,
2681 {
2682 type Response = http::Response<tonic::body::Body>;
2683 type Error = std::convert::Infallible;
2684 type Future = BoxFuture<Self::Response, Self::Error>;
2685 fn poll_ready(
2686 &mut self,
2687 _cx: &mut Context<'_>,
2688 ) -> Poll<std::result::Result<(), Self::Error>> {
2689 Poll::Ready(Ok(()))
2690 }
2691 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2692 match req.uri().path() {
2693 "/qdrant.Collections/Get" => {
2694 #[allow(non_camel_case_types)]
2695 struct GetSvc<T: Collections>(pub Arc<T>);
2696 impl<
2697 T: Collections,
2698 > tonic::server::UnaryService<super::GetCollectionInfoRequest>
2699 for GetSvc<T> {
2700 type Response = super::GetCollectionInfoResponse;
2701 type Future = BoxFuture<
2702 tonic::Response<Self::Response>,
2703 tonic::Status,
2704 >;
2705 fn call(
2706 &mut self,
2707 request: tonic::Request<super::GetCollectionInfoRequest>,
2708 ) -> Self::Future {
2709 let inner = Arc::clone(&self.0);
2710 let fut = async move {
2711 <T as Collections>::get(&inner, request).await
2712 };
2713 Box::pin(fut)
2714 }
2715 }
2716 let accept_compression_encodings = self.accept_compression_encodings;
2717 let send_compression_encodings = self.send_compression_encodings;
2718 let max_decoding_message_size = self.max_decoding_message_size;
2719 let max_encoding_message_size = self.max_encoding_message_size;
2720 let inner = self.inner.clone();
2721 let fut = async move {
2722 let method = GetSvc(inner);
2723 let codec = tonic_prost::ProstCodec::default();
2724 let mut grpc = tonic::server::Grpc::new(codec)
2725 .apply_compression_config(
2726 accept_compression_encodings,
2727 send_compression_encodings,
2728 )
2729 .apply_max_message_size_config(
2730 max_decoding_message_size,
2731 max_encoding_message_size,
2732 );
2733 let res = grpc.unary(method, req).await;
2734 Ok(res)
2735 };
2736 Box::pin(fut)
2737 }
2738 "/qdrant.Collections/List" => {
2739 #[allow(non_camel_case_types)]
2740 struct ListSvc<T: Collections>(pub Arc<T>);
2741 impl<
2742 T: Collections,
2743 > tonic::server::UnaryService<super::ListCollectionsRequest>
2744 for ListSvc<T> {
2745 type Response = super::ListCollectionsResponse;
2746 type Future = BoxFuture<
2747 tonic::Response<Self::Response>,
2748 tonic::Status,
2749 >;
2750 fn call(
2751 &mut self,
2752 request: tonic::Request<super::ListCollectionsRequest>,
2753 ) -> Self::Future {
2754 let inner = Arc::clone(&self.0);
2755 let fut = async move {
2756 <T as Collections>::list(&inner, request).await
2757 };
2758 Box::pin(fut)
2759 }
2760 }
2761 let accept_compression_encodings = self.accept_compression_encodings;
2762 let send_compression_encodings = self.send_compression_encodings;
2763 let max_decoding_message_size = self.max_decoding_message_size;
2764 let max_encoding_message_size = self.max_encoding_message_size;
2765 let inner = self.inner.clone();
2766 let fut = async move {
2767 let method = ListSvc(inner);
2768 let codec = tonic_prost::ProstCodec::default();
2769 let mut grpc = tonic::server::Grpc::new(codec)
2770 .apply_compression_config(
2771 accept_compression_encodings,
2772 send_compression_encodings,
2773 )
2774 .apply_max_message_size_config(
2775 max_decoding_message_size,
2776 max_encoding_message_size,
2777 );
2778 let res = grpc.unary(method, req).await;
2779 Ok(res)
2780 };
2781 Box::pin(fut)
2782 }
2783 "/qdrant.Collections/Create" => {
2784 #[allow(non_camel_case_types)]
2785 struct CreateSvc<T: Collections>(pub Arc<T>);
2786 impl<
2787 T: Collections,
2788 > tonic::server::UnaryService<super::CreateCollection>
2789 for CreateSvc<T> {
2790 type Response = super::CollectionOperationResponse;
2791 type Future = BoxFuture<
2792 tonic::Response<Self::Response>,
2793 tonic::Status,
2794 >;
2795 fn call(
2796 &mut self,
2797 request: tonic::Request<super::CreateCollection>,
2798 ) -> Self::Future {
2799 let inner = Arc::clone(&self.0);
2800 let fut = async move {
2801 <T as Collections>::create(&inner, request).await
2802 };
2803 Box::pin(fut)
2804 }
2805 }
2806 let accept_compression_encodings = self.accept_compression_encodings;
2807 let send_compression_encodings = self.send_compression_encodings;
2808 let max_decoding_message_size = self.max_decoding_message_size;
2809 let max_encoding_message_size = self.max_encoding_message_size;
2810 let inner = self.inner.clone();
2811 let fut = async move {
2812 let method = CreateSvc(inner);
2813 let codec = tonic_prost::ProstCodec::default();
2814 let mut grpc = tonic::server::Grpc::new(codec)
2815 .apply_compression_config(
2816 accept_compression_encodings,
2817 send_compression_encodings,
2818 )
2819 .apply_max_message_size_config(
2820 max_decoding_message_size,
2821 max_encoding_message_size,
2822 );
2823 let res = grpc.unary(method, req).await;
2824 Ok(res)
2825 };
2826 Box::pin(fut)
2827 }
2828 "/qdrant.Collections/Update" => {
2829 #[allow(non_camel_case_types)]
2830 struct UpdateSvc<T: Collections>(pub Arc<T>);
2831 impl<
2832 T: Collections,
2833 > tonic::server::UnaryService<super::UpdateCollection>
2834 for UpdateSvc<T> {
2835 type Response = super::CollectionOperationResponse;
2836 type Future = BoxFuture<
2837 tonic::Response<Self::Response>,
2838 tonic::Status,
2839 >;
2840 fn call(
2841 &mut self,
2842 request: tonic::Request<super::UpdateCollection>,
2843 ) -> Self::Future {
2844 let inner = Arc::clone(&self.0);
2845 let fut = async move {
2846 <T as Collections>::update(&inner, request).await
2847 };
2848 Box::pin(fut)
2849 }
2850 }
2851 let accept_compression_encodings = self.accept_compression_encodings;
2852 let send_compression_encodings = self.send_compression_encodings;
2853 let max_decoding_message_size = self.max_decoding_message_size;
2854 let max_encoding_message_size = self.max_encoding_message_size;
2855 let inner = self.inner.clone();
2856 let fut = async move {
2857 let method = UpdateSvc(inner);
2858 let codec = tonic_prost::ProstCodec::default();
2859 let mut grpc = tonic::server::Grpc::new(codec)
2860 .apply_compression_config(
2861 accept_compression_encodings,
2862 send_compression_encodings,
2863 )
2864 .apply_max_message_size_config(
2865 max_decoding_message_size,
2866 max_encoding_message_size,
2867 );
2868 let res = grpc.unary(method, req).await;
2869 Ok(res)
2870 };
2871 Box::pin(fut)
2872 }
2873 "/qdrant.Collections/Delete" => {
2874 #[allow(non_camel_case_types)]
2875 struct DeleteSvc<T: Collections>(pub Arc<T>);
2876 impl<
2877 T: Collections,
2878 > tonic::server::UnaryService<super::DeleteCollection>
2879 for DeleteSvc<T> {
2880 type Response = super::CollectionOperationResponse;
2881 type Future = BoxFuture<
2882 tonic::Response<Self::Response>,
2883 tonic::Status,
2884 >;
2885 fn call(
2886 &mut self,
2887 request: tonic::Request<super::DeleteCollection>,
2888 ) -> Self::Future {
2889 let inner = Arc::clone(&self.0);
2890 let fut = async move {
2891 <T as Collections>::delete(&inner, request).await
2892 };
2893 Box::pin(fut)
2894 }
2895 }
2896 let accept_compression_encodings = self.accept_compression_encodings;
2897 let send_compression_encodings = self.send_compression_encodings;
2898 let max_decoding_message_size = self.max_decoding_message_size;
2899 let max_encoding_message_size = self.max_encoding_message_size;
2900 let inner = self.inner.clone();
2901 let fut = async move {
2902 let method = DeleteSvc(inner);
2903 let codec = tonic_prost::ProstCodec::default();
2904 let mut grpc = tonic::server::Grpc::new(codec)
2905 .apply_compression_config(
2906 accept_compression_encodings,
2907 send_compression_encodings,
2908 )
2909 .apply_max_message_size_config(
2910 max_decoding_message_size,
2911 max_encoding_message_size,
2912 );
2913 let res = grpc.unary(method, req).await;
2914 Ok(res)
2915 };
2916 Box::pin(fut)
2917 }
2918 "/qdrant.Collections/UpdateAliases" => {
2919 #[allow(non_camel_case_types)]
2920 struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
2921 impl<
2922 T: Collections,
2923 > tonic::server::UnaryService<super::ChangeAliases>
2924 for UpdateAliasesSvc<T> {
2925 type Response = super::CollectionOperationResponse;
2926 type Future = BoxFuture<
2927 tonic::Response<Self::Response>,
2928 tonic::Status,
2929 >;
2930 fn call(
2931 &mut self,
2932 request: tonic::Request<super::ChangeAliases>,
2933 ) -> Self::Future {
2934 let inner = Arc::clone(&self.0);
2935 let fut = async move {
2936 <T as Collections>::update_aliases(&inner, request).await
2937 };
2938 Box::pin(fut)
2939 }
2940 }
2941 let accept_compression_encodings = self.accept_compression_encodings;
2942 let send_compression_encodings = self.send_compression_encodings;
2943 let max_decoding_message_size = self.max_decoding_message_size;
2944 let max_encoding_message_size = self.max_encoding_message_size;
2945 let inner = self.inner.clone();
2946 let fut = async move {
2947 let method = UpdateAliasesSvc(inner);
2948 let codec = tonic_prost::ProstCodec::default();
2949 let mut grpc = tonic::server::Grpc::new(codec)
2950 .apply_compression_config(
2951 accept_compression_encodings,
2952 send_compression_encodings,
2953 )
2954 .apply_max_message_size_config(
2955 max_decoding_message_size,
2956 max_encoding_message_size,
2957 );
2958 let res = grpc.unary(method, req).await;
2959 Ok(res)
2960 };
2961 Box::pin(fut)
2962 }
2963 "/qdrant.Collections/ListCollectionAliases" => {
2964 #[allow(non_camel_case_types)]
2965 struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
2966 impl<
2967 T: Collections,
2968 > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
2969 for ListCollectionAliasesSvc<T> {
2970 type Response = super::ListAliasesResponse;
2971 type Future = BoxFuture<
2972 tonic::Response<Self::Response>,
2973 tonic::Status,
2974 >;
2975 fn call(
2976 &mut self,
2977 request: tonic::Request<super::ListCollectionAliasesRequest>,
2978 ) -> Self::Future {
2979 let inner = Arc::clone(&self.0);
2980 let fut = async move {
2981 <T as Collections>::list_collection_aliases(&inner, request)
2982 .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 = ListCollectionAliasesSvc(inner);
2994 let codec = tonic_prost::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/ListAliases" => {
3010 #[allow(non_camel_case_types)]
3011 struct ListAliasesSvc<T: Collections>(pub Arc<T>);
3012 impl<
3013 T: Collections,
3014 > tonic::server::UnaryService<super::ListAliasesRequest>
3015 for ListAliasesSvc<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::ListAliasesRequest>,
3024 ) -> Self::Future {
3025 let inner = Arc::clone(&self.0);
3026 let fut = async move {
3027 <T as Collections>::list_aliases(&inner, request).await
3028 };
3029 Box::pin(fut)
3030 }
3031 }
3032 let accept_compression_encodings = self.accept_compression_encodings;
3033 let send_compression_encodings = self.send_compression_encodings;
3034 let max_decoding_message_size = self.max_decoding_message_size;
3035 let max_encoding_message_size = self.max_encoding_message_size;
3036 let inner = self.inner.clone();
3037 let fut = async move {
3038 let method = ListAliasesSvc(inner);
3039 let codec = tonic_prost::ProstCodec::default();
3040 let mut grpc = tonic::server::Grpc::new(codec)
3041 .apply_compression_config(
3042 accept_compression_encodings,
3043 send_compression_encodings,
3044 )
3045 .apply_max_message_size_config(
3046 max_decoding_message_size,
3047 max_encoding_message_size,
3048 );
3049 let res = grpc.unary(method, req).await;
3050 Ok(res)
3051 };
3052 Box::pin(fut)
3053 }
3054 "/qdrant.Collections/CollectionClusterInfo" => {
3055 #[allow(non_camel_case_types)]
3056 struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
3057 impl<
3058 T: Collections,
3059 > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
3060 for CollectionClusterInfoSvc<T> {
3061 type Response = super::CollectionClusterInfoResponse;
3062 type Future = BoxFuture<
3063 tonic::Response<Self::Response>,
3064 tonic::Status,
3065 >;
3066 fn call(
3067 &mut self,
3068 request: tonic::Request<super::CollectionClusterInfoRequest>,
3069 ) -> Self::Future {
3070 let inner = Arc::clone(&self.0);
3071 let fut = async move {
3072 <T as Collections>::collection_cluster_info(&inner, request)
3073 .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 = CollectionClusterInfoSvc(inner);
3085 let codec = tonic_prost::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/CollectionExists" => {
3101 #[allow(non_camel_case_types)]
3102 struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
3103 impl<
3104 T: Collections,
3105 > tonic::server::UnaryService<super::CollectionExistsRequest>
3106 for CollectionExistsSvc<T> {
3107 type Response = super::CollectionExistsResponse;
3108 type Future = BoxFuture<
3109 tonic::Response<Self::Response>,
3110 tonic::Status,
3111 >;
3112 fn call(
3113 &mut self,
3114 request: tonic::Request<super::CollectionExistsRequest>,
3115 ) -> Self::Future {
3116 let inner = Arc::clone(&self.0);
3117 let fut = async move {
3118 <T as Collections>::collection_exists(&inner, request).await
3119 };
3120 Box::pin(fut)
3121 }
3122 }
3123 let accept_compression_encodings = self.accept_compression_encodings;
3124 let send_compression_encodings = self.send_compression_encodings;
3125 let max_decoding_message_size = self.max_decoding_message_size;
3126 let max_encoding_message_size = self.max_encoding_message_size;
3127 let inner = self.inner.clone();
3128 let fut = async move {
3129 let method = CollectionExistsSvc(inner);
3130 let codec = tonic_prost::ProstCodec::default();
3131 let mut grpc = tonic::server::Grpc::new(codec)
3132 .apply_compression_config(
3133 accept_compression_encodings,
3134 send_compression_encodings,
3135 )
3136 .apply_max_message_size_config(
3137 max_decoding_message_size,
3138 max_encoding_message_size,
3139 );
3140 let res = grpc.unary(method, req).await;
3141 Ok(res)
3142 };
3143 Box::pin(fut)
3144 }
3145 "/qdrant.Collections/UpdateCollectionClusterSetup" => {
3146 #[allow(non_camel_case_types)]
3147 struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
3148 impl<
3149 T: Collections,
3150 > tonic::server::UnaryService<
3151 super::UpdateCollectionClusterSetupRequest,
3152 > for UpdateCollectionClusterSetupSvc<T> {
3153 type Response = super::UpdateCollectionClusterSetupResponse;
3154 type Future = BoxFuture<
3155 tonic::Response<Self::Response>,
3156 tonic::Status,
3157 >;
3158 fn call(
3159 &mut self,
3160 request: tonic::Request<
3161 super::UpdateCollectionClusterSetupRequest,
3162 >,
3163 ) -> Self::Future {
3164 let inner = Arc::clone(&self.0);
3165 let fut = async move {
3166 <T as Collections>::update_collection_cluster_setup(
3167 &inner,
3168 request,
3169 )
3170 .await
3171 };
3172 Box::pin(fut)
3173 }
3174 }
3175 let accept_compression_encodings = self.accept_compression_encodings;
3176 let send_compression_encodings = self.send_compression_encodings;
3177 let max_decoding_message_size = self.max_decoding_message_size;
3178 let max_encoding_message_size = self.max_encoding_message_size;
3179 let inner = self.inner.clone();
3180 let fut = async move {
3181 let method = UpdateCollectionClusterSetupSvc(inner);
3182 let codec = tonic_prost::ProstCodec::default();
3183 let mut grpc = tonic::server::Grpc::new(codec)
3184 .apply_compression_config(
3185 accept_compression_encodings,
3186 send_compression_encodings,
3187 )
3188 .apply_max_message_size_config(
3189 max_decoding_message_size,
3190 max_encoding_message_size,
3191 );
3192 let res = grpc.unary(method, req).await;
3193 Ok(res)
3194 };
3195 Box::pin(fut)
3196 }
3197 "/qdrant.Collections/CreateShardKey" => {
3198 #[allow(non_camel_case_types)]
3199 struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
3200 impl<
3201 T: Collections,
3202 > tonic::server::UnaryService<super::CreateShardKeyRequest>
3203 for CreateShardKeySvc<T> {
3204 type Response = super::CreateShardKeyResponse;
3205 type Future = BoxFuture<
3206 tonic::Response<Self::Response>,
3207 tonic::Status,
3208 >;
3209 fn call(
3210 &mut self,
3211 request: tonic::Request<super::CreateShardKeyRequest>,
3212 ) -> Self::Future {
3213 let inner = Arc::clone(&self.0);
3214 let fut = async move {
3215 <T as Collections>::create_shard_key(&inner, request).await
3216 };
3217 Box::pin(fut)
3218 }
3219 }
3220 let accept_compression_encodings = self.accept_compression_encodings;
3221 let send_compression_encodings = self.send_compression_encodings;
3222 let max_decoding_message_size = self.max_decoding_message_size;
3223 let max_encoding_message_size = self.max_encoding_message_size;
3224 let inner = self.inner.clone();
3225 let fut = async move {
3226 let method = CreateShardKeySvc(inner);
3227 let codec = tonic_prost::ProstCodec::default();
3228 let mut grpc = tonic::server::Grpc::new(codec)
3229 .apply_compression_config(
3230 accept_compression_encodings,
3231 send_compression_encodings,
3232 )
3233 .apply_max_message_size_config(
3234 max_decoding_message_size,
3235 max_encoding_message_size,
3236 );
3237 let res = grpc.unary(method, req).await;
3238 Ok(res)
3239 };
3240 Box::pin(fut)
3241 }
3242 "/qdrant.Collections/DeleteShardKey" => {
3243 #[allow(non_camel_case_types)]
3244 struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
3245 impl<
3246 T: Collections,
3247 > tonic::server::UnaryService<super::DeleteShardKeyRequest>
3248 for DeleteShardKeySvc<T> {
3249 type Response = super::DeleteShardKeyResponse;
3250 type Future = BoxFuture<
3251 tonic::Response<Self::Response>,
3252 tonic::Status,
3253 >;
3254 fn call(
3255 &mut self,
3256 request: tonic::Request<super::DeleteShardKeyRequest>,
3257 ) -> Self::Future {
3258 let inner = Arc::clone(&self.0);
3259 let fut = async move {
3260 <T as Collections>::delete_shard_key(&inner, request).await
3261 };
3262 Box::pin(fut)
3263 }
3264 }
3265 let accept_compression_encodings = self.accept_compression_encodings;
3266 let send_compression_encodings = self.send_compression_encodings;
3267 let max_decoding_message_size = self.max_decoding_message_size;
3268 let max_encoding_message_size = self.max_encoding_message_size;
3269 let inner = self.inner.clone();
3270 let fut = async move {
3271 let method = DeleteShardKeySvc(inner);
3272 let codec = tonic_prost::ProstCodec::default();
3273 let mut grpc = tonic::server::Grpc::new(codec)
3274 .apply_compression_config(
3275 accept_compression_encodings,
3276 send_compression_encodings,
3277 )
3278 .apply_max_message_size_config(
3279 max_decoding_message_size,
3280 max_encoding_message_size,
3281 );
3282 let res = grpc.unary(method, req).await;
3283 Ok(res)
3284 };
3285 Box::pin(fut)
3286 }
3287 _ => {
3288 Box::pin(async move {
3289 let mut response = http::Response::new(
3290 tonic::body::Body::default(),
3291 );
3292 let headers = response.headers_mut();
3293 headers
3294 .insert(
3295 tonic::Status::GRPC_STATUS,
3296 (tonic::Code::Unimplemented as i32).into(),
3297 );
3298 headers
3299 .insert(
3300 http::header::CONTENT_TYPE,
3301 tonic::metadata::GRPC_CONTENT_TYPE,
3302 );
3303 Ok(response)
3304 })
3305 }
3306 }
3307 }
3308 }
3309 impl<T> Clone for CollectionsServer<T> {
3310 fn clone(&self) -> Self {
3311 let inner = self.inner.clone();
3312 Self {
3313 inner,
3314 accept_compression_encodings: self.accept_compression_encodings,
3315 send_compression_encodings: self.send_compression_encodings,
3316 max_decoding_message_size: self.max_decoding_message_size,
3317 max_encoding_message_size: self.max_encoding_message_size,
3318 }
3319 }
3320 }
3321 pub const SERVICE_NAME: &str = "qdrant.Collections";
3323 impl<T> tonic::server::NamedService for CollectionsServer<T> {
3324 const NAME: &'static str = SERVICE_NAME;
3325 }
3326}
3327#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3328pub struct WriteOrdering {
3329 #[prost(enumeration = "WriteOrderingType", tag = "1")]
3331 pub r#type: i32,
3332}
3333#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3334pub struct ReadConsistency {
3335 #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3336 pub value: ::core::option::Option<read_consistency::Value>,
3337}
3338pub mod read_consistency {
3340 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
3341 pub enum Value {
3342 #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3344 Type(i32),
3345 #[prost(uint64, tag = "2")]
3347 Factor(u64),
3348 }
3349}
3350#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3351pub struct SparseIndices {
3352 #[prost(uint32, repeated, tag = "1")]
3353 pub data: ::prost::alloc::vec::Vec<u32>,
3354}
3355#[derive(Clone, PartialEq, ::prost::Message)]
3356pub struct Document {
3357 #[prost(string, tag = "1")]
3359 pub text: ::prost::alloc::string::String,
3360 #[prost(string, tag = "3")]
3362 pub model: ::prost::alloc::string::String,
3363 #[prost(map = "string, message", tag = "4")]
3365 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3366}
3367#[derive(Clone, PartialEq, ::prost::Message)]
3368pub struct Image {
3369 #[prost(message, optional, tag = "1")]
3371 pub image: ::core::option::Option<Value>,
3372 #[prost(string, tag = "2")]
3374 pub model: ::prost::alloc::string::String,
3375 #[prost(map = "string, message", tag = "3")]
3377 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3378}
3379#[derive(Clone, PartialEq, ::prost::Message)]
3380pub struct InferenceObject {
3381 #[prost(message, optional, tag = "1")]
3383 pub object: ::core::option::Option<Value>,
3384 #[prost(string, tag = "2")]
3386 pub model: ::prost::alloc::string::String,
3387 #[prost(map = "string, message", tag = "3")]
3389 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3390}
3391#[derive(Clone, PartialEq, ::prost::Message)]
3392pub struct Vector {
3393 #[deprecated]
3395 #[prost(float, repeated, packed = "false", tag = "1")]
3396 pub data: ::prost::alloc::vec::Vec<f32>,
3397 #[deprecated]
3399 #[prost(message, optional, tag = "2")]
3400 pub indices: ::core::option::Option<SparseIndices>,
3401 #[deprecated]
3403 #[prost(uint32, optional, tag = "3")]
3404 pub vectors_count: ::core::option::Option<u32>,
3405 #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3406 pub vector: ::core::option::Option<vector::Vector>,
3407}
3408pub mod vector {
3410 #[derive(Clone, PartialEq, ::prost::Oneof)]
3411 pub enum Vector {
3412 #[prost(message, tag = "101")]
3414 Dense(super::DenseVector),
3415 #[prost(message, tag = "102")]
3417 Sparse(super::SparseVector),
3418 #[prost(message, tag = "103")]
3420 MultiDense(super::MultiDenseVector),
3421 #[prost(message, tag = "104")]
3422 Document(super::Document),
3423 #[prost(message, tag = "105")]
3424 Image(super::Image),
3425 #[prost(message, tag = "106")]
3426 Object(super::InferenceObject),
3427 }
3428}
3429#[derive(Clone, PartialEq, ::prost::Message)]
3430pub struct VectorOutput {
3431 #[deprecated]
3433 #[prost(float, repeated, packed = "false", tag = "1")]
3434 pub data: ::prost::alloc::vec::Vec<f32>,
3435 #[deprecated]
3437 #[prost(message, optional, tag = "2")]
3438 pub indices: ::core::option::Option<SparseIndices>,
3439 #[deprecated]
3441 #[prost(uint32, optional, tag = "3")]
3442 pub vectors_count: ::core::option::Option<u32>,
3443 #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
3444 pub vector: ::core::option::Option<vector_output::Vector>,
3445}
3446pub mod vector_output {
3448 #[derive(Clone, PartialEq, ::prost::Oneof)]
3449 pub enum Vector {
3450 #[prost(message, tag = "101")]
3452 Dense(super::DenseVector),
3453 #[prost(message, tag = "102")]
3455 Sparse(super::SparseVector),
3456 #[prost(message, tag = "103")]
3458 MultiDense(super::MultiDenseVector),
3459 }
3460}
3461#[derive(Clone, PartialEq, ::prost::Message)]
3462pub struct DenseVector {
3463 #[prost(float, repeated, tag = "1")]
3464 pub data: ::prost::alloc::vec::Vec<f32>,
3465}
3466#[derive(Clone, PartialEq, ::prost::Message)]
3467pub struct SparseVector {
3468 #[prost(float, repeated, tag = "1")]
3469 pub values: ::prost::alloc::vec::Vec<f32>,
3470 #[prost(uint32, repeated, tag = "2")]
3471 pub indices: ::prost::alloc::vec::Vec<u32>,
3472}
3473#[derive(Clone, PartialEq, ::prost::Message)]
3474pub struct MultiDenseVector {
3475 #[prost(message, repeated, tag = "1")]
3476 pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
3477}
3478#[derive(Clone, PartialEq, ::prost::Message)]
3480pub struct VectorInput {
3481 #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
3482 pub variant: ::core::option::Option<vector_input::Variant>,
3483}
3484pub mod vector_input {
3486 #[derive(Clone, PartialEq, ::prost::Oneof)]
3487 pub enum Variant {
3488 #[prost(message, tag = "1")]
3489 Id(super::PointId),
3490 #[prost(message, tag = "2")]
3491 Dense(super::DenseVector),
3492 #[prost(message, tag = "3")]
3493 Sparse(super::SparseVector),
3494 #[prost(message, tag = "4")]
3495 MultiDense(super::MultiDenseVector),
3496 #[prost(message, tag = "5")]
3497 Document(super::Document),
3498 #[prost(message, tag = "6")]
3499 Image(super::Image),
3500 #[prost(message, tag = "7")]
3501 Object(super::InferenceObject),
3502 }
3503}
3504#[derive(Clone, PartialEq, ::prost::Message)]
3505pub struct ShardKeySelector {
3506 #[prost(message, repeated, tag = "1")]
3508 pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
3509 #[prost(message, optional, tag = "2")]
3510 pub fallback: ::core::option::Option<ShardKey>,
3511}
3512#[derive(Clone, PartialEq, ::prost::Message)]
3513pub struct UpsertPoints {
3514 #[prost(string, tag = "1")]
3516 pub collection_name: ::prost::alloc::string::String,
3517 #[prost(bool, optional, tag = "2")]
3519 pub wait: ::core::option::Option<bool>,
3520 #[prost(message, repeated, tag = "3")]
3521 pub points: ::prost::alloc::vec::Vec<PointStruct>,
3522 #[prost(message, optional, tag = "4")]
3524 pub ordering: ::core::option::Option<WriteOrdering>,
3525 #[prost(message, optional, tag = "5")]
3527 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3528 #[prost(message, optional, tag = "6")]
3530 pub update_filter: ::core::option::Option<Filter>,
3531}
3532#[derive(Clone, PartialEq, ::prost::Message)]
3533pub struct DeletePoints {
3534 #[prost(string, tag = "1")]
3536 pub collection_name: ::prost::alloc::string::String,
3537 #[prost(bool, optional, tag = "2")]
3539 pub wait: ::core::option::Option<bool>,
3540 #[prost(message, optional, tag = "3")]
3542 pub points: ::core::option::Option<PointsSelector>,
3543 #[prost(message, optional, tag = "4")]
3545 pub ordering: ::core::option::Option<WriteOrdering>,
3546 #[prost(message, optional, tag = "5")]
3548 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3549}
3550#[derive(Clone, PartialEq, ::prost::Message)]
3551pub struct GetPoints {
3552 #[prost(string, tag = "1")]
3554 pub collection_name: ::prost::alloc::string::String,
3555 #[prost(message, repeated, tag = "2")]
3557 pub ids: ::prost::alloc::vec::Vec<PointId>,
3558 #[prost(message, optional, tag = "4")]
3560 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3561 #[prost(message, optional, tag = "5")]
3563 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3564 #[prost(message, optional, tag = "6")]
3566 pub read_consistency: ::core::option::Option<ReadConsistency>,
3567 #[prost(message, optional, tag = "7")]
3569 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3570 #[prost(uint64, optional, tag = "8")]
3572 pub timeout: ::core::option::Option<u64>,
3573}
3574#[derive(Clone, PartialEq, ::prost::Message)]
3575pub struct UpdatePointVectors {
3576 #[prost(string, tag = "1")]
3578 pub collection_name: ::prost::alloc::string::String,
3579 #[prost(bool, optional, tag = "2")]
3581 pub wait: ::core::option::Option<bool>,
3582 #[prost(message, repeated, tag = "3")]
3584 pub points: ::prost::alloc::vec::Vec<PointVectors>,
3585 #[prost(message, optional, tag = "4")]
3587 pub ordering: ::core::option::Option<WriteOrdering>,
3588 #[prost(message, optional, tag = "5")]
3590 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3591 #[prost(message, optional, tag = "6")]
3593 pub update_filter: ::core::option::Option<Filter>,
3594}
3595#[derive(Clone, PartialEq, ::prost::Message)]
3596pub struct PointVectors {
3597 #[prost(message, optional, tag = "1")]
3599 pub id: ::core::option::Option<PointId>,
3600 #[prost(message, optional, tag = "2")]
3602 pub vectors: ::core::option::Option<Vectors>,
3603}
3604#[derive(Clone, PartialEq, ::prost::Message)]
3605pub struct DeletePointVectors {
3606 #[prost(string, tag = "1")]
3608 pub collection_name: ::prost::alloc::string::String,
3609 #[prost(bool, optional, tag = "2")]
3611 pub wait: ::core::option::Option<bool>,
3612 #[prost(message, optional, tag = "3")]
3614 pub points_selector: ::core::option::Option<PointsSelector>,
3615 #[prost(message, optional, tag = "4")]
3617 pub vectors: ::core::option::Option<VectorsSelector>,
3618 #[prost(message, optional, tag = "5")]
3620 pub ordering: ::core::option::Option<WriteOrdering>,
3621 #[prost(message, optional, tag = "6")]
3623 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3624}
3625#[derive(Clone, PartialEq, ::prost::Message)]
3626pub struct SetPayloadPoints {
3627 #[prost(string, tag = "1")]
3629 pub collection_name: ::prost::alloc::string::String,
3630 #[prost(bool, optional, tag = "2")]
3632 pub wait: ::core::option::Option<bool>,
3633 #[prost(map = "string, message", tag = "3")]
3635 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3636 #[prost(message, optional, tag = "5")]
3638 pub points_selector: ::core::option::Option<PointsSelector>,
3639 #[prost(message, optional, tag = "6")]
3641 pub ordering: ::core::option::Option<WriteOrdering>,
3642 #[prost(message, optional, tag = "7")]
3644 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3645 #[prost(string, optional, tag = "8")]
3647 pub key: ::core::option::Option<::prost::alloc::string::String>,
3648}
3649#[derive(Clone, PartialEq, ::prost::Message)]
3650pub struct DeletePayloadPoints {
3651 #[prost(string, tag = "1")]
3653 pub collection_name: ::prost::alloc::string::String,
3654 #[prost(bool, optional, tag = "2")]
3656 pub wait: ::core::option::Option<bool>,
3657 #[prost(string, repeated, tag = "3")]
3659 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3660 #[prost(message, optional, tag = "5")]
3662 pub points_selector: ::core::option::Option<PointsSelector>,
3663 #[prost(message, optional, tag = "6")]
3665 pub ordering: ::core::option::Option<WriteOrdering>,
3666 #[prost(message, optional, tag = "7")]
3668 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3669}
3670#[derive(Clone, PartialEq, ::prost::Message)]
3671pub struct ClearPayloadPoints {
3672 #[prost(string, tag = "1")]
3674 pub collection_name: ::prost::alloc::string::String,
3675 #[prost(bool, optional, tag = "2")]
3677 pub wait: ::core::option::Option<bool>,
3678 #[prost(message, optional, tag = "3")]
3680 pub points: ::core::option::Option<PointsSelector>,
3681 #[prost(message, optional, tag = "4")]
3683 pub ordering: ::core::option::Option<WriteOrdering>,
3684 #[prost(message, optional, tag = "5")]
3686 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3687}
3688#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3689pub struct CreateFieldIndexCollection {
3690 #[prost(string, tag = "1")]
3692 pub collection_name: ::prost::alloc::string::String,
3693 #[prost(bool, optional, tag = "2")]
3695 pub wait: ::core::option::Option<bool>,
3696 #[prost(string, tag = "3")]
3698 pub field_name: ::prost::alloc::string::String,
3699 #[prost(enumeration = "FieldType", optional, tag = "4")]
3701 pub field_type: ::core::option::Option<i32>,
3702 #[prost(message, optional, tag = "5")]
3704 pub field_index_params: ::core::option::Option<PayloadIndexParams>,
3705 #[prost(message, optional, tag = "6")]
3707 pub ordering: ::core::option::Option<WriteOrdering>,
3708}
3709#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3710pub struct DeleteFieldIndexCollection {
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, tag = "3")]
3719 pub field_name: ::prost::alloc::string::String,
3720 #[prost(message, optional, tag = "4")]
3722 pub ordering: ::core::option::Option<WriteOrdering>,
3723}
3724#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3725pub struct PayloadIncludeSelector {
3726 #[prost(string, repeated, tag = "1")]
3728 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3729}
3730#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3731pub struct PayloadExcludeSelector {
3732 #[prost(string, repeated, tag = "1")]
3734 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3735}
3736#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3737pub struct WithPayloadSelector {
3738 #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
3739 pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
3740}
3741pub mod with_payload_selector {
3743 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
3744 pub enum SelectorOptions {
3745 #[prost(bool, tag = "1")]
3747 Enable(bool),
3748 #[prost(message, tag = "2")]
3749 Include(super::PayloadIncludeSelector),
3750 #[prost(message, tag = "3")]
3751 Exclude(super::PayloadExcludeSelector),
3752 }
3753}
3754#[derive(Clone, PartialEq, ::prost::Message)]
3755pub struct NamedVectors {
3756 #[prost(map = "string, message", tag = "1")]
3757 pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
3758}
3759#[derive(Clone, PartialEq, ::prost::Message)]
3760pub struct NamedVectorsOutput {
3761 #[prost(map = "string, message", tag = "1")]
3762 pub vectors: ::std::collections::HashMap<
3763 ::prost::alloc::string::String,
3764 VectorOutput,
3765 >,
3766}
3767#[derive(Clone, PartialEq, ::prost::Message)]
3768pub struct Vectors {
3769 #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
3770 pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
3771}
3772pub mod vectors {
3774 #[derive(Clone, PartialEq, ::prost::Oneof)]
3775 pub enum VectorsOptions {
3776 #[prost(message, tag = "1")]
3777 Vector(super::Vector),
3778 #[prost(message, tag = "2")]
3779 Vectors(super::NamedVectors),
3780 }
3781}
3782#[derive(Clone, PartialEq, ::prost::Message)]
3783pub struct VectorsOutput {
3784 #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
3785 pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
3786}
3787pub mod vectors_output {
3789 #[derive(Clone, PartialEq, ::prost::Oneof)]
3790 pub enum VectorsOptions {
3791 #[prost(message, tag = "1")]
3792 Vector(super::VectorOutput),
3793 #[prost(message, tag = "2")]
3794 Vectors(super::NamedVectorsOutput),
3795 }
3796}
3797#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3798pub struct VectorsSelector {
3799 #[prost(string, repeated, tag = "1")]
3801 pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3802}
3803#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3804pub struct WithVectorsSelector {
3805 #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
3806 pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
3807}
3808pub mod with_vectors_selector {
3810 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
3811 pub enum SelectorOptions {
3812 #[prost(bool, tag = "1")]
3814 Enable(bool),
3815 #[prost(message, tag = "2")]
3817 Include(super::VectorsSelector),
3818 }
3819}
3820#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3821pub struct QuantizationSearchParams {
3822 #[prost(bool, optional, tag = "1")]
3824 pub ignore: ::core::option::Option<bool>,
3825 #[prost(bool, optional, tag = "2")]
3827 pub rescore: ::core::option::Option<bool>,
3828 #[prost(double, optional, tag = "3")]
3836 pub oversampling: ::core::option::Option<f64>,
3837}
3838#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3839pub struct AcornSearchParams {
3840 #[prost(bool, optional, tag = "1")]
3846 pub enable: ::core::option::Option<bool>,
3847 #[prost(double, optional, tag = "2")]
3855 pub max_selectivity: ::core::option::Option<f64>,
3856}
3857#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3858pub struct SearchParams {
3859 #[prost(uint64, optional, tag = "1")]
3862 pub hnsw_ef: ::core::option::Option<u64>,
3863 #[prost(bool, optional, tag = "2")]
3865 pub exact: ::core::option::Option<bool>,
3866 #[prost(message, optional, tag = "3")]
3868 pub quantization: ::core::option::Option<QuantizationSearchParams>,
3869 #[prost(bool, optional, tag = "4")]
3873 pub indexed_only: ::core::option::Option<bool>,
3874 #[prost(message, optional, tag = "5")]
3876 pub acorn: ::core::option::Option<AcornSearchParams>,
3877}
3878#[derive(Clone, PartialEq, ::prost::Message)]
3879pub struct SearchPoints {
3880 #[prost(string, tag = "1")]
3882 pub collection_name: ::prost::alloc::string::String,
3883 #[prost(float, repeated, tag = "2")]
3885 pub vector: ::prost::alloc::vec::Vec<f32>,
3886 #[prost(message, optional, tag = "3")]
3888 pub filter: ::core::option::Option<Filter>,
3889 #[prost(uint64, tag = "4")]
3891 pub limit: u64,
3892 #[prost(message, optional, tag = "6")]
3894 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3895 #[prost(message, optional, tag = "7")]
3897 pub params: ::core::option::Option<SearchParams>,
3898 #[prost(float, optional, tag = "8")]
3900 pub score_threshold: ::core::option::Option<f32>,
3901 #[prost(uint64, optional, tag = "9")]
3903 pub offset: ::core::option::Option<u64>,
3904 #[prost(string, optional, tag = "10")]
3906 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3907 #[prost(message, optional, tag = "11")]
3909 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3910 #[prost(message, optional, tag = "12")]
3912 pub read_consistency: ::core::option::Option<ReadConsistency>,
3913 #[prost(uint64, optional, tag = "13")]
3915 pub timeout: ::core::option::Option<u64>,
3916 #[prost(message, optional, tag = "14")]
3918 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3919 #[prost(message, optional, tag = "15")]
3920 pub sparse_indices: ::core::option::Option<SparseIndices>,
3921}
3922#[derive(Clone, PartialEq, ::prost::Message)]
3923pub struct SearchBatchPoints {
3924 #[prost(string, tag = "1")]
3926 pub collection_name: ::prost::alloc::string::String,
3927 #[prost(message, repeated, tag = "2")]
3928 pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
3929 #[prost(message, optional, tag = "3")]
3931 pub read_consistency: ::core::option::Option<ReadConsistency>,
3932 #[prost(uint64, optional, tag = "4")]
3934 pub timeout: ::core::option::Option<u64>,
3935}
3936#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3937pub struct WithLookup {
3938 #[prost(string, tag = "1")]
3940 pub collection: ::prost::alloc::string::String,
3941 #[prost(message, optional, tag = "2")]
3943 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3944 #[prost(message, optional, tag = "3")]
3946 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3947}
3948#[derive(Clone, PartialEq, ::prost::Message)]
3949pub struct SearchPointGroups {
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(uint32, tag = "4")]
3961 pub limit: u32,
3962 #[prost(message, optional, tag = "5")]
3964 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3965 #[prost(message, optional, tag = "6")]
3967 pub params: ::core::option::Option<SearchParams>,
3968 #[prost(float, optional, tag = "7")]
3970 pub score_threshold: ::core::option::Option<f32>,
3971 #[prost(string, optional, tag = "8")]
3973 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
3974 #[prost(message, optional, tag = "9")]
3976 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3977 #[prost(string, tag = "10")]
3979 pub group_by: ::prost::alloc::string::String,
3980 #[prost(uint32, tag = "11")]
3982 pub group_size: u32,
3983 #[prost(message, optional, tag = "12")]
3985 pub read_consistency: ::core::option::Option<ReadConsistency>,
3986 #[prost(message, optional, tag = "13")]
3988 pub with_lookup: ::core::option::Option<WithLookup>,
3989 #[prost(uint64, optional, tag = "14")]
3991 pub timeout: ::core::option::Option<u64>,
3992 #[prost(message, optional, tag = "15")]
3994 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3995 #[prost(message, optional, tag = "16")]
3996 pub sparse_indices: ::core::option::Option<SparseIndices>,
3997}
3998#[derive(Clone, PartialEq, ::prost::Message)]
3999pub struct StartFrom {
4000 #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
4001 pub value: ::core::option::Option<start_from::Value>,
4002}
4003pub mod start_from {
4005 #[derive(Clone, PartialEq, ::prost::Oneof)]
4006 pub enum Value {
4007 #[prost(double, tag = "1")]
4008 Float(f64),
4009 #[prost(int64, tag = "2")]
4010 Integer(i64),
4011 #[prost(message, tag = "3")]
4012 Timestamp(::prost_types::Timestamp),
4013 #[prost(string, tag = "4")]
4014 Datetime(::prost::alloc::string::String),
4015 }
4016}
4017#[derive(Clone, PartialEq, ::prost::Message)]
4018pub struct OrderBy {
4019 #[prost(string, tag = "1")]
4021 pub key: ::prost::alloc::string::String,
4022 #[prost(enumeration = "Direction", optional, tag = "2")]
4024 pub direction: ::core::option::Option<i32>,
4025 #[prost(message, optional, tag = "3")]
4027 pub start_from: ::core::option::Option<StartFrom>,
4028}
4029#[derive(Clone, PartialEq, ::prost::Message)]
4030pub struct ScrollPoints {
4031 #[prost(string, tag = "1")]
4032 pub collection_name: ::prost::alloc::string::String,
4033 #[prost(message, optional, tag = "2")]
4035 pub filter: ::core::option::Option<Filter>,
4036 #[prost(message, optional, tag = "3")]
4038 pub offset: ::core::option::Option<PointId>,
4039 #[prost(uint32, optional, tag = "4")]
4041 pub limit: ::core::option::Option<u32>,
4042 #[prost(message, optional, tag = "6")]
4044 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4045 #[prost(message, optional, tag = "7")]
4047 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4048 #[prost(message, optional, tag = "8")]
4050 pub read_consistency: ::core::option::Option<ReadConsistency>,
4051 #[prost(message, optional, tag = "9")]
4053 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4054 #[prost(message, optional, tag = "10")]
4056 pub order_by: ::core::option::Option<OrderBy>,
4057 #[prost(uint64, optional, tag = "11")]
4059 pub timeout: ::core::option::Option<u64>,
4060}
4061#[derive(Clone, PartialEq, ::prost::Message)]
4062pub struct LookupLocation {
4063 #[prost(string, tag = "1")]
4064 pub collection_name: ::prost::alloc::string::String,
4065 #[prost(string, optional, tag = "2")]
4067 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4068 #[prost(message, optional, tag = "3")]
4070 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4071}
4072#[derive(Clone, PartialEq, ::prost::Message)]
4073pub struct RecommendPoints {
4074 #[prost(string, tag = "1")]
4076 pub collection_name: ::prost::alloc::string::String,
4077 #[prost(message, repeated, tag = "2")]
4079 pub positive: ::prost::alloc::vec::Vec<PointId>,
4080 #[prost(message, repeated, tag = "3")]
4082 pub negative: ::prost::alloc::vec::Vec<PointId>,
4083 #[prost(message, optional, tag = "4")]
4085 pub filter: ::core::option::Option<Filter>,
4086 #[prost(uint64, tag = "5")]
4088 pub limit: u64,
4089 #[prost(message, optional, tag = "7")]
4091 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4092 #[prost(message, optional, tag = "8")]
4094 pub params: ::core::option::Option<SearchParams>,
4095 #[prost(float, optional, tag = "9")]
4097 pub score_threshold: ::core::option::Option<f32>,
4098 #[prost(uint64, optional, tag = "10")]
4100 pub offset: ::core::option::Option<u64>,
4101 #[prost(string, optional, tag = "11")]
4103 pub using: ::core::option::Option<::prost::alloc::string::String>,
4104 #[prost(message, optional, tag = "12")]
4106 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4107 #[prost(message, optional, tag = "13")]
4109 pub lookup_from: ::core::option::Option<LookupLocation>,
4110 #[prost(message, optional, tag = "14")]
4112 pub read_consistency: ::core::option::Option<ReadConsistency>,
4113 #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
4115 pub strategy: ::core::option::Option<i32>,
4116 #[prost(message, repeated, tag = "17")]
4118 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4119 #[prost(message, repeated, tag = "18")]
4121 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4122 #[prost(uint64, optional, tag = "19")]
4124 pub timeout: ::core::option::Option<u64>,
4125 #[prost(message, optional, tag = "20")]
4127 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4128}
4129#[derive(Clone, PartialEq, ::prost::Message)]
4130pub struct RecommendBatchPoints {
4131 #[prost(string, tag = "1")]
4133 pub collection_name: ::prost::alloc::string::String,
4134 #[prost(message, repeated, tag = "2")]
4135 pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
4136 #[prost(message, optional, tag = "3")]
4138 pub read_consistency: ::core::option::Option<ReadConsistency>,
4139 #[prost(uint64, optional, tag = "4")]
4141 pub timeout: ::core::option::Option<u64>,
4142}
4143#[derive(Clone, PartialEq, ::prost::Message)]
4144pub struct RecommendPointGroups {
4145 #[prost(string, tag = "1")]
4147 pub collection_name: ::prost::alloc::string::String,
4148 #[prost(message, repeated, tag = "2")]
4150 pub positive: ::prost::alloc::vec::Vec<PointId>,
4151 #[prost(message, repeated, tag = "3")]
4153 pub negative: ::prost::alloc::vec::Vec<PointId>,
4154 #[prost(message, optional, tag = "4")]
4156 pub filter: ::core::option::Option<Filter>,
4157 #[prost(uint32, tag = "5")]
4159 pub limit: u32,
4160 #[prost(message, optional, tag = "6")]
4162 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4163 #[prost(message, optional, tag = "7")]
4165 pub params: ::core::option::Option<SearchParams>,
4166 #[prost(float, optional, tag = "8")]
4168 pub score_threshold: ::core::option::Option<f32>,
4169 #[prost(string, optional, tag = "9")]
4171 pub using: ::core::option::Option<::prost::alloc::string::String>,
4172 #[prost(message, optional, tag = "10")]
4174 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4175 #[prost(message, optional, tag = "11")]
4177 pub lookup_from: ::core::option::Option<LookupLocation>,
4178 #[prost(string, tag = "12")]
4180 pub group_by: ::prost::alloc::string::String,
4181 #[prost(uint32, tag = "13")]
4183 pub group_size: u32,
4184 #[prost(message, optional, tag = "14")]
4186 pub read_consistency: ::core::option::Option<ReadConsistency>,
4187 #[prost(message, optional, tag = "15")]
4189 pub with_lookup: ::core::option::Option<WithLookup>,
4190 #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
4192 pub strategy: ::core::option::Option<i32>,
4193 #[prost(message, repeated, tag = "18")]
4195 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4196 #[prost(message, repeated, tag = "19")]
4198 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4199 #[prost(uint64, optional, tag = "20")]
4201 pub timeout: ::core::option::Option<u64>,
4202 #[prost(message, optional, tag = "21")]
4204 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4205}
4206#[derive(Clone, PartialEq, ::prost::Message)]
4207pub struct TargetVector {
4208 #[prost(oneof = "target_vector::Target", tags = "1")]
4209 pub target: ::core::option::Option<target_vector::Target>,
4210}
4211pub mod target_vector {
4213 #[derive(Clone, PartialEq, ::prost::Oneof)]
4214 pub enum Target {
4215 #[prost(message, tag = "1")]
4216 Single(super::VectorExample),
4217 }
4218}
4219#[derive(Clone, PartialEq, ::prost::Message)]
4220pub struct VectorExample {
4221 #[prost(oneof = "vector_example::Example", tags = "1, 2")]
4222 pub example: ::core::option::Option<vector_example::Example>,
4223}
4224pub mod vector_example {
4226 #[derive(Clone, PartialEq, ::prost::Oneof)]
4227 pub enum Example {
4228 #[prost(message, tag = "1")]
4229 Id(super::PointId),
4230 #[prost(message, tag = "2")]
4231 Vector(super::Vector),
4232 }
4233}
4234#[derive(Clone, PartialEq, ::prost::Message)]
4235pub struct ContextExamplePair {
4236 #[prost(message, optional, tag = "1")]
4237 pub positive: ::core::option::Option<VectorExample>,
4238 #[prost(message, optional, tag = "2")]
4239 pub negative: ::core::option::Option<VectorExample>,
4240}
4241#[derive(Clone, PartialEq, ::prost::Message)]
4242pub struct DiscoverPoints {
4243 #[prost(string, tag = "1")]
4245 pub collection_name: ::prost::alloc::string::String,
4246 #[prost(message, optional, tag = "2")]
4248 pub target: ::core::option::Option<TargetVector>,
4249 #[prost(message, repeated, tag = "3")]
4251 pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
4252 #[prost(message, optional, tag = "4")]
4254 pub filter: ::core::option::Option<Filter>,
4255 #[prost(uint64, tag = "5")]
4257 pub limit: u64,
4258 #[prost(message, optional, tag = "6")]
4260 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4261 #[prost(message, optional, tag = "7")]
4263 pub params: ::core::option::Option<SearchParams>,
4264 #[prost(uint64, optional, tag = "8")]
4266 pub offset: ::core::option::Option<u64>,
4267 #[prost(string, optional, tag = "9")]
4269 pub using: ::core::option::Option<::prost::alloc::string::String>,
4270 #[prost(message, optional, tag = "10")]
4272 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4273 #[prost(message, optional, tag = "11")]
4275 pub lookup_from: ::core::option::Option<LookupLocation>,
4276 #[prost(message, optional, tag = "12")]
4278 pub read_consistency: ::core::option::Option<ReadConsistency>,
4279 #[prost(uint64, optional, tag = "13")]
4281 pub timeout: ::core::option::Option<u64>,
4282 #[prost(message, optional, tag = "14")]
4284 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4285}
4286#[derive(Clone, PartialEq, ::prost::Message)]
4287pub struct DiscoverBatchPoints {
4288 #[prost(string, tag = "1")]
4290 pub collection_name: ::prost::alloc::string::String,
4291 #[prost(message, repeated, tag = "2")]
4292 pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
4293 #[prost(message, optional, tag = "3")]
4295 pub read_consistency: ::core::option::Option<ReadConsistency>,
4296 #[prost(uint64, optional, tag = "4")]
4298 pub timeout: ::core::option::Option<u64>,
4299}
4300#[derive(Clone, PartialEq, ::prost::Message)]
4301pub struct CountPoints {
4302 #[prost(string, tag = "1")]
4304 pub collection_name: ::prost::alloc::string::String,
4305 #[prost(message, optional, tag = "2")]
4307 pub filter: ::core::option::Option<Filter>,
4308 #[prost(bool, optional, tag = "3")]
4310 pub exact: ::core::option::Option<bool>,
4311 #[prost(message, optional, tag = "4")]
4313 pub read_consistency: ::core::option::Option<ReadConsistency>,
4314 #[prost(message, optional, tag = "5")]
4316 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4317 #[prost(uint64, optional, tag = "6")]
4319 pub timeout: ::core::option::Option<u64>,
4320}
4321#[derive(Clone, PartialEq, ::prost::Message)]
4322pub struct RecommendInput {
4323 #[prost(message, repeated, tag = "1")]
4325 pub positive: ::prost::alloc::vec::Vec<VectorInput>,
4326 #[prost(message, repeated, tag = "2")]
4328 pub negative: ::prost::alloc::vec::Vec<VectorInput>,
4329 #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
4331 pub strategy: ::core::option::Option<i32>,
4332}
4333#[derive(Clone, PartialEq, ::prost::Message)]
4334pub struct ContextInputPair {
4335 #[prost(message, optional, tag = "1")]
4337 pub positive: ::core::option::Option<VectorInput>,
4338 #[prost(message, optional, tag = "2")]
4340 pub negative: ::core::option::Option<VectorInput>,
4341}
4342#[derive(Clone, PartialEq, ::prost::Message)]
4343pub struct DiscoverInput {
4344 #[prost(message, optional, tag = "1")]
4346 pub target: ::core::option::Option<VectorInput>,
4347 #[prost(message, optional, tag = "2")]
4349 pub context: ::core::option::Option<ContextInput>,
4350}
4351#[derive(Clone, PartialEq, ::prost::Message)]
4352pub struct ContextInput {
4353 #[prost(message, repeated, tag = "1")]
4355 pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
4356}
4357#[derive(Clone, PartialEq, ::prost::Message)]
4358pub struct Formula {
4359 #[prost(message, optional, tag = "1")]
4360 pub expression: ::core::option::Option<Expression>,
4361 #[prost(map = "string, message", tag = "2")]
4362 pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4363}
4364#[derive(Clone, PartialEq, ::prost::Message)]
4365pub struct Expression {
4366 #[prost(
4367 oneof = "expression::Variant",
4368 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
4369 )]
4370 pub variant: ::core::option::Option<expression::Variant>,
4371}
4372pub mod expression {
4374 #[derive(Clone, PartialEq, ::prost::Oneof)]
4375 pub enum Variant {
4376 #[prost(float, tag = "1")]
4377 Constant(f32),
4378 #[prost(string, tag = "2")]
4380 Variable(::prost::alloc::string::String),
4381 #[prost(message, tag = "3")]
4383 Condition(super::Condition),
4384 #[prost(message, tag = "4")]
4386 GeoDistance(super::GeoDistance),
4387 #[prost(string, tag = "5")]
4389 Datetime(::prost::alloc::string::String),
4390 #[prost(string, tag = "6")]
4392 DatetimeKey(::prost::alloc::string::String),
4393 #[prost(message, tag = "7")]
4395 Mult(super::MultExpression),
4396 #[prost(message, tag = "8")]
4398 Sum(super::SumExpression),
4399 #[prost(message, tag = "9")]
4401 Div(::prost::alloc::boxed::Box<super::DivExpression>),
4402 #[prost(message, tag = "10")]
4404 Neg(::prost::alloc::boxed::Box<super::Expression>),
4405 #[prost(message, tag = "11")]
4407 Abs(::prost::alloc::boxed::Box<super::Expression>),
4408 #[prost(message, tag = "12")]
4410 Sqrt(::prost::alloc::boxed::Box<super::Expression>),
4411 #[prost(message, tag = "13")]
4413 Pow(::prost::alloc::boxed::Box<super::PowExpression>),
4414 #[prost(message, tag = "14")]
4416 Exp(::prost::alloc::boxed::Box<super::Expression>),
4417 #[prost(message, tag = "15")]
4419 Log10(::prost::alloc::boxed::Box<super::Expression>),
4420 #[prost(message, tag = "16")]
4422 Ln(::prost::alloc::boxed::Box<super::Expression>),
4423 #[prost(message, tag = "17")]
4425 ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4426 #[prost(message, tag = "18")]
4428 GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4429 #[prost(message, tag = "19")]
4431 LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4432 }
4433}
4434#[derive(Clone, PartialEq, ::prost::Message)]
4435pub struct GeoDistance {
4436 #[prost(message, optional, tag = "1")]
4437 pub origin: ::core::option::Option<GeoPoint>,
4438 #[prost(string, tag = "2")]
4439 pub to: ::prost::alloc::string::String,
4440}
4441#[derive(Clone, PartialEq, ::prost::Message)]
4442pub struct MultExpression {
4443 #[prost(message, repeated, tag = "1")]
4444 pub mult: ::prost::alloc::vec::Vec<Expression>,
4445}
4446#[derive(Clone, PartialEq, ::prost::Message)]
4447pub struct SumExpression {
4448 #[prost(message, repeated, tag = "1")]
4449 pub sum: ::prost::alloc::vec::Vec<Expression>,
4450}
4451#[derive(Clone, PartialEq, ::prost::Message)]
4452pub struct DivExpression {
4453 #[prost(message, optional, boxed, tag = "1")]
4454 pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4455 #[prost(message, optional, boxed, tag = "2")]
4456 pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4457 #[prost(float, optional, tag = "3")]
4458 pub by_zero_default: ::core::option::Option<f32>,
4459}
4460#[derive(Clone, PartialEq, ::prost::Message)]
4461pub struct PowExpression {
4462 #[prost(message, optional, boxed, tag = "1")]
4463 pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4464 #[prost(message, optional, boxed, tag = "2")]
4465 pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4466}
4467#[derive(Clone, PartialEq, ::prost::Message)]
4468pub struct DecayParamsExpression {
4469 #[prost(message, optional, boxed, tag = "1")]
4471 pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4472 #[prost(message, optional, boxed, tag = "2")]
4474 pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4475 #[prost(float, optional, tag = "3")]
4477 pub scale: ::core::option::Option<f32>,
4478 #[prost(float, optional, tag = "4")]
4480 pub midpoint: ::core::option::Option<f32>,
4481}
4482#[derive(Clone, PartialEq, ::prost::Message)]
4483pub struct NearestInputWithMmr {
4484 #[prost(message, optional, tag = "1")]
4486 pub nearest: ::core::option::Option<VectorInput>,
4487 #[prost(message, optional, tag = "2")]
4490 pub mmr: ::core::option::Option<Mmr>,
4491}
4492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4494pub struct Mmr {
4495 #[prost(float, optional, tag = "2")]
4504 pub diversity: ::core::option::Option<f32>,
4505 #[prost(uint32, optional, tag = "3")]
4509 pub candidates_limit: ::core::option::Option<u32>,
4510}
4511#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4513pub struct Rrf {
4514 #[prost(uint32, optional, tag = "1")]
4516 pub k: ::core::option::Option<u32>,
4517}
4518#[derive(Clone, PartialEq, ::prost::Message)]
4519pub struct Query {
4520 #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
4521 pub variant: ::core::option::Option<query::Variant>,
4522}
4523pub mod query {
4525 #[derive(Clone, PartialEq, ::prost::Oneof)]
4526 pub enum Variant {
4527 #[prost(message, tag = "1")]
4529 Nearest(super::VectorInput),
4530 #[prost(message, tag = "2")]
4532 Recommend(super::RecommendInput),
4533 #[prost(message, tag = "3")]
4535 Discover(super::DiscoverInput),
4536 #[prost(message, tag = "4")]
4538 Context(super::ContextInput),
4539 #[prost(message, tag = "5")]
4541 OrderBy(super::OrderBy),
4542 #[prost(enumeration = "super::Fusion", tag = "6")]
4544 Fusion(i32),
4545 #[prost(enumeration = "super::Sample", tag = "7")]
4547 Sample(i32),
4548 #[prost(message, tag = "8")]
4550 Formula(super::Formula),
4551 #[prost(message, tag = "9")]
4553 NearestWithMmr(super::NearestInputWithMmr),
4554 #[prost(message, tag = "10")]
4556 Rrf(super::Rrf),
4557 }
4558}
4559#[derive(Clone, PartialEq, ::prost::Message)]
4560pub struct PrefetchQuery {
4561 #[prost(message, repeated, tag = "1")]
4563 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4564 #[prost(message, optional, tag = "2")]
4566 pub query: ::core::option::Option<Query>,
4567 #[prost(string, optional, tag = "3")]
4569 pub using: ::core::option::Option<::prost::alloc::string::String>,
4570 #[prost(message, optional, tag = "4")]
4572 pub filter: ::core::option::Option<Filter>,
4573 #[prost(message, optional, tag = "5")]
4575 pub params: ::core::option::Option<SearchParams>,
4576 #[prost(float, optional, tag = "6")]
4578 pub score_threshold: ::core::option::Option<f32>,
4579 #[prost(uint64, optional, tag = "7")]
4581 pub limit: ::core::option::Option<u64>,
4582 #[prost(message, optional, tag = "8")]
4584 pub lookup_from: ::core::option::Option<LookupLocation>,
4585}
4586#[derive(Clone, PartialEq, ::prost::Message)]
4587pub struct QueryPoints {
4588 #[prost(string, tag = "1")]
4590 pub collection_name: ::prost::alloc::string::String,
4591 #[prost(message, repeated, tag = "2")]
4593 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4594 #[prost(message, optional, tag = "3")]
4596 pub query: ::core::option::Option<Query>,
4597 #[prost(string, optional, tag = "4")]
4599 pub using: ::core::option::Option<::prost::alloc::string::String>,
4600 #[prost(message, optional, tag = "5")]
4602 pub filter: ::core::option::Option<Filter>,
4603 #[prost(message, optional, tag = "6")]
4605 pub params: ::core::option::Option<SearchParams>,
4606 #[prost(float, optional, tag = "7")]
4608 pub score_threshold: ::core::option::Option<f32>,
4609 #[prost(uint64, optional, tag = "8")]
4611 pub limit: ::core::option::Option<u64>,
4612 #[prost(uint64, optional, tag = "9")]
4614 pub offset: ::core::option::Option<u64>,
4615 #[prost(message, optional, tag = "10")]
4617 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4618 #[prost(message, optional, tag = "11")]
4620 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4621 #[prost(message, optional, tag = "12")]
4623 pub read_consistency: ::core::option::Option<ReadConsistency>,
4624 #[prost(message, optional, tag = "13")]
4626 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4627 #[prost(message, optional, tag = "14")]
4629 pub lookup_from: ::core::option::Option<LookupLocation>,
4630 #[prost(uint64, optional, tag = "15")]
4632 pub timeout: ::core::option::Option<u64>,
4633}
4634#[derive(Clone, PartialEq, ::prost::Message)]
4635pub struct QueryBatchPoints {
4636 #[prost(string, tag = "1")]
4637 pub collection_name: ::prost::alloc::string::String,
4638 #[prost(message, repeated, tag = "2")]
4639 pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
4640 #[prost(message, optional, tag = "3")]
4642 pub read_consistency: ::core::option::Option<ReadConsistency>,
4643 #[prost(uint64, optional, tag = "4")]
4645 pub timeout: ::core::option::Option<u64>,
4646}
4647#[derive(Clone, PartialEq, ::prost::Message)]
4648pub struct QueryPointGroups {
4649 #[prost(string, tag = "1")]
4651 pub collection_name: ::prost::alloc::string::String,
4652 #[prost(message, repeated, tag = "2")]
4654 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4655 #[prost(message, optional, tag = "3")]
4657 pub query: ::core::option::Option<Query>,
4658 #[prost(string, optional, tag = "4")]
4660 pub using: ::core::option::Option<::prost::alloc::string::String>,
4661 #[prost(message, optional, tag = "5")]
4663 pub filter: ::core::option::Option<Filter>,
4664 #[prost(message, optional, tag = "6")]
4666 pub params: ::core::option::Option<SearchParams>,
4667 #[prost(float, optional, tag = "7")]
4669 pub score_threshold: ::core::option::Option<f32>,
4670 #[prost(message, optional, tag = "8")]
4672 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4673 #[prost(message, optional, tag = "9")]
4675 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4676 #[prost(message, optional, tag = "10")]
4678 pub lookup_from: ::core::option::Option<LookupLocation>,
4679 #[prost(uint64, optional, tag = "11")]
4681 pub limit: ::core::option::Option<u64>,
4682 #[prost(uint64, optional, tag = "12")]
4684 pub group_size: ::core::option::Option<u64>,
4685 #[prost(string, tag = "13")]
4687 pub group_by: ::prost::alloc::string::String,
4688 #[prost(message, optional, tag = "14")]
4690 pub read_consistency: ::core::option::Option<ReadConsistency>,
4691 #[prost(message, optional, tag = "15")]
4693 pub with_lookup: ::core::option::Option<WithLookup>,
4694 #[prost(uint64, optional, tag = "16")]
4696 pub timeout: ::core::option::Option<u64>,
4697 #[prost(message, optional, tag = "17")]
4699 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4700}
4701#[derive(Clone, PartialEq, ::prost::Message)]
4702pub struct FacetCounts {
4703 #[prost(string, tag = "1")]
4705 pub collection_name: ::prost::alloc::string::String,
4706 #[prost(string, tag = "2")]
4708 pub key: ::prost::alloc::string::String,
4709 #[prost(message, optional, tag = "3")]
4711 pub filter: ::core::option::Option<Filter>,
4712 #[prost(uint64, optional, tag = "4")]
4714 pub limit: ::core::option::Option<u64>,
4715 #[prost(bool, optional, tag = "5")]
4717 pub exact: ::core::option::Option<bool>,
4718 #[prost(uint64, optional, tag = "6")]
4720 pub timeout: ::core::option::Option<u64>,
4721 #[prost(message, optional, tag = "7")]
4723 pub read_consistency: ::core::option::Option<ReadConsistency>,
4724 #[prost(message, optional, tag = "8")]
4726 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4727}
4728#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4729pub struct FacetValue {
4730 #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
4731 pub variant: ::core::option::Option<facet_value::Variant>,
4732}
4733pub mod facet_value {
4735 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
4736 pub enum Variant {
4737 #[prost(string, tag = "1")]
4739 StringValue(::prost::alloc::string::String),
4740 #[prost(int64, tag = "2")]
4742 IntegerValue(i64),
4743 #[prost(bool, tag = "3")]
4745 BoolValue(bool),
4746 }
4747}
4748#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4749pub struct FacetHit {
4750 #[prost(message, optional, tag = "1")]
4752 pub value: ::core::option::Option<FacetValue>,
4753 #[prost(uint64, tag = "2")]
4755 pub count: u64,
4756}
4757#[derive(Clone, PartialEq, ::prost::Message)]
4758pub struct SearchMatrixPoints {
4759 #[prost(string, tag = "1")]
4761 pub collection_name: ::prost::alloc::string::String,
4762 #[prost(message, optional, tag = "2")]
4764 pub filter: ::core::option::Option<Filter>,
4765 #[prost(uint64, optional, tag = "3")]
4767 pub sample: ::core::option::Option<u64>,
4768 #[prost(uint64, optional, tag = "4")]
4770 pub limit: ::core::option::Option<u64>,
4771 #[prost(string, optional, tag = "5")]
4773 pub using: ::core::option::Option<::prost::alloc::string::String>,
4774 #[prost(uint64, optional, tag = "6")]
4776 pub timeout: ::core::option::Option<u64>,
4777 #[prost(message, optional, tag = "7")]
4779 pub read_consistency: ::core::option::Option<ReadConsistency>,
4780 #[prost(message, optional, tag = "8")]
4782 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4783}
4784#[derive(Clone, PartialEq, ::prost::Message)]
4785pub struct SearchMatrixPairs {
4786 #[prost(message, repeated, tag = "1")]
4788 pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
4789}
4790#[derive(Clone, PartialEq, ::prost::Message)]
4791pub struct SearchMatrixPair {
4792 #[prost(message, optional, tag = "1")]
4794 pub a: ::core::option::Option<PointId>,
4795 #[prost(message, optional, tag = "2")]
4797 pub b: ::core::option::Option<PointId>,
4798 #[prost(float, tag = "3")]
4800 pub score: f32,
4801}
4802#[derive(Clone, PartialEq, ::prost::Message)]
4803pub struct SearchMatrixOffsets {
4804 #[prost(uint64, repeated, tag = "1")]
4806 pub offsets_row: ::prost::alloc::vec::Vec<u64>,
4807 #[prost(uint64, repeated, tag = "2")]
4809 pub offsets_col: ::prost::alloc::vec::Vec<u64>,
4810 #[prost(float, repeated, tag = "3")]
4812 pub scores: ::prost::alloc::vec::Vec<f32>,
4813 #[prost(message, repeated, tag = "4")]
4815 pub ids: ::prost::alloc::vec::Vec<PointId>,
4816}
4817#[derive(Clone, PartialEq, ::prost::Message)]
4818pub struct PointsUpdateOperation {
4819 #[prost(
4820 oneof = "points_update_operation::Operation",
4821 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
4822 )]
4823 pub operation: ::core::option::Option<points_update_operation::Operation>,
4824}
4825pub mod points_update_operation {
4827 #[derive(Clone, PartialEq, ::prost::Message)]
4828 pub struct PointStructList {
4829 #[prost(message, repeated, tag = "1")]
4830 pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
4831 #[prost(message, optional, tag = "2")]
4833 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4834 #[prost(message, optional, tag = "3")]
4836 pub update_filter: ::core::option::Option<super::Filter>,
4837 }
4838 #[derive(Clone, PartialEq, ::prost::Message)]
4839 pub struct SetPayload {
4840 #[prost(map = "string, message", tag = "1")]
4841 pub payload: ::std::collections::HashMap<
4842 ::prost::alloc::string::String,
4843 super::Value,
4844 >,
4845 #[prost(message, optional, tag = "2")]
4847 pub points_selector: ::core::option::Option<super::PointsSelector>,
4848 #[prost(message, optional, tag = "3")]
4850 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4851 #[prost(string, optional, tag = "4")]
4853 pub key: ::core::option::Option<::prost::alloc::string::String>,
4854 }
4855 #[derive(Clone, PartialEq, ::prost::Message)]
4856 pub struct OverwritePayload {
4857 #[prost(map = "string, message", tag = "1")]
4858 pub payload: ::std::collections::HashMap<
4859 ::prost::alloc::string::String,
4860 super::Value,
4861 >,
4862 #[prost(message, optional, tag = "2")]
4864 pub points_selector: ::core::option::Option<super::PointsSelector>,
4865 #[prost(message, optional, tag = "3")]
4867 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4868 #[prost(string, optional, tag = "4")]
4870 pub key: ::core::option::Option<::prost::alloc::string::String>,
4871 }
4872 #[derive(Clone, PartialEq, ::prost::Message)]
4873 pub struct DeletePayload {
4874 #[prost(string, repeated, tag = "1")]
4875 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4876 #[prost(message, optional, tag = "2")]
4878 pub points_selector: ::core::option::Option<super::PointsSelector>,
4879 #[prost(message, optional, tag = "3")]
4881 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4882 }
4883 #[derive(Clone, PartialEq, ::prost::Message)]
4884 pub struct UpdateVectors {
4885 #[prost(message, repeated, tag = "1")]
4887 pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
4888 #[prost(message, optional, tag = "2")]
4890 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4891 #[prost(message, optional, tag = "3")]
4893 pub update_filter: ::core::option::Option<super::Filter>,
4894 }
4895 #[derive(Clone, PartialEq, ::prost::Message)]
4896 pub struct DeleteVectors {
4897 #[prost(message, optional, tag = "1")]
4899 pub points_selector: ::core::option::Option<super::PointsSelector>,
4900 #[prost(message, optional, tag = "2")]
4902 pub vectors: ::core::option::Option<super::VectorsSelector>,
4903 #[prost(message, optional, tag = "3")]
4905 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4906 }
4907 #[derive(Clone, PartialEq, ::prost::Message)]
4908 pub struct DeletePoints {
4909 #[prost(message, optional, tag = "1")]
4911 pub points: ::core::option::Option<super::PointsSelector>,
4912 #[prost(message, optional, tag = "2")]
4914 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4915 }
4916 #[derive(Clone, PartialEq, ::prost::Message)]
4917 pub struct ClearPayload {
4918 #[prost(message, optional, tag = "1")]
4920 pub points: ::core::option::Option<super::PointsSelector>,
4921 #[prost(message, optional, tag = "2")]
4923 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
4924 }
4925 #[derive(Clone, PartialEq, ::prost::Oneof)]
4926 pub enum Operation {
4927 #[prost(message, tag = "1")]
4928 Upsert(PointStructList),
4929 #[deprecated]
4930 #[prost(message, tag = "2")]
4931 DeleteDeprecated(super::PointsSelector),
4932 #[prost(message, tag = "3")]
4933 SetPayload(SetPayload),
4934 #[prost(message, tag = "4")]
4935 OverwritePayload(OverwritePayload),
4936 #[prost(message, tag = "5")]
4937 DeletePayload(DeletePayload),
4938 #[deprecated]
4939 #[prost(message, tag = "6")]
4940 ClearPayloadDeprecated(super::PointsSelector),
4941 #[prost(message, tag = "7")]
4942 UpdateVectors(UpdateVectors),
4943 #[prost(message, tag = "8")]
4944 DeleteVectors(DeleteVectors),
4945 #[prost(message, tag = "9")]
4946 DeletePoints(DeletePoints),
4947 #[prost(message, tag = "10")]
4948 ClearPayload(ClearPayload),
4949 }
4950}
4951#[derive(Clone, PartialEq, ::prost::Message)]
4952pub struct UpdateBatchPoints {
4953 #[prost(string, tag = "1")]
4955 pub collection_name: ::prost::alloc::string::String,
4956 #[prost(bool, optional, tag = "2")]
4958 pub wait: ::core::option::Option<bool>,
4959 #[prost(message, repeated, tag = "3")]
4960 pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
4961 #[prost(message, optional, tag = "4")]
4963 pub ordering: ::core::option::Option<WriteOrdering>,
4964}
4965#[derive(Clone, PartialEq, ::prost::Message)]
4966pub struct PointsOperationResponse {
4967 #[prost(message, optional, tag = "1")]
4968 pub result: ::core::option::Option<UpdateResult>,
4969 #[prost(double, tag = "2")]
4971 pub time: f64,
4972 #[prost(message, optional, tag = "3")]
4973 pub usage: ::core::option::Option<Usage>,
4974}
4975#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4976pub struct UpdateResult {
4977 #[prost(uint64, optional, tag = "1")]
4979 pub operation_id: ::core::option::Option<u64>,
4980 #[prost(enumeration = "UpdateStatus", tag = "2")]
4982 pub status: i32,
4983}
4984#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4985pub struct OrderValue {
4986 #[prost(oneof = "order_value::Variant", tags = "1, 2")]
4987 pub variant: ::core::option::Option<order_value::Variant>,
4988}
4989pub mod order_value {
4991 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4992 pub enum Variant {
4993 #[prost(int64, tag = "1")]
4994 Int(i64),
4995 #[prost(double, tag = "2")]
4996 Float(f64),
4997 }
4998}
4999#[derive(Clone, PartialEq, ::prost::Message)]
5000pub struct ScoredPoint {
5001 #[prost(message, optional, tag = "1")]
5003 pub id: ::core::option::Option<PointId>,
5004 #[prost(map = "string, message", tag = "2")]
5006 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5007 #[prost(float, tag = "3")]
5009 pub score: f32,
5010 #[prost(uint64, tag = "5")]
5012 pub version: u64,
5013 #[prost(message, optional, tag = "6")]
5015 pub vectors: ::core::option::Option<VectorsOutput>,
5016 #[prost(message, optional, tag = "7")]
5018 pub shard_key: ::core::option::Option<ShardKey>,
5019 #[prost(message, optional, tag = "8")]
5021 pub order_value: ::core::option::Option<OrderValue>,
5022}
5023#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5024pub struct GroupId {
5025 #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
5026 pub kind: ::core::option::Option<group_id::Kind>,
5027}
5028pub mod group_id {
5030 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
5031 pub enum Kind {
5032 #[prost(uint64, tag = "1")]
5034 UnsignedValue(u64),
5035 #[prost(int64, tag = "2")]
5037 IntegerValue(i64),
5038 #[prost(string, tag = "3")]
5040 StringValue(::prost::alloc::string::String),
5041 }
5042}
5043#[derive(Clone, PartialEq, ::prost::Message)]
5044pub struct PointGroup {
5045 #[prost(message, optional, tag = "1")]
5047 pub id: ::core::option::Option<GroupId>,
5048 #[prost(message, repeated, tag = "2")]
5050 pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
5051 #[prost(message, optional, tag = "3")]
5053 pub lookup: ::core::option::Option<RetrievedPoint>,
5054}
5055#[derive(Clone, PartialEq, ::prost::Message)]
5056pub struct GroupsResult {
5057 #[prost(message, repeated, tag = "1")]
5059 pub groups: ::prost::alloc::vec::Vec<PointGroup>,
5060}
5061#[derive(Clone, PartialEq, ::prost::Message)]
5062pub struct SearchResponse {
5063 #[prost(message, repeated, tag = "1")]
5064 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5065 #[prost(double, tag = "2")]
5067 pub time: f64,
5068 #[prost(message, optional, tag = "3")]
5069 pub usage: ::core::option::Option<Usage>,
5070}
5071#[derive(Clone, PartialEq, ::prost::Message)]
5072pub struct QueryResponse {
5073 #[prost(message, repeated, tag = "1")]
5074 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5075 #[prost(double, tag = "2")]
5077 pub time: f64,
5078 #[prost(message, optional, tag = "3")]
5079 pub usage: ::core::option::Option<Usage>,
5080}
5081#[derive(Clone, PartialEq, ::prost::Message)]
5082pub struct QueryBatchResponse {
5083 #[prost(message, repeated, tag = "1")]
5084 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5085 #[prost(double, tag = "2")]
5087 pub time: f64,
5088 #[prost(message, optional, tag = "3")]
5089 pub usage: ::core::option::Option<Usage>,
5090}
5091#[derive(Clone, PartialEq, ::prost::Message)]
5092pub struct QueryGroupsResponse {
5093 #[prost(message, optional, tag = "1")]
5094 pub result: ::core::option::Option<GroupsResult>,
5095 #[prost(double, tag = "2")]
5097 pub time: f64,
5098 #[prost(message, optional, tag = "3")]
5099 pub usage: ::core::option::Option<Usage>,
5100}
5101#[derive(Clone, PartialEq, ::prost::Message)]
5102pub struct BatchResult {
5103 #[prost(message, repeated, tag = "1")]
5104 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5105}
5106#[derive(Clone, PartialEq, ::prost::Message)]
5107pub struct SearchBatchResponse {
5108 #[prost(message, repeated, tag = "1")]
5109 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5110 #[prost(double, tag = "2")]
5112 pub time: f64,
5113 #[prost(message, optional, tag = "3")]
5114 pub usage: ::core::option::Option<Usage>,
5115}
5116#[derive(Clone, PartialEq, ::prost::Message)]
5117pub struct SearchGroupsResponse {
5118 #[prost(message, optional, tag = "1")]
5119 pub result: ::core::option::Option<GroupsResult>,
5120 #[prost(double, tag = "2")]
5122 pub time: f64,
5123 #[prost(message, optional, tag = "3")]
5124 pub usage: ::core::option::Option<Usage>,
5125}
5126#[derive(Clone, PartialEq, ::prost::Message)]
5127pub struct CountResponse {
5128 #[prost(message, optional, tag = "1")]
5129 pub result: ::core::option::Option<CountResult>,
5130 #[prost(double, tag = "2")]
5132 pub time: f64,
5133 #[prost(message, optional, tag = "3")]
5134 pub usage: ::core::option::Option<Usage>,
5135}
5136#[derive(Clone, PartialEq, ::prost::Message)]
5137pub struct ScrollResponse {
5138 #[prost(message, optional, tag = "1")]
5140 pub next_page_offset: ::core::option::Option<PointId>,
5141 #[prost(message, repeated, tag = "2")]
5142 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5143 #[prost(double, tag = "3")]
5145 pub time: f64,
5146 #[prost(message, optional, tag = "4")]
5147 pub usage: ::core::option::Option<Usage>,
5148}
5149#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5150pub struct CountResult {
5151 #[prost(uint64, tag = "1")]
5152 pub count: u64,
5153}
5154#[derive(Clone, PartialEq, ::prost::Message)]
5155pub struct RetrievedPoint {
5156 #[prost(message, optional, tag = "1")]
5157 pub id: ::core::option::Option<PointId>,
5158 #[prost(map = "string, message", tag = "2")]
5159 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5160 #[prost(message, optional, tag = "4")]
5161 pub vectors: ::core::option::Option<VectorsOutput>,
5162 #[prost(message, optional, tag = "5")]
5164 pub shard_key: ::core::option::Option<ShardKey>,
5165 #[prost(message, optional, tag = "6")]
5167 pub order_value: ::core::option::Option<OrderValue>,
5168}
5169#[derive(Clone, PartialEq, ::prost::Message)]
5170pub struct GetResponse {
5171 #[prost(message, repeated, tag = "1")]
5172 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5173 #[prost(double, tag = "2")]
5175 pub time: f64,
5176 #[prost(message, optional, tag = "3")]
5177 pub usage: ::core::option::Option<Usage>,
5178}
5179#[derive(Clone, PartialEq, ::prost::Message)]
5180pub struct RecommendResponse {
5181 #[prost(message, repeated, tag = "1")]
5182 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5183 #[prost(double, tag = "2")]
5185 pub time: f64,
5186 #[prost(message, optional, tag = "3")]
5187 pub usage: ::core::option::Option<Usage>,
5188}
5189#[derive(Clone, PartialEq, ::prost::Message)]
5190pub struct RecommendBatchResponse {
5191 #[prost(message, repeated, tag = "1")]
5192 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5193 #[prost(double, tag = "2")]
5195 pub time: f64,
5196 #[prost(message, optional, tag = "3")]
5197 pub usage: ::core::option::Option<Usage>,
5198}
5199#[derive(Clone, PartialEq, ::prost::Message)]
5200pub struct DiscoverResponse {
5201 #[prost(message, repeated, tag = "1")]
5202 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5203 #[prost(double, tag = "2")]
5205 pub time: f64,
5206 #[prost(message, optional, tag = "3")]
5207 pub usage: ::core::option::Option<Usage>,
5208}
5209#[derive(Clone, PartialEq, ::prost::Message)]
5210pub struct DiscoverBatchResponse {
5211 #[prost(message, repeated, tag = "1")]
5212 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5213 #[prost(double, tag = "2")]
5215 pub time: f64,
5216 #[prost(message, optional, tag = "3")]
5217 pub usage: ::core::option::Option<Usage>,
5218}
5219#[derive(Clone, PartialEq, ::prost::Message)]
5220pub struct RecommendGroupsResponse {
5221 #[prost(message, optional, tag = "1")]
5222 pub result: ::core::option::Option<GroupsResult>,
5223 #[prost(double, tag = "2")]
5225 pub time: f64,
5226 #[prost(message, optional, tag = "3")]
5227 pub usage: ::core::option::Option<Usage>,
5228}
5229#[derive(Clone, PartialEq, ::prost::Message)]
5230pub struct UpdateBatchResponse {
5231 #[prost(message, repeated, tag = "1")]
5232 pub result: ::prost::alloc::vec::Vec<UpdateResult>,
5233 #[prost(double, tag = "2")]
5235 pub time: f64,
5236 #[prost(message, optional, tag = "3")]
5237 pub usage: ::core::option::Option<Usage>,
5238}
5239#[derive(Clone, PartialEq, ::prost::Message)]
5240pub struct FacetResponse {
5241 #[prost(message, repeated, tag = "1")]
5242 pub hits: ::prost::alloc::vec::Vec<FacetHit>,
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 SearchMatrixPairsResponse {
5251 #[prost(message, optional, tag = "1")]
5252 pub result: ::core::option::Option<SearchMatrixPairs>,
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 SearchMatrixOffsetsResponse {
5261 #[prost(message, optional, tag = "1")]
5262 pub result: ::core::option::Option<SearchMatrixOffsets>,
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 PointsSelector {
5271 #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
5272 pub points_selector_one_of: ::core::option::Option<
5273 points_selector::PointsSelectorOneOf,
5274 >,
5275}
5276pub mod points_selector {
5278 #[derive(Clone, PartialEq, ::prost::Oneof)]
5279 pub enum PointsSelectorOneOf {
5280 #[prost(message, tag = "1")]
5281 Points(super::PointsIdsList),
5282 #[prost(message, tag = "2")]
5283 Filter(super::Filter),
5284 }
5285}
5286#[derive(Clone, PartialEq, ::prost::Message)]
5287pub struct PointsIdsList {
5288 #[prost(message, repeated, tag = "1")]
5289 pub ids: ::prost::alloc::vec::Vec<PointId>,
5290}
5291#[derive(Clone, PartialEq, ::prost::Message)]
5292pub struct PointStruct {
5293 #[prost(message, optional, tag = "1")]
5294 pub id: ::core::option::Option<PointId>,
5295 #[prost(map = "string, message", tag = "3")]
5296 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5297 #[prost(message, optional, tag = "4")]
5298 pub vectors: ::core::option::Option<Vectors>,
5299}
5300#[derive(Clone, PartialEq, ::prost::Message)]
5304pub struct Usage {
5305 #[prost(message, optional, tag = "1")]
5306 pub hardware: ::core::option::Option<HardwareUsage>,
5307 #[prost(message, optional, tag = "2")]
5308 pub inference: ::core::option::Option<InferenceUsage>,
5309}
5310#[derive(Clone, PartialEq, ::prost::Message)]
5311pub struct InferenceUsage {
5312 #[prost(map = "string, message", tag = "1")]
5313 pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
5314}
5315#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5316pub struct ModelUsage {
5317 #[prost(uint64, tag = "1")]
5318 pub tokens: u64,
5319}
5320#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5321pub struct HardwareUsage {
5322 #[prost(uint64, tag = "1")]
5323 pub cpu: u64,
5324 #[prost(uint64, tag = "2")]
5325 pub payload_io_read: u64,
5326 #[prost(uint64, tag = "3")]
5327 pub payload_io_write: u64,
5328 #[prost(uint64, tag = "4")]
5329 pub payload_index_io_read: u64,
5330 #[prost(uint64, tag = "5")]
5331 pub payload_index_io_write: u64,
5332 #[prost(uint64, tag = "6")]
5333 pub vector_io_read: u64,
5334 #[prost(uint64, tag = "7")]
5335 pub vector_io_write: u64,
5336}
5337#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5338#[repr(i32)]
5339pub enum WriteOrderingType {
5340 Weak = 0,
5342 Medium = 1,
5344 Strong = 2,
5346}
5347impl WriteOrderingType {
5348 pub fn as_str_name(&self) -> &'static str {
5353 match self {
5354 Self::Weak => "Weak",
5355 Self::Medium => "Medium",
5356 Self::Strong => "Strong",
5357 }
5358 }
5359 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5361 match value {
5362 "Weak" => Some(Self::Weak),
5363 "Medium" => Some(Self::Medium),
5364 "Strong" => Some(Self::Strong),
5365 _ => None,
5366 }
5367 }
5368}
5369#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5370#[repr(i32)]
5371pub enum ReadConsistencyType {
5372 All = 0,
5374 Majority = 1,
5376 Quorum = 2,
5378}
5379impl ReadConsistencyType {
5380 pub fn as_str_name(&self) -> &'static str {
5385 match self {
5386 Self::All => "All",
5387 Self::Majority => "Majority",
5388 Self::Quorum => "Quorum",
5389 }
5390 }
5391 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5393 match value {
5394 "All" => Some(Self::All),
5395 "Majority" => Some(Self::Majority),
5396 "Quorum" => Some(Self::Quorum),
5397 _ => None,
5398 }
5399 }
5400}
5401#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5402#[repr(i32)]
5403pub enum FieldType {
5404 Keyword = 0,
5405 Integer = 1,
5406 Float = 2,
5407 Geo = 3,
5408 Text = 4,
5409 Bool = 5,
5410 Datetime = 6,
5411 Uuid = 7,
5412}
5413impl FieldType {
5414 pub fn as_str_name(&self) -> &'static str {
5419 match self {
5420 Self::Keyword => "FieldTypeKeyword",
5421 Self::Integer => "FieldTypeInteger",
5422 Self::Float => "FieldTypeFloat",
5423 Self::Geo => "FieldTypeGeo",
5424 Self::Text => "FieldTypeText",
5425 Self::Bool => "FieldTypeBool",
5426 Self::Datetime => "FieldTypeDatetime",
5427 Self::Uuid => "FieldTypeUuid",
5428 }
5429 }
5430 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5432 match value {
5433 "FieldTypeKeyword" => Some(Self::Keyword),
5434 "FieldTypeInteger" => Some(Self::Integer),
5435 "FieldTypeFloat" => Some(Self::Float),
5436 "FieldTypeGeo" => Some(Self::Geo),
5437 "FieldTypeText" => Some(Self::Text),
5438 "FieldTypeBool" => Some(Self::Bool),
5439 "FieldTypeDatetime" => Some(Self::Datetime),
5440 "FieldTypeUuid" => Some(Self::Uuid),
5441 _ => None,
5442 }
5443 }
5444}
5445#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5446#[repr(i32)]
5447pub enum Direction {
5448 Asc = 0,
5449 Desc = 1,
5450}
5451impl Direction {
5452 pub fn as_str_name(&self) -> &'static str {
5457 match self {
5458 Self::Asc => "Asc",
5459 Self::Desc => "Desc",
5460 }
5461 }
5462 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5464 match value {
5465 "Asc" => Some(Self::Asc),
5466 "Desc" => Some(Self::Desc),
5467 _ => None,
5468 }
5469 }
5470}
5471#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5473#[repr(i32)]
5474pub enum RecommendStrategy {
5475 AverageVector = 0,
5478 BestScore = 1,
5482 SumScores = 2,
5485}
5486impl RecommendStrategy {
5487 pub fn as_str_name(&self) -> &'static str {
5492 match self {
5493 Self::AverageVector => "AverageVector",
5494 Self::BestScore => "BestScore",
5495 Self::SumScores => "SumScores",
5496 }
5497 }
5498 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5500 match value {
5501 "AverageVector" => Some(Self::AverageVector),
5502 "BestScore" => Some(Self::BestScore),
5503 "SumScores" => Some(Self::SumScores),
5504 _ => None,
5505 }
5506 }
5507}
5508#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5509#[repr(i32)]
5510pub enum Fusion {
5511 Rrf = 0,
5513 Dbsf = 1,
5515}
5516impl Fusion {
5517 pub fn as_str_name(&self) -> &'static str {
5522 match self {
5523 Self::Rrf => "RRF",
5524 Self::Dbsf => "DBSF",
5525 }
5526 }
5527 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5529 match value {
5530 "RRF" => Some(Self::Rrf),
5531 "DBSF" => Some(Self::Dbsf),
5532 _ => None,
5533 }
5534 }
5535}
5536#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5542#[repr(i32)]
5543pub enum Sample {
5544 Random = 0,
5545}
5546impl Sample {
5547 pub fn as_str_name(&self) -> &'static str {
5552 match self {
5553 Self::Random => "Random",
5554 }
5555 }
5556 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5558 match value {
5559 "Random" => Some(Self::Random),
5560 _ => None,
5561 }
5562 }
5563}
5564#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5565#[repr(i32)]
5566pub enum UpdateStatus {
5567 UnknownUpdateStatus = 0,
5568 Acknowledged = 1,
5570 Completed = 2,
5572 ClockRejected = 3,
5574}
5575impl UpdateStatus {
5576 pub fn as_str_name(&self) -> &'static str {
5581 match self {
5582 Self::UnknownUpdateStatus => "UnknownUpdateStatus",
5583 Self::Acknowledged => "Acknowledged",
5584 Self::Completed => "Completed",
5585 Self::ClockRejected => "ClockRejected",
5586 }
5587 }
5588 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5590 match value {
5591 "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
5592 "Acknowledged" => Some(Self::Acknowledged),
5593 "Completed" => Some(Self::Completed),
5594 "ClockRejected" => Some(Self::ClockRejected),
5595 _ => None,
5596 }
5597 }
5598}
5599pub mod points_client {
5601 #![allow(
5602 unused_variables,
5603 dead_code,
5604 missing_docs,
5605 clippy::wildcard_imports,
5606 clippy::let_unit_value,
5607 )]
5608 use tonic::codegen::*;
5609 use tonic::codegen::http::Uri;
5610 #[derive(Debug, Clone)]
5611 pub struct PointsClient<T> {
5612 inner: tonic::client::Grpc<T>,
5613 }
5614 impl PointsClient<tonic::transport::Channel> {
5615 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5617 where
5618 D: TryInto<tonic::transport::Endpoint>,
5619 D::Error: Into<StdError>,
5620 {
5621 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5622 Ok(Self::new(conn))
5623 }
5624 }
5625 impl<T> PointsClient<T>
5626 where
5627 T: tonic::client::GrpcService<tonic::body::Body>,
5628 T::Error: Into<StdError>,
5629 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
5630 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
5631 {
5632 pub fn new(inner: T) -> Self {
5633 let inner = tonic::client::Grpc::new(inner);
5634 Self { inner }
5635 }
5636 pub fn with_origin(inner: T, origin: Uri) -> Self {
5637 let inner = tonic::client::Grpc::with_origin(inner, origin);
5638 Self { inner }
5639 }
5640 pub fn with_interceptor<F>(
5641 inner: T,
5642 interceptor: F,
5643 ) -> PointsClient<InterceptedService<T, F>>
5644 where
5645 F: tonic::service::Interceptor,
5646 T::ResponseBody: Default,
5647 T: tonic::codegen::Service<
5648 http::Request<tonic::body::Body>,
5649 Response = http::Response<
5650 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
5651 >,
5652 >,
5653 <T as tonic::codegen::Service<
5654 http::Request<tonic::body::Body>,
5655 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
5656 {
5657 PointsClient::new(InterceptedService::new(inner, interceptor))
5658 }
5659 #[must_use]
5664 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5665 self.inner = self.inner.send_compressed(encoding);
5666 self
5667 }
5668 #[must_use]
5670 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5671 self.inner = self.inner.accept_compressed(encoding);
5672 self
5673 }
5674 #[must_use]
5678 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5679 self.inner = self.inner.max_decoding_message_size(limit);
5680 self
5681 }
5682 #[must_use]
5686 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5687 self.inner = self.inner.max_encoding_message_size(limit);
5688 self
5689 }
5690 pub async fn upsert(
5692 &mut self,
5693 request: impl tonic::IntoRequest<super::UpsertPoints>,
5694 ) -> std::result::Result<
5695 tonic::Response<super::PointsOperationResponse>,
5696 tonic::Status,
5697 > {
5698 self.inner
5699 .ready()
5700 .await
5701 .map_err(|e| {
5702 tonic::Status::unknown(
5703 format!("Service was not ready: {}", e.into()),
5704 )
5705 })?;
5706 let codec = tonic_prost::ProstCodec::default();
5707 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
5708 let mut req = request.into_request();
5709 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
5710 self.inner.unary(req, path, codec).await
5711 }
5712 pub async fn delete(
5714 &mut self,
5715 request: impl tonic::IntoRequest<super::DeletePoints>,
5716 ) -> std::result::Result<
5717 tonic::Response<super::PointsOperationResponse>,
5718 tonic::Status,
5719 > {
5720 self.inner
5721 .ready()
5722 .await
5723 .map_err(|e| {
5724 tonic::Status::unknown(
5725 format!("Service was not ready: {}", e.into()),
5726 )
5727 })?;
5728 let codec = tonic_prost::ProstCodec::default();
5729 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
5730 let mut req = request.into_request();
5731 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
5732 self.inner.unary(req, path, codec).await
5733 }
5734 pub async fn get(
5736 &mut self,
5737 request: impl tonic::IntoRequest<super::GetPoints>,
5738 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
5739 self.inner
5740 .ready()
5741 .await
5742 .map_err(|e| {
5743 tonic::Status::unknown(
5744 format!("Service was not ready: {}", e.into()),
5745 )
5746 })?;
5747 let codec = tonic_prost::ProstCodec::default();
5748 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
5749 let mut req = request.into_request();
5750 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
5751 self.inner.unary(req, path, codec).await
5752 }
5753 pub async fn update_vectors(
5755 &mut self,
5756 request: impl tonic::IntoRequest<super::UpdatePointVectors>,
5757 ) -> std::result::Result<
5758 tonic::Response<super::PointsOperationResponse>,
5759 tonic::Status,
5760 > {
5761 self.inner
5762 .ready()
5763 .await
5764 .map_err(|e| {
5765 tonic::Status::unknown(
5766 format!("Service was not ready: {}", e.into()),
5767 )
5768 })?;
5769 let codec = tonic_prost::ProstCodec::default();
5770 let path = http::uri::PathAndQuery::from_static(
5771 "/qdrant.Points/UpdateVectors",
5772 );
5773 let mut req = request.into_request();
5774 req.extensions_mut()
5775 .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
5776 self.inner.unary(req, path, codec).await
5777 }
5778 pub async fn delete_vectors(
5780 &mut self,
5781 request: impl tonic::IntoRequest<super::DeletePointVectors>,
5782 ) -> std::result::Result<
5783 tonic::Response<super::PointsOperationResponse>,
5784 tonic::Status,
5785 > {
5786 self.inner
5787 .ready()
5788 .await
5789 .map_err(|e| {
5790 tonic::Status::unknown(
5791 format!("Service was not ready: {}", e.into()),
5792 )
5793 })?;
5794 let codec = tonic_prost::ProstCodec::default();
5795 let path = http::uri::PathAndQuery::from_static(
5796 "/qdrant.Points/DeleteVectors",
5797 );
5798 let mut req = request.into_request();
5799 req.extensions_mut()
5800 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
5801 self.inner.unary(req, path, codec).await
5802 }
5803 pub async fn set_payload(
5805 &mut self,
5806 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5807 ) -> std::result::Result<
5808 tonic::Response<super::PointsOperationResponse>,
5809 tonic::Status,
5810 > {
5811 self.inner
5812 .ready()
5813 .await
5814 .map_err(|e| {
5815 tonic::Status::unknown(
5816 format!("Service was not ready: {}", e.into()),
5817 )
5818 })?;
5819 let codec = tonic_prost::ProstCodec::default();
5820 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
5821 let mut req = request.into_request();
5822 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
5823 self.inner.unary(req, path, codec).await
5824 }
5825 pub async fn overwrite_payload(
5827 &mut self,
5828 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
5829 ) -> std::result::Result<
5830 tonic::Response<super::PointsOperationResponse>,
5831 tonic::Status,
5832 > {
5833 self.inner
5834 .ready()
5835 .await
5836 .map_err(|e| {
5837 tonic::Status::unknown(
5838 format!("Service was not ready: {}", e.into()),
5839 )
5840 })?;
5841 let codec = tonic_prost::ProstCodec::default();
5842 let path = http::uri::PathAndQuery::from_static(
5843 "/qdrant.Points/OverwritePayload",
5844 );
5845 let mut req = request.into_request();
5846 req.extensions_mut()
5847 .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
5848 self.inner.unary(req, path, codec).await
5849 }
5850 pub async fn delete_payload(
5852 &mut self,
5853 request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
5854 ) -> std::result::Result<
5855 tonic::Response<super::PointsOperationResponse>,
5856 tonic::Status,
5857 > {
5858 self.inner
5859 .ready()
5860 .await
5861 .map_err(|e| {
5862 tonic::Status::unknown(
5863 format!("Service was not ready: {}", e.into()),
5864 )
5865 })?;
5866 let codec = tonic_prost::ProstCodec::default();
5867 let path = http::uri::PathAndQuery::from_static(
5868 "/qdrant.Points/DeletePayload",
5869 );
5870 let mut req = request.into_request();
5871 req.extensions_mut()
5872 .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
5873 self.inner.unary(req, path, codec).await
5874 }
5875 pub async fn clear_payload(
5877 &mut self,
5878 request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
5879 ) -> std::result::Result<
5880 tonic::Response<super::PointsOperationResponse>,
5881 tonic::Status,
5882 > {
5883 self.inner
5884 .ready()
5885 .await
5886 .map_err(|e| {
5887 tonic::Status::unknown(
5888 format!("Service was not ready: {}", e.into()),
5889 )
5890 })?;
5891 let codec = tonic_prost::ProstCodec::default();
5892 let path = http::uri::PathAndQuery::from_static(
5893 "/qdrant.Points/ClearPayload",
5894 );
5895 let mut req = request.into_request();
5896 req.extensions_mut()
5897 .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
5898 self.inner.unary(req, path, codec).await
5899 }
5900 pub async fn create_field_index(
5902 &mut self,
5903 request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
5904 ) -> std::result::Result<
5905 tonic::Response<super::PointsOperationResponse>,
5906 tonic::Status,
5907 > {
5908 self.inner
5909 .ready()
5910 .await
5911 .map_err(|e| {
5912 tonic::Status::unknown(
5913 format!("Service was not ready: {}", e.into()),
5914 )
5915 })?;
5916 let codec = tonic_prost::ProstCodec::default();
5917 let path = http::uri::PathAndQuery::from_static(
5918 "/qdrant.Points/CreateFieldIndex",
5919 );
5920 let mut req = request.into_request();
5921 req.extensions_mut()
5922 .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
5923 self.inner.unary(req, path, codec).await
5924 }
5925 pub async fn delete_field_index(
5927 &mut self,
5928 request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
5929 ) -> std::result::Result<
5930 tonic::Response<super::PointsOperationResponse>,
5931 tonic::Status,
5932 > {
5933 self.inner
5934 .ready()
5935 .await
5936 .map_err(|e| {
5937 tonic::Status::unknown(
5938 format!("Service was not ready: {}", e.into()),
5939 )
5940 })?;
5941 let codec = tonic_prost::ProstCodec::default();
5942 let path = http::uri::PathAndQuery::from_static(
5943 "/qdrant.Points/DeleteFieldIndex",
5944 );
5945 let mut req = request.into_request();
5946 req.extensions_mut()
5947 .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
5948 self.inner.unary(req, path, codec).await
5949 }
5950 pub async fn search(
5952 &mut self,
5953 request: impl tonic::IntoRequest<super::SearchPoints>,
5954 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
5955 self.inner
5956 .ready()
5957 .await
5958 .map_err(|e| {
5959 tonic::Status::unknown(
5960 format!("Service was not ready: {}", e.into()),
5961 )
5962 })?;
5963 let codec = tonic_prost::ProstCodec::default();
5964 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
5965 let mut req = request.into_request();
5966 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
5967 self.inner.unary(req, path, codec).await
5968 }
5969 pub async fn search_batch(
5971 &mut self,
5972 request: impl tonic::IntoRequest<super::SearchBatchPoints>,
5973 ) -> std::result::Result<
5974 tonic::Response<super::SearchBatchResponse>,
5975 tonic::Status,
5976 > {
5977 self.inner
5978 .ready()
5979 .await
5980 .map_err(|e| {
5981 tonic::Status::unknown(
5982 format!("Service was not ready: {}", e.into()),
5983 )
5984 })?;
5985 let codec = tonic_prost::ProstCodec::default();
5986 let path = http::uri::PathAndQuery::from_static(
5987 "/qdrant.Points/SearchBatch",
5988 );
5989 let mut req = request.into_request();
5990 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
5991 self.inner.unary(req, path, codec).await
5992 }
5993 pub async fn search_groups(
5995 &mut self,
5996 request: impl tonic::IntoRequest<super::SearchPointGroups>,
5997 ) -> std::result::Result<
5998 tonic::Response<super::SearchGroupsResponse>,
5999 tonic::Status,
6000 > {
6001 self.inner
6002 .ready()
6003 .await
6004 .map_err(|e| {
6005 tonic::Status::unknown(
6006 format!("Service was not ready: {}", e.into()),
6007 )
6008 })?;
6009 let codec = tonic_prost::ProstCodec::default();
6010 let path = http::uri::PathAndQuery::from_static(
6011 "/qdrant.Points/SearchGroups",
6012 );
6013 let mut req = request.into_request();
6014 req.extensions_mut()
6015 .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
6016 self.inner.unary(req, path, codec).await
6017 }
6018 pub async fn scroll(
6020 &mut self,
6021 request: impl tonic::IntoRequest<super::ScrollPoints>,
6022 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
6023 self.inner
6024 .ready()
6025 .await
6026 .map_err(|e| {
6027 tonic::Status::unknown(
6028 format!("Service was not ready: {}", e.into()),
6029 )
6030 })?;
6031 let codec = tonic_prost::ProstCodec::default();
6032 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
6033 let mut req = request.into_request();
6034 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
6035 self.inner.unary(req, path, codec).await
6036 }
6037 pub async fn recommend(
6039 &mut self,
6040 request: impl tonic::IntoRequest<super::RecommendPoints>,
6041 ) -> std::result::Result<
6042 tonic::Response<super::RecommendResponse>,
6043 tonic::Status,
6044 > {
6045 self.inner
6046 .ready()
6047 .await
6048 .map_err(|e| {
6049 tonic::Status::unknown(
6050 format!("Service was not ready: {}", e.into()),
6051 )
6052 })?;
6053 let codec = tonic_prost::ProstCodec::default();
6054 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
6055 let mut req = request.into_request();
6056 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
6057 self.inner.unary(req, path, codec).await
6058 }
6059 pub async fn recommend_batch(
6061 &mut self,
6062 request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
6063 ) -> std::result::Result<
6064 tonic::Response<super::RecommendBatchResponse>,
6065 tonic::Status,
6066 > {
6067 self.inner
6068 .ready()
6069 .await
6070 .map_err(|e| {
6071 tonic::Status::unknown(
6072 format!("Service was not ready: {}", e.into()),
6073 )
6074 })?;
6075 let codec = tonic_prost::ProstCodec::default();
6076 let path = http::uri::PathAndQuery::from_static(
6077 "/qdrant.Points/RecommendBatch",
6078 );
6079 let mut req = request.into_request();
6080 req.extensions_mut()
6081 .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
6082 self.inner.unary(req, path, codec).await
6083 }
6084 pub async fn recommend_groups(
6086 &mut self,
6087 request: impl tonic::IntoRequest<super::RecommendPointGroups>,
6088 ) -> std::result::Result<
6089 tonic::Response<super::RecommendGroupsResponse>,
6090 tonic::Status,
6091 > {
6092 self.inner
6093 .ready()
6094 .await
6095 .map_err(|e| {
6096 tonic::Status::unknown(
6097 format!("Service was not ready: {}", e.into()),
6098 )
6099 })?;
6100 let codec = tonic_prost::ProstCodec::default();
6101 let path = http::uri::PathAndQuery::from_static(
6102 "/qdrant.Points/RecommendGroups",
6103 );
6104 let mut req = request.into_request();
6105 req.extensions_mut()
6106 .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
6107 self.inner.unary(req, path, codec).await
6108 }
6109 pub async fn discover(
6125 &mut self,
6126 request: impl tonic::IntoRequest<super::DiscoverPoints>,
6127 ) -> std::result::Result<
6128 tonic::Response<super::DiscoverResponse>,
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_prost::ProstCodec::default();
6140 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
6141 let mut req = request.into_request();
6142 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
6143 self.inner.unary(req, path, codec).await
6144 }
6145 pub async fn discover_batch(
6147 &mut self,
6148 request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
6149 ) -> std::result::Result<
6150 tonic::Response<super::DiscoverBatchResponse>,
6151 tonic::Status,
6152 > {
6153 self.inner
6154 .ready()
6155 .await
6156 .map_err(|e| {
6157 tonic::Status::unknown(
6158 format!("Service was not ready: {}", e.into()),
6159 )
6160 })?;
6161 let codec = tonic_prost::ProstCodec::default();
6162 let path = http::uri::PathAndQuery::from_static(
6163 "/qdrant.Points/DiscoverBatch",
6164 );
6165 let mut req = request.into_request();
6166 req.extensions_mut()
6167 .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
6168 self.inner.unary(req, path, codec).await
6169 }
6170 pub async fn count(
6172 &mut self,
6173 request: impl tonic::IntoRequest<super::CountPoints>,
6174 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
6175 self.inner
6176 .ready()
6177 .await
6178 .map_err(|e| {
6179 tonic::Status::unknown(
6180 format!("Service was not ready: {}", e.into()),
6181 )
6182 })?;
6183 let codec = tonic_prost::ProstCodec::default();
6184 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
6185 let mut req = request.into_request();
6186 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
6187 self.inner.unary(req, path, codec).await
6188 }
6189 pub async fn update_batch(
6191 &mut self,
6192 request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
6193 ) -> std::result::Result<
6194 tonic::Response<super::UpdateBatchResponse>,
6195 tonic::Status,
6196 > {
6197 self.inner
6198 .ready()
6199 .await
6200 .map_err(|e| {
6201 tonic::Status::unknown(
6202 format!("Service was not ready: {}", e.into()),
6203 )
6204 })?;
6205 let codec = tonic_prost::ProstCodec::default();
6206 let path = http::uri::PathAndQuery::from_static(
6207 "/qdrant.Points/UpdateBatch",
6208 );
6209 let mut req = request.into_request();
6210 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
6211 self.inner.unary(req, path, codec).await
6212 }
6213 pub async fn query(
6215 &mut self,
6216 request: impl tonic::IntoRequest<super::QueryPoints>,
6217 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
6218 self.inner
6219 .ready()
6220 .await
6221 .map_err(|e| {
6222 tonic::Status::unknown(
6223 format!("Service was not ready: {}", e.into()),
6224 )
6225 })?;
6226 let codec = tonic_prost::ProstCodec::default();
6227 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
6228 let mut req = request.into_request();
6229 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
6230 self.inner.unary(req, path, codec).await
6231 }
6232 pub async fn query_batch(
6234 &mut self,
6235 request: impl tonic::IntoRequest<super::QueryBatchPoints>,
6236 ) -> std::result::Result<
6237 tonic::Response<super::QueryBatchResponse>,
6238 tonic::Status,
6239 > {
6240 self.inner
6241 .ready()
6242 .await
6243 .map_err(|e| {
6244 tonic::Status::unknown(
6245 format!("Service was not ready: {}", e.into()),
6246 )
6247 })?;
6248 let codec = tonic_prost::ProstCodec::default();
6249 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
6250 let mut req = request.into_request();
6251 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
6252 self.inner.unary(req, path, codec).await
6253 }
6254 pub async fn query_groups(
6256 &mut self,
6257 request: impl tonic::IntoRequest<super::QueryPointGroups>,
6258 ) -> std::result::Result<
6259 tonic::Response<super::QueryGroupsResponse>,
6260 tonic::Status,
6261 > {
6262 self.inner
6263 .ready()
6264 .await
6265 .map_err(|e| {
6266 tonic::Status::unknown(
6267 format!("Service was not ready: {}", e.into()),
6268 )
6269 })?;
6270 let codec = tonic_prost::ProstCodec::default();
6271 let path = http::uri::PathAndQuery::from_static(
6272 "/qdrant.Points/QueryGroups",
6273 );
6274 let mut req = request.into_request();
6275 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
6276 self.inner.unary(req, path, codec).await
6277 }
6278 pub async fn facet(
6280 &mut self,
6281 request: impl tonic::IntoRequest<super::FacetCounts>,
6282 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
6283 self.inner
6284 .ready()
6285 .await
6286 .map_err(|e| {
6287 tonic::Status::unknown(
6288 format!("Service was not ready: {}", e.into()),
6289 )
6290 })?;
6291 let codec = tonic_prost::ProstCodec::default();
6292 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
6293 let mut req = request.into_request();
6294 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
6295 self.inner.unary(req, path, codec).await
6296 }
6297 pub async fn search_matrix_pairs(
6299 &mut self,
6300 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6301 ) -> std::result::Result<
6302 tonic::Response<super::SearchMatrixPairsResponse>,
6303 tonic::Status,
6304 > {
6305 self.inner
6306 .ready()
6307 .await
6308 .map_err(|e| {
6309 tonic::Status::unknown(
6310 format!("Service was not ready: {}", e.into()),
6311 )
6312 })?;
6313 let codec = tonic_prost::ProstCodec::default();
6314 let path = http::uri::PathAndQuery::from_static(
6315 "/qdrant.Points/SearchMatrixPairs",
6316 );
6317 let mut req = request.into_request();
6318 req.extensions_mut()
6319 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
6320 self.inner.unary(req, path, codec).await
6321 }
6322 pub async fn search_matrix_offsets(
6324 &mut self,
6325 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6326 ) -> std::result::Result<
6327 tonic::Response<super::SearchMatrixOffsetsResponse>,
6328 tonic::Status,
6329 > {
6330 self.inner
6331 .ready()
6332 .await
6333 .map_err(|e| {
6334 tonic::Status::unknown(
6335 format!("Service was not ready: {}", e.into()),
6336 )
6337 })?;
6338 let codec = tonic_prost::ProstCodec::default();
6339 let path = http::uri::PathAndQuery::from_static(
6340 "/qdrant.Points/SearchMatrixOffsets",
6341 );
6342 let mut req = request.into_request();
6343 req.extensions_mut()
6344 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
6345 self.inner.unary(req, path, codec).await
6346 }
6347 }
6348}
6349pub mod points_server {
6351 #![allow(
6352 unused_variables,
6353 dead_code,
6354 missing_docs,
6355 clippy::wildcard_imports,
6356 clippy::let_unit_value,
6357 )]
6358 use tonic::codegen::*;
6359 #[async_trait]
6361 pub trait Points: std::marker::Send + std::marker::Sync + 'static {
6362 async fn upsert(
6364 &self,
6365 request: tonic::Request<super::UpsertPoints>,
6366 ) -> std::result::Result<
6367 tonic::Response<super::PointsOperationResponse>,
6368 tonic::Status,
6369 >;
6370 async fn delete(
6372 &self,
6373 request: tonic::Request<super::DeletePoints>,
6374 ) -> std::result::Result<
6375 tonic::Response<super::PointsOperationResponse>,
6376 tonic::Status,
6377 >;
6378 async fn get(
6380 &self,
6381 request: tonic::Request<super::GetPoints>,
6382 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
6383 async fn update_vectors(
6385 &self,
6386 request: tonic::Request<super::UpdatePointVectors>,
6387 ) -> std::result::Result<
6388 tonic::Response<super::PointsOperationResponse>,
6389 tonic::Status,
6390 >;
6391 async fn delete_vectors(
6393 &self,
6394 request: tonic::Request<super::DeletePointVectors>,
6395 ) -> std::result::Result<
6396 tonic::Response<super::PointsOperationResponse>,
6397 tonic::Status,
6398 >;
6399 async fn set_payload(
6401 &self,
6402 request: tonic::Request<super::SetPayloadPoints>,
6403 ) -> std::result::Result<
6404 tonic::Response<super::PointsOperationResponse>,
6405 tonic::Status,
6406 >;
6407 async fn overwrite_payload(
6409 &self,
6410 request: tonic::Request<super::SetPayloadPoints>,
6411 ) -> std::result::Result<
6412 tonic::Response<super::PointsOperationResponse>,
6413 tonic::Status,
6414 >;
6415 async fn delete_payload(
6417 &self,
6418 request: tonic::Request<super::DeletePayloadPoints>,
6419 ) -> std::result::Result<
6420 tonic::Response<super::PointsOperationResponse>,
6421 tonic::Status,
6422 >;
6423 async fn clear_payload(
6425 &self,
6426 request: tonic::Request<super::ClearPayloadPoints>,
6427 ) -> std::result::Result<
6428 tonic::Response<super::PointsOperationResponse>,
6429 tonic::Status,
6430 >;
6431 async fn create_field_index(
6433 &self,
6434 request: tonic::Request<super::CreateFieldIndexCollection>,
6435 ) -> std::result::Result<
6436 tonic::Response<super::PointsOperationResponse>,
6437 tonic::Status,
6438 >;
6439 async fn delete_field_index(
6441 &self,
6442 request: tonic::Request<super::DeleteFieldIndexCollection>,
6443 ) -> std::result::Result<
6444 tonic::Response<super::PointsOperationResponse>,
6445 tonic::Status,
6446 >;
6447 async fn search(
6449 &self,
6450 request: tonic::Request<super::SearchPoints>,
6451 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
6452 async fn search_batch(
6454 &self,
6455 request: tonic::Request<super::SearchBatchPoints>,
6456 ) -> std::result::Result<
6457 tonic::Response<super::SearchBatchResponse>,
6458 tonic::Status,
6459 >;
6460 async fn search_groups(
6462 &self,
6463 request: tonic::Request<super::SearchPointGroups>,
6464 ) -> std::result::Result<
6465 tonic::Response<super::SearchGroupsResponse>,
6466 tonic::Status,
6467 >;
6468 async fn scroll(
6470 &self,
6471 request: tonic::Request<super::ScrollPoints>,
6472 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
6473 async fn recommend(
6475 &self,
6476 request: tonic::Request<super::RecommendPoints>,
6477 ) -> std::result::Result<
6478 tonic::Response<super::RecommendResponse>,
6479 tonic::Status,
6480 >;
6481 async fn recommend_batch(
6483 &self,
6484 request: tonic::Request<super::RecommendBatchPoints>,
6485 ) -> std::result::Result<
6486 tonic::Response<super::RecommendBatchResponse>,
6487 tonic::Status,
6488 >;
6489 async fn recommend_groups(
6491 &self,
6492 request: tonic::Request<super::RecommendPointGroups>,
6493 ) -> std::result::Result<
6494 tonic::Response<super::RecommendGroupsResponse>,
6495 tonic::Status,
6496 >;
6497 async fn discover(
6513 &self,
6514 request: tonic::Request<super::DiscoverPoints>,
6515 ) -> std::result::Result<
6516 tonic::Response<super::DiscoverResponse>,
6517 tonic::Status,
6518 >;
6519 async fn discover_batch(
6521 &self,
6522 request: tonic::Request<super::DiscoverBatchPoints>,
6523 ) -> std::result::Result<
6524 tonic::Response<super::DiscoverBatchResponse>,
6525 tonic::Status,
6526 >;
6527 async fn count(
6529 &self,
6530 request: tonic::Request<super::CountPoints>,
6531 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
6532 async fn update_batch(
6534 &self,
6535 request: tonic::Request<super::UpdateBatchPoints>,
6536 ) -> std::result::Result<
6537 tonic::Response<super::UpdateBatchResponse>,
6538 tonic::Status,
6539 >;
6540 async fn query(
6542 &self,
6543 request: tonic::Request<super::QueryPoints>,
6544 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
6545 async fn query_batch(
6547 &self,
6548 request: tonic::Request<super::QueryBatchPoints>,
6549 ) -> std::result::Result<
6550 tonic::Response<super::QueryBatchResponse>,
6551 tonic::Status,
6552 >;
6553 async fn query_groups(
6555 &self,
6556 request: tonic::Request<super::QueryPointGroups>,
6557 ) -> std::result::Result<
6558 tonic::Response<super::QueryGroupsResponse>,
6559 tonic::Status,
6560 >;
6561 async fn facet(
6563 &self,
6564 request: tonic::Request<super::FacetCounts>,
6565 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
6566 async fn search_matrix_pairs(
6568 &self,
6569 request: tonic::Request<super::SearchMatrixPoints>,
6570 ) -> std::result::Result<
6571 tonic::Response<super::SearchMatrixPairsResponse>,
6572 tonic::Status,
6573 >;
6574 async fn search_matrix_offsets(
6576 &self,
6577 request: tonic::Request<super::SearchMatrixPoints>,
6578 ) -> std::result::Result<
6579 tonic::Response<super::SearchMatrixOffsetsResponse>,
6580 tonic::Status,
6581 >;
6582 }
6583 #[derive(Debug)]
6584 pub struct PointsServer<T> {
6585 inner: Arc<T>,
6586 accept_compression_encodings: EnabledCompressionEncodings,
6587 send_compression_encodings: EnabledCompressionEncodings,
6588 max_decoding_message_size: Option<usize>,
6589 max_encoding_message_size: Option<usize>,
6590 }
6591 impl<T> PointsServer<T> {
6592 pub fn new(inner: T) -> Self {
6593 Self::from_arc(Arc::new(inner))
6594 }
6595 pub fn from_arc(inner: Arc<T>) -> Self {
6596 Self {
6597 inner,
6598 accept_compression_encodings: Default::default(),
6599 send_compression_encodings: Default::default(),
6600 max_decoding_message_size: None,
6601 max_encoding_message_size: None,
6602 }
6603 }
6604 pub fn with_interceptor<F>(
6605 inner: T,
6606 interceptor: F,
6607 ) -> InterceptedService<Self, F>
6608 where
6609 F: tonic::service::Interceptor,
6610 {
6611 InterceptedService::new(Self::new(inner), interceptor)
6612 }
6613 #[must_use]
6615 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6616 self.accept_compression_encodings.enable(encoding);
6617 self
6618 }
6619 #[must_use]
6621 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6622 self.send_compression_encodings.enable(encoding);
6623 self
6624 }
6625 #[must_use]
6629 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6630 self.max_decoding_message_size = Some(limit);
6631 self
6632 }
6633 #[must_use]
6637 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6638 self.max_encoding_message_size = Some(limit);
6639 self
6640 }
6641 }
6642 impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
6643 where
6644 T: Points,
6645 B: Body + std::marker::Send + 'static,
6646 B::Error: Into<StdError> + std::marker::Send + 'static,
6647 {
6648 type Response = http::Response<tonic::body::Body>;
6649 type Error = std::convert::Infallible;
6650 type Future = BoxFuture<Self::Response, Self::Error>;
6651 fn poll_ready(
6652 &mut self,
6653 _cx: &mut Context<'_>,
6654 ) -> Poll<std::result::Result<(), Self::Error>> {
6655 Poll::Ready(Ok(()))
6656 }
6657 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6658 match req.uri().path() {
6659 "/qdrant.Points/Upsert" => {
6660 #[allow(non_camel_case_types)]
6661 struct UpsertSvc<T: Points>(pub Arc<T>);
6662 impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
6663 for UpsertSvc<T> {
6664 type Response = super::PointsOperationResponse;
6665 type Future = BoxFuture<
6666 tonic::Response<Self::Response>,
6667 tonic::Status,
6668 >;
6669 fn call(
6670 &mut self,
6671 request: tonic::Request<super::UpsertPoints>,
6672 ) -> Self::Future {
6673 let inner = Arc::clone(&self.0);
6674 let fut = async move {
6675 <T as Points>::upsert(&inner, request).await
6676 };
6677 Box::pin(fut)
6678 }
6679 }
6680 let accept_compression_encodings = self.accept_compression_encodings;
6681 let send_compression_encodings = self.send_compression_encodings;
6682 let max_decoding_message_size = self.max_decoding_message_size;
6683 let max_encoding_message_size = self.max_encoding_message_size;
6684 let inner = self.inner.clone();
6685 let fut = async move {
6686 let method = UpsertSvc(inner);
6687 let codec = tonic_prost::ProstCodec::default();
6688 let mut grpc = tonic::server::Grpc::new(codec)
6689 .apply_compression_config(
6690 accept_compression_encodings,
6691 send_compression_encodings,
6692 )
6693 .apply_max_message_size_config(
6694 max_decoding_message_size,
6695 max_encoding_message_size,
6696 );
6697 let res = grpc.unary(method, req).await;
6698 Ok(res)
6699 };
6700 Box::pin(fut)
6701 }
6702 "/qdrant.Points/Delete" => {
6703 #[allow(non_camel_case_types)]
6704 struct DeleteSvc<T: Points>(pub Arc<T>);
6705 impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
6706 for DeleteSvc<T> {
6707 type Response = super::PointsOperationResponse;
6708 type Future = BoxFuture<
6709 tonic::Response<Self::Response>,
6710 tonic::Status,
6711 >;
6712 fn call(
6713 &mut self,
6714 request: tonic::Request<super::DeletePoints>,
6715 ) -> Self::Future {
6716 let inner = Arc::clone(&self.0);
6717 let fut = async move {
6718 <T as Points>::delete(&inner, request).await
6719 };
6720 Box::pin(fut)
6721 }
6722 }
6723 let accept_compression_encodings = self.accept_compression_encodings;
6724 let send_compression_encodings = self.send_compression_encodings;
6725 let max_decoding_message_size = self.max_decoding_message_size;
6726 let max_encoding_message_size = self.max_encoding_message_size;
6727 let inner = self.inner.clone();
6728 let fut = async move {
6729 let method = DeleteSvc(inner);
6730 let codec = tonic_prost::ProstCodec::default();
6731 let mut grpc = tonic::server::Grpc::new(codec)
6732 .apply_compression_config(
6733 accept_compression_encodings,
6734 send_compression_encodings,
6735 )
6736 .apply_max_message_size_config(
6737 max_decoding_message_size,
6738 max_encoding_message_size,
6739 );
6740 let res = grpc.unary(method, req).await;
6741 Ok(res)
6742 };
6743 Box::pin(fut)
6744 }
6745 "/qdrant.Points/Get" => {
6746 #[allow(non_camel_case_types)]
6747 struct GetSvc<T: Points>(pub Arc<T>);
6748 impl<T: Points> tonic::server::UnaryService<super::GetPoints>
6749 for GetSvc<T> {
6750 type Response = super::GetResponse;
6751 type Future = BoxFuture<
6752 tonic::Response<Self::Response>,
6753 tonic::Status,
6754 >;
6755 fn call(
6756 &mut self,
6757 request: tonic::Request<super::GetPoints>,
6758 ) -> Self::Future {
6759 let inner = Arc::clone(&self.0);
6760 let fut = async move {
6761 <T as Points>::get(&inner, request).await
6762 };
6763 Box::pin(fut)
6764 }
6765 }
6766 let accept_compression_encodings = self.accept_compression_encodings;
6767 let send_compression_encodings = self.send_compression_encodings;
6768 let max_decoding_message_size = self.max_decoding_message_size;
6769 let max_encoding_message_size = self.max_encoding_message_size;
6770 let inner = self.inner.clone();
6771 let fut = async move {
6772 let method = GetSvc(inner);
6773 let codec = tonic_prost::ProstCodec::default();
6774 let mut grpc = tonic::server::Grpc::new(codec)
6775 .apply_compression_config(
6776 accept_compression_encodings,
6777 send_compression_encodings,
6778 )
6779 .apply_max_message_size_config(
6780 max_decoding_message_size,
6781 max_encoding_message_size,
6782 );
6783 let res = grpc.unary(method, req).await;
6784 Ok(res)
6785 };
6786 Box::pin(fut)
6787 }
6788 "/qdrant.Points/UpdateVectors" => {
6789 #[allow(non_camel_case_types)]
6790 struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
6791 impl<
6792 T: Points,
6793 > tonic::server::UnaryService<super::UpdatePointVectors>
6794 for UpdateVectorsSvc<T> {
6795 type Response = super::PointsOperationResponse;
6796 type Future = BoxFuture<
6797 tonic::Response<Self::Response>,
6798 tonic::Status,
6799 >;
6800 fn call(
6801 &mut self,
6802 request: tonic::Request<super::UpdatePointVectors>,
6803 ) -> Self::Future {
6804 let inner = Arc::clone(&self.0);
6805 let fut = async move {
6806 <T as Points>::update_vectors(&inner, request).await
6807 };
6808 Box::pin(fut)
6809 }
6810 }
6811 let accept_compression_encodings = self.accept_compression_encodings;
6812 let send_compression_encodings = self.send_compression_encodings;
6813 let max_decoding_message_size = self.max_decoding_message_size;
6814 let max_encoding_message_size = self.max_encoding_message_size;
6815 let inner = self.inner.clone();
6816 let fut = async move {
6817 let method = UpdateVectorsSvc(inner);
6818 let codec = tonic_prost::ProstCodec::default();
6819 let mut grpc = tonic::server::Grpc::new(codec)
6820 .apply_compression_config(
6821 accept_compression_encodings,
6822 send_compression_encodings,
6823 )
6824 .apply_max_message_size_config(
6825 max_decoding_message_size,
6826 max_encoding_message_size,
6827 );
6828 let res = grpc.unary(method, req).await;
6829 Ok(res)
6830 };
6831 Box::pin(fut)
6832 }
6833 "/qdrant.Points/DeleteVectors" => {
6834 #[allow(non_camel_case_types)]
6835 struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
6836 impl<
6837 T: Points,
6838 > tonic::server::UnaryService<super::DeletePointVectors>
6839 for DeleteVectorsSvc<T> {
6840 type Response = super::PointsOperationResponse;
6841 type Future = BoxFuture<
6842 tonic::Response<Self::Response>,
6843 tonic::Status,
6844 >;
6845 fn call(
6846 &mut self,
6847 request: tonic::Request<super::DeletePointVectors>,
6848 ) -> Self::Future {
6849 let inner = Arc::clone(&self.0);
6850 let fut = async move {
6851 <T as Points>::delete_vectors(&inner, request).await
6852 };
6853 Box::pin(fut)
6854 }
6855 }
6856 let accept_compression_encodings = self.accept_compression_encodings;
6857 let send_compression_encodings = self.send_compression_encodings;
6858 let max_decoding_message_size = self.max_decoding_message_size;
6859 let max_encoding_message_size = self.max_encoding_message_size;
6860 let inner = self.inner.clone();
6861 let fut = async move {
6862 let method = DeleteVectorsSvc(inner);
6863 let codec = tonic_prost::ProstCodec::default();
6864 let mut grpc = tonic::server::Grpc::new(codec)
6865 .apply_compression_config(
6866 accept_compression_encodings,
6867 send_compression_encodings,
6868 )
6869 .apply_max_message_size_config(
6870 max_decoding_message_size,
6871 max_encoding_message_size,
6872 );
6873 let res = grpc.unary(method, req).await;
6874 Ok(res)
6875 };
6876 Box::pin(fut)
6877 }
6878 "/qdrant.Points/SetPayload" => {
6879 #[allow(non_camel_case_types)]
6880 struct SetPayloadSvc<T: Points>(pub Arc<T>);
6881 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
6882 for SetPayloadSvc<T> {
6883 type Response = super::PointsOperationResponse;
6884 type Future = BoxFuture<
6885 tonic::Response<Self::Response>,
6886 tonic::Status,
6887 >;
6888 fn call(
6889 &mut self,
6890 request: tonic::Request<super::SetPayloadPoints>,
6891 ) -> Self::Future {
6892 let inner = Arc::clone(&self.0);
6893 let fut = async move {
6894 <T as Points>::set_payload(&inner, request).await
6895 };
6896 Box::pin(fut)
6897 }
6898 }
6899 let accept_compression_encodings = self.accept_compression_encodings;
6900 let send_compression_encodings = self.send_compression_encodings;
6901 let max_decoding_message_size = self.max_decoding_message_size;
6902 let max_encoding_message_size = self.max_encoding_message_size;
6903 let inner = self.inner.clone();
6904 let fut = async move {
6905 let method = SetPayloadSvc(inner);
6906 let codec = tonic_prost::ProstCodec::default();
6907 let mut grpc = tonic::server::Grpc::new(codec)
6908 .apply_compression_config(
6909 accept_compression_encodings,
6910 send_compression_encodings,
6911 )
6912 .apply_max_message_size_config(
6913 max_decoding_message_size,
6914 max_encoding_message_size,
6915 );
6916 let res = grpc.unary(method, req).await;
6917 Ok(res)
6918 };
6919 Box::pin(fut)
6920 }
6921 "/qdrant.Points/OverwritePayload" => {
6922 #[allow(non_camel_case_types)]
6923 struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
6924 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
6925 for OverwritePayloadSvc<T> {
6926 type Response = super::PointsOperationResponse;
6927 type Future = BoxFuture<
6928 tonic::Response<Self::Response>,
6929 tonic::Status,
6930 >;
6931 fn call(
6932 &mut self,
6933 request: tonic::Request<super::SetPayloadPoints>,
6934 ) -> Self::Future {
6935 let inner = Arc::clone(&self.0);
6936 let fut = async move {
6937 <T as Points>::overwrite_payload(&inner, request).await
6938 };
6939 Box::pin(fut)
6940 }
6941 }
6942 let accept_compression_encodings = self.accept_compression_encodings;
6943 let send_compression_encodings = self.send_compression_encodings;
6944 let max_decoding_message_size = self.max_decoding_message_size;
6945 let max_encoding_message_size = self.max_encoding_message_size;
6946 let inner = self.inner.clone();
6947 let fut = async move {
6948 let method = OverwritePayloadSvc(inner);
6949 let codec = tonic_prost::ProstCodec::default();
6950 let mut grpc = tonic::server::Grpc::new(codec)
6951 .apply_compression_config(
6952 accept_compression_encodings,
6953 send_compression_encodings,
6954 )
6955 .apply_max_message_size_config(
6956 max_decoding_message_size,
6957 max_encoding_message_size,
6958 );
6959 let res = grpc.unary(method, req).await;
6960 Ok(res)
6961 };
6962 Box::pin(fut)
6963 }
6964 "/qdrant.Points/DeletePayload" => {
6965 #[allow(non_camel_case_types)]
6966 struct DeletePayloadSvc<T: Points>(pub Arc<T>);
6967 impl<
6968 T: Points,
6969 > tonic::server::UnaryService<super::DeletePayloadPoints>
6970 for DeletePayloadSvc<T> {
6971 type Response = super::PointsOperationResponse;
6972 type Future = BoxFuture<
6973 tonic::Response<Self::Response>,
6974 tonic::Status,
6975 >;
6976 fn call(
6977 &mut self,
6978 request: tonic::Request<super::DeletePayloadPoints>,
6979 ) -> Self::Future {
6980 let inner = Arc::clone(&self.0);
6981 let fut = async move {
6982 <T as Points>::delete_payload(&inner, request).await
6983 };
6984 Box::pin(fut)
6985 }
6986 }
6987 let accept_compression_encodings = self.accept_compression_encodings;
6988 let send_compression_encodings = self.send_compression_encodings;
6989 let max_decoding_message_size = self.max_decoding_message_size;
6990 let max_encoding_message_size = self.max_encoding_message_size;
6991 let inner = self.inner.clone();
6992 let fut = async move {
6993 let method = DeletePayloadSvc(inner);
6994 let codec = tonic_prost::ProstCodec::default();
6995 let mut grpc = tonic::server::Grpc::new(codec)
6996 .apply_compression_config(
6997 accept_compression_encodings,
6998 send_compression_encodings,
6999 )
7000 .apply_max_message_size_config(
7001 max_decoding_message_size,
7002 max_encoding_message_size,
7003 );
7004 let res = grpc.unary(method, req).await;
7005 Ok(res)
7006 };
7007 Box::pin(fut)
7008 }
7009 "/qdrant.Points/ClearPayload" => {
7010 #[allow(non_camel_case_types)]
7011 struct ClearPayloadSvc<T: Points>(pub Arc<T>);
7012 impl<
7013 T: Points,
7014 > tonic::server::UnaryService<super::ClearPayloadPoints>
7015 for ClearPayloadSvc<T> {
7016 type Response = super::PointsOperationResponse;
7017 type Future = BoxFuture<
7018 tonic::Response<Self::Response>,
7019 tonic::Status,
7020 >;
7021 fn call(
7022 &mut self,
7023 request: tonic::Request<super::ClearPayloadPoints>,
7024 ) -> Self::Future {
7025 let inner = Arc::clone(&self.0);
7026 let fut = async move {
7027 <T as Points>::clear_payload(&inner, request).await
7028 };
7029 Box::pin(fut)
7030 }
7031 }
7032 let accept_compression_encodings = self.accept_compression_encodings;
7033 let send_compression_encodings = self.send_compression_encodings;
7034 let max_decoding_message_size = self.max_decoding_message_size;
7035 let max_encoding_message_size = self.max_encoding_message_size;
7036 let inner = self.inner.clone();
7037 let fut = async move {
7038 let method = ClearPayloadSvc(inner);
7039 let codec = tonic_prost::ProstCodec::default();
7040 let mut grpc = tonic::server::Grpc::new(codec)
7041 .apply_compression_config(
7042 accept_compression_encodings,
7043 send_compression_encodings,
7044 )
7045 .apply_max_message_size_config(
7046 max_decoding_message_size,
7047 max_encoding_message_size,
7048 );
7049 let res = grpc.unary(method, req).await;
7050 Ok(res)
7051 };
7052 Box::pin(fut)
7053 }
7054 "/qdrant.Points/CreateFieldIndex" => {
7055 #[allow(non_camel_case_types)]
7056 struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
7057 impl<
7058 T: Points,
7059 > tonic::server::UnaryService<super::CreateFieldIndexCollection>
7060 for CreateFieldIndexSvc<T> {
7061 type Response = super::PointsOperationResponse;
7062 type Future = BoxFuture<
7063 tonic::Response<Self::Response>,
7064 tonic::Status,
7065 >;
7066 fn call(
7067 &mut self,
7068 request: tonic::Request<super::CreateFieldIndexCollection>,
7069 ) -> Self::Future {
7070 let inner = Arc::clone(&self.0);
7071 let fut = async move {
7072 <T as Points>::create_field_index(&inner, request).await
7073 };
7074 Box::pin(fut)
7075 }
7076 }
7077 let accept_compression_encodings = self.accept_compression_encodings;
7078 let send_compression_encodings = self.send_compression_encodings;
7079 let max_decoding_message_size = self.max_decoding_message_size;
7080 let max_encoding_message_size = self.max_encoding_message_size;
7081 let inner = self.inner.clone();
7082 let fut = async move {
7083 let method = CreateFieldIndexSvc(inner);
7084 let codec = tonic_prost::ProstCodec::default();
7085 let mut grpc = tonic::server::Grpc::new(codec)
7086 .apply_compression_config(
7087 accept_compression_encodings,
7088 send_compression_encodings,
7089 )
7090 .apply_max_message_size_config(
7091 max_decoding_message_size,
7092 max_encoding_message_size,
7093 );
7094 let res = grpc.unary(method, req).await;
7095 Ok(res)
7096 };
7097 Box::pin(fut)
7098 }
7099 "/qdrant.Points/DeleteFieldIndex" => {
7100 #[allow(non_camel_case_types)]
7101 struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
7102 impl<
7103 T: Points,
7104 > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
7105 for DeleteFieldIndexSvc<T> {
7106 type Response = super::PointsOperationResponse;
7107 type Future = BoxFuture<
7108 tonic::Response<Self::Response>,
7109 tonic::Status,
7110 >;
7111 fn call(
7112 &mut self,
7113 request: tonic::Request<super::DeleteFieldIndexCollection>,
7114 ) -> Self::Future {
7115 let inner = Arc::clone(&self.0);
7116 let fut = async move {
7117 <T as Points>::delete_field_index(&inner, request).await
7118 };
7119 Box::pin(fut)
7120 }
7121 }
7122 let accept_compression_encodings = self.accept_compression_encodings;
7123 let send_compression_encodings = self.send_compression_encodings;
7124 let max_decoding_message_size = self.max_decoding_message_size;
7125 let max_encoding_message_size = self.max_encoding_message_size;
7126 let inner = self.inner.clone();
7127 let fut = async move {
7128 let method = DeleteFieldIndexSvc(inner);
7129 let codec = tonic_prost::ProstCodec::default();
7130 let mut grpc = tonic::server::Grpc::new(codec)
7131 .apply_compression_config(
7132 accept_compression_encodings,
7133 send_compression_encodings,
7134 )
7135 .apply_max_message_size_config(
7136 max_decoding_message_size,
7137 max_encoding_message_size,
7138 );
7139 let res = grpc.unary(method, req).await;
7140 Ok(res)
7141 };
7142 Box::pin(fut)
7143 }
7144 "/qdrant.Points/Search" => {
7145 #[allow(non_camel_case_types)]
7146 struct SearchSvc<T: Points>(pub Arc<T>);
7147 impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
7148 for SearchSvc<T> {
7149 type Response = super::SearchResponse;
7150 type Future = BoxFuture<
7151 tonic::Response<Self::Response>,
7152 tonic::Status,
7153 >;
7154 fn call(
7155 &mut self,
7156 request: tonic::Request<super::SearchPoints>,
7157 ) -> Self::Future {
7158 let inner = Arc::clone(&self.0);
7159 let fut = async move {
7160 <T as Points>::search(&inner, request).await
7161 };
7162 Box::pin(fut)
7163 }
7164 }
7165 let accept_compression_encodings = self.accept_compression_encodings;
7166 let send_compression_encodings = self.send_compression_encodings;
7167 let max_decoding_message_size = self.max_decoding_message_size;
7168 let max_encoding_message_size = self.max_encoding_message_size;
7169 let inner = self.inner.clone();
7170 let fut = async move {
7171 let method = SearchSvc(inner);
7172 let codec = tonic_prost::ProstCodec::default();
7173 let mut grpc = tonic::server::Grpc::new(codec)
7174 .apply_compression_config(
7175 accept_compression_encodings,
7176 send_compression_encodings,
7177 )
7178 .apply_max_message_size_config(
7179 max_decoding_message_size,
7180 max_encoding_message_size,
7181 );
7182 let res = grpc.unary(method, req).await;
7183 Ok(res)
7184 };
7185 Box::pin(fut)
7186 }
7187 "/qdrant.Points/SearchBatch" => {
7188 #[allow(non_camel_case_types)]
7189 struct SearchBatchSvc<T: Points>(pub Arc<T>);
7190 impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
7191 for SearchBatchSvc<T> {
7192 type Response = super::SearchBatchResponse;
7193 type Future = BoxFuture<
7194 tonic::Response<Self::Response>,
7195 tonic::Status,
7196 >;
7197 fn call(
7198 &mut self,
7199 request: tonic::Request<super::SearchBatchPoints>,
7200 ) -> Self::Future {
7201 let inner = Arc::clone(&self.0);
7202 let fut = async move {
7203 <T as Points>::search_batch(&inner, request).await
7204 };
7205 Box::pin(fut)
7206 }
7207 }
7208 let accept_compression_encodings = self.accept_compression_encodings;
7209 let send_compression_encodings = self.send_compression_encodings;
7210 let max_decoding_message_size = self.max_decoding_message_size;
7211 let max_encoding_message_size = self.max_encoding_message_size;
7212 let inner = self.inner.clone();
7213 let fut = async move {
7214 let method = SearchBatchSvc(inner);
7215 let codec = tonic_prost::ProstCodec::default();
7216 let mut grpc = tonic::server::Grpc::new(codec)
7217 .apply_compression_config(
7218 accept_compression_encodings,
7219 send_compression_encodings,
7220 )
7221 .apply_max_message_size_config(
7222 max_decoding_message_size,
7223 max_encoding_message_size,
7224 );
7225 let res = grpc.unary(method, req).await;
7226 Ok(res)
7227 };
7228 Box::pin(fut)
7229 }
7230 "/qdrant.Points/SearchGroups" => {
7231 #[allow(non_camel_case_types)]
7232 struct SearchGroupsSvc<T: Points>(pub Arc<T>);
7233 impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
7234 for SearchGroupsSvc<T> {
7235 type Response = super::SearchGroupsResponse;
7236 type Future = BoxFuture<
7237 tonic::Response<Self::Response>,
7238 tonic::Status,
7239 >;
7240 fn call(
7241 &mut self,
7242 request: tonic::Request<super::SearchPointGroups>,
7243 ) -> Self::Future {
7244 let inner = Arc::clone(&self.0);
7245 let fut = async move {
7246 <T as Points>::search_groups(&inner, request).await
7247 };
7248 Box::pin(fut)
7249 }
7250 }
7251 let accept_compression_encodings = self.accept_compression_encodings;
7252 let send_compression_encodings = self.send_compression_encodings;
7253 let max_decoding_message_size = self.max_decoding_message_size;
7254 let max_encoding_message_size = self.max_encoding_message_size;
7255 let inner = self.inner.clone();
7256 let fut = async move {
7257 let method = SearchGroupsSvc(inner);
7258 let codec = tonic_prost::ProstCodec::default();
7259 let mut grpc = tonic::server::Grpc::new(codec)
7260 .apply_compression_config(
7261 accept_compression_encodings,
7262 send_compression_encodings,
7263 )
7264 .apply_max_message_size_config(
7265 max_decoding_message_size,
7266 max_encoding_message_size,
7267 );
7268 let res = grpc.unary(method, req).await;
7269 Ok(res)
7270 };
7271 Box::pin(fut)
7272 }
7273 "/qdrant.Points/Scroll" => {
7274 #[allow(non_camel_case_types)]
7275 struct ScrollSvc<T: Points>(pub Arc<T>);
7276 impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
7277 for ScrollSvc<T> {
7278 type Response = super::ScrollResponse;
7279 type Future = BoxFuture<
7280 tonic::Response<Self::Response>,
7281 tonic::Status,
7282 >;
7283 fn call(
7284 &mut self,
7285 request: tonic::Request<super::ScrollPoints>,
7286 ) -> Self::Future {
7287 let inner = Arc::clone(&self.0);
7288 let fut = async move {
7289 <T as Points>::scroll(&inner, request).await
7290 };
7291 Box::pin(fut)
7292 }
7293 }
7294 let accept_compression_encodings = self.accept_compression_encodings;
7295 let send_compression_encodings = self.send_compression_encodings;
7296 let max_decoding_message_size = self.max_decoding_message_size;
7297 let max_encoding_message_size = self.max_encoding_message_size;
7298 let inner = self.inner.clone();
7299 let fut = async move {
7300 let method = ScrollSvc(inner);
7301 let codec = tonic_prost::ProstCodec::default();
7302 let mut grpc = tonic::server::Grpc::new(codec)
7303 .apply_compression_config(
7304 accept_compression_encodings,
7305 send_compression_encodings,
7306 )
7307 .apply_max_message_size_config(
7308 max_decoding_message_size,
7309 max_encoding_message_size,
7310 );
7311 let res = grpc.unary(method, req).await;
7312 Ok(res)
7313 };
7314 Box::pin(fut)
7315 }
7316 "/qdrant.Points/Recommend" => {
7317 #[allow(non_camel_case_types)]
7318 struct RecommendSvc<T: Points>(pub Arc<T>);
7319 impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
7320 for RecommendSvc<T> {
7321 type Response = super::RecommendResponse;
7322 type Future = BoxFuture<
7323 tonic::Response<Self::Response>,
7324 tonic::Status,
7325 >;
7326 fn call(
7327 &mut self,
7328 request: tonic::Request<super::RecommendPoints>,
7329 ) -> Self::Future {
7330 let inner = Arc::clone(&self.0);
7331 let fut = async move {
7332 <T as Points>::recommend(&inner, request).await
7333 };
7334 Box::pin(fut)
7335 }
7336 }
7337 let accept_compression_encodings = self.accept_compression_encodings;
7338 let send_compression_encodings = self.send_compression_encodings;
7339 let max_decoding_message_size = self.max_decoding_message_size;
7340 let max_encoding_message_size = self.max_encoding_message_size;
7341 let inner = self.inner.clone();
7342 let fut = async move {
7343 let method = RecommendSvc(inner);
7344 let codec = tonic_prost::ProstCodec::default();
7345 let mut grpc = tonic::server::Grpc::new(codec)
7346 .apply_compression_config(
7347 accept_compression_encodings,
7348 send_compression_encodings,
7349 )
7350 .apply_max_message_size_config(
7351 max_decoding_message_size,
7352 max_encoding_message_size,
7353 );
7354 let res = grpc.unary(method, req).await;
7355 Ok(res)
7356 };
7357 Box::pin(fut)
7358 }
7359 "/qdrant.Points/RecommendBatch" => {
7360 #[allow(non_camel_case_types)]
7361 struct RecommendBatchSvc<T: Points>(pub Arc<T>);
7362 impl<
7363 T: Points,
7364 > tonic::server::UnaryService<super::RecommendBatchPoints>
7365 for RecommendBatchSvc<T> {
7366 type Response = super::RecommendBatchResponse;
7367 type Future = BoxFuture<
7368 tonic::Response<Self::Response>,
7369 tonic::Status,
7370 >;
7371 fn call(
7372 &mut self,
7373 request: tonic::Request<super::RecommendBatchPoints>,
7374 ) -> Self::Future {
7375 let inner = Arc::clone(&self.0);
7376 let fut = async move {
7377 <T as Points>::recommend_batch(&inner, request).await
7378 };
7379 Box::pin(fut)
7380 }
7381 }
7382 let accept_compression_encodings = self.accept_compression_encodings;
7383 let send_compression_encodings = self.send_compression_encodings;
7384 let max_decoding_message_size = self.max_decoding_message_size;
7385 let max_encoding_message_size = self.max_encoding_message_size;
7386 let inner = self.inner.clone();
7387 let fut = async move {
7388 let method = RecommendBatchSvc(inner);
7389 let codec = tonic_prost::ProstCodec::default();
7390 let mut grpc = tonic::server::Grpc::new(codec)
7391 .apply_compression_config(
7392 accept_compression_encodings,
7393 send_compression_encodings,
7394 )
7395 .apply_max_message_size_config(
7396 max_decoding_message_size,
7397 max_encoding_message_size,
7398 );
7399 let res = grpc.unary(method, req).await;
7400 Ok(res)
7401 };
7402 Box::pin(fut)
7403 }
7404 "/qdrant.Points/RecommendGroups" => {
7405 #[allow(non_camel_case_types)]
7406 struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
7407 impl<
7408 T: Points,
7409 > tonic::server::UnaryService<super::RecommendPointGroups>
7410 for RecommendGroupsSvc<T> {
7411 type Response = super::RecommendGroupsResponse;
7412 type Future = BoxFuture<
7413 tonic::Response<Self::Response>,
7414 tonic::Status,
7415 >;
7416 fn call(
7417 &mut self,
7418 request: tonic::Request<super::RecommendPointGroups>,
7419 ) -> Self::Future {
7420 let inner = Arc::clone(&self.0);
7421 let fut = async move {
7422 <T as Points>::recommend_groups(&inner, request).await
7423 };
7424 Box::pin(fut)
7425 }
7426 }
7427 let accept_compression_encodings = self.accept_compression_encodings;
7428 let send_compression_encodings = self.send_compression_encodings;
7429 let max_decoding_message_size = self.max_decoding_message_size;
7430 let max_encoding_message_size = self.max_encoding_message_size;
7431 let inner = self.inner.clone();
7432 let fut = async move {
7433 let method = RecommendGroupsSvc(inner);
7434 let codec = tonic_prost::ProstCodec::default();
7435 let mut grpc = tonic::server::Grpc::new(codec)
7436 .apply_compression_config(
7437 accept_compression_encodings,
7438 send_compression_encodings,
7439 )
7440 .apply_max_message_size_config(
7441 max_decoding_message_size,
7442 max_encoding_message_size,
7443 );
7444 let res = grpc.unary(method, req).await;
7445 Ok(res)
7446 };
7447 Box::pin(fut)
7448 }
7449 "/qdrant.Points/Discover" => {
7450 #[allow(non_camel_case_types)]
7451 struct DiscoverSvc<T: Points>(pub Arc<T>);
7452 impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
7453 for DiscoverSvc<T> {
7454 type Response = super::DiscoverResponse;
7455 type Future = BoxFuture<
7456 tonic::Response<Self::Response>,
7457 tonic::Status,
7458 >;
7459 fn call(
7460 &mut self,
7461 request: tonic::Request<super::DiscoverPoints>,
7462 ) -> Self::Future {
7463 let inner = Arc::clone(&self.0);
7464 let fut = async move {
7465 <T as Points>::discover(&inner, request).await
7466 };
7467 Box::pin(fut)
7468 }
7469 }
7470 let accept_compression_encodings = self.accept_compression_encodings;
7471 let send_compression_encodings = self.send_compression_encodings;
7472 let max_decoding_message_size = self.max_decoding_message_size;
7473 let max_encoding_message_size = self.max_encoding_message_size;
7474 let inner = self.inner.clone();
7475 let fut = async move {
7476 let method = DiscoverSvc(inner);
7477 let codec = tonic_prost::ProstCodec::default();
7478 let mut grpc = tonic::server::Grpc::new(codec)
7479 .apply_compression_config(
7480 accept_compression_encodings,
7481 send_compression_encodings,
7482 )
7483 .apply_max_message_size_config(
7484 max_decoding_message_size,
7485 max_encoding_message_size,
7486 );
7487 let res = grpc.unary(method, req).await;
7488 Ok(res)
7489 };
7490 Box::pin(fut)
7491 }
7492 "/qdrant.Points/DiscoverBatch" => {
7493 #[allow(non_camel_case_types)]
7494 struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
7495 impl<
7496 T: Points,
7497 > tonic::server::UnaryService<super::DiscoverBatchPoints>
7498 for DiscoverBatchSvc<T> {
7499 type Response = super::DiscoverBatchResponse;
7500 type Future = BoxFuture<
7501 tonic::Response<Self::Response>,
7502 tonic::Status,
7503 >;
7504 fn call(
7505 &mut self,
7506 request: tonic::Request<super::DiscoverBatchPoints>,
7507 ) -> Self::Future {
7508 let inner = Arc::clone(&self.0);
7509 let fut = async move {
7510 <T as Points>::discover_batch(&inner, request).await
7511 };
7512 Box::pin(fut)
7513 }
7514 }
7515 let accept_compression_encodings = self.accept_compression_encodings;
7516 let send_compression_encodings = self.send_compression_encodings;
7517 let max_decoding_message_size = self.max_decoding_message_size;
7518 let max_encoding_message_size = self.max_encoding_message_size;
7519 let inner = self.inner.clone();
7520 let fut = async move {
7521 let method = DiscoverBatchSvc(inner);
7522 let codec = tonic_prost::ProstCodec::default();
7523 let mut grpc = tonic::server::Grpc::new(codec)
7524 .apply_compression_config(
7525 accept_compression_encodings,
7526 send_compression_encodings,
7527 )
7528 .apply_max_message_size_config(
7529 max_decoding_message_size,
7530 max_encoding_message_size,
7531 );
7532 let res = grpc.unary(method, req).await;
7533 Ok(res)
7534 };
7535 Box::pin(fut)
7536 }
7537 "/qdrant.Points/Count" => {
7538 #[allow(non_camel_case_types)]
7539 struct CountSvc<T: Points>(pub Arc<T>);
7540 impl<T: Points> tonic::server::UnaryService<super::CountPoints>
7541 for CountSvc<T> {
7542 type Response = super::CountResponse;
7543 type Future = BoxFuture<
7544 tonic::Response<Self::Response>,
7545 tonic::Status,
7546 >;
7547 fn call(
7548 &mut self,
7549 request: tonic::Request<super::CountPoints>,
7550 ) -> Self::Future {
7551 let inner = Arc::clone(&self.0);
7552 let fut = async move {
7553 <T as Points>::count(&inner, request).await
7554 };
7555 Box::pin(fut)
7556 }
7557 }
7558 let accept_compression_encodings = self.accept_compression_encodings;
7559 let send_compression_encodings = self.send_compression_encodings;
7560 let max_decoding_message_size = self.max_decoding_message_size;
7561 let max_encoding_message_size = self.max_encoding_message_size;
7562 let inner = self.inner.clone();
7563 let fut = async move {
7564 let method = CountSvc(inner);
7565 let codec = tonic_prost::ProstCodec::default();
7566 let mut grpc = tonic::server::Grpc::new(codec)
7567 .apply_compression_config(
7568 accept_compression_encodings,
7569 send_compression_encodings,
7570 )
7571 .apply_max_message_size_config(
7572 max_decoding_message_size,
7573 max_encoding_message_size,
7574 );
7575 let res = grpc.unary(method, req).await;
7576 Ok(res)
7577 };
7578 Box::pin(fut)
7579 }
7580 "/qdrant.Points/UpdateBatch" => {
7581 #[allow(non_camel_case_types)]
7582 struct UpdateBatchSvc<T: Points>(pub Arc<T>);
7583 impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
7584 for UpdateBatchSvc<T> {
7585 type Response = super::UpdateBatchResponse;
7586 type Future = BoxFuture<
7587 tonic::Response<Self::Response>,
7588 tonic::Status,
7589 >;
7590 fn call(
7591 &mut self,
7592 request: tonic::Request<super::UpdateBatchPoints>,
7593 ) -> Self::Future {
7594 let inner = Arc::clone(&self.0);
7595 let fut = async move {
7596 <T as Points>::update_batch(&inner, request).await
7597 };
7598 Box::pin(fut)
7599 }
7600 }
7601 let accept_compression_encodings = self.accept_compression_encodings;
7602 let send_compression_encodings = self.send_compression_encodings;
7603 let max_decoding_message_size = self.max_decoding_message_size;
7604 let max_encoding_message_size = self.max_encoding_message_size;
7605 let inner = self.inner.clone();
7606 let fut = async move {
7607 let method = UpdateBatchSvc(inner);
7608 let codec = tonic_prost::ProstCodec::default();
7609 let mut grpc = tonic::server::Grpc::new(codec)
7610 .apply_compression_config(
7611 accept_compression_encodings,
7612 send_compression_encodings,
7613 )
7614 .apply_max_message_size_config(
7615 max_decoding_message_size,
7616 max_encoding_message_size,
7617 );
7618 let res = grpc.unary(method, req).await;
7619 Ok(res)
7620 };
7621 Box::pin(fut)
7622 }
7623 "/qdrant.Points/Query" => {
7624 #[allow(non_camel_case_types)]
7625 struct QuerySvc<T: Points>(pub Arc<T>);
7626 impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
7627 for QuerySvc<T> {
7628 type Response = super::QueryResponse;
7629 type Future = BoxFuture<
7630 tonic::Response<Self::Response>,
7631 tonic::Status,
7632 >;
7633 fn call(
7634 &mut self,
7635 request: tonic::Request<super::QueryPoints>,
7636 ) -> Self::Future {
7637 let inner = Arc::clone(&self.0);
7638 let fut = async move {
7639 <T as Points>::query(&inner, request).await
7640 };
7641 Box::pin(fut)
7642 }
7643 }
7644 let accept_compression_encodings = self.accept_compression_encodings;
7645 let send_compression_encodings = self.send_compression_encodings;
7646 let max_decoding_message_size = self.max_decoding_message_size;
7647 let max_encoding_message_size = self.max_encoding_message_size;
7648 let inner = self.inner.clone();
7649 let fut = async move {
7650 let method = QuerySvc(inner);
7651 let codec = tonic_prost::ProstCodec::default();
7652 let mut grpc = tonic::server::Grpc::new(codec)
7653 .apply_compression_config(
7654 accept_compression_encodings,
7655 send_compression_encodings,
7656 )
7657 .apply_max_message_size_config(
7658 max_decoding_message_size,
7659 max_encoding_message_size,
7660 );
7661 let res = grpc.unary(method, req).await;
7662 Ok(res)
7663 };
7664 Box::pin(fut)
7665 }
7666 "/qdrant.Points/QueryBatch" => {
7667 #[allow(non_camel_case_types)]
7668 struct QueryBatchSvc<T: Points>(pub Arc<T>);
7669 impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
7670 for QueryBatchSvc<T> {
7671 type Response = super::QueryBatchResponse;
7672 type Future = BoxFuture<
7673 tonic::Response<Self::Response>,
7674 tonic::Status,
7675 >;
7676 fn call(
7677 &mut self,
7678 request: tonic::Request<super::QueryBatchPoints>,
7679 ) -> Self::Future {
7680 let inner = Arc::clone(&self.0);
7681 let fut = async move {
7682 <T as Points>::query_batch(&inner, request).await
7683 };
7684 Box::pin(fut)
7685 }
7686 }
7687 let accept_compression_encodings = self.accept_compression_encodings;
7688 let send_compression_encodings = self.send_compression_encodings;
7689 let max_decoding_message_size = self.max_decoding_message_size;
7690 let max_encoding_message_size = self.max_encoding_message_size;
7691 let inner = self.inner.clone();
7692 let fut = async move {
7693 let method = QueryBatchSvc(inner);
7694 let codec = tonic_prost::ProstCodec::default();
7695 let mut grpc = tonic::server::Grpc::new(codec)
7696 .apply_compression_config(
7697 accept_compression_encodings,
7698 send_compression_encodings,
7699 )
7700 .apply_max_message_size_config(
7701 max_decoding_message_size,
7702 max_encoding_message_size,
7703 );
7704 let res = grpc.unary(method, req).await;
7705 Ok(res)
7706 };
7707 Box::pin(fut)
7708 }
7709 "/qdrant.Points/QueryGroups" => {
7710 #[allow(non_camel_case_types)]
7711 struct QueryGroupsSvc<T: Points>(pub Arc<T>);
7712 impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
7713 for QueryGroupsSvc<T> {
7714 type Response = super::QueryGroupsResponse;
7715 type Future = BoxFuture<
7716 tonic::Response<Self::Response>,
7717 tonic::Status,
7718 >;
7719 fn call(
7720 &mut self,
7721 request: tonic::Request<super::QueryPointGroups>,
7722 ) -> Self::Future {
7723 let inner = Arc::clone(&self.0);
7724 let fut = async move {
7725 <T as Points>::query_groups(&inner, request).await
7726 };
7727 Box::pin(fut)
7728 }
7729 }
7730 let accept_compression_encodings = self.accept_compression_encodings;
7731 let send_compression_encodings = self.send_compression_encodings;
7732 let max_decoding_message_size = self.max_decoding_message_size;
7733 let max_encoding_message_size = self.max_encoding_message_size;
7734 let inner = self.inner.clone();
7735 let fut = async move {
7736 let method = QueryGroupsSvc(inner);
7737 let codec = tonic_prost::ProstCodec::default();
7738 let mut grpc = tonic::server::Grpc::new(codec)
7739 .apply_compression_config(
7740 accept_compression_encodings,
7741 send_compression_encodings,
7742 )
7743 .apply_max_message_size_config(
7744 max_decoding_message_size,
7745 max_encoding_message_size,
7746 );
7747 let res = grpc.unary(method, req).await;
7748 Ok(res)
7749 };
7750 Box::pin(fut)
7751 }
7752 "/qdrant.Points/Facet" => {
7753 #[allow(non_camel_case_types)]
7754 struct FacetSvc<T: Points>(pub Arc<T>);
7755 impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
7756 for FacetSvc<T> {
7757 type Response = super::FacetResponse;
7758 type Future = BoxFuture<
7759 tonic::Response<Self::Response>,
7760 tonic::Status,
7761 >;
7762 fn call(
7763 &mut self,
7764 request: tonic::Request<super::FacetCounts>,
7765 ) -> Self::Future {
7766 let inner = Arc::clone(&self.0);
7767 let fut = async move {
7768 <T as Points>::facet(&inner, request).await
7769 };
7770 Box::pin(fut)
7771 }
7772 }
7773 let accept_compression_encodings = self.accept_compression_encodings;
7774 let send_compression_encodings = self.send_compression_encodings;
7775 let max_decoding_message_size = self.max_decoding_message_size;
7776 let max_encoding_message_size = self.max_encoding_message_size;
7777 let inner = self.inner.clone();
7778 let fut = async move {
7779 let method = FacetSvc(inner);
7780 let codec = tonic_prost::ProstCodec::default();
7781 let mut grpc = tonic::server::Grpc::new(codec)
7782 .apply_compression_config(
7783 accept_compression_encodings,
7784 send_compression_encodings,
7785 )
7786 .apply_max_message_size_config(
7787 max_decoding_message_size,
7788 max_encoding_message_size,
7789 );
7790 let res = grpc.unary(method, req).await;
7791 Ok(res)
7792 };
7793 Box::pin(fut)
7794 }
7795 "/qdrant.Points/SearchMatrixPairs" => {
7796 #[allow(non_camel_case_types)]
7797 struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
7798 impl<
7799 T: Points,
7800 > tonic::server::UnaryService<super::SearchMatrixPoints>
7801 for SearchMatrixPairsSvc<T> {
7802 type Response = super::SearchMatrixPairsResponse;
7803 type Future = BoxFuture<
7804 tonic::Response<Self::Response>,
7805 tonic::Status,
7806 >;
7807 fn call(
7808 &mut self,
7809 request: tonic::Request<super::SearchMatrixPoints>,
7810 ) -> Self::Future {
7811 let inner = Arc::clone(&self.0);
7812 let fut = async move {
7813 <T as Points>::search_matrix_pairs(&inner, request).await
7814 };
7815 Box::pin(fut)
7816 }
7817 }
7818 let accept_compression_encodings = self.accept_compression_encodings;
7819 let send_compression_encodings = self.send_compression_encodings;
7820 let max_decoding_message_size = self.max_decoding_message_size;
7821 let max_encoding_message_size = self.max_encoding_message_size;
7822 let inner = self.inner.clone();
7823 let fut = async move {
7824 let method = SearchMatrixPairsSvc(inner);
7825 let codec = tonic_prost::ProstCodec::default();
7826 let mut grpc = tonic::server::Grpc::new(codec)
7827 .apply_compression_config(
7828 accept_compression_encodings,
7829 send_compression_encodings,
7830 )
7831 .apply_max_message_size_config(
7832 max_decoding_message_size,
7833 max_encoding_message_size,
7834 );
7835 let res = grpc.unary(method, req).await;
7836 Ok(res)
7837 };
7838 Box::pin(fut)
7839 }
7840 "/qdrant.Points/SearchMatrixOffsets" => {
7841 #[allow(non_camel_case_types)]
7842 struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
7843 impl<
7844 T: Points,
7845 > tonic::server::UnaryService<super::SearchMatrixPoints>
7846 for SearchMatrixOffsetsSvc<T> {
7847 type Response = super::SearchMatrixOffsetsResponse;
7848 type Future = BoxFuture<
7849 tonic::Response<Self::Response>,
7850 tonic::Status,
7851 >;
7852 fn call(
7853 &mut self,
7854 request: tonic::Request<super::SearchMatrixPoints>,
7855 ) -> Self::Future {
7856 let inner = Arc::clone(&self.0);
7857 let fut = async move {
7858 <T as Points>::search_matrix_offsets(&inner, request).await
7859 };
7860 Box::pin(fut)
7861 }
7862 }
7863 let accept_compression_encodings = self.accept_compression_encodings;
7864 let send_compression_encodings = self.send_compression_encodings;
7865 let max_decoding_message_size = self.max_decoding_message_size;
7866 let max_encoding_message_size = self.max_encoding_message_size;
7867 let inner = self.inner.clone();
7868 let fut = async move {
7869 let method = SearchMatrixOffsetsSvc(inner);
7870 let codec = tonic_prost::ProstCodec::default();
7871 let mut grpc = tonic::server::Grpc::new(codec)
7872 .apply_compression_config(
7873 accept_compression_encodings,
7874 send_compression_encodings,
7875 )
7876 .apply_max_message_size_config(
7877 max_decoding_message_size,
7878 max_encoding_message_size,
7879 );
7880 let res = grpc.unary(method, req).await;
7881 Ok(res)
7882 };
7883 Box::pin(fut)
7884 }
7885 _ => {
7886 Box::pin(async move {
7887 let mut response = http::Response::new(
7888 tonic::body::Body::default(),
7889 );
7890 let headers = response.headers_mut();
7891 headers
7892 .insert(
7893 tonic::Status::GRPC_STATUS,
7894 (tonic::Code::Unimplemented as i32).into(),
7895 );
7896 headers
7897 .insert(
7898 http::header::CONTENT_TYPE,
7899 tonic::metadata::GRPC_CONTENT_TYPE,
7900 );
7901 Ok(response)
7902 })
7903 }
7904 }
7905 }
7906 }
7907 impl<T> Clone for PointsServer<T> {
7908 fn clone(&self) -> Self {
7909 let inner = self.inner.clone();
7910 Self {
7911 inner,
7912 accept_compression_encodings: self.accept_compression_encodings,
7913 send_compression_encodings: self.send_compression_encodings,
7914 max_decoding_message_size: self.max_decoding_message_size,
7915 max_encoding_message_size: self.max_encoding_message_size,
7916 }
7917 }
7918 }
7919 pub const SERVICE_NAME: &str = "qdrant.Points";
7921 impl<T> tonic::server::NamedService for PointsServer<T> {
7922 const NAME: &'static str = SERVICE_NAME;
7923 }
7924}
7925#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7926pub struct CreateFullSnapshotRequest {}
7927#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7928pub struct ListFullSnapshotsRequest {}
7929#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7930pub struct DeleteFullSnapshotRequest {
7931 #[prost(string, tag = "1")]
7933 pub snapshot_name: ::prost::alloc::string::String,
7934}
7935#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7936pub struct CreateSnapshotRequest {
7937 #[prost(string, tag = "1")]
7939 pub collection_name: ::prost::alloc::string::String,
7940}
7941#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7942pub struct ListSnapshotsRequest {
7943 #[prost(string, tag = "1")]
7945 pub collection_name: ::prost::alloc::string::String,
7946}
7947#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7948pub struct DeleteSnapshotRequest {
7949 #[prost(string, tag = "1")]
7951 pub collection_name: ::prost::alloc::string::String,
7952 #[prost(string, tag = "2")]
7954 pub snapshot_name: ::prost::alloc::string::String,
7955}
7956#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7957pub struct SnapshotDescription {
7958 #[prost(string, tag = "1")]
7960 pub name: ::prost::alloc::string::String,
7961 #[prost(message, optional, tag = "2")]
7963 pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
7964 #[prost(int64, tag = "3")]
7966 pub size: i64,
7967 #[prost(string, optional, tag = "4")]
7969 pub checksum: ::core::option::Option<::prost::alloc::string::String>,
7970}
7971#[derive(Clone, PartialEq, ::prost::Message)]
7972pub struct CreateSnapshotResponse {
7973 #[prost(message, optional, tag = "1")]
7974 pub snapshot_description: ::core::option::Option<SnapshotDescription>,
7975 #[prost(double, tag = "2")]
7977 pub time: f64,
7978}
7979#[derive(Clone, PartialEq, ::prost::Message)]
7980pub struct ListSnapshotsResponse {
7981 #[prost(message, repeated, tag = "1")]
7982 pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
7983 #[prost(double, tag = "2")]
7985 pub time: f64,
7986}
7987#[derive(Clone, Copy, PartialEq, ::prost::Message)]
7988pub struct DeleteSnapshotResponse {
7989 #[prost(double, tag = "1")]
7991 pub time: f64,
7992}
7993pub mod snapshots_client {
7995 #![allow(
7996 unused_variables,
7997 dead_code,
7998 missing_docs,
7999 clippy::wildcard_imports,
8000 clippy::let_unit_value,
8001 )]
8002 use tonic::codegen::*;
8003 use tonic::codegen::http::Uri;
8004 #[derive(Debug, Clone)]
8005 pub struct SnapshotsClient<T> {
8006 inner: tonic::client::Grpc<T>,
8007 }
8008 impl SnapshotsClient<tonic::transport::Channel> {
8009 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8011 where
8012 D: TryInto<tonic::transport::Endpoint>,
8013 D::Error: Into<StdError>,
8014 {
8015 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8016 Ok(Self::new(conn))
8017 }
8018 }
8019 impl<T> SnapshotsClient<T>
8020 where
8021 T: tonic::client::GrpcService<tonic::body::Body>,
8022 T::Error: Into<StdError>,
8023 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8024 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8025 {
8026 pub fn new(inner: T) -> Self {
8027 let inner = tonic::client::Grpc::new(inner);
8028 Self { inner }
8029 }
8030 pub fn with_origin(inner: T, origin: Uri) -> Self {
8031 let inner = tonic::client::Grpc::with_origin(inner, origin);
8032 Self { inner }
8033 }
8034 pub fn with_interceptor<F>(
8035 inner: T,
8036 interceptor: F,
8037 ) -> SnapshotsClient<InterceptedService<T, F>>
8038 where
8039 F: tonic::service::Interceptor,
8040 T::ResponseBody: Default,
8041 T: tonic::codegen::Service<
8042 http::Request<tonic::body::Body>,
8043 Response = http::Response<
8044 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
8045 >,
8046 >,
8047 <T as tonic::codegen::Service<
8048 http::Request<tonic::body::Body>,
8049 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8050 {
8051 SnapshotsClient::new(InterceptedService::new(inner, interceptor))
8052 }
8053 #[must_use]
8058 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8059 self.inner = self.inner.send_compressed(encoding);
8060 self
8061 }
8062 #[must_use]
8064 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8065 self.inner = self.inner.accept_compressed(encoding);
8066 self
8067 }
8068 #[must_use]
8072 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8073 self.inner = self.inner.max_decoding_message_size(limit);
8074 self
8075 }
8076 #[must_use]
8080 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8081 self.inner = self.inner.max_encoding_message_size(limit);
8082 self
8083 }
8084 pub async fn create(
8086 &mut self,
8087 request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
8088 ) -> std::result::Result<
8089 tonic::Response<super::CreateSnapshotResponse>,
8090 tonic::Status,
8091 > {
8092 self.inner
8093 .ready()
8094 .await
8095 .map_err(|e| {
8096 tonic::Status::unknown(
8097 format!("Service was not ready: {}", e.into()),
8098 )
8099 })?;
8100 let codec = tonic_prost::ProstCodec::default();
8101 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
8102 let mut req = request.into_request();
8103 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
8104 self.inner.unary(req, path, codec).await
8105 }
8106 pub async fn list(
8108 &mut self,
8109 request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
8110 ) -> std::result::Result<
8111 tonic::Response<super::ListSnapshotsResponse>,
8112 tonic::Status,
8113 > {
8114 self.inner
8115 .ready()
8116 .await
8117 .map_err(|e| {
8118 tonic::Status::unknown(
8119 format!("Service was not ready: {}", e.into()),
8120 )
8121 })?;
8122 let codec = tonic_prost::ProstCodec::default();
8123 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
8124 let mut req = request.into_request();
8125 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
8126 self.inner.unary(req, path, codec).await
8127 }
8128 pub async fn delete(
8130 &mut self,
8131 request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
8132 ) -> std::result::Result<
8133 tonic::Response<super::DeleteSnapshotResponse>,
8134 tonic::Status,
8135 > {
8136 self.inner
8137 .ready()
8138 .await
8139 .map_err(|e| {
8140 tonic::Status::unknown(
8141 format!("Service was not ready: {}", e.into()),
8142 )
8143 })?;
8144 let codec = tonic_prost::ProstCodec::default();
8145 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
8146 let mut req = request.into_request();
8147 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
8148 self.inner.unary(req, path, codec).await
8149 }
8150 pub async fn create_full(
8152 &mut self,
8153 request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
8154 ) -> std::result::Result<
8155 tonic::Response<super::CreateSnapshotResponse>,
8156 tonic::Status,
8157 > {
8158 self.inner
8159 .ready()
8160 .await
8161 .map_err(|e| {
8162 tonic::Status::unknown(
8163 format!("Service was not ready: {}", e.into()),
8164 )
8165 })?;
8166 let codec = tonic_prost::ProstCodec::default();
8167 let path = http::uri::PathAndQuery::from_static(
8168 "/qdrant.Snapshots/CreateFull",
8169 );
8170 let mut req = request.into_request();
8171 req.extensions_mut()
8172 .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
8173 self.inner.unary(req, path, codec).await
8174 }
8175 pub async fn list_full(
8177 &mut self,
8178 request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
8179 ) -> std::result::Result<
8180 tonic::Response<super::ListSnapshotsResponse>,
8181 tonic::Status,
8182 > {
8183 self.inner
8184 .ready()
8185 .await
8186 .map_err(|e| {
8187 tonic::Status::unknown(
8188 format!("Service was not ready: {}", e.into()),
8189 )
8190 })?;
8191 let codec = tonic_prost::ProstCodec::default();
8192 let path = http::uri::PathAndQuery::from_static(
8193 "/qdrant.Snapshots/ListFull",
8194 );
8195 let mut req = request.into_request();
8196 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
8197 self.inner.unary(req, path, codec).await
8198 }
8199 pub async fn delete_full(
8201 &mut self,
8202 request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
8203 ) -> std::result::Result<
8204 tonic::Response<super::DeleteSnapshotResponse>,
8205 tonic::Status,
8206 > {
8207 self.inner
8208 .ready()
8209 .await
8210 .map_err(|e| {
8211 tonic::Status::unknown(
8212 format!("Service was not ready: {}", e.into()),
8213 )
8214 })?;
8215 let codec = tonic_prost::ProstCodec::default();
8216 let path = http::uri::PathAndQuery::from_static(
8217 "/qdrant.Snapshots/DeleteFull",
8218 );
8219 let mut req = request.into_request();
8220 req.extensions_mut()
8221 .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
8222 self.inner.unary(req, path, codec).await
8223 }
8224 }
8225}
8226pub mod snapshots_server {
8228 #![allow(
8229 unused_variables,
8230 dead_code,
8231 missing_docs,
8232 clippy::wildcard_imports,
8233 clippy::let_unit_value,
8234 )]
8235 use tonic::codegen::*;
8236 #[async_trait]
8238 pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
8239 async fn create(
8241 &self,
8242 request: tonic::Request<super::CreateSnapshotRequest>,
8243 ) -> std::result::Result<
8244 tonic::Response<super::CreateSnapshotResponse>,
8245 tonic::Status,
8246 >;
8247 async fn list(
8249 &self,
8250 request: tonic::Request<super::ListSnapshotsRequest>,
8251 ) -> std::result::Result<
8252 tonic::Response<super::ListSnapshotsResponse>,
8253 tonic::Status,
8254 >;
8255 async fn delete(
8257 &self,
8258 request: tonic::Request<super::DeleteSnapshotRequest>,
8259 ) -> std::result::Result<
8260 tonic::Response<super::DeleteSnapshotResponse>,
8261 tonic::Status,
8262 >;
8263 async fn create_full(
8265 &self,
8266 request: tonic::Request<super::CreateFullSnapshotRequest>,
8267 ) -> std::result::Result<
8268 tonic::Response<super::CreateSnapshotResponse>,
8269 tonic::Status,
8270 >;
8271 async fn list_full(
8273 &self,
8274 request: tonic::Request<super::ListFullSnapshotsRequest>,
8275 ) -> std::result::Result<
8276 tonic::Response<super::ListSnapshotsResponse>,
8277 tonic::Status,
8278 >;
8279 async fn delete_full(
8281 &self,
8282 request: tonic::Request<super::DeleteFullSnapshotRequest>,
8283 ) -> std::result::Result<
8284 tonic::Response<super::DeleteSnapshotResponse>,
8285 tonic::Status,
8286 >;
8287 }
8288 #[derive(Debug)]
8289 pub struct SnapshotsServer<T> {
8290 inner: Arc<T>,
8291 accept_compression_encodings: EnabledCompressionEncodings,
8292 send_compression_encodings: EnabledCompressionEncodings,
8293 max_decoding_message_size: Option<usize>,
8294 max_encoding_message_size: Option<usize>,
8295 }
8296 impl<T> SnapshotsServer<T> {
8297 pub fn new(inner: T) -> Self {
8298 Self::from_arc(Arc::new(inner))
8299 }
8300 pub fn from_arc(inner: Arc<T>) -> Self {
8301 Self {
8302 inner,
8303 accept_compression_encodings: Default::default(),
8304 send_compression_encodings: Default::default(),
8305 max_decoding_message_size: None,
8306 max_encoding_message_size: None,
8307 }
8308 }
8309 pub fn with_interceptor<F>(
8310 inner: T,
8311 interceptor: F,
8312 ) -> InterceptedService<Self, F>
8313 where
8314 F: tonic::service::Interceptor,
8315 {
8316 InterceptedService::new(Self::new(inner), interceptor)
8317 }
8318 #[must_use]
8320 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8321 self.accept_compression_encodings.enable(encoding);
8322 self
8323 }
8324 #[must_use]
8326 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8327 self.send_compression_encodings.enable(encoding);
8328 self
8329 }
8330 #[must_use]
8334 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8335 self.max_decoding_message_size = Some(limit);
8336 self
8337 }
8338 #[must_use]
8342 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8343 self.max_encoding_message_size = Some(limit);
8344 self
8345 }
8346 }
8347 impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
8348 where
8349 T: Snapshots,
8350 B: Body + std::marker::Send + 'static,
8351 B::Error: Into<StdError> + std::marker::Send + 'static,
8352 {
8353 type Response = http::Response<tonic::body::Body>;
8354 type Error = std::convert::Infallible;
8355 type Future = BoxFuture<Self::Response, Self::Error>;
8356 fn poll_ready(
8357 &mut self,
8358 _cx: &mut Context<'_>,
8359 ) -> Poll<std::result::Result<(), Self::Error>> {
8360 Poll::Ready(Ok(()))
8361 }
8362 fn call(&mut self, req: http::Request<B>) -> Self::Future {
8363 match req.uri().path() {
8364 "/qdrant.Snapshots/Create" => {
8365 #[allow(non_camel_case_types)]
8366 struct CreateSvc<T: Snapshots>(pub Arc<T>);
8367 impl<
8368 T: Snapshots,
8369 > tonic::server::UnaryService<super::CreateSnapshotRequest>
8370 for CreateSvc<T> {
8371 type Response = super::CreateSnapshotResponse;
8372 type Future = BoxFuture<
8373 tonic::Response<Self::Response>,
8374 tonic::Status,
8375 >;
8376 fn call(
8377 &mut self,
8378 request: tonic::Request<super::CreateSnapshotRequest>,
8379 ) -> Self::Future {
8380 let inner = Arc::clone(&self.0);
8381 let fut = async move {
8382 <T as Snapshots>::create(&inner, request).await
8383 };
8384 Box::pin(fut)
8385 }
8386 }
8387 let accept_compression_encodings = self.accept_compression_encodings;
8388 let send_compression_encodings = self.send_compression_encodings;
8389 let max_decoding_message_size = self.max_decoding_message_size;
8390 let max_encoding_message_size = self.max_encoding_message_size;
8391 let inner = self.inner.clone();
8392 let fut = async move {
8393 let method = CreateSvc(inner);
8394 let codec = tonic_prost::ProstCodec::default();
8395 let mut grpc = tonic::server::Grpc::new(codec)
8396 .apply_compression_config(
8397 accept_compression_encodings,
8398 send_compression_encodings,
8399 )
8400 .apply_max_message_size_config(
8401 max_decoding_message_size,
8402 max_encoding_message_size,
8403 );
8404 let res = grpc.unary(method, req).await;
8405 Ok(res)
8406 };
8407 Box::pin(fut)
8408 }
8409 "/qdrant.Snapshots/List" => {
8410 #[allow(non_camel_case_types)]
8411 struct ListSvc<T: Snapshots>(pub Arc<T>);
8412 impl<
8413 T: Snapshots,
8414 > tonic::server::UnaryService<super::ListSnapshotsRequest>
8415 for ListSvc<T> {
8416 type Response = super::ListSnapshotsResponse;
8417 type Future = BoxFuture<
8418 tonic::Response<Self::Response>,
8419 tonic::Status,
8420 >;
8421 fn call(
8422 &mut self,
8423 request: tonic::Request<super::ListSnapshotsRequest>,
8424 ) -> Self::Future {
8425 let inner = Arc::clone(&self.0);
8426 let fut = async move {
8427 <T as Snapshots>::list(&inner, request).await
8428 };
8429 Box::pin(fut)
8430 }
8431 }
8432 let accept_compression_encodings = self.accept_compression_encodings;
8433 let send_compression_encodings = self.send_compression_encodings;
8434 let max_decoding_message_size = self.max_decoding_message_size;
8435 let max_encoding_message_size = self.max_encoding_message_size;
8436 let inner = self.inner.clone();
8437 let fut = async move {
8438 let method = ListSvc(inner);
8439 let codec = tonic_prost::ProstCodec::default();
8440 let mut grpc = tonic::server::Grpc::new(codec)
8441 .apply_compression_config(
8442 accept_compression_encodings,
8443 send_compression_encodings,
8444 )
8445 .apply_max_message_size_config(
8446 max_decoding_message_size,
8447 max_encoding_message_size,
8448 );
8449 let res = grpc.unary(method, req).await;
8450 Ok(res)
8451 };
8452 Box::pin(fut)
8453 }
8454 "/qdrant.Snapshots/Delete" => {
8455 #[allow(non_camel_case_types)]
8456 struct DeleteSvc<T: Snapshots>(pub Arc<T>);
8457 impl<
8458 T: Snapshots,
8459 > tonic::server::UnaryService<super::DeleteSnapshotRequest>
8460 for DeleteSvc<T> {
8461 type Response = super::DeleteSnapshotResponse;
8462 type Future = BoxFuture<
8463 tonic::Response<Self::Response>,
8464 tonic::Status,
8465 >;
8466 fn call(
8467 &mut self,
8468 request: tonic::Request<super::DeleteSnapshotRequest>,
8469 ) -> Self::Future {
8470 let inner = Arc::clone(&self.0);
8471 let fut = async move {
8472 <T as Snapshots>::delete(&inner, request).await
8473 };
8474 Box::pin(fut)
8475 }
8476 }
8477 let accept_compression_encodings = self.accept_compression_encodings;
8478 let send_compression_encodings = self.send_compression_encodings;
8479 let max_decoding_message_size = self.max_decoding_message_size;
8480 let max_encoding_message_size = self.max_encoding_message_size;
8481 let inner = self.inner.clone();
8482 let fut = async move {
8483 let method = DeleteSvc(inner);
8484 let codec = tonic_prost::ProstCodec::default();
8485 let mut grpc = tonic::server::Grpc::new(codec)
8486 .apply_compression_config(
8487 accept_compression_encodings,
8488 send_compression_encodings,
8489 )
8490 .apply_max_message_size_config(
8491 max_decoding_message_size,
8492 max_encoding_message_size,
8493 );
8494 let res = grpc.unary(method, req).await;
8495 Ok(res)
8496 };
8497 Box::pin(fut)
8498 }
8499 "/qdrant.Snapshots/CreateFull" => {
8500 #[allow(non_camel_case_types)]
8501 struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
8502 impl<
8503 T: Snapshots,
8504 > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
8505 for CreateFullSvc<T> {
8506 type Response = super::CreateSnapshotResponse;
8507 type Future = BoxFuture<
8508 tonic::Response<Self::Response>,
8509 tonic::Status,
8510 >;
8511 fn call(
8512 &mut self,
8513 request: tonic::Request<super::CreateFullSnapshotRequest>,
8514 ) -> Self::Future {
8515 let inner = Arc::clone(&self.0);
8516 let fut = async move {
8517 <T as Snapshots>::create_full(&inner, request).await
8518 };
8519 Box::pin(fut)
8520 }
8521 }
8522 let accept_compression_encodings = self.accept_compression_encodings;
8523 let send_compression_encodings = self.send_compression_encodings;
8524 let max_decoding_message_size = self.max_decoding_message_size;
8525 let max_encoding_message_size = self.max_encoding_message_size;
8526 let inner = self.inner.clone();
8527 let fut = async move {
8528 let method = CreateFullSvc(inner);
8529 let codec = tonic_prost::ProstCodec::default();
8530 let mut grpc = tonic::server::Grpc::new(codec)
8531 .apply_compression_config(
8532 accept_compression_encodings,
8533 send_compression_encodings,
8534 )
8535 .apply_max_message_size_config(
8536 max_decoding_message_size,
8537 max_encoding_message_size,
8538 );
8539 let res = grpc.unary(method, req).await;
8540 Ok(res)
8541 };
8542 Box::pin(fut)
8543 }
8544 "/qdrant.Snapshots/ListFull" => {
8545 #[allow(non_camel_case_types)]
8546 struct ListFullSvc<T: Snapshots>(pub Arc<T>);
8547 impl<
8548 T: Snapshots,
8549 > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
8550 for ListFullSvc<T> {
8551 type Response = super::ListSnapshotsResponse;
8552 type Future = BoxFuture<
8553 tonic::Response<Self::Response>,
8554 tonic::Status,
8555 >;
8556 fn call(
8557 &mut self,
8558 request: tonic::Request<super::ListFullSnapshotsRequest>,
8559 ) -> Self::Future {
8560 let inner = Arc::clone(&self.0);
8561 let fut = async move {
8562 <T as Snapshots>::list_full(&inner, request).await
8563 };
8564 Box::pin(fut)
8565 }
8566 }
8567 let accept_compression_encodings = self.accept_compression_encodings;
8568 let send_compression_encodings = self.send_compression_encodings;
8569 let max_decoding_message_size = self.max_decoding_message_size;
8570 let max_encoding_message_size = self.max_encoding_message_size;
8571 let inner = self.inner.clone();
8572 let fut = async move {
8573 let method = ListFullSvc(inner);
8574 let codec = tonic_prost::ProstCodec::default();
8575 let mut grpc = tonic::server::Grpc::new(codec)
8576 .apply_compression_config(
8577 accept_compression_encodings,
8578 send_compression_encodings,
8579 )
8580 .apply_max_message_size_config(
8581 max_decoding_message_size,
8582 max_encoding_message_size,
8583 );
8584 let res = grpc.unary(method, req).await;
8585 Ok(res)
8586 };
8587 Box::pin(fut)
8588 }
8589 "/qdrant.Snapshots/DeleteFull" => {
8590 #[allow(non_camel_case_types)]
8591 struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
8592 impl<
8593 T: Snapshots,
8594 > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
8595 for DeleteFullSvc<T> {
8596 type Response = super::DeleteSnapshotResponse;
8597 type Future = BoxFuture<
8598 tonic::Response<Self::Response>,
8599 tonic::Status,
8600 >;
8601 fn call(
8602 &mut self,
8603 request: tonic::Request<super::DeleteFullSnapshotRequest>,
8604 ) -> Self::Future {
8605 let inner = Arc::clone(&self.0);
8606 let fut = async move {
8607 <T as Snapshots>::delete_full(&inner, request).await
8608 };
8609 Box::pin(fut)
8610 }
8611 }
8612 let accept_compression_encodings = self.accept_compression_encodings;
8613 let send_compression_encodings = self.send_compression_encodings;
8614 let max_decoding_message_size = self.max_decoding_message_size;
8615 let max_encoding_message_size = self.max_encoding_message_size;
8616 let inner = self.inner.clone();
8617 let fut = async move {
8618 let method = DeleteFullSvc(inner);
8619 let codec = tonic_prost::ProstCodec::default();
8620 let mut grpc = tonic::server::Grpc::new(codec)
8621 .apply_compression_config(
8622 accept_compression_encodings,
8623 send_compression_encodings,
8624 )
8625 .apply_max_message_size_config(
8626 max_decoding_message_size,
8627 max_encoding_message_size,
8628 );
8629 let res = grpc.unary(method, req).await;
8630 Ok(res)
8631 };
8632 Box::pin(fut)
8633 }
8634 _ => {
8635 Box::pin(async move {
8636 let mut response = http::Response::new(
8637 tonic::body::Body::default(),
8638 );
8639 let headers = response.headers_mut();
8640 headers
8641 .insert(
8642 tonic::Status::GRPC_STATUS,
8643 (tonic::Code::Unimplemented as i32).into(),
8644 );
8645 headers
8646 .insert(
8647 http::header::CONTENT_TYPE,
8648 tonic::metadata::GRPC_CONTENT_TYPE,
8649 );
8650 Ok(response)
8651 })
8652 }
8653 }
8654 }
8655 }
8656 impl<T> Clone for SnapshotsServer<T> {
8657 fn clone(&self) -> Self {
8658 let inner = self.inner.clone();
8659 Self {
8660 inner,
8661 accept_compression_encodings: self.accept_compression_encodings,
8662 send_compression_encodings: self.send_compression_encodings,
8663 max_decoding_message_size: self.max_decoding_message_size,
8664 max_encoding_message_size: self.max_encoding_message_size,
8665 }
8666 }
8667 }
8668 pub const SERVICE_NAME: &str = "qdrant.Snapshots";
8670 impl<T> tonic::server::NamedService for SnapshotsServer<T> {
8671 const NAME: &'static str = SERVICE_NAME;
8672 }
8673}