1#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Struct {
12 #[prost(map = "string, message", tag = "1")]
14 pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct Value {
24 #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
26 pub kind: ::core::option::Option<value::Kind>,
27}
28pub mod value {
30 #[derive(Clone, PartialEq, ::prost::Oneof)]
32 pub enum Kind {
33 #[prost(enumeration = "super::NullValue", tag = "1")]
35 NullValue(i32),
36 #[prost(double, tag = "2")]
38 DoubleValue(f64),
39 #[prost(int64, tag = "3")]
41 IntegerValue(i64),
42 #[prost(string, tag = "4")]
44 StringValue(::prost::alloc::string::String),
45 #[prost(bool, tag = "5")]
47 BoolValue(bool),
48 #[prost(message, tag = "6")]
50 StructValue(super::Struct),
51 #[prost(message, tag = "7")]
53 ListValue(super::ListValue),
54 }
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct ListValue {
61 #[prost(message, repeated, tag = "1")]
63 pub values: ::prost::alloc::vec::Vec<Value>,
64}
65#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
70#[repr(i32)]
71pub enum NullValue {
72 NullValue = 0,
74}
75impl NullValue {
76 pub fn as_str_name(&self) -> &'static str {
81 match self {
82 Self::NullValue => "NULL_VALUE",
83 }
84 }
85 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
87 match value {
88 "NULL_VALUE" => Some(Self::NullValue),
89 _ => None,
90 }
91 }
92}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct PointId {
95 #[prost(oneof = "point_id::PointIdOptions", tags = "1, 2")]
96 pub point_id_options: ::core::option::Option<point_id::PointIdOptions>,
97}
98pub mod point_id {
100 #[derive(Clone, PartialEq, ::prost::Oneof)]
101 pub enum PointIdOptions {
102 #[prost(uint64, tag = "1")]
104 Num(u64),
105 #[prost(string, tag = "2")]
107 Uuid(::prost::alloc::string::String),
108 }
109}
110#[derive(Clone, Copy, PartialEq, ::prost::Message)]
111pub struct GeoPoint {
112 #[prost(double, tag = "1")]
113 pub lon: f64,
114 #[prost(double, tag = "2")]
115 pub lat: f64,
116}
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct Filter {
119 #[prost(message, repeated, tag = "1")]
121 pub should: ::prost::alloc::vec::Vec<Condition>,
122 #[prost(message, repeated, tag = "2")]
124 pub must: ::prost::alloc::vec::Vec<Condition>,
125 #[prost(message, repeated, tag = "3")]
127 pub must_not: ::prost::alloc::vec::Vec<Condition>,
128 #[prost(message, optional, tag = "4")]
130 pub min_should: ::core::option::Option<MinShould>,
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct MinShould {
134 #[prost(message, repeated, tag = "1")]
135 pub conditions: ::prost::alloc::vec::Vec<Condition>,
136 #[prost(uint64, tag = "2")]
137 pub min_count: u64,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct Condition {
141 #[prost(oneof = "condition::ConditionOneOf", tags = "1, 2, 3, 4, 5, 6, 7")]
142 pub condition_one_of: ::core::option::Option<condition::ConditionOneOf>,
143}
144pub mod condition {
146 #[derive(Clone, PartialEq, ::prost::Oneof)]
147 pub enum ConditionOneOf {
148 #[prost(message, tag = "1")]
149 Field(super::FieldCondition),
150 #[prost(message, tag = "2")]
151 IsEmpty(super::IsEmptyCondition),
152 #[prost(message, tag = "3")]
153 HasId(super::HasIdCondition),
154 #[prost(message, tag = "4")]
155 Filter(super::Filter),
156 #[prost(message, tag = "5")]
157 IsNull(super::IsNullCondition),
158 #[prost(message, tag = "6")]
159 Nested(super::NestedCondition),
160 #[prost(message, tag = "7")]
161 HasVector(super::HasVectorCondition),
162 }
163}
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct IsEmptyCondition {
166 #[prost(string, tag = "1")]
167 pub key: ::prost::alloc::string::String,
168}
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct IsNullCondition {
171 #[prost(string, tag = "1")]
172 pub key: ::prost::alloc::string::String,
173}
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct HasIdCondition {
176 #[prost(message, repeated, tag = "1")]
177 pub has_id: ::prost::alloc::vec::Vec<PointId>,
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct HasVectorCondition {
181 #[prost(string, tag = "1")]
182 pub has_vector: ::prost::alloc::string::String,
183}
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct NestedCondition {
186 #[prost(string, tag = "1")]
188 pub key: ::prost::alloc::string::String,
189 #[prost(message, optional, tag = "2")]
191 pub filter: ::core::option::Option<Filter>,
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct FieldCondition {
195 #[prost(string, tag = "1")]
196 pub key: ::prost::alloc::string::String,
197 #[prost(message, optional, tag = "2")]
199 pub r#match: ::core::option::Option<Match>,
200 #[prost(message, optional, tag = "3")]
202 pub range: ::core::option::Option<Range>,
203 #[prost(message, optional, tag = "4")]
205 pub geo_bounding_box: ::core::option::Option<GeoBoundingBox>,
206 #[prost(message, optional, tag = "5")]
208 pub geo_radius: ::core::option::Option<GeoRadius>,
209 #[prost(message, optional, tag = "6")]
211 pub values_count: ::core::option::Option<ValuesCount>,
212 #[prost(message, optional, tag = "7")]
214 pub geo_polygon: ::core::option::Option<GeoPolygon>,
215 #[prost(message, optional, tag = "8")]
217 pub datetime_range: ::core::option::Option<DatetimeRange>,
218 #[prost(bool, optional, tag = "9")]
220 pub is_empty: ::core::option::Option<bool>,
221 #[prost(bool, optional, tag = "10")]
223 pub is_null: ::core::option::Option<bool>,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct Match {
227 #[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
228 pub match_value: ::core::option::Option<r#match::MatchValue>,
229}
230pub mod r#match {
232 #[derive(Clone, PartialEq, ::prost::Oneof)]
233 pub enum MatchValue {
234 #[prost(string, tag = "1")]
236 Keyword(::prost::alloc::string::String),
237 #[prost(int64, tag = "2")]
239 Integer(i64),
240 #[prost(bool, tag = "3")]
242 Boolean(bool),
243 #[prost(string, tag = "4")]
245 Text(::prost::alloc::string::String),
246 #[prost(message, tag = "5")]
248 Keywords(super::RepeatedStrings),
249 #[prost(message, tag = "6")]
251 Integers(super::RepeatedIntegers),
252 #[prost(message, tag = "7")]
254 ExceptIntegers(super::RepeatedIntegers),
255 #[prost(message, tag = "8")]
257 ExceptKeywords(super::RepeatedStrings),
258 #[prost(string, tag = "9")]
260 Phrase(::prost::alloc::string::String),
261 #[prost(string, tag = "10")]
263 TextAny(::prost::alloc::string::String),
264 }
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct RepeatedStrings {
268 #[prost(string, repeated, tag = "1")]
269 pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
270}
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct RepeatedIntegers {
273 #[prost(int64, repeated, tag = "1")]
274 pub integers: ::prost::alloc::vec::Vec<i64>,
275}
276#[derive(Clone, Copy, PartialEq, ::prost::Message)]
277pub struct Range {
278 #[prost(double, optional, tag = "1")]
279 pub lt: ::core::option::Option<f64>,
280 #[prost(double, optional, tag = "2")]
281 pub gt: ::core::option::Option<f64>,
282 #[prost(double, optional, tag = "3")]
283 pub gte: ::core::option::Option<f64>,
284 #[prost(double, optional, tag = "4")]
285 pub lte: ::core::option::Option<f64>,
286}
287#[derive(Clone, Copy, PartialEq, ::prost::Message)]
288pub struct DatetimeRange {
289 #[prost(message, optional, tag = "1")]
290 pub lt: ::core::option::Option<::prost_types::Timestamp>,
291 #[prost(message, optional, tag = "2")]
292 pub gt: ::core::option::Option<::prost_types::Timestamp>,
293 #[prost(message, optional, tag = "3")]
294 pub gte: ::core::option::Option<::prost_types::Timestamp>,
295 #[prost(message, optional, tag = "4")]
296 pub lte: ::core::option::Option<::prost_types::Timestamp>,
297}
298#[derive(Clone, Copy, PartialEq, ::prost::Message)]
299pub struct GeoBoundingBox {
300 #[prost(message, optional, tag = "1")]
302 pub top_left: ::core::option::Option<GeoPoint>,
303 #[prost(message, optional, tag = "2")]
305 pub bottom_right: ::core::option::Option<GeoPoint>,
306}
307#[derive(Clone, Copy, PartialEq, ::prost::Message)]
308pub struct GeoRadius {
309 #[prost(message, optional, tag = "1")]
311 pub center: ::core::option::Option<GeoPoint>,
312 #[prost(float, tag = "2")]
314 pub radius: f32,
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct GeoLineString {
318 #[prost(message, repeated, tag = "1")]
320 pub points: ::prost::alloc::vec::Vec<GeoPoint>,
321}
322#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct GeoPolygon {
327 #[prost(message, optional, tag = "1")]
329 pub exterior: ::core::option::Option<GeoLineString>,
330 #[prost(message, repeated, tag = "2")]
332 pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
333}
334#[derive(Clone, Copy, PartialEq, ::prost::Message)]
335pub struct ValuesCount {
336 #[prost(uint64, optional, tag = "1")]
337 pub lt: ::core::option::Option<u64>,
338 #[prost(uint64, optional, tag = "2")]
339 pub gt: ::core::option::Option<u64>,
340 #[prost(uint64, optional, tag = "3")]
341 pub gte: ::core::option::Option<u64>,
342 #[prost(uint64, optional, tag = "4")]
343 pub lte: ::core::option::Option<u64>,
344}
345#[derive(Clone, Copy, PartialEq, ::prost::Message)]
346pub struct VectorParams {
347 #[prost(uint64, tag = "1")]
349 pub size: u64,
350 #[prost(enumeration = "Distance", tag = "2")]
352 pub distance: i32,
353 #[prost(message, optional, tag = "3")]
356 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
357 #[prost(message, optional, tag = "4")]
360 pub quantization_config: ::core::option::Option<QuantizationConfig>,
361 #[prost(bool, optional, tag = "5")]
364 pub on_disk: ::core::option::Option<bool>,
365 #[prost(enumeration = "Datatype", optional, tag = "6")]
367 pub datatype: ::core::option::Option<i32>,
368 #[prost(message, optional, tag = "7")]
370 pub multivector_config: ::core::option::Option<MultiVectorConfig>,
371}
372#[derive(Clone, Copy, PartialEq, ::prost::Message)]
373pub struct VectorParamsDiff {
374 #[prost(message, optional, tag = "1")]
377 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
378 #[prost(message, optional, tag = "2")]
380 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
381 #[prost(bool, optional, tag = "3")]
384 pub on_disk: ::core::option::Option<bool>,
385}
386#[derive(Clone, PartialEq, ::prost::Message)]
387pub struct VectorParamsMap {
388 #[prost(map = "string, message", tag = "1")]
389 pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
390}
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct VectorParamsDiffMap {
393 #[prost(map = "string, message", tag = "1")]
394 pub map: ::std::collections::HashMap<
395 ::prost::alloc::string::String,
396 VectorParamsDiff,
397 >,
398}
399#[derive(Clone, PartialEq, ::prost::Message)]
400pub struct VectorsConfig {
401 #[prost(oneof = "vectors_config::Config", tags = "1, 2")]
402 pub config: ::core::option::Option<vectors_config::Config>,
403}
404pub mod vectors_config {
406 #[derive(Clone, PartialEq, ::prost::Oneof)]
407 pub enum Config {
408 #[prost(message, tag = "1")]
409 Params(super::VectorParams),
410 #[prost(message, tag = "2")]
411 ParamsMap(super::VectorParamsMap),
412 }
413}
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct VectorsConfigDiff {
416 #[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
417 pub config: ::core::option::Option<vectors_config_diff::Config>,
418}
419pub mod vectors_config_diff {
421 #[derive(Clone, PartialEq, ::prost::Oneof)]
422 pub enum Config {
423 #[prost(message, tag = "1")]
424 Params(super::VectorParamsDiff),
425 #[prost(message, tag = "2")]
426 ParamsMap(super::VectorParamsDiffMap),
427 }
428}
429#[derive(Clone, Copy, PartialEq, ::prost::Message)]
430pub struct SparseVectorParams {
431 #[prost(message, optional, tag = "1")]
433 pub index: ::core::option::Option<SparseIndexConfig>,
434 #[prost(enumeration = "Modifier", optional, tag = "2")]
436 pub modifier: ::core::option::Option<i32>,
437}
438#[derive(Clone, PartialEq, ::prost::Message)]
439pub struct SparseVectorConfig {
440 #[prost(map = "string, message", tag = "1")]
441 pub map: ::std::collections::HashMap<
442 ::prost::alloc::string::String,
443 SparseVectorParams,
444 >,
445}
446#[derive(Clone, Copy, PartialEq, ::prost::Message)]
447pub struct MultiVectorConfig {
448 #[prost(enumeration = "MultiVectorComparator", tag = "1")]
450 pub comparator: i32,
451}
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct GetCollectionInfoRequest {
454 #[prost(string, tag = "1")]
456 pub collection_name: ::prost::alloc::string::String,
457}
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct CollectionExistsRequest {
460 #[prost(string, tag = "1")]
461 pub collection_name: ::prost::alloc::string::String,
462}
463#[derive(Clone, Copy, PartialEq, ::prost::Message)]
464pub struct CollectionExists {
465 #[prost(bool, tag = "1")]
466 pub exists: bool,
467}
468#[derive(Clone, Copy, PartialEq, ::prost::Message)]
469pub struct CollectionExistsResponse {
470 #[prost(message, optional, tag = "1")]
471 pub result: ::core::option::Option<CollectionExists>,
472 #[prost(double, tag = "2")]
474 pub time: f64,
475}
476#[derive(Clone, Copy, PartialEq, ::prost::Message)]
477pub struct ListCollectionsRequest {}
478#[derive(Clone, PartialEq, ::prost::Message)]
479pub struct CollectionDescription {
480 #[prost(string, tag = "1")]
482 pub name: ::prost::alloc::string::String,
483}
484#[derive(Clone, PartialEq, ::prost::Message)]
485pub struct GetCollectionInfoResponse {
486 #[prost(message, optional, tag = "1")]
487 pub result: ::core::option::Option<CollectionInfo>,
488 #[prost(double, tag = "2")]
490 pub time: f64,
491}
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct ListCollectionsResponse {
494 #[prost(message, repeated, tag = "1")]
495 pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
496 #[prost(double, tag = "2")]
498 pub time: f64,
499}
500#[derive(Clone, Copy, PartialEq, ::prost::Message)]
501pub struct MaxOptimizationThreads {
502 #[prost(oneof = "max_optimization_threads::Variant", tags = "1, 2")]
503 pub variant: ::core::option::Option<max_optimization_threads::Variant>,
504}
505pub mod max_optimization_threads {
507 #[derive(
508 Clone,
509 Copy,
510 Debug,
511 PartialEq,
512 Eq,
513 Hash,
514 PartialOrd,
515 Ord,
516 ::prost::Enumeration
517 )]
518 #[repr(i32)]
519 pub enum Setting {
520 Auto = 0,
521 }
522 impl Setting {
523 pub fn as_str_name(&self) -> &'static str {
528 match self {
529 Self::Auto => "Auto",
530 }
531 }
532 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
534 match value {
535 "Auto" => Some(Self::Auto),
536 _ => None,
537 }
538 }
539 }
540 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
541 pub enum Variant {
542 #[prost(uint64, tag = "1")]
543 Value(u64),
544 #[prost(enumeration = "Setting", tag = "2")]
545 Setting(i32),
546 }
547}
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct OptimizerStatus {
550 #[prost(bool, tag = "1")]
551 pub ok: bool,
552 #[prost(string, tag = "2")]
553 pub error: ::prost::alloc::string::String,
554}
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct CollectionWarning {
557 #[prost(string, tag = "1")]
558 pub message: ::prost::alloc::string::String,
559}
560#[derive(Clone, Copy, PartialEq, ::prost::Message)]
561pub struct HnswConfigDiff {
562 #[prost(uint64, optional, tag = "1")]
565 pub m: ::core::option::Option<u64>,
566 #[prost(uint64, optional, tag = "2")]
569 pub ef_construct: ::core::option::Option<u64>,
570 #[prost(uint64, optional, tag = "3")]
577 pub full_scan_threshold: ::core::option::Option<u64>,
578 #[prost(uint64, optional, tag = "4")]
583 pub max_indexing_threads: ::core::option::Option<u64>,
584 #[prost(bool, optional, tag = "5")]
586 pub on_disk: ::core::option::Option<bool>,
587 #[prost(uint64, optional, tag = "6")]
590 pub payload_m: ::core::option::Option<u64>,
591 #[prost(bool, optional, tag = "7")]
596 pub inline_storage: ::core::option::Option<bool>,
597}
598#[derive(Clone, Copy, PartialEq, ::prost::Message)]
599pub struct SparseIndexConfig {
600 #[prost(uint64, optional, tag = "1")]
603 pub full_scan_threshold: ::core::option::Option<u64>,
604 #[prost(bool, optional, tag = "2")]
606 pub on_disk: ::core::option::Option<bool>,
607 #[prost(enumeration = "Datatype", optional, tag = "3")]
609 pub datatype: ::core::option::Option<i32>,
610}
611#[derive(Clone, Copy, PartialEq, ::prost::Message)]
612pub struct WalConfigDiff {
613 #[prost(uint64, optional, tag = "1")]
615 pub wal_capacity_mb: ::core::option::Option<u64>,
616 #[prost(uint64, optional, tag = "2")]
618 pub wal_segments_ahead: ::core::option::Option<u64>,
619 #[prost(uint64, optional, tag = "3")]
621 pub wal_retain_closed: ::core::option::Option<u64>,
622}
623#[derive(Clone, Copy, PartialEq, ::prost::Message)]
624pub struct OptimizersConfigDiff {
625 #[prost(double, optional, tag = "1")]
628 pub deleted_threshold: ::core::option::Option<f64>,
629 #[prost(uint64, optional, tag = "2")]
632 pub vacuum_min_vector_number: ::core::option::Option<u64>,
633 #[prost(uint64, optional, tag = "3")]
642 pub default_segment_number: ::core::option::Option<u64>,
643 #[prost(uint64, optional, tag = "4")]
654 pub max_segment_size: ::core::option::Option<u64>,
655 #[prost(uint64, optional, tag = "5")]
664 pub memmap_threshold: ::core::option::Option<u64>,
665 #[prost(uint64, optional, tag = "6")]
675 pub indexing_threshold: ::core::option::Option<u64>,
676 #[prost(uint64, optional, tag = "7")]
678 pub flush_interval_sec: ::core::option::Option<u64>,
679 #[prost(uint64, optional, tag = "8")]
681 pub deprecated_max_optimization_threads: ::core::option::Option<u64>,
682 #[prost(message, optional, tag = "9")]
687 pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
688 #[prost(bool, optional, tag = "10")]
694 pub prevent_unoptimized: ::core::option::Option<bool>,
695}
696#[derive(Clone, Copy, PartialEq, ::prost::Message)]
697pub struct ScalarQuantization {
698 #[prost(enumeration = "QuantizationType", tag = "1")]
700 pub r#type: i32,
701 #[prost(float, optional, tag = "2")]
703 pub quantile: ::core::option::Option<f32>,
704 #[prost(bool, optional, tag = "3")]
706 pub always_ram: ::core::option::Option<bool>,
707}
708#[derive(Clone, Copy, PartialEq, ::prost::Message)]
709pub struct ProductQuantization {
710 #[prost(enumeration = "CompressionRatio", tag = "1")]
712 pub compression: i32,
713 #[prost(bool, optional, tag = "2")]
715 pub always_ram: ::core::option::Option<bool>,
716}
717#[derive(Clone, Copy, PartialEq, ::prost::Message)]
718pub struct BinaryQuantizationQueryEncoding {
719 #[prost(oneof = "binary_quantization_query_encoding::Variant", tags = "4")]
720 pub variant: ::core::option::Option<binary_quantization_query_encoding::Variant>,
721}
722pub mod binary_quantization_query_encoding {
724 #[derive(
725 Clone,
726 Copy,
727 Debug,
728 PartialEq,
729 Eq,
730 Hash,
731 PartialOrd,
732 Ord,
733 ::prost::Enumeration
734 )]
735 #[repr(i32)]
736 pub enum Setting {
737 Default = 0,
738 Binary = 1,
739 Scalar4Bits = 2,
740 Scalar8Bits = 3,
741 }
742 impl Setting {
743 pub fn as_str_name(&self) -> &'static str {
748 match self {
749 Self::Default => "Default",
750 Self::Binary => "Binary",
751 Self::Scalar4Bits => "Scalar4Bits",
752 Self::Scalar8Bits => "Scalar8Bits",
753 }
754 }
755 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
757 match value {
758 "Default" => Some(Self::Default),
759 "Binary" => Some(Self::Binary),
760 "Scalar4Bits" => Some(Self::Scalar4Bits),
761 "Scalar8Bits" => Some(Self::Scalar8Bits),
762 _ => None,
763 }
764 }
765 }
766 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
767 pub enum Variant {
768 #[prost(enumeration = "Setting", tag = "4")]
769 Setting(i32),
770 }
771}
772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
773pub struct BinaryQuantization {
774 #[prost(bool, optional, tag = "1")]
776 pub always_ram: ::core::option::Option<bool>,
777 #[prost(enumeration = "BinaryQuantizationEncoding", optional, tag = "2")]
779 pub encoding: ::core::option::Option<i32>,
780 #[prost(message, optional, tag = "3")]
784 pub query_encoding: ::core::option::Option<BinaryQuantizationQueryEncoding>,
785}
786#[derive(Clone, Copy, PartialEq, ::prost::Message)]
787pub struct QuantizationConfig {
788 #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")]
789 pub quantization: ::core::option::Option<quantization_config::Quantization>,
790}
791pub mod quantization_config {
793 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
794 pub enum Quantization {
795 #[prost(message, tag = "1")]
796 Scalar(super::ScalarQuantization),
797 #[prost(message, tag = "2")]
798 Product(super::ProductQuantization),
799 #[prost(message, tag = "3")]
800 Binary(super::BinaryQuantization),
801 }
802}
803#[derive(Clone, Copy, PartialEq, ::prost::Message)]
804pub struct Disabled {}
805#[derive(Clone, Copy, PartialEq, ::prost::Message)]
806pub struct QuantizationConfigDiff {
807 #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")]
808 pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
809}
810pub mod quantization_config_diff {
812 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
813 pub enum Quantization {
814 #[prost(message, tag = "1")]
815 Scalar(super::ScalarQuantization),
816 #[prost(message, tag = "2")]
817 Product(super::ProductQuantization),
818 #[prost(message, tag = "3")]
819 Disabled(super::Disabled),
820 #[prost(message, tag = "4")]
821 Binary(super::BinaryQuantization),
822 }
823}
824#[derive(Clone, PartialEq, ::prost::Message)]
825pub struct StrictModeConfig {
826 #[prost(bool, optional, tag = "1")]
828 pub enabled: ::core::option::Option<bool>,
829 #[prost(uint32, optional, tag = "2")]
831 pub max_query_limit: ::core::option::Option<u32>,
832 #[prost(uint32, optional, tag = "3")]
834 pub max_timeout: ::core::option::Option<u32>,
835 #[prost(bool, optional, tag = "4")]
837 pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
838 #[prost(bool, optional, tag = "5")]
840 pub unindexed_filtering_update: ::core::option::Option<bool>,
841 #[prost(uint32, optional, tag = "6")]
843 pub search_max_hnsw_ef: ::core::option::Option<u32>,
844 #[prost(bool, optional, tag = "7")]
846 pub search_allow_exact: ::core::option::Option<bool>,
847 #[prost(float, optional, tag = "8")]
849 pub search_max_oversampling: ::core::option::Option<f32>,
850 #[prost(uint64, optional, tag = "9")]
852 pub upsert_max_batchsize: ::core::option::Option<u64>,
853 #[prost(uint64, optional, tag = "10")]
855 pub max_collection_vector_size_bytes: ::core::option::Option<u64>,
856 #[prost(uint32, optional, tag = "11")]
858 pub read_rate_limit: ::core::option::Option<u32>,
859 #[prost(uint32, optional, tag = "12")]
861 pub write_rate_limit: ::core::option::Option<u32>,
862 #[prost(uint64, optional, tag = "13")]
864 pub max_collection_payload_size_bytes: ::core::option::Option<u64>,
865 #[prost(uint64, optional, tag = "14")]
867 pub filter_max_conditions: ::core::option::Option<u64>,
868 #[prost(uint64, optional, tag = "15")]
870 pub condition_max_size: ::core::option::Option<u64>,
871 #[prost(message, optional, tag = "16")]
873 pub multivector_config: ::core::option::Option<StrictModeMultivectorConfig>,
874 #[prost(message, optional, tag = "17")]
876 pub sparse_config: ::core::option::Option<StrictModeSparseConfig>,
877 #[prost(uint64, optional, tag = "18")]
879 pub max_points_count: ::core::option::Option<u64>,
880 #[prost(uint64, optional, tag = "19")]
882 pub max_payload_index_count: ::core::option::Option<u64>,
883}
884#[derive(Clone, PartialEq, ::prost::Message)]
885pub struct StrictModeSparseConfig {
886 #[prost(map = "string, message", tag = "1")]
887 pub sparse_config: ::std::collections::HashMap<
888 ::prost::alloc::string::String,
889 StrictModeSparse,
890 >,
891}
892#[derive(Clone, Copy, PartialEq, ::prost::Message)]
893pub struct StrictModeSparse {
894 #[prost(uint64, optional, tag = "10")]
896 pub max_length: ::core::option::Option<u64>,
897}
898#[derive(Clone, PartialEq, ::prost::Message)]
899pub struct StrictModeMultivectorConfig {
900 #[prost(map = "string, message", tag = "1")]
901 pub multivector_config: ::std::collections::HashMap<
902 ::prost::alloc::string::String,
903 StrictModeMultivector,
904 >,
905}
906#[derive(Clone, Copy, PartialEq, ::prost::Message)]
907pub struct StrictModeMultivector {
908 #[prost(uint64, optional, tag = "1")]
910 pub max_vectors: ::core::option::Option<u64>,
911}
912#[derive(Clone, PartialEq, ::prost::Message)]
913pub struct CreateCollection {
914 #[prost(string, tag = "1")]
916 pub collection_name: ::prost::alloc::string::String,
917 #[prost(message, optional, tag = "4")]
919 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
920 #[prost(message, optional, tag = "5")]
922 pub wal_config: ::core::option::Option<WalConfigDiff>,
923 #[prost(message, optional, tag = "6")]
925 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
926 #[prost(uint32, optional, tag = "7")]
929 pub shard_number: ::core::option::Option<u32>,
930 #[prost(bool, optional, tag = "8")]
932 pub on_disk_payload: ::core::option::Option<bool>,
933 #[prost(uint64, optional, tag = "9")]
936 pub timeout: ::core::option::Option<u64>,
937 #[prost(message, optional, tag = "10")]
939 pub vectors_config: ::core::option::Option<VectorsConfig>,
940 #[prost(uint32, optional, tag = "11")]
942 pub replication_factor: ::core::option::Option<u32>,
943 #[prost(uint32, optional, tag = "12")]
945 pub write_consistency_factor: ::core::option::Option<u32>,
946 #[prost(message, optional, tag = "14")]
948 pub quantization_config: ::core::option::Option<QuantizationConfig>,
949 #[prost(enumeration = "ShardingMethod", optional, tag = "15")]
951 pub sharding_method: ::core::option::Option<i32>,
952 #[prost(message, optional, tag = "16")]
954 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
955 #[prost(message, optional, tag = "17")]
957 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
958 #[prost(map = "string, message", tag = "18")]
960 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
961}
962#[derive(Clone, PartialEq, ::prost::Message)]
963pub struct UpdateCollection {
964 #[prost(string, tag = "1")]
966 pub collection_name: ::prost::alloc::string::String,
967 #[prost(message, optional, tag = "2")]
971 pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
972 #[prost(uint64, optional, tag = "3")]
975 pub timeout: ::core::option::Option<u64>,
976 #[prost(message, optional, tag = "4")]
978 pub params: ::core::option::Option<CollectionParamsDiff>,
979 #[prost(message, optional, tag = "5")]
981 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
982 #[prost(message, optional, tag = "6")]
984 pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
985 #[prost(message, optional, tag = "7")]
987 pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
988 #[prost(message, optional, tag = "8")]
990 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
991 #[prost(message, optional, tag = "9")]
993 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
994 #[prost(map = "string, message", tag = "10")]
997 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
998}
999#[derive(Clone, PartialEq, ::prost::Message)]
1000pub struct DeleteCollection {
1001 #[prost(string, tag = "1")]
1003 pub collection_name: ::prost::alloc::string::String,
1004 #[prost(uint64, optional, tag = "2")]
1007 pub timeout: ::core::option::Option<u64>,
1008}
1009#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1010pub struct CollectionOperationResponse {
1011 #[prost(bool, tag = "1")]
1013 pub result: bool,
1014 #[prost(double, tag = "2")]
1016 pub time: f64,
1017}
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct CollectionParams {
1020 #[prost(uint32, tag = "3")]
1022 pub shard_number: u32,
1023 #[prost(bool, tag = "4")]
1025 pub on_disk_payload: bool,
1026 #[prost(message, optional, tag = "5")]
1028 pub vectors_config: ::core::option::Option<VectorsConfig>,
1029 #[prost(uint32, optional, tag = "6")]
1031 pub replication_factor: ::core::option::Option<u32>,
1032 #[prost(uint32, optional, tag = "7")]
1034 pub write_consistency_factor: ::core::option::Option<u32>,
1035 #[prost(uint32, optional, tag = "8")]
1037 pub read_fan_out_factor: ::core::option::Option<u32>,
1038 #[prost(enumeration = "ShardingMethod", optional, tag = "9")]
1040 pub sharding_method: ::core::option::Option<i32>,
1041 #[prost(message, optional, tag = "10")]
1043 pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
1044 #[prost(uint64, optional, tag = "11")]
1046 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1047}
1048#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1049pub struct CollectionParamsDiff {
1050 #[prost(uint32, optional, tag = "1")]
1052 pub replication_factor: ::core::option::Option<u32>,
1053 #[prost(uint32, optional, tag = "2")]
1055 pub write_consistency_factor: ::core::option::Option<u32>,
1056 #[prost(bool, optional, tag = "3")]
1058 pub on_disk_payload: ::core::option::Option<bool>,
1059 #[prost(uint32, optional, tag = "4")]
1061 pub read_fan_out_factor: ::core::option::Option<u32>,
1062 #[prost(uint64, optional, tag = "5")]
1064 pub read_fan_out_delay_ms: ::core::option::Option<u64>,
1065}
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct CollectionConfig {
1068 #[prost(message, optional, tag = "1")]
1070 pub params: ::core::option::Option<CollectionParams>,
1071 #[prost(message, optional, tag = "2")]
1073 pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
1074 #[prost(message, optional, tag = "3")]
1076 pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
1077 #[prost(message, optional, tag = "4")]
1079 pub wal_config: ::core::option::Option<WalConfigDiff>,
1080 #[prost(message, optional, tag = "5")]
1082 pub quantization_config: ::core::option::Option<QuantizationConfig>,
1083 #[prost(message, optional, tag = "6")]
1085 pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
1086 #[prost(map = "string, message", tag = "7")]
1088 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
1089}
1090#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1091pub struct KeywordIndexParams {
1092 #[prost(bool, optional, tag = "1")]
1094 pub is_tenant: ::core::option::Option<bool>,
1095 #[prost(bool, optional, tag = "2")]
1097 pub on_disk: ::core::option::Option<bool>,
1098 #[prost(bool, optional, tag = "3")]
1102 pub enable_hnsw: ::core::option::Option<bool>,
1103}
1104#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1105pub struct IntegerIndexParams {
1106 #[prost(bool, optional, tag = "1")]
1108 pub lookup: ::core::option::Option<bool>,
1109 #[prost(bool, optional, tag = "2")]
1111 pub range: ::core::option::Option<bool>,
1112 #[prost(bool, optional, tag = "3")]
1116 pub is_principal: ::core::option::Option<bool>,
1117 #[prost(bool, optional, tag = "4")]
1119 pub on_disk: ::core::option::Option<bool>,
1120 #[prost(bool, optional, tag = "5")]
1124 pub enable_hnsw: ::core::option::Option<bool>,
1125}
1126#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1127pub struct FloatIndexParams {
1128 #[prost(bool, optional, tag = "1")]
1130 pub on_disk: ::core::option::Option<bool>,
1131 #[prost(bool, optional, tag = "2")]
1134 pub is_principal: ::core::option::Option<bool>,
1135 #[prost(bool, optional, tag = "3")]
1139 pub enable_hnsw: ::core::option::Option<bool>,
1140}
1141#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1142pub struct GeoIndexParams {
1143 #[prost(bool, optional, tag = "1")]
1145 pub on_disk: ::core::option::Option<bool>,
1146 #[prost(bool, optional, tag = "2")]
1150 pub enable_hnsw: ::core::option::Option<bool>,
1151}
1152#[derive(Clone, PartialEq, ::prost::Message)]
1153pub struct StopwordsSet {
1154 #[prost(string, repeated, tag = "1")]
1156 pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1157 #[prost(string, repeated, tag = "2")]
1159 pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1160}
1161#[derive(Clone, PartialEq, ::prost::Message)]
1162pub struct TextIndexParams {
1163 #[prost(enumeration = "TokenizerType", tag = "1")]
1165 pub tokenizer: i32,
1166 #[prost(bool, optional, tag = "2")]
1168 pub lowercase: ::core::option::Option<bool>,
1169 #[prost(uint64, optional, tag = "3")]
1171 pub min_token_len: ::core::option::Option<u64>,
1172 #[prost(uint64, optional, tag = "4")]
1174 pub max_token_len: ::core::option::Option<u64>,
1175 #[prost(bool, optional, tag = "5")]
1177 pub on_disk: ::core::option::Option<bool>,
1178 #[prost(message, optional, tag = "6")]
1180 pub stopwords: ::core::option::Option<StopwordsSet>,
1181 #[prost(bool, optional, tag = "7")]
1183 pub phrase_matching: ::core::option::Option<bool>,
1184 #[prost(message, optional, tag = "8")]
1186 pub stemmer: ::core::option::Option<StemmingAlgorithm>,
1187 #[prost(bool, optional, tag = "9")]
1190 pub ascii_folding: ::core::option::Option<bool>,
1191 #[prost(bool, optional, tag = "10")]
1195 pub enable_hnsw: ::core::option::Option<bool>,
1196}
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct StemmingAlgorithm {
1199 #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1")]
1200 pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
1201}
1202pub mod stemming_algorithm {
1204 #[derive(Clone, PartialEq, ::prost::Oneof)]
1205 pub enum StemmingParams {
1206 #[prost(message, tag = "1")]
1208 Snowball(super::SnowballParams),
1209 }
1210}
1211#[derive(Clone, PartialEq, ::prost::Message)]
1212pub struct SnowballParams {
1213 #[prost(string, tag = "1")]
1215 pub language: ::prost::alloc::string::String,
1216}
1217#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1218pub struct BoolIndexParams {
1219 #[prost(bool, optional, tag = "1")]
1221 pub on_disk: ::core::option::Option<bool>,
1222 #[prost(bool, optional, tag = "2")]
1226 pub enable_hnsw: ::core::option::Option<bool>,
1227}
1228#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1229pub struct DatetimeIndexParams {
1230 #[prost(bool, optional, tag = "1")]
1232 pub on_disk: ::core::option::Option<bool>,
1233 #[prost(bool, optional, tag = "2")]
1236 pub is_principal: ::core::option::Option<bool>,
1237 #[prost(bool, optional, tag = "3")]
1241 pub enable_hnsw: ::core::option::Option<bool>,
1242}
1243#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1244pub struct UuidIndexParams {
1245 #[prost(bool, optional, tag = "1")]
1247 pub is_tenant: ::core::option::Option<bool>,
1248 #[prost(bool, optional, tag = "2")]
1250 pub on_disk: ::core::option::Option<bool>,
1251 #[prost(bool, optional, tag = "3")]
1255 pub enable_hnsw: ::core::option::Option<bool>,
1256}
1257#[derive(Clone, PartialEq, ::prost::Message)]
1258pub struct PayloadIndexParams {
1259 #[prost(
1260 oneof = "payload_index_params::IndexParams",
1261 tags = "3, 2, 4, 5, 1, 6, 7, 8"
1262 )]
1263 pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
1264}
1265pub mod payload_index_params {
1267 #[derive(Clone, PartialEq, ::prost::Oneof)]
1268 pub enum IndexParams {
1269 #[prost(message, tag = "3")]
1271 KeywordIndexParams(super::KeywordIndexParams),
1272 #[prost(message, tag = "2")]
1274 IntegerIndexParams(super::IntegerIndexParams),
1275 #[prost(message, tag = "4")]
1277 FloatIndexParams(super::FloatIndexParams),
1278 #[prost(message, tag = "5")]
1280 GeoIndexParams(super::GeoIndexParams),
1281 #[prost(message, tag = "1")]
1283 TextIndexParams(super::TextIndexParams),
1284 #[prost(message, tag = "6")]
1286 BoolIndexParams(super::BoolIndexParams),
1287 #[prost(message, tag = "7")]
1289 DatetimeIndexParams(super::DatetimeIndexParams),
1290 #[prost(message, tag = "8")]
1292 UuidIndexParams(super::UuidIndexParams),
1293 }
1294}
1295#[derive(Clone, PartialEq, ::prost::Message)]
1296pub struct PayloadSchemaInfo {
1297 #[prost(enumeration = "PayloadSchemaType", tag = "1")]
1299 pub data_type: i32,
1300 #[prost(message, optional, tag = "2")]
1302 pub params: ::core::option::Option<PayloadIndexParams>,
1303 #[prost(uint64, optional, tag = "3")]
1305 pub points: ::core::option::Option<u64>,
1306}
1307#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1308pub struct UpdateQueueInfo {
1309 #[prost(uint64, tag = "1")]
1311 pub length: u64,
1312}
1313#[derive(Clone, PartialEq, ::prost::Message)]
1314pub struct CollectionInfo {
1315 #[prost(enumeration = "CollectionStatus", tag = "1")]
1317 pub status: i32,
1318 #[prost(message, optional, tag = "2")]
1320 pub optimizer_status: ::core::option::Option<OptimizerStatus>,
1321 #[prost(uint64, tag = "4")]
1323 pub segments_count: u64,
1324 #[prost(message, optional, tag = "7")]
1326 pub config: ::core::option::Option<CollectionConfig>,
1327 #[prost(map = "string, message", tag = "8")]
1329 pub payload_schema: ::std::collections::HashMap<
1330 ::prost::alloc::string::String,
1331 PayloadSchemaInfo,
1332 >,
1333 #[prost(uint64, optional, tag = "9")]
1335 pub points_count: ::core::option::Option<u64>,
1336 #[prost(uint64, optional, tag = "10")]
1338 pub indexed_vectors_count: ::core::option::Option<u64>,
1339 #[prost(message, repeated, tag = "11")]
1341 pub warnings: ::prost::alloc::vec::Vec<CollectionWarning>,
1342 #[prost(message, optional, tag = "12")]
1344 pub update_queue: ::core::option::Option<UpdateQueueInfo>,
1345}
1346#[derive(Clone, PartialEq, ::prost::Message)]
1347pub struct ChangeAliases {
1348 #[prost(message, repeated, tag = "1")]
1350 pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
1351 #[prost(uint64, optional, tag = "2")]
1354 pub timeout: ::core::option::Option<u64>,
1355}
1356#[derive(Clone, PartialEq, ::prost::Message)]
1357pub struct AliasOperations {
1358 #[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
1359 pub action: ::core::option::Option<alias_operations::Action>,
1360}
1361pub mod alias_operations {
1363 #[derive(Clone, PartialEq, ::prost::Oneof)]
1364 pub enum Action {
1365 #[prost(message, tag = "1")]
1366 CreateAlias(super::CreateAlias),
1367 #[prost(message, tag = "2")]
1368 RenameAlias(super::RenameAlias),
1369 #[prost(message, tag = "3")]
1370 DeleteAlias(super::DeleteAlias),
1371 }
1372}
1373#[derive(Clone, PartialEq, ::prost::Message)]
1374pub struct CreateAlias {
1375 #[prost(string, tag = "1")]
1377 pub collection_name: ::prost::alloc::string::String,
1378 #[prost(string, tag = "2")]
1380 pub alias_name: ::prost::alloc::string::String,
1381}
1382#[derive(Clone, PartialEq, ::prost::Message)]
1383pub struct RenameAlias {
1384 #[prost(string, tag = "1")]
1386 pub old_alias_name: ::prost::alloc::string::String,
1387 #[prost(string, tag = "2")]
1389 pub new_alias_name: ::prost::alloc::string::String,
1390}
1391#[derive(Clone, PartialEq, ::prost::Message)]
1392pub struct DeleteAlias {
1393 #[prost(string, tag = "1")]
1395 pub alias_name: ::prost::alloc::string::String,
1396}
1397#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1398pub struct ListAliasesRequest {}
1399#[derive(Clone, PartialEq, ::prost::Message)]
1400pub struct ListCollectionAliasesRequest {
1401 #[prost(string, tag = "1")]
1403 pub collection_name: ::prost::alloc::string::String,
1404}
1405#[derive(Clone, PartialEq, ::prost::Message)]
1406pub struct AliasDescription {
1407 #[prost(string, tag = "1")]
1409 pub alias_name: ::prost::alloc::string::String,
1410 #[prost(string, tag = "2")]
1412 pub collection_name: ::prost::alloc::string::String,
1413}
1414#[derive(Clone, PartialEq, ::prost::Message)]
1415pub struct ListAliasesResponse {
1416 #[prost(message, repeated, tag = "1")]
1417 pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
1418 #[prost(double, tag = "2")]
1420 pub time: f64,
1421}
1422#[derive(Clone, PartialEq, ::prost::Message)]
1423pub struct CollectionClusterInfoRequest {
1424 #[prost(string, tag = "1")]
1426 pub collection_name: ::prost::alloc::string::String,
1427}
1428#[derive(Clone, PartialEq, ::prost::Message)]
1429pub struct ShardKey {
1430 #[prost(oneof = "shard_key::Key", tags = "1, 2")]
1431 pub key: ::core::option::Option<shard_key::Key>,
1432}
1433pub mod shard_key {
1435 #[derive(Clone, PartialEq, ::prost::Oneof)]
1436 pub enum Key {
1437 #[prost(string, tag = "1")]
1439 Keyword(::prost::alloc::string::String),
1440 #[prost(uint64, tag = "2")]
1442 Number(u64),
1443 }
1444}
1445#[derive(Clone, PartialEq, ::prost::Message)]
1446pub struct LocalShardInfo {
1447 #[prost(uint32, tag = "1")]
1449 pub shard_id: u32,
1450 #[prost(uint64, tag = "2")]
1452 pub points_count: u64,
1453 #[prost(enumeration = "ReplicaState", tag = "3")]
1455 pub state: i32,
1456 #[prost(message, optional, tag = "4")]
1458 pub shard_key: ::core::option::Option<ShardKey>,
1459}
1460#[derive(Clone, PartialEq, ::prost::Message)]
1461pub struct RemoteShardInfo {
1462 #[prost(uint32, tag = "1")]
1464 pub shard_id: u32,
1465 #[prost(uint64, tag = "2")]
1467 pub peer_id: u64,
1468 #[prost(enumeration = "ReplicaState", tag = "3")]
1470 pub state: i32,
1471 #[prost(message, optional, tag = "4")]
1473 pub shard_key: ::core::option::Option<ShardKey>,
1474}
1475#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1476pub struct ShardTransferInfo {
1477 #[prost(uint32, tag = "1")]
1479 pub shard_id: u32,
1480 #[prost(uint32, optional, tag = "5")]
1481 pub to_shard_id: ::core::option::Option<u32>,
1482 #[prost(uint64, tag = "2")]
1483 pub from: u64,
1484 #[prost(uint64, tag = "3")]
1485 pub to: u64,
1486 #[prost(bool, tag = "4")]
1489 pub sync: bool,
1490}
1491#[derive(Clone, PartialEq, ::prost::Message)]
1492pub struct ReshardingInfo {
1493 #[prost(uint32, tag = "1")]
1494 pub shard_id: u32,
1495 #[prost(uint64, tag = "2")]
1496 pub peer_id: u64,
1497 #[prost(message, optional, tag = "3")]
1498 pub shard_key: ::core::option::Option<ShardKey>,
1499 #[prost(enumeration = "ReshardingDirection", tag = "4")]
1500 pub direction: i32,
1501}
1502#[derive(Clone, PartialEq, ::prost::Message)]
1503pub struct CollectionClusterInfoResponse {
1504 #[prost(uint64, tag = "1")]
1506 pub peer_id: u64,
1507 #[prost(uint64, tag = "2")]
1509 pub shard_count: u64,
1510 #[prost(message, repeated, tag = "3")]
1512 pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
1513 #[prost(message, repeated, tag = "4")]
1515 pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
1516 #[prost(message, repeated, tag = "5")]
1518 pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
1519 #[prost(message, repeated, tag = "6")]
1521 pub resharding_operations: ::prost::alloc::vec::Vec<ReshardingInfo>,
1522}
1523#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1524pub struct MoveShard {
1525 #[prost(uint32, tag = "1")]
1527 pub shard_id: u32,
1528 #[prost(uint32, optional, tag = "5")]
1529 pub to_shard_id: ::core::option::Option<u32>,
1530 #[prost(uint64, tag = "2")]
1531 pub from_peer_id: u64,
1532 #[prost(uint64, tag = "3")]
1533 pub to_peer_id: u64,
1534 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1535 pub method: ::core::option::Option<i32>,
1536}
1537#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1538pub struct ReplicateShard {
1539 #[prost(uint32, tag = "1")]
1541 pub shard_id: u32,
1542 #[prost(uint32, optional, tag = "5")]
1543 pub to_shard_id: ::core::option::Option<u32>,
1544 #[prost(uint64, tag = "2")]
1545 pub from_peer_id: u64,
1546 #[prost(uint64, tag = "3")]
1547 pub to_peer_id: u64,
1548 #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
1549 pub method: ::core::option::Option<i32>,
1550}
1551#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1552pub struct AbortShardTransfer {
1553 #[prost(uint32, tag = "1")]
1555 pub shard_id: u32,
1556 #[prost(uint32, optional, tag = "4")]
1557 pub to_shard_id: ::core::option::Option<u32>,
1558 #[prost(uint64, tag = "2")]
1559 pub from_peer_id: u64,
1560 #[prost(uint64, tag = "3")]
1561 pub to_peer_id: u64,
1562}
1563#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1564pub struct RestartTransfer {
1565 #[prost(uint32, tag = "1")]
1567 pub shard_id: u32,
1568 #[prost(uint32, optional, tag = "5")]
1569 pub to_shard_id: ::core::option::Option<u32>,
1570 #[prost(uint64, tag = "2")]
1571 pub from_peer_id: u64,
1572 #[prost(uint64, tag = "3")]
1573 pub to_peer_id: u64,
1574 #[prost(enumeration = "ShardTransferMethod", tag = "4")]
1575 pub method: i32,
1576}
1577#[derive(Clone, PartialEq, ::prost::Message)]
1578pub struct ReplicatePoints {
1579 #[prost(message, optional, tag = "1")]
1581 pub from_shard_key: ::core::option::Option<ShardKey>,
1582 #[prost(message, optional, tag = "2")]
1584 pub to_shard_key: ::core::option::Option<ShardKey>,
1585 #[prost(message, optional, tag = "3")]
1587 pub filter: ::core::option::Option<Filter>,
1588}
1589#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1590pub struct Replica {
1591 #[prost(uint32, tag = "1")]
1592 pub shard_id: u32,
1593 #[prost(uint64, tag = "2")]
1594 pub peer_id: u64,
1595}
1596#[derive(Clone, PartialEq, ::prost::Message)]
1597pub struct CreateShardKey {
1598 #[prost(message, optional, tag = "1")]
1600 pub shard_key: ::core::option::Option<ShardKey>,
1601 #[prost(uint32, optional, tag = "2")]
1603 pub shards_number: ::core::option::Option<u32>,
1604 #[prost(uint32, optional, tag = "3")]
1606 pub replication_factor: ::core::option::Option<u32>,
1607 #[prost(uint64, repeated, tag = "4")]
1609 pub placement: ::prost::alloc::vec::Vec<u64>,
1610 #[prost(enumeration = "ReplicaState", optional, tag = "5")]
1612 pub initial_state: ::core::option::Option<i32>,
1613}
1614#[derive(Clone, PartialEq, ::prost::Message)]
1615pub struct DeleteShardKey {
1616 #[prost(message, optional, tag = "1")]
1618 pub shard_key: ::core::option::Option<ShardKey>,
1619}
1620#[derive(Clone, PartialEq, ::prost::Message)]
1621pub struct UpdateCollectionClusterSetupRequest {
1622 #[prost(string, tag = "1")]
1624 pub collection_name: ::prost::alloc::string::String,
1625 #[prost(uint64, optional, tag = "6")]
1628 pub timeout: ::core::option::Option<u64>,
1629 #[prost(
1630 oneof = "update_collection_cluster_setup_request::Operation",
1631 tags = "2, 3, 4, 5, 7, 8, 9, 10"
1632 )]
1633 pub operation: ::core::option::Option<
1634 update_collection_cluster_setup_request::Operation,
1635 >,
1636}
1637pub mod update_collection_cluster_setup_request {
1639 #[derive(Clone, PartialEq, ::prost::Oneof)]
1640 pub enum Operation {
1641 #[prost(message, tag = "2")]
1642 MoveShard(super::MoveShard),
1643 #[prost(message, tag = "3")]
1644 ReplicateShard(super::ReplicateShard),
1645 #[prost(message, tag = "4")]
1646 AbortTransfer(super::AbortShardTransfer),
1647 #[prost(message, tag = "5")]
1648 DropReplica(super::Replica),
1649 #[prost(message, tag = "7")]
1650 CreateShardKey(super::CreateShardKey),
1651 #[prost(message, tag = "8")]
1652 DeleteShardKey(super::DeleteShardKey),
1653 #[prost(message, tag = "9")]
1654 RestartTransfer(super::RestartTransfer),
1655 #[prost(message, tag = "10")]
1656 ReplicatePoints(super::ReplicatePoints),
1657 }
1658}
1659#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1660pub struct UpdateCollectionClusterSetupResponse {
1661 #[prost(bool, tag = "1")]
1662 pub result: bool,
1663}
1664#[derive(Clone, PartialEq, ::prost::Message)]
1665pub struct CreateShardKeyRequest {
1666 #[prost(string, tag = "1")]
1668 pub collection_name: ::prost::alloc::string::String,
1669 #[prost(message, optional, tag = "2")]
1671 pub request: ::core::option::Option<CreateShardKey>,
1672 #[prost(uint64, optional, tag = "3")]
1675 pub timeout: ::core::option::Option<u64>,
1676}
1677#[derive(Clone, PartialEq, ::prost::Message)]
1678pub struct DeleteShardKeyRequest {
1679 #[prost(string, tag = "1")]
1681 pub collection_name: ::prost::alloc::string::String,
1682 #[prost(message, optional, tag = "2")]
1684 pub request: ::core::option::Option<DeleteShardKey>,
1685 #[prost(uint64, optional, tag = "3")]
1688 pub timeout: ::core::option::Option<u64>,
1689}
1690#[derive(Clone, PartialEq, ::prost::Message)]
1691pub struct ListShardKeysRequest {
1692 #[prost(string, tag = "1")]
1694 pub collection_name: ::prost::alloc::string::String,
1695}
1696#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1697pub struct CreateShardKeyResponse {
1698 #[prost(bool, tag = "1")]
1699 pub result: bool,
1700}
1701#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1702pub struct DeleteShardKeyResponse {
1703 #[prost(bool, tag = "1")]
1704 pub result: bool,
1705}
1706#[derive(Clone, PartialEq, ::prost::Message)]
1707pub struct ShardKeyDescription {
1708 #[prost(message, optional, tag = "1")]
1709 pub key: ::core::option::Option<ShardKey>,
1710}
1711#[derive(Clone, PartialEq, ::prost::Message)]
1712pub struct ListShardKeysResponse {
1713 #[prost(message, repeated, tag = "1")]
1714 pub shard_keys: ::prost::alloc::vec::Vec<ShardKeyDescription>,
1715 #[prost(double, tag = "2")]
1717 pub time: f64,
1718}
1719#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1720#[repr(i32)]
1721pub enum Datatype {
1722 Default = 0,
1723 Float32 = 1,
1724 Uint8 = 2,
1725 Float16 = 3,
1726}
1727impl Datatype {
1728 pub fn as_str_name(&self) -> &'static str {
1733 match self {
1734 Self::Default => "Default",
1735 Self::Float32 => "Float32",
1736 Self::Uint8 => "Uint8",
1737 Self::Float16 => "Float16",
1738 }
1739 }
1740 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1742 match value {
1743 "Default" => Some(Self::Default),
1744 "Float32" => Some(Self::Float32),
1745 "Uint8" => Some(Self::Uint8),
1746 "Float16" => Some(Self::Float16),
1747 _ => None,
1748 }
1749 }
1750}
1751#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1752#[repr(i32)]
1753pub enum Modifier {
1754 None = 0,
1755 Idf = 1,
1757}
1758impl Modifier {
1759 pub fn as_str_name(&self) -> &'static str {
1764 match self {
1765 Self::None => "None",
1766 Self::Idf => "Idf",
1767 }
1768 }
1769 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1771 match value {
1772 "None" => Some(Self::None),
1773 "Idf" => Some(Self::Idf),
1774 _ => None,
1775 }
1776 }
1777}
1778#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1779#[repr(i32)]
1780pub enum MultiVectorComparator {
1781 MaxSim = 0,
1782}
1783impl MultiVectorComparator {
1784 pub fn as_str_name(&self) -> &'static str {
1789 match self {
1790 Self::MaxSim => "MaxSim",
1791 }
1792 }
1793 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1795 match value {
1796 "MaxSim" => Some(Self::MaxSim),
1797 _ => None,
1798 }
1799 }
1800}
1801#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1802#[repr(i32)]
1803pub enum Distance {
1804 UnknownDistance = 0,
1805 Cosine = 1,
1806 Euclid = 2,
1807 Dot = 3,
1808 Manhattan = 4,
1809}
1810impl Distance {
1811 pub fn as_str_name(&self) -> &'static str {
1816 match self {
1817 Self::UnknownDistance => "UnknownDistance",
1818 Self::Cosine => "Cosine",
1819 Self::Euclid => "Euclid",
1820 Self::Dot => "Dot",
1821 Self::Manhattan => "Manhattan",
1822 }
1823 }
1824 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1826 match value {
1827 "UnknownDistance" => Some(Self::UnknownDistance),
1828 "Cosine" => Some(Self::Cosine),
1829 "Euclid" => Some(Self::Euclid),
1830 "Dot" => Some(Self::Dot),
1831 "Manhattan" => Some(Self::Manhattan),
1832 _ => None,
1833 }
1834 }
1835}
1836#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1837#[repr(i32)]
1838pub enum CollectionStatus {
1839 UnknownCollectionStatus = 0,
1840 Green = 1,
1842 Yellow = 2,
1844 Red = 3,
1846 Grey = 4,
1848}
1849impl CollectionStatus {
1850 pub fn as_str_name(&self) -> &'static str {
1855 match self {
1856 Self::UnknownCollectionStatus => "UnknownCollectionStatus",
1857 Self::Green => "Green",
1858 Self::Yellow => "Yellow",
1859 Self::Red => "Red",
1860 Self::Grey => "Grey",
1861 }
1862 }
1863 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1865 match value {
1866 "UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
1867 "Green" => Some(Self::Green),
1868 "Yellow" => Some(Self::Yellow),
1869 "Red" => Some(Self::Red),
1870 "Grey" => Some(Self::Grey),
1871 _ => None,
1872 }
1873 }
1874}
1875#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1876#[repr(i32)]
1877pub enum PayloadSchemaType {
1878 UnknownType = 0,
1879 Keyword = 1,
1880 Integer = 2,
1881 Float = 3,
1882 Geo = 4,
1883 Text = 5,
1884 Bool = 6,
1885 Datetime = 7,
1886 Uuid = 8,
1887}
1888impl PayloadSchemaType {
1889 pub fn as_str_name(&self) -> &'static str {
1894 match self {
1895 Self::UnknownType => "UnknownType",
1896 Self::Keyword => "Keyword",
1897 Self::Integer => "Integer",
1898 Self::Float => "Float",
1899 Self::Geo => "Geo",
1900 Self::Text => "Text",
1901 Self::Bool => "Bool",
1902 Self::Datetime => "Datetime",
1903 Self::Uuid => "Uuid",
1904 }
1905 }
1906 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1908 match value {
1909 "UnknownType" => Some(Self::UnknownType),
1910 "Keyword" => Some(Self::Keyword),
1911 "Integer" => Some(Self::Integer),
1912 "Float" => Some(Self::Float),
1913 "Geo" => Some(Self::Geo),
1914 "Text" => Some(Self::Text),
1915 "Bool" => Some(Self::Bool),
1916 "Datetime" => Some(Self::Datetime),
1917 "Uuid" => Some(Self::Uuid),
1918 _ => None,
1919 }
1920 }
1921}
1922#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1923#[repr(i32)]
1924pub enum QuantizationType {
1925 UnknownQuantization = 0,
1926 Int8 = 1,
1927}
1928impl QuantizationType {
1929 pub fn as_str_name(&self) -> &'static str {
1934 match self {
1935 Self::UnknownQuantization => "UnknownQuantization",
1936 Self::Int8 => "Int8",
1937 }
1938 }
1939 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1941 match value {
1942 "UnknownQuantization" => Some(Self::UnknownQuantization),
1943 "Int8" => Some(Self::Int8),
1944 _ => None,
1945 }
1946 }
1947}
1948#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1949#[repr(i32)]
1950pub enum CompressionRatio {
1951 X4 = 0,
1952 X8 = 1,
1953 X16 = 2,
1954 X32 = 3,
1955 X64 = 4,
1956}
1957impl CompressionRatio {
1958 pub fn as_str_name(&self) -> &'static str {
1963 match self {
1964 Self::X4 => "x4",
1965 Self::X8 => "x8",
1966 Self::X16 => "x16",
1967 Self::X32 => "x32",
1968 Self::X64 => "x64",
1969 }
1970 }
1971 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1973 match value {
1974 "x4" => Some(Self::X4),
1975 "x8" => Some(Self::X8),
1976 "x16" => Some(Self::X16),
1977 "x32" => Some(Self::X32),
1978 "x64" => Some(Self::X64),
1979 _ => None,
1980 }
1981 }
1982}
1983#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1984#[repr(i32)]
1985pub enum BinaryQuantizationEncoding {
1986 OneBit = 0,
1987 TwoBits = 1,
1988 OneAndHalfBits = 2,
1989}
1990impl BinaryQuantizationEncoding {
1991 pub fn as_str_name(&self) -> &'static str {
1996 match self {
1997 Self::OneBit => "OneBit",
1998 Self::TwoBits => "TwoBits",
1999 Self::OneAndHalfBits => "OneAndHalfBits",
2000 }
2001 }
2002 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2004 match value {
2005 "OneBit" => Some(Self::OneBit),
2006 "TwoBits" => Some(Self::TwoBits),
2007 "OneAndHalfBits" => Some(Self::OneAndHalfBits),
2008 _ => None,
2009 }
2010 }
2011}
2012#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2013#[repr(i32)]
2014pub enum ShardingMethod {
2015 Auto = 0,
2017 Custom = 1,
2019}
2020impl ShardingMethod {
2021 pub fn as_str_name(&self) -> &'static str {
2026 match self {
2027 Self::Auto => "Auto",
2028 Self::Custom => "Custom",
2029 }
2030 }
2031 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2033 match value {
2034 "Auto" => Some(Self::Auto),
2035 "Custom" => Some(Self::Custom),
2036 _ => None,
2037 }
2038 }
2039}
2040#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2041#[repr(i32)]
2042pub enum TokenizerType {
2043 Unknown = 0,
2044 Prefix = 1,
2045 Whitespace = 2,
2046 Word = 3,
2047 Multilingual = 4,
2048}
2049impl TokenizerType {
2050 pub fn as_str_name(&self) -> &'static str {
2055 match self {
2056 Self::Unknown => "Unknown",
2057 Self::Prefix => "Prefix",
2058 Self::Whitespace => "Whitespace",
2059 Self::Word => "Word",
2060 Self::Multilingual => "Multilingual",
2061 }
2062 }
2063 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2065 match value {
2066 "Unknown" => Some(Self::Unknown),
2067 "Prefix" => Some(Self::Prefix),
2068 "Whitespace" => Some(Self::Whitespace),
2069 "Word" => Some(Self::Word),
2070 "Multilingual" => Some(Self::Multilingual),
2071 _ => None,
2072 }
2073 }
2074}
2075#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2076#[repr(i32)]
2077pub enum ReplicaState {
2078 Active = 0,
2080 Dead = 1,
2082 Partial = 2,
2084 Initializing = 3,
2086 Listener = 4,
2089 PartialSnapshot = 5,
2092 Recovery = 6,
2095 Resharding = 7,
2097 ReshardingScaleDown = 8,
2099 ActiveRead = 9,
2101 ManualRecovery = 10,
2107}
2108impl ReplicaState {
2109 pub fn as_str_name(&self) -> &'static str {
2114 match self {
2115 Self::Active => "Active",
2116 Self::Dead => "Dead",
2117 Self::Partial => "Partial",
2118 Self::Initializing => "Initializing",
2119 Self::Listener => "Listener",
2120 Self::PartialSnapshot => "PartialSnapshot",
2121 Self::Recovery => "Recovery",
2122 Self::Resharding => "Resharding",
2123 Self::ReshardingScaleDown => "ReshardingScaleDown",
2124 Self::ActiveRead => "ActiveRead",
2125 Self::ManualRecovery => "ManualRecovery",
2126 }
2127 }
2128 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2130 match value {
2131 "Active" => Some(Self::Active),
2132 "Dead" => Some(Self::Dead),
2133 "Partial" => Some(Self::Partial),
2134 "Initializing" => Some(Self::Initializing),
2135 "Listener" => Some(Self::Listener),
2136 "PartialSnapshot" => Some(Self::PartialSnapshot),
2137 "Recovery" => Some(Self::Recovery),
2138 "Resharding" => Some(Self::Resharding),
2139 "ReshardingScaleDown" => Some(Self::ReshardingScaleDown),
2140 "ActiveRead" => Some(Self::ActiveRead),
2141 "ManualRecovery" => Some(Self::ManualRecovery),
2142 _ => None,
2143 }
2144 }
2145}
2146#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2148#[repr(i32)]
2149pub enum ReshardingDirection {
2150 Up = 0,
2152 Down = 1,
2154}
2155impl ReshardingDirection {
2156 pub fn as_str_name(&self) -> &'static str {
2161 match self {
2162 Self::Up => "Up",
2163 Self::Down => "Down",
2164 }
2165 }
2166 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2168 match value {
2169 "Up" => Some(Self::Up),
2170 "Down" => Some(Self::Down),
2171 _ => None,
2172 }
2173 }
2174}
2175#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2176#[repr(i32)]
2177pub enum ShardTransferMethod {
2178 StreamRecords = 0,
2180 Snapshot = 1,
2182 WalDelta = 2,
2184 ReshardingStreamRecords = 3,
2186}
2187impl ShardTransferMethod {
2188 pub fn as_str_name(&self) -> &'static str {
2193 match self {
2194 Self::StreamRecords => "StreamRecords",
2195 Self::Snapshot => "Snapshot",
2196 Self::WalDelta => "WalDelta",
2197 Self::ReshardingStreamRecords => "ReshardingStreamRecords",
2198 }
2199 }
2200 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2202 match value {
2203 "StreamRecords" => Some(Self::StreamRecords),
2204 "Snapshot" => Some(Self::Snapshot),
2205 "WalDelta" => Some(Self::WalDelta),
2206 "ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
2207 _ => None,
2208 }
2209 }
2210}
2211pub mod collections_client {
2213 #![allow(
2214 unused_variables,
2215 dead_code,
2216 missing_docs,
2217 clippy::wildcard_imports,
2218 clippy::let_unit_value,
2219 )]
2220 use tonic::codegen::*;
2221 use tonic::codegen::http::Uri;
2222 #[derive(Debug, Clone)]
2223 pub struct CollectionsClient<T> {
2224 inner: tonic::client::Grpc<T>,
2225 }
2226 impl CollectionsClient<tonic::transport::Channel> {
2227 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2229 where
2230 D: TryInto<tonic::transport::Endpoint>,
2231 D::Error: Into<StdError>,
2232 {
2233 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2234 Ok(Self::new(conn))
2235 }
2236 }
2237 impl<T> CollectionsClient<T>
2238 where
2239 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2240 T::Error: Into<StdError>,
2241 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2242 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2243 {
2244 pub fn new(inner: T) -> Self {
2245 let inner = tonic::client::Grpc::new(inner);
2246 Self { inner }
2247 }
2248 pub fn with_origin(inner: T, origin: Uri) -> Self {
2249 let inner = tonic::client::Grpc::with_origin(inner, origin);
2250 Self { inner }
2251 }
2252 pub fn with_interceptor<F>(
2253 inner: T,
2254 interceptor: F,
2255 ) -> CollectionsClient<InterceptedService<T, F>>
2256 where
2257 F: tonic::service::Interceptor,
2258 T::ResponseBody: Default,
2259 T: tonic::codegen::Service<
2260 http::Request<tonic::body::BoxBody>,
2261 Response = http::Response<
2262 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2263 >,
2264 >,
2265 <T as tonic::codegen::Service<
2266 http::Request<tonic::body::BoxBody>,
2267 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2268 {
2269 CollectionsClient::new(InterceptedService::new(inner, interceptor))
2270 }
2271 #[must_use]
2276 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2277 self.inner = self.inner.send_compressed(encoding);
2278 self
2279 }
2280 #[must_use]
2282 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2283 self.inner = self.inner.accept_compressed(encoding);
2284 self
2285 }
2286 #[must_use]
2290 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2291 self.inner = self.inner.max_decoding_message_size(limit);
2292 self
2293 }
2294 #[must_use]
2298 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2299 self.inner = self.inner.max_encoding_message_size(limit);
2300 self
2301 }
2302 pub async fn get(
2304 &mut self,
2305 request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
2306 ) -> std::result::Result<
2307 tonic::Response<super::GetCollectionInfoResponse>,
2308 tonic::Status,
2309 > {
2310 self.inner
2311 .ready()
2312 .await
2313 .map_err(|e| {
2314 tonic::Status::unknown(
2315 format!("Service was not ready: {}", e.into()),
2316 )
2317 })?;
2318 let codec = tonic::codec::ProstCodec::default();
2319 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
2320 let mut req = request.into_request();
2321 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
2322 self.inner.unary(req, path, codec).await
2323 }
2324 pub async fn list(
2326 &mut self,
2327 request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
2328 ) -> std::result::Result<
2329 tonic::Response<super::ListCollectionsResponse>,
2330 tonic::Status,
2331 > {
2332 self.inner
2333 .ready()
2334 .await
2335 .map_err(|e| {
2336 tonic::Status::unknown(
2337 format!("Service was not ready: {}", e.into()),
2338 )
2339 })?;
2340 let codec = tonic::codec::ProstCodec::default();
2341 let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
2342 let mut req = request.into_request();
2343 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
2344 self.inner.unary(req, path, codec).await
2345 }
2346 pub async fn create(
2348 &mut self,
2349 request: impl tonic::IntoRequest<super::CreateCollection>,
2350 ) -> std::result::Result<
2351 tonic::Response<super::CollectionOperationResponse>,
2352 tonic::Status,
2353 > {
2354 self.inner
2355 .ready()
2356 .await
2357 .map_err(|e| {
2358 tonic::Status::unknown(
2359 format!("Service was not ready: {}", e.into()),
2360 )
2361 })?;
2362 let codec = tonic::codec::ProstCodec::default();
2363 let path = http::uri::PathAndQuery::from_static(
2364 "/qdrant.Collections/Create",
2365 );
2366 let mut req = request.into_request();
2367 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
2368 self.inner.unary(req, path, codec).await
2369 }
2370 pub async fn update(
2372 &mut self,
2373 request: impl tonic::IntoRequest<super::UpdateCollection>,
2374 ) -> std::result::Result<
2375 tonic::Response<super::CollectionOperationResponse>,
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::codec::ProstCodec::default();
2387 let path = http::uri::PathAndQuery::from_static(
2388 "/qdrant.Collections/Update",
2389 );
2390 let mut req = request.into_request();
2391 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
2392 self.inner.unary(req, path, codec).await
2393 }
2394 pub async fn delete(
2396 &mut self,
2397 request: impl tonic::IntoRequest<super::DeleteCollection>,
2398 ) -> std::result::Result<
2399 tonic::Response<super::CollectionOperationResponse>,
2400 tonic::Status,
2401 > {
2402 self.inner
2403 .ready()
2404 .await
2405 .map_err(|e| {
2406 tonic::Status::unknown(
2407 format!("Service was not ready: {}", e.into()),
2408 )
2409 })?;
2410 let codec = tonic::codec::ProstCodec::default();
2411 let path = http::uri::PathAndQuery::from_static(
2412 "/qdrant.Collections/Delete",
2413 );
2414 let mut req = request.into_request();
2415 req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
2416 self.inner.unary(req, path, codec).await
2417 }
2418 pub async fn update_aliases(
2420 &mut self,
2421 request: impl tonic::IntoRequest<super::ChangeAliases>,
2422 ) -> std::result::Result<
2423 tonic::Response<super::CollectionOperationResponse>,
2424 tonic::Status,
2425 > {
2426 self.inner
2427 .ready()
2428 .await
2429 .map_err(|e| {
2430 tonic::Status::unknown(
2431 format!("Service was not ready: {}", e.into()),
2432 )
2433 })?;
2434 let codec = tonic::codec::ProstCodec::default();
2435 let path = http::uri::PathAndQuery::from_static(
2436 "/qdrant.Collections/UpdateAliases",
2437 );
2438 let mut req = request.into_request();
2439 req.extensions_mut()
2440 .insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
2441 self.inner.unary(req, path, codec).await
2442 }
2443 pub async fn list_collection_aliases(
2445 &mut self,
2446 request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
2447 ) -> std::result::Result<
2448 tonic::Response<super::ListAliasesResponse>,
2449 tonic::Status,
2450 > {
2451 self.inner
2452 .ready()
2453 .await
2454 .map_err(|e| {
2455 tonic::Status::unknown(
2456 format!("Service was not ready: {}", e.into()),
2457 )
2458 })?;
2459 let codec = tonic::codec::ProstCodec::default();
2460 let path = http::uri::PathAndQuery::from_static(
2461 "/qdrant.Collections/ListCollectionAliases",
2462 );
2463 let mut req = request.into_request();
2464 req.extensions_mut()
2465 .insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
2466 self.inner.unary(req, path, codec).await
2467 }
2468 pub async fn list_aliases(
2470 &mut self,
2471 request: impl tonic::IntoRequest<super::ListAliasesRequest>,
2472 ) -> std::result::Result<
2473 tonic::Response<super::ListAliasesResponse>,
2474 tonic::Status,
2475 > {
2476 self.inner
2477 .ready()
2478 .await
2479 .map_err(|e| {
2480 tonic::Status::unknown(
2481 format!("Service was not ready: {}", e.into()),
2482 )
2483 })?;
2484 let codec = tonic::codec::ProstCodec::default();
2485 let path = http::uri::PathAndQuery::from_static(
2486 "/qdrant.Collections/ListAliases",
2487 );
2488 let mut req = request.into_request();
2489 req.extensions_mut()
2490 .insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
2491 self.inner.unary(req, path, codec).await
2492 }
2493 pub async fn collection_cluster_info(
2495 &mut self,
2496 request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
2497 ) -> std::result::Result<
2498 tonic::Response<super::CollectionClusterInfoResponse>,
2499 tonic::Status,
2500 > {
2501 self.inner
2502 .ready()
2503 .await
2504 .map_err(|e| {
2505 tonic::Status::unknown(
2506 format!("Service was not ready: {}", e.into()),
2507 )
2508 })?;
2509 let codec = tonic::codec::ProstCodec::default();
2510 let path = http::uri::PathAndQuery::from_static(
2511 "/qdrant.Collections/CollectionClusterInfo",
2512 );
2513 let mut req = request.into_request();
2514 req.extensions_mut()
2515 .insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
2516 self.inner.unary(req, path, codec).await
2517 }
2518 pub async fn collection_exists(
2520 &mut self,
2521 request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
2522 ) -> std::result::Result<
2523 tonic::Response<super::CollectionExistsResponse>,
2524 tonic::Status,
2525 > {
2526 self.inner
2527 .ready()
2528 .await
2529 .map_err(|e| {
2530 tonic::Status::unknown(
2531 format!("Service was not ready: {}", e.into()),
2532 )
2533 })?;
2534 let codec = tonic::codec::ProstCodec::default();
2535 let path = http::uri::PathAndQuery::from_static(
2536 "/qdrant.Collections/CollectionExists",
2537 );
2538 let mut req = request.into_request();
2539 req.extensions_mut()
2540 .insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
2541 self.inner.unary(req, path, codec).await
2542 }
2543 pub async fn update_collection_cluster_setup(
2545 &mut self,
2546 request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
2547 ) -> std::result::Result<
2548 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2549 tonic::Status,
2550 > {
2551 self.inner
2552 .ready()
2553 .await
2554 .map_err(|e| {
2555 tonic::Status::unknown(
2556 format!("Service was not ready: {}", e.into()),
2557 )
2558 })?;
2559 let codec = tonic::codec::ProstCodec::default();
2560 let path = http::uri::PathAndQuery::from_static(
2561 "/qdrant.Collections/UpdateCollectionClusterSetup",
2562 );
2563 let mut req = request.into_request();
2564 req.extensions_mut()
2565 .insert(
2566 GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
2567 );
2568 self.inner.unary(req, path, codec).await
2569 }
2570 pub async fn create_shard_key(
2572 &mut self,
2573 request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
2574 ) -> std::result::Result<
2575 tonic::Response<super::CreateShardKeyResponse>,
2576 tonic::Status,
2577 > {
2578 self.inner
2579 .ready()
2580 .await
2581 .map_err(|e| {
2582 tonic::Status::unknown(
2583 format!("Service was not ready: {}", e.into()),
2584 )
2585 })?;
2586 let codec = tonic::codec::ProstCodec::default();
2587 let path = http::uri::PathAndQuery::from_static(
2588 "/qdrant.Collections/CreateShardKey",
2589 );
2590 let mut req = request.into_request();
2591 req.extensions_mut()
2592 .insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
2593 self.inner.unary(req, path, codec).await
2594 }
2595 pub async fn delete_shard_key(
2597 &mut self,
2598 request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
2599 ) -> std::result::Result<
2600 tonic::Response<super::DeleteShardKeyResponse>,
2601 tonic::Status,
2602 > {
2603 self.inner
2604 .ready()
2605 .await
2606 .map_err(|e| {
2607 tonic::Status::unknown(
2608 format!("Service was not ready: {}", e.into()),
2609 )
2610 })?;
2611 let codec = tonic::codec::ProstCodec::default();
2612 let path = http::uri::PathAndQuery::from_static(
2613 "/qdrant.Collections/DeleteShardKey",
2614 );
2615 let mut req = request.into_request();
2616 req.extensions_mut()
2617 .insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
2618 self.inner.unary(req, path, codec).await
2619 }
2620 pub async fn list_shard_keys(
2622 &mut self,
2623 request: impl tonic::IntoRequest<super::ListShardKeysRequest>,
2624 ) -> std::result::Result<
2625 tonic::Response<super::ListShardKeysResponse>,
2626 tonic::Status,
2627 > {
2628 self.inner
2629 .ready()
2630 .await
2631 .map_err(|e| {
2632 tonic::Status::unknown(
2633 format!("Service was not ready: {}", e.into()),
2634 )
2635 })?;
2636 let codec = tonic::codec::ProstCodec::default();
2637 let path = http::uri::PathAndQuery::from_static(
2638 "/qdrant.Collections/ListShardKeys",
2639 );
2640 let mut req = request.into_request();
2641 req.extensions_mut()
2642 .insert(GrpcMethod::new("qdrant.Collections", "ListShardKeys"));
2643 self.inner.unary(req, path, codec).await
2644 }
2645 }
2646}
2647pub mod collections_server {
2649 #![allow(
2650 unused_variables,
2651 dead_code,
2652 missing_docs,
2653 clippy::wildcard_imports,
2654 clippy::let_unit_value,
2655 )]
2656 use tonic::codegen::*;
2657 #[async_trait]
2659 pub trait Collections: std::marker::Send + std::marker::Sync + 'static {
2660 async fn get(
2662 &self,
2663 request: tonic::Request<super::GetCollectionInfoRequest>,
2664 ) -> std::result::Result<
2665 tonic::Response<super::GetCollectionInfoResponse>,
2666 tonic::Status,
2667 >;
2668 async fn list(
2670 &self,
2671 request: tonic::Request<super::ListCollectionsRequest>,
2672 ) -> std::result::Result<
2673 tonic::Response<super::ListCollectionsResponse>,
2674 tonic::Status,
2675 >;
2676 async fn create(
2678 &self,
2679 request: tonic::Request<super::CreateCollection>,
2680 ) -> std::result::Result<
2681 tonic::Response<super::CollectionOperationResponse>,
2682 tonic::Status,
2683 >;
2684 async fn update(
2686 &self,
2687 request: tonic::Request<super::UpdateCollection>,
2688 ) -> std::result::Result<
2689 tonic::Response<super::CollectionOperationResponse>,
2690 tonic::Status,
2691 >;
2692 async fn delete(
2694 &self,
2695 request: tonic::Request<super::DeleteCollection>,
2696 ) -> std::result::Result<
2697 tonic::Response<super::CollectionOperationResponse>,
2698 tonic::Status,
2699 >;
2700 async fn update_aliases(
2702 &self,
2703 request: tonic::Request<super::ChangeAliases>,
2704 ) -> std::result::Result<
2705 tonic::Response<super::CollectionOperationResponse>,
2706 tonic::Status,
2707 >;
2708 async fn list_collection_aliases(
2710 &self,
2711 request: tonic::Request<super::ListCollectionAliasesRequest>,
2712 ) -> std::result::Result<
2713 tonic::Response<super::ListAliasesResponse>,
2714 tonic::Status,
2715 >;
2716 async fn list_aliases(
2718 &self,
2719 request: tonic::Request<super::ListAliasesRequest>,
2720 ) -> std::result::Result<
2721 tonic::Response<super::ListAliasesResponse>,
2722 tonic::Status,
2723 >;
2724 async fn collection_cluster_info(
2726 &self,
2727 request: tonic::Request<super::CollectionClusterInfoRequest>,
2728 ) -> std::result::Result<
2729 tonic::Response<super::CollectionClusterInfoResponse>,
2730 tonic::Status,
2731 >;
2732 async fn collection_exists(
2734 &self,
2735 request: tonic::Request<super::CollectionExistsRequest>,
2736 ) -> std::result::Result<
2737 tonic::Response<super::CollectionExistsResponse>,
2738 tonic::Status,
2739 >;
2740 async fn update_collection_cluster_setup(
2742 &self,
2743 request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
2744 ) -> std::result::Result<
2745 tonic::Response<super::UpdateCollectionClusterSetupResponse>,
2746 tonic::Status,
2747 >;
2748 async fn create_shard_key(
2750 &self,
2751 request: tonic::Request<super::CreateShardKeyRequest>,
2752 ) -> std::result::Result<
2753 tonic::Response<super::CreateShardKeyResponse>,
2754 tonic::Status,
2755 >;
2756 async fn delete_shard_key(
2758 &self,
2759 request: tonic::Request<super::DeleteShardKeyRequest>,
2760 ) -> std::result::Result<
2761 tonic::Response<super::DeleteShardKeyResponse>,
2762 tonic::Status,
2763 >;
2764 async fn list_shard_keys(
2766 &self,
2767 request: tonic::Request<super::ListShardKeysRequest>,
2768 ) -> std::result::Result<
2769 tonic::Response<super::ListShardKeysResponse>,
2770 tonic::Status,
2771 >;
2772 }
2773 #[derive(Debug)]
2774 pub struct CollectionsServer<T> {
2775 inner: Arc<T>,
2776 accept_compression_encodings: EnabledCompressionEncodings,
2777 send_compression_encodings: EnabledCompressionEncodings,
2778 max_decoding_message_size: Option<usize>,
2779 max_encoding_message_size: Option<usize>,
2780 }
2781 impl<T> CollectionsServer<T> {
2782 pub fn new(inner: T) -> Self {
2783 Self::from_arc(Arc::new(inner))
2784 }
2785 pub fn from_arc(inner: Arc<T>) -> Self {
2786 Self {
2787 inner,
2788 accept_compression_encodings: Default::default(),
2789 send_compression_encodings: Default::default(),
2790 max_decoding_message_size: None,
2791 max_encoding_message_size: None,
2792 }
2793 }
2794 pub fn with_interceptor<F>(
2795 inner: T,
2796 interceptor: F,
2797 ) -> InterceptedService<Self, F>
2798 where
2799 F: tonic::service::Interceptor,
2800 {
2801 InterceptedService::new(Self::new(inner), interceptor)
2802 }
2803 #[must_use]
2805 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2806 self.accept_compression_encodings.enable(encoding);
2807 self
2808 }
2809 #[must_use]
2811 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2812 self.send_compression_encodings.enable(encoding);
2813 self
2814 }
2815 #[must_use]
2819 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2820 self.max_decoding_message_size = Some(limit);
2821 self
2822 }
2823 #[must_use]
2827 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2828 self.max_encoding_message_size = Some(limit);
2829 self
2830 }
2831 }
2832 impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
2833 where
2834 T: Collections,
2835 B: Body + std::marker::Send + 'static,
2836 B::Error: Into<StdError> + std::marker::Send + 'static,
2837 {
2838 type Response = http::Response<tonic::body::BoxBody>;
2839 type Error = std::convert::Infallible;
2840 type Future = BoxFuture<Self::Response, Self::Error>;
2841 fn poll_ready(
2842 &mut self,
2843 _cx: &mut Context<'_>,
2844 ) -> Poll<std::result::Result<(), Self::Error>> {
2845 Poll::Ready(Ok(()))
2846 }
2847 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2848 match req.uri().path() {
2849 "/qdrant.Collections/Get" => {
2850 #[allow(non_camel_case_types)]
2851 struct GetSvc<T: Collections>(pub Arc<T>);
2852 impl<
2853 T: Collections,
2854 > tonic::server::UnaryService<super::GetCollectionInfoRequest>
2855 for GetSvc<T> {
2856 type Response = super::GetCollectionInfoResponse;
2857 type Future = BoxFuture<
2858 tonic::Response<Self::Response>,
2859 tonic::Status,
2860 >;
2861 fn call(
2862 &mut self,
2863 request: tonic::Request<super::GetCollectionInfoRequest>,
2864 ) -> Self::Future {
2865 let inner = Arc::clone(&self.0);
2866 let fut = async move {
2867 <T as Collections>::get(&inner, request).await
2868 };
2869 Box::pin(fut)
2870 }
2871 }
2872 let accept_compression_encodings = self.accept_compression_encodings;
2873 let send_compression_encodings = self.send_compression_encodings;
2874 let max_decoding_message_size = self.max_decoding_message_size;
2875 let max_encoding_message_size = self.max_encoding_message_size;
2876 let inner = self.inner.clone();
2877 let fut = async move {
2878 let method = GetSvc(inner);
2879 let codec = tonic::codec::ProstCodec::default();
2880 let mut grpc = tonic::server::Grpc::new(codec)
2881 .apply_compression_config(
2882 accept_compression_encodings,
2883 send_compression_encodings,
2884 )
2885 .apply_max_message_size_config(
2886 max_decoding_message_size,
2887 max_encoding_message_size,
2888 );
2889 let res = grpc.unary(method, req).await;
2890 Ok(res)
2891 };
2892 Box::pin(fut)
2893 }
2894 "/qdrant.Collections/List" => {
2895 #[allow(non_camel_case_types)]
2896 struct ListSvc<T: Collections>(pub Arc<T>);
2897 impl<
2898 T: Collections,
2899 > tonic::server::UnaryService<super::ListCollectionsRequest>
2900 for ListSvc<T> {
2901 type Response = super::ListCollectionsResponse;
2902 type Future = BoxFuture<
2903 tonic::Response<Self::Response>,
2904 tonic::Status,
2905 >;
2906 fn call(
2907 &mut self,
2908 request: tonic::Request<super::ListCollectionsRequest>,
2909 ) -> Self::Future {
2910 let inner = Arc::clone(&self.0);
2911 let fut = async move {
2912 <T as Collections>::list(&inner, request).await
2913 };
2914 Box::pin(fut)
2915 }
2916 }
2917 let accept_compression_encodings = self.accept_compression_encodings;
2918 let send_compression_encodings = self.send_compression_encodings;
2919 let max_decoding_message_size = self.max_decoding_message_size;
2920 let max_encoding_message_size = self.max_encoding_message_size;
2921 let inner = self.inner.clone();
2922 let fut = async move {
2923 let method = ListSvc(inner);
2924 let codec = tonic::codec::ProstCodec::default();
2925 let mut grpc = tonic::server::Grpc::new(codec)
2926 .apply_compression_config(
2927 accept_compression_encodings,
2928 send_compression_encodings,
2929 )
2930 .apply_max_message_size_config(
2931 max_decoding_message_size,
2932 max_encoding_message_size,
2933 );
2934 let res = grpc.unary(method, req).await;
2935 Ok(res)
2936 };
2937 Box::pin(fut)
2938 }
2939 "/qdrant.Collections/Create" => {
2940 #[allow(non_camel_case_types)]
2941 struct CreateSvc<T: Collections>(pub Arc<T>);
2942 impl<
2943 T: Collections,
2944 > tonic::server::UnaryService<super::CreateCollection>
2945 for CreateSvc<T> {
2946 type Response = super::CollectionOperationResponse;
2947 type Future = BoxFuture<
2948 tonic::Response<Self::Response>,
2949 tonic::Status,
2950 >;
2951 fn call(
2952 &mut self,
2953 request: tonic::Request<super::CreateCollection>,
2954 ) -> Self::Future {
2955 let inner = Arc::clone(&self.0);
2956 let fut = async move {
2957 <T as Collections>::create(&inner, request).await
2958 };
2959 Box::pin(fut)
2960 }
2961 }
2962 let accept_compression_encodings = self.accept_compression_encodings;
2963 let send_compression_encodings = self.send_compression_encodings;
2964 let max_decoding_message_size = self.max_decoding_message_size;
2965 let max_encoding_message_size = self.max_encoding_message_size;
2966 let inner = self.inner.clone();
2967 let fut = async move {
2968 let method = CreateSvc(inner);
2969 let codec = tonic::codec::ProstCodec::default();
2970 let mut grpc = tonic::server::Grpc::new(codec)
2971 .apply_compression_config(
2972 accept_compression_encodings,
2973 send_compression_encodings,
2974 )
2975 .apply_max_message_size_config(
2976 max_decoding_message_size,
2977 max_encoding_message_size,
2978 );
2979 let res = grpc.unary(method, req).await;
2980 Ok(res)
2981 };
2982 Box::pin(fut)
2983 }
2984 "/qdrant.Collections/Update" => {
2985 #[allow(non_camel_case_types)]
2986 struct UpdateSvc<T: Collections>(pub Arc<T>);
2987 impl<
2988 T: Collections,
2989 > tonic::server::UnaryService<super::UpdateCollection>
2990 for UpdateSvc<T> {
2991 type Response = super::CollectionOperationResponse;
2992 type Future = BoxFuture<
2993 tonic::Response<Self::Response>,
2994 tonic::Status,
2995 >;
2996 fn call(
2997 &mut self,
2998 request: tonic::Request<super::UpdateCollection>,
2999 ) -> Self::Future {
3000 let inner = Arc::clone(&self.0);
3001 let fut = async move {
3002 <T as Collections>::update(&inner, request).await
3003 };
3004 Box::pin(fut)
3005 }
3006 }
3007 let accept_compression_encodings = self.accept_compression_encodings;
3008 let send_compression_encodings = self.send_compression_encodings;
3009 let max_decoding_message_size = self.max_decoding_message_size;
3010 let max_encoding_message_size = self.max_encoding_message_size;
3011 let inner = self.inner.clone();
3012 let fut = async move {
3013 let method = UpdateSvc(inner);
3014 let codec = tonic::codec::ProstCodec::default();
3015 let mut grpc = tonic::server::Grpc::new(codec)
3016 .apply_compression_config(
3017 accept_compression_encodings,
3018 send_compression_encodings,
3019 )
3020 .apply_max_message_size_config(
3021 max_decoding_message_size,
3022 max_encoding_message_size,
3023 );
3024 let res = grpc.unary(method, req).await;
3025 Ok(res)
3026 };
3027 Box::pin(fut)
3028 }
3029 "/qdrant.Collections/Delete" => {
3030 #[allow(non_camel_case_types)]
3031 struct DeleteSvc<T: Collections>(pub Arc<T>);
3032 impl<
3033 T: Collections,
3034 > tonic::server::UnaryService<super::DeleteCollection>
3035 for DeleteSvc<T> {
3036 type Response = super::CollectionOperationResponse;
3037 type Future = BoxFuture<
3038 tonic::Response<Self::Response>,
3039 tonic::Status,
3040 >;
3041 fn call(
3042 &mut self,
3043 request: tonic::Request<super::DeleteCollection>,
3044 ) -> Self::Future {
3045 let inner = Arc::clone(&self.0);
3046 let fut = async move {
3047 <T as Collections>::delete(&inner, request).await
3048 };
3049 Box::pin(fut)
3050 }
3051 }
3052 let accept_compression_encodings = self.accept_compression_encodings;
3053 let send_compression_encodings = self.send_compression_encodings;
3054 let max_decoding_message_size = self.max_decoding_message_size;
3055 let max_encoding_message_size = self.max_encoding_message_size;
3056 let inner = self.inner.clone();
3057 let fut = async move {
3058 let method = DeleteSvc(inner);
3059 let codec = tonic::codec::ProstCodec::default();
3060 let mut grpc = tonic::server::Grpc::new(codec)
3061 .apply_compression_config(
3062 accept_compression_encodings,
3063 send_compression_encodings,
3064 )
3065 .apply_max_message_size_config(
3066 max_decoding_message_size,
3067 max_encoding_message_size,
3068 );
3069 let res = grpc.unary(method, req).await;
3070 Ok(res)
3071 };
3072 Box::pin(fut)
3073 }
3074 "/qdrant.Collections/UpdateAliases" => {
3075 #[allow(non_camel_case_types)]
3076 struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
3077 impl<
3078 T: Collections,
3079 > tonic::server::UnaryService<super::ChangeAliases>
3080 for UpdateAliasesSvc<T> {
3081 type Response = super::CollectionOperationResponse;
3082 type Future = BoxFuture<
3083 tonic::Response<Self::Response>,
3084 tonic::Status,
3085 >;
3086 fn call(
3087 &mut self,
3088 request: tonic::Request<super::ChangeAliases>,
3089 ) -> Self::Future {
3090 let inner = Arc::clone(&self.0);
3091 let fut = async move {
3092 <T as Collections>::update_aliases(&inner, request).await
3093 };
3094 Box::pin(fut)
3095 }
3096 }
3097 let accept_compression_encodings = self.accept_compression_encodings;
3098 let send_compression_encodings = self.send_compression_encodings;
3099 let max_decoding_message_size = self.max_decoding_message_size;
3100 let max_encoding_message_size = self.max_encoding_message_size;
3101 let inner = self.inner.clone();
3102 let fut = async move {
3103 let method = UpdateAliasesSvc(inner);
3104 let codec = tonic::codec::ProstCodec::default();
3105 let mut grpc = tonic::server::Grpc::new(codec)
3106 .apply_compression_config(
3107 accept_compression_encodings,
3108 send_compression_encodings,
3109 )
3110 .apply_max_message_size_config(
3111 max_decoding_message_size,
3112 max_encoding_message_size,
3113 );
3114 let res = grpc.unary(method, req).await;
3115 Ok(res)
3116 };
3117 Box::pin(fut)
3118 }
3119 "/qdrant.Collections/ListCollectionAliases" => {
3120 #[allow(non_camel_case_types)]
3121 struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
3122 impl<
3123 T: Collections,
3124 > tonic::server::UnaryService<super::ListCollectionAliasesRequest>
3125 for ListCollectionAliasesSvc<T> {
3126 type Response = super::ListAliasesResponse;
3127 type Future = BoxFuture<
3128 tonic::Response<Self::Response>,
3129 tonic::Status,
3130 >;
3131 fn call(
3132 &mut self,
3133 request: tonic::Request<super::ListCollectionAliasesRequest>,
3134 ) -> Self::Future {
3135 let inner = Arc::clone(&self.0);
3136 let fut = async move {
3137 <T as Collections>::list_collection_aliases(&inner, request)
3138 .await
3139 };
3140 Box::pin(fut)
3141 }
3142 }
3143 let accept_compression_encodings = self.accept_compression_encodings;
3144 let send_compression_encodings = self.send_compression_encodings;
3145 let max_decoding_message_size = self.max_decoding_message_size;
3146 let max_encoding_message_size = self.max_encoding_message_size;
3147 let inner = self.inner.clone();
3148 let fut = async move {
3149 let method = ListCollectionAliasesSvc(inner);
3150 let codec = tonic::codec::ProstCodec::default();
3151 let mut grpc = tonic::server::Grpc::new(codec)
3152 .apply_compression_config(
3153 accept_compression_encodings,
3154 send_compression_encodings,
3155 )
3156 .apply_max_message_size_config(
3157 max_decoding_message_size,
3158 max_encoding_message_size,
3159 );
3160 let res = grpc.unary(method, req).await;
3161 Ok(res)
3162 };
3163 Box::pin(fut)
3164 }
3165 "/qdrant.Collections/ListAliases" => {
3166 #[allow(non_camel_case_types)]
3167 struct ListAliasesSvc<T: Collections>(pub Arc<T>);
3168 impl<
3169 T: Collections,
3170 > tonic::server::UnaryService<super::ListAliasesRequest>
3171 for ListAliasesSvc<T> {
3172 type Response = super::ListAliasesResponse;
3173 type Future = BoxFuture<
3174 tonic::Response<Self::Response>,
3175 tonic::Status,
3176 >;
3177 fn call(
3178 &mut self,
3179 request: tonic::Request<super::ListAliasesRequest>,
3180 ) -> Self::Future {
3181 let inner = Arc::clone(&self.0);
3182 let fut = async move {
3183 <T as Collections>::list_aliases(&inner, request).await
3184 };
3185 Box::pin(fut)
3186 }
3187 }
3188 let accept_compression_encodings = self.accept_compression_encodings;
3189 let send_compression_encodings = self.send_compression_encodings;
3190 let max_decoding_message_size = self.max_decoding_message_size;
3191 let max_encoding_message_size = self.max_encoding_message_size;
3192 let inner = self.inner.clone();
3193 let fut = async move {
3194 let method = ListAliasesSvc(inner);
3195 let codec = tonic::codec::ProstCodec::default();
3196 let mut grpc = tonic::server::Grpc::new(codec)
3197 .apply_compression_config(
3198 accept_compression_encodings,
3199 send_compression_encodings,
3200 )
3201 .apply_max_message_size_config(
3202 max_decoding_message_size,
3203 max_encoding_message_size,
3204 );
3205 let res = grpc.unary(method, req).await;
3206 Ok(res)
3207 };
3208 Box::pin(fut)
3209 }
3210 "/qdrant.Collections/CollectionClusterInfo" => {
3211 #[allow(non_camel_case_types)]
3212 struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
3213 impl<
3214 T: Collections,
3215 > tonic::server::UnaryService<super::CollectionClusterInfoRequest>
3216 for CollectionClusterInfoSvc<T> {
3217 type Response = super::CollectionClusterInfoResponse;
3218 type Future = BoxFuture<
3219 tonic::Response<Self::Response>,
3220 tonic::Status,
3221 >;
3222 fn call(
3223 &mut self,
3224 request: tonic::Request<super::CollectionClusterInfoRequest>,
3225 ) -> Self::Future {
3226 let inner = Arc::clone(&self.0);
3227 let fut = async move {
3228 <T as Collections>::collection_cluster_info(&inner, request)
3229 .await
3230 };
3231 Box::pin(fut)
3232 }
3233 }
3234 let accept_compression_encodings = self.accept_compression_encodings;
3235 let send_compression_encodings = self.send_compression_encodings;
3236 let max_decoding_message_size = self.max_decoding_message_size;
3237 let max_encoding_message_size = self.max_encoding_message_size;
3238 let inner = self.inner.clone();
3239 let fut = async move {
3240 let method = CollectionClusterInfoSvc(inner);
3241 let codec = tonic::codec::ProstCodec::default();
3242 let mut grpc = tonic::server::Grpc::new(codec)
3243 .apply_compression_config(
3244 accept_compression_encodings,
3245 send_compression_encodings,
3246 )
3247 .apply_max_message_size_config(
3248 max_decoding_message_size,
3249 max_encoding_message_size,
3250 );
3251 let res = grpc.unary(method, req).await;
3252 Ok(res)
3253 };
3254 Box::pin(fut)
3255 }
3256 "/qdrant.Collections/CollectionExists" => {
3257 #[allow(non_camel_case_types)]
3258 struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
3259 impl<
3260 T: Collections,
3261 > tonic::server::UnaryService<super::CollectionExistsRequest>
3262 for CollectionExistsSvc<T> {
3263 type Response = super::CollectionExistsResponse;
3264 type Future = BoxFuture<
3265 tonic::Response<Self::Response>,
3266 tonic::Status,
3267 >;
3268 fn call(
3269 &mut self,
3270 request: tonic::Request<super::CollectionExistsRequest>,
3271 ) -> Self::Future {
3272 let inner = Arc::clone(&self.0);
3273 let fut = async move {
3274 <T as Collections>::collection_exists(&inner, request).await
3275 };
3276 Box::pin(fut)
3277 }
3278 }
3279 let accept_compression_encodings = self.accept_compression_encodings;
3280 let send_compression_encodings = self.send_compression_encodings;
3281 let max_decoding_message_size = self.max_decoding_message_size;
3282 let max_encoding_message_size = self.max_encoding_message_size;
3283 let inner = self.inner.clone();
3284 let fut = async move {
3285 let method = CollectionExistsSvc(inner);
3286 let codec = tonic::codec::ProstCodec::default();
3287 let mut grpc = tonic::server::Grpc::new(codec)
3288 .apply_compression_config(
3289 accept_compression_encodings,
3290 send_compression_encodings,
3291 )
3292 .apply_max_message_size_config(
3293 max_decoding_message_size,
3294 max_encoding_message_size,
3295 );
3296 let res = grpc.unary(method, req).await;
3297 Ok(res)
3298 };
3299 Box::pin(fut)
3300 }
3301 "/qdrant.Collections/UpdateCollectionClusterSetup" => {
3302 #[allow(non_camel_case_types)]
3303 struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
3304 impl<
3305 T: Collections,
3306 > tonic::server::UnaryService<
3307 super::UpdateCollectionClusterSetupRequest,
3308 > for UpdateCollectionClusterSetupSvc<T> {
3309 type Response = super::UpdateCollectionClusterSetupResponse;
3310 type Future = BoxFuture<
3311 tonic::Response<Self::Response>,
3312 tonic::Status,
3313 >;
3314 fn call(
3315 &mut self,
3316 request: tonic::Request<
3317 super::UpdateCollectionClusterSetupRequest,
3318 >,
3319 ) -> Self::Future {
3320 let inner = Arc::clone(&self.0);
3321 let fut = async move {
3322 <T as Collections>::update_collection_cluster_setup(
3323 &inner,
3324 request,
3325 )
3326 .await
3327 };
3328 Box::pin(fut)
3329 }
3330 }
3331 let accept_compression_encodings = self.accept_compression_encodings;
3332 let send_compression_encodings = self.send_compression_encodings;
3333 let max_decoding_message_size = self.max_decoding_message_size;
3334 let max_encoding_message_size = self.max_encoding_message_size;
3335 let inner = self.inner.clone();
3336 let fut = async move {
3337 let method = UpdateCollectionClusterSetupSvc(inner);
3338 let codec = tonic::codec::ProstCodec::default();
3339 let mut grpc = tonic::server::Grpc::new(codec)
3340 .apply_compression_config(
3341 accept_compression_encodings,
3342 send_compression_encodings,
3343 )
3344 .apply_max_message_size_config(
3345 max_decoding_message_size,
3346 max_encoding_message_size,
3347 );
3348 let res = grpc.unary(method, req).await;
3349 Ok(res)
3350 };
3351 Box::pin(fut)
3352 }
3353 "/qdrant.Collections/CreateShardKey" => {
3354 #[allow(non_camel_case_types)]
3355 struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
3356 impl<
3357 T: Collections,
3358 > tonic::server::UnaryService<super::CreateShardKeyRequest>
3359 for CreateShardKeySvc<T> {
3360 type Response = super::CreateShardKeyResponse;
3361 type Future = BoxFuture<
3362 tonic::Response<Self::Response>,
3363 tonic::Status,
3364 >;
3365 fn call(
3366 &mut self,
3367 request: tonic::Request<super::CreateShardKeyRequest>,
3368 ) -> Self::Future {
3369 let inner = Arc::clone(&self.0);
3370 let fut = async move {
3371 <T as Collections>::create_shard_key(&inner, request).await
3372 };
3373 Box::pin(fut)
3374 }
3375 }
3376 let accept_compression_encodings = self.accept_compression_encodings;
3377 let send_compression_encodings = self.send_compression_encodings;
3378 let max_decoding_message_size = self.max_decoding_message_size;
3379 let max_encoding_message_size = self.max_encoding_message_size;
3380 let inner = self.inner.clone();
3381 let fut = async move {
3382 let method = CreateShardKeySvc(inner);
3383 let codec = tonic::codec::ProstCodec::default();
3384 let mut grpc = tonic::server::Grpc::new(codec)
3385 .apply_compression_config(
3386 accept_compression_encodings,
3387 send_compression_encodings,
3388 )
3389 .apply_max_message_size_config(
3390 max_decoding_message_size,
3391 max_encoding_message_size,
3392 );
3393 let res = grpc.unary(method, req).await;
3394 Ok(res)
3395 };
3396 Box::pin(fut)
3397 }
3398 "/qdrant.Collections/DeleteShardKey" => {
3399 #[allow(non_camel_case_types)]
3400 struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
3401 impl<
3402 T: Collections,
3403 > tonic::server::UnaryService<super::DeleteShardKeyRequest>
3404 for DeleteShardKeySvc<T> {
3405 type Response = super::DeleteShardKeyResponse;
3406 type Future = BoxFuture<
3407 tonic::Response<Self::Response>,
3408 tonic::Status,
3409 >;
3410 fn call(
3411 &mut self,
3412 request: tonic::Request<super::DeleteShardKeyRequest>,
3413 ) -> Self::Future {
3414 let inner = Arc::clone(&self.0);
3415 let fut = async move {
3416 <T as Collections>::delete_shard_key(&inner, request).await
3417 };
3418 Box::pin(fut)
3419 }
3420 }
3421 let accept_compression_encodings = self.accept_compression_encodings;
3422 let send_compression_encodings = self.send_compression_encodings;
3423 let max_decoding_message_size = self.max_decoding_message_size;
3424 let max_encoding_message_size = self.max_encoding_message_size;
3425 let inner = self.inner.clone();
3426 let fut = async move {
3427 let method = DeleteShardKeySvc(inner);
3428 let codec = tonic::codec::ProstCodec::default();
3429 let mut grpc = tonic::server::Grpc::new(codec)
3430 .apply_compression_config(
3431 accept_compression_encodings,
3432 send_compression_encodings,
3433 )
3434 .apply_max_message_size_config(
3435 max_decoding_message_size,
3436 max_encoding_message_size,
3437 );
3438 let res = grpc.unary(method, req).await;
3439 Ok(res)
3440 };
3441 Box::pin(fut)
3442 }
3443 "/qdrant.Collections/ListShardKeys" => {
3444 #[allow(non_camel_case_types)]
3445 struct ListShardKeysSvc<T: Collections>(pub Arc<T>);
3446 impl<
3447 T: Collections,
3448 > tonic::server::UnaryService<super::ListShardKeysRequest>
3449 for ListShardKeysSvc<T> {
3450 type Response = super::ListShardKeysResponse;
3451 type Future = BoxFuture<
3452 tonic::Response<Self::Response>,
3453 tonic::Status,
3454 >;
3455 fn call(
3456 &mut self,
3457 request: tonic::Request<super::ListShardKeysRequest>,
3458 ) -> Self::Future {
3459 let inner = Arc::clone(&self.0);
3460 let fut = async move {
3461 <T as Collections>::list_shard_keys(&inner, request).await
3462 };
3463 Box::pin(fut)
3464 }
3465 }
3466 let accept_compression_encodings = self.accept_compression_encodings;
3467 let send_compression_encodings = self.send_compression_encodings;
3468 let max_decoding_message_size = self.max_decoding_message_size;
3469 let max_encoding_message_size = self.max_encoding_message_size;
3470 let inner = self.inner.clone();
3471 let fut = async move {
3472 let method = ListShardKeysSvc(inner);
3473 let codec = tonic::codec::ProstCodec::default();
3474 let mut grpc = tonic::server::Grpc::new(codec)
3475 .apply_compression_config(
3476 accept_compression_encodings,
3477 send_compression_encodings,
3478 )
3479 .apply_max_message_size_config(
3480 max_decoding_message_size,
3481 max_encoding_message_size,
3482 );
3483 let res = grpc.unary(method, req).await;
3484 Ok(res)
3485 };
3486 Box::pin(fut)
3487 }
3488 _ => {
3489 Box::pin(async move {
3490 let mut response = http::Response::new(empty_body());
3491 let headers = response.headers_mut();
3492 headers
3493 .insert(
3494 tonic::Status::GRPC_STATUS,
3495 (tonic::Code::Unimplemented as i32).into(),
3496 );
3497 headers
3498 .insert(
3499 http::header::CONTENT_TYPE,
3500 tonic::metadata::GRPC_CONTENT_TYPE,
3501 );
3502 Ok(response)
3503 })
3504 }
3505 }
3506 }
3507 }
3508 impl<T> Clone for CollectionsServer<T> {
3509 fn clone(&self) -> Self {
3510 let inner = self.inner.clone();
3511 Self {
3512 inner,
3513 accept_compression_encodings: self.accept_compression_encodings,
3514 send_compression_encodings: self.send_compression_encodings,
3515 max_decoding_message_size: self.max_decoding_message_size,
3516 max_encoding_message_size: self.max_encoding_message_size,
3517 }
3518 }
3519 }
3520 pub const SERVICE_NAME: &str = "qdrant.Collections";
3522 impl<T> tonic::server::NamedService for CollectionsServer<T> {
3523 const NAME: &'static str = SERVICE_NAME;
3524 }
3525}
3526#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3527pub struct WriteOrdering {
3528 #[prost(enumeration = "WriteOrderingType", tag = "1")]
3530 pub r#type: i32,
3531}
3532#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3533pub struct ReadConsistency {
3534 #[prost(oneof = "read_consistency::Value", tags = "1, 2")]
3535 pub value: ::core::option::Option<read_consistency::Value>,
3536}
3537pub mod read_consistency {
3539 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3540 pub enum Value {
3541 #[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
3543 Type(i32),
3544 #[prost(uint64, tag = "2")]
3547 Factor(u64),
3548 }
3549}
3550#[derive(Clone, PartialEq, ::prost::Message)]
3551pub struct SparseIndices {
3552 #[prost(uint32, repeated, tag = "1")]
3553 pub data: ::prost::alloc::vec::Vec<u32>,
3554}
3555#[derive(Clone, PartialEq, ::prost::Message)]
3556pub struct Document {
3557 #[prost(string, tag = "1")]
3559 pub text: ::prost::alloc::string::String,
3560 #[prost(string, tag = "3")]
3562 pub model: ::prost::alloc::string::String,
3563 #[prost(map = "string, message", tag = "4")]
3565 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3566}
3567#[derive(Clone, PartialEq, ::prost::Message)]
3568pub struct Image {
3569 #[prost(message, optional, tag = "1")]
3571 pub image: ::core::option::Option<Value>,
3572 #[prost(string, tag = "2")]
3574 pub model: ::prost::alloc::string::String,
3575 #[prost(map = "string, message", tag = "3")]
3577 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3578}
3579#[derive(Clone, PartialEq, ::prost::Message)]
3580pub struct InferenceObject {
3581 #[prost(message, optional, tag = "1")]
3583 pub object: ::core::option::Option<Value>,
3584 #[prost(string, tag = "2")]
3586 pub model: ::prost::alloc::string::String,
3587 #[prost(map = "string, message", tag = "3")]
3589 pub options: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3590}
3591#[derive(Clone, PartialEq, ::prost::Message)]
3592pub struct Vector {
3593 #[deprecated]
3595 #[prost(float, repeated, packed = "false", tag = "1")]
3596 pub data: ::prost::alloc::vec::Vec<f32>,
3600 #[deprecated]
3602 #[prost(message, optional, tag = "2")]
3603 pub indices: ::core::option::Option<SparseIndices>,
3607 #[deprecated]
3609 #[prost(uint32, optional, tag = "3")]
3610 pub vectors_count: ::core::option::Option<u32>,
3614 #[prost(oneof = "vector::Vector", tags = "101, 102, 103, 104, 105, 106")]
3615 pub vector: ::core::option::Option<vector::Vector>,
3616}
3617pub mod vector {
3619 #[derive(Clone, PartialEq, ::prost::Oneof)]
3620 pub enum Vector {
3621 #[prost(message, tag = "101")]
3623 Dense(super::DenseVector),
3624 #[prost(message, tag = "102")]
3626 Sparse(super::SparseVector),
3627 #[prost(message, tag = "103")]
3629 MultiDense(super::MultiDenseVector),
3630 #[prost(message, tag = "104")]
3631 Document(super::Document),
3632 #[prost(message, tag = "105")]
3633 Image(super::Image),
3634 #[prost(message, tag = "106")]
3635 Object(super::InferenceObject),
3636 }
3637}
3638#[derive(Clone, PartialEq, ::prost::Message)]
3639pub struct VectorOutput {
3640 #[deprecated]
3642 #[prost(float, repeated, packed = "false", tag = "1")]
3643 pub data: ::prost::alloc::vec::Vec<f32>,
3647 #[deprecated]
3649 #[prost(message, optional, tag = "2")]
3650 pub indices: ::core::option::Option<SparseIndices>,
3654 #[deprecated]
3656 #[prost(uint32, optional, tag = "3")]
3657 pub vectors_count: ::core::option::Option<u32>,
3661 #[prost(oneof = "vector_output::Vector", tags = "101, 102, 103")]
3662 pub vector: ::core::option::Option<vector_output::Vector>,
3663}
3664pub mod vector_output {
3666 #[derive(Clone, PartialEq, ::prost::Oneof)]
3667 pub enum Vector {
3668 #[prost(message, tag = "101")]
3670 Dense(super::DenseVector),
3671 #[prost(message, tag = "102")]
3673 Sparse(super::SparseVector),
3674 #[prost(message, tag = "103")]
3676 MultiDense(super::MultiDenseVector),
3677 }
3678}
3679#[derive(Clone, PartialEq, ::prost::Message)]
3680pub struct DenseVector {
3681 #[prost(float, repeated, tag = "1")]
3682 pub data: ::prost::alloc::vec::Vec<f32>,
3683}
3684#[derive(Clone, PartialEq, ::prost::Message)]
3685pub struct SparseVector {
3686 #[prost(float, repeated, tag = "1")]
3687 pub values: ::prost::alloc::vec::Vec<f32>,
3688 #[prost(uint32, repeated, tag = "2")]
3689 pub indices: ::prost::alloc::vec::Vec<u32>,
3690}
3691#[derive(Clone, PartialEq, ::prost::Message)]
3692pub struct MultiDenseVector {
3693 #[prost(message, repeated, tag = "1")]
3694 pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
3695}
3696#[derive(Clone, PartialEq, ::prost::Message)]
3699pub struct VectorInput {
3700 #[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
3701 pub variant: ::core::option::Option<vector_input::Variant>,
3702}
3703pub mod vector_input {
3705 #[derive(Clone, PartialEq, ::prost::Oneof)]
3706 pub enum Variant {
3707 #[prost(message, tag = "1")]
3708 Id(super::PointId),
3709 #[prost(message, tag = "2")]
3710 Dense(super::DenseVector),
3711 #[prost(message, tag = "3")]
3712 Sparse(super::SparseVector),
3713 #[prost(message, tag = "4")]
3714 MultiDense(super::MultiDenseVector),
3715 #[prost(message, tag = "5")]
3716 Document(super::Document),
3717 #[prost(message, tag = "6")]
3718 Image(super::Image),
3719 #[prost(message, tag = "7")]
3720 Object(super::InferenceObject),
3721 }
3722}
3723#[derive(Clone, PartialEq, ::prost::Message)]
3724pub struct ShardKeySelector {
3725 #[prost(message, repeated, tag = "1")]
3727 pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
3728 #[prost(message, optional, tag = "2")]
3729 pub fallback: ::core::option::Option<ShardKey>,
3730}
3731#[derive(Clone, PartialEq, ::prost::Message)]
3732pub struct UpsertPoints {
3733 #[prost(string, tag = "1")]
3735 pub collection_name: ::prost::alloc::string::String,
3736 #[prost(bool, optional, tag = "2")]
3738 pub wait: ::core::option::Option<bool>,
3739 #[prost(message, repeated, tag = "3")]
3740 pub points: ::prost::alloc::vec::Vec<PointStruct>,
3741 #[prost(message, optional, tag = "4")]
3743 pub ordering: ::core::option::Option<WriteOrdering>,
3744 #[prost(message, optional, tag = "5")]
3746 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3747 #[prost(message, optional, tag = "6")]
3750 pub update_filter: ::core::option::Option<Filter>,
3751 #[prost(uint64, optional, tag = "7")]
3753 pub timeout: ::core::option::Option<u64>,
3754 #[prost(enumeration = "UpdateMode", optional, tag = "8")]
3756 pub update_mode: ::core::option::Option<i32>,
3757}
3758#[derive(Clone, PartialEq, ::prost::Message)]
3759pub struct DeletePoints {
3760 #[prost(string, tag = "1")]
3762 pub collection_name: ::prost::alloc::string::String,
3763 #[prost(bool, optional, tag = "2")]
3765 pub wait: ::core::option::Option<bool>,
3766 #[prost(message, optional, tag = "3")]
3768 pub points: ::core::option::Option<PointsSelector>,
3769 #[prost(message, optional, tag = "4")]
3771 pub ordering: ::core::option::Option<WriteOrdering>,
3772 #[prost(message, optional, tag = "5")]
3774 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3775 #[prost(uint64, optional, tag = "6")]
3777 pub timeout: ::core::option::Option<u64>,
3778}
3779#[derive(Clone, PartialEq, ::prost::Message)]
3780pub struct GetPoints {
3781 #[prost(string, tag = "1")]
3783 pub collection_name: ::prost::alloc::string::String,
3784 #[prost(message, repeated, tag = "2")]
3786 pub ids: ::prost::alloc::vec::Vec<PointId>,
3787 #[prost(message, optional, tag = "4")]
3789 pub with_payload: ::core::option::Option<WithPayloadSelector>,
3790 #[prost(message, optional, tag = "5")]
3792 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
3793 #[prost(message, optional, tag = "6")]
3795 pub read_consistency: ::core::option::Option<ReadConsistency>,
3796 #[prost(message, optional, tag = "7")]
3798 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3799 #[prost(uint64, optional, tag = "8")]
3801 pub timeout: ::core::option::Option<u64>,
3802}
3803#[derive(Clone, PartialEq, ::prost::Message)]
3804pub struct UpdatePointVectors {
3805 #[prost(string, tag = "1")]
3807 pub collection_name: ::prost::alloc::string::String,
3808 #[prost(bool, optional, tag = "2")]
3810 pub wait: ::core::option::Option<bool>,
3811 #[prost(message, repeated, tag = "3")]
3813 pub points: ::prost::alloc::vec::Vec<PointVectors>,
3814 #[prost(message, optional, tag = "4")]
3816 pub ordering: ::core::option::Option<WriteOrdering>,
3817 #[prost(message, optional, tag = "5")]
3819 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3820 #[prost(message, optional, tag = "6")]
3822 pub update_filter: ::core::option::Option<Filter>,
3823 #[prost(uint64, optional, tag = "7")]
3825 pub timeout: ::core::option::Option<u64>,
3826}
3827#[derive(Clone, PartialEq, ::prost::Message)]
3828pub struct PointVectors {
3829 #[prost(message, optional, tag = "1")]
3831 pub id: ::core::option::Option<PointId>,
3832 #[prost(message, optional, tag = "2")]
3834 pub vectors: ::core::option::Option<Vectors>,
3835}
3836#[derive(Clone, PartialEq, ::prost::Message)]
3837pub struct DeletePointVectors {
3838 #[prost(string, tag = "1")]
3840 pub collection_name: ::prost::alloc::string::String,
3841 #[prost(bool, optional, tag = "2")]
3843 pub wait: ::core::option::Option<bool>,
3844 #[prost(message, optional, tag = "3")]
3846 pub points_selector: ::core::option::Option<PointsSelector>,
3847 #[prost(message, optional, tag = "4")]
3849 pub vectors: ::core::option::Option<VectorsSelector>,
3850 #[prost(message, optional, tag = "5")]
3852 pub ordering: ::core::option::Option<WriteOrdering>,
3853 #[prost(message, optional, tag = "6")]
3855 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3856 #[prost(uint64, optional, tag = "7")]
3858 pub timeout: ::core::option::Option<u64>,
3859}
3860#[derive(Clone, PartialEq, ::prost::Message)]
3861pub struct SetPayloadPoints {
3862 #[prost(string, tag = "1")]
3864 pub collection_name: ::prost::alloc::string::String,
3865 #[prost(bool, optional, tag = "2")]
3867 pub wait: ::core::option::Option<bool>,
3868 #[prost(map = "string, message", tag = "3")]
3870 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
3871 #[prost(message, optional, tag = "5")]
3873 pub points_selector: ::core::option::Option<PointsSelector>,
3874 #[prost(message, optional, tag = "6")]
3876 pub ordering: ::core::option::Option<WriteOrdering>,
3877 #[prost(message, optional, tag = "7")]
3879 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3880 #[prost(string, optional, tag = "8")]
3882 pub key: ::core::option::Option<::prost::alloc::string::String>,
3883 #[prost(uint64, optional, tag = "9")]
3885 pub timeout: ::core::option::Option<u64>,
3886}
3887#[derive(Clone, PartialEq, ::prost::Message)]
3888pub struct DeletePayloadPoints {
3889 #[prost(string, tag = "1")]
3891 pub collection_name: ::prost::alloc::string::String,
3892 #[prost(bool, optional, tag = "2")]
3894 pub wait: ::core::option::Option<bool>,
3895 #[prost(string, repeated, tag = "3")]
3897 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3898 #[prost(message, optional, tag = "5")]
3900 pub points_selector: ::core::option::Option<PointsSelector>,
3901 #[prost(message, optional, tag = "6")]
3903 pub ordering: ::core::option::Option<WriteOrdering>,
3904 #[prost(message, optional, tag = "7")]
3906 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3907 #[prost(uint64, optional, tag = "8")]
3909 pub timeout: ::core::option::Option<u64>,
3910}
3911#[derive(Clone, PartialEq, ::prost::Message)]
3912pub struct ClearPayloadPoints {
3913 #[prost(string, tag = "1")]
3915 pub collection_name: ::prost::alloc::string::String,
3916 #[prost(bool, optional, tag = "2")]
3918 pub wait: ::core::option::Option<bool>,
3919 #[prost(message, optional, tag = "3")]
3921 pub points: ::core::option::Option<PointsSelector>,
3922 #[prost(message, optional, tag = "4")]
3924 pub ordering: ::core::option::Option<WriteOrdering>,
3925 #[prost(message, optional, tag = "5")]
3927 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
3928 #[prost(uint64, optional, tag = "6")]
3930 pub timeout: ::core::option::Option<u64>,
3931}
3932#[derive(Clone, PartialEq, ::prost::Message)]
3933pub struct CreateFieldIndexCollection {
3934 #[prost(string, tag = "1")]
3936 pub collection_name: ::prost::alloc::string::String,
3937 #[prost(bool, optional, tag = "2")]
3939 pub wait: ::core::option::Option<bool>,
3940 #[prost(string, tag = "3")]
3942 pub field_name: ::prost::alloc::string::String,
3943 #[prost(enumeration = "FieldType", optional, tag = "4")]
3945 pub field_type: ::core::option::Option<i32>,
3946 #[prost(message, optional, tag = "5")]
3948 pub field_index_params: ::core::option::Option<PayloadIndexParams>,
3949 #[prost(message, optional, tag = "6")]
3951 pub ordering: ::core::option::Option<WriteOrdering>,
3952 #[prost(uint64, optional, tag = "7")]
3954 pub timeout: ::core::option::Option<u64>,
3955}
3956#[derive(Clone, PartialEq, ::prost::Message)]
3957pub struct DeleteFieldIndexCollection {
3958 #[prost(string, tag = "1")]
3960 pub collection_name: ::prost::alloc::string::String,
3961 #[prost(bool, optional, tag = "2")]
3963 pub wait: ::core::option::Option<bool>,
3964 #[prost(string, tag = "3")]
3966 pub field_name: ::prost::alloc::string::String,
3967 #[prost(message, optional, tag = "4")]
3969 pub ordering: ::core::option::Option<WriteOrdering>,
3970 #[prost(uint64, optional, tag = "5")]
3972 pub timeout: ::core::option::Option<u64>,
3973}
3974#[derive(Clone, PartialEq, ::prost::Message)]
3975pub struct PayloadIncludeSelector {
3976 #[prost(string, repeated, tag = "1")]
3978 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3979}
3980#[derive(Clone, PartialEq, ::prost::Message)]
3981pub struct PayloadExcludeSelector {
3982 #[prost(string, repeated, tag = "1")]
3984 pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3985}
3986#[derive(Clone, PartialEq, ::prost::Message)]
3987pub struct WithPayloadSelector {
3988 #[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
3989 pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
3990}
3991pub mod with_payload_selector {
3993 #[derive(Clone, PartialEq, ::prost::Oneof)]
3994 pub enum SelectorOptions {
3995 #[prost(bool, tag = "1")]
3997 Enable(bool),
3998 #[prost(message, tag = "2")]
3999 Include(super::PayloadIncludeSelector),
4000 #[prost(message, tag = "3")]
4001 Exclude(super::PayloadExcludeSelector),
4002 }
4003}
4004#[derive(Clone, PartialEq, ::prost::Message)]
4005pub struct NamedVectors {
4006 #[prost(map = "string, message", tag = "1")]
4007 pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
4008}
4009#[derive(Clone, PartialEq, ::prost::Message)]
4010pub struct NamedVectorsOutput {
4011 #[prost(map = "string, message", tag = "1")]
4012 pub vectors: ::std::collections::HashMap<
4013 ::prost::alloc::string::String,
4014 VectorOutput,
4015 >,
4016}
4017#[derive(Clone, PartialEq, ::prost::Message)]
4018pub struct Vectors {
4019 #[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
4020 pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
4021}
4022pub mod vectors {
4024 #[derive(Clone, PartialEq, ::prost::Oneof)]
4025 pub enum VectorsOptions {
4026 #[prost(message, tag = "1")]
4027 Vector(super::Vector),
4028 #[prost(message, tag = "2")]
4029 Vectors(super::NamedVectors),
4030 }
4031}
4032#[derive(Clone, PartialEq, ::prost::Message)]
4033pub struct VectorsOutput {
4034 #[prost(oneof = "vectors_output::VectorsOptions", tags = "1, 2")]
4035 pub vectors_options: ::core::option::Option<vectors_output::VectorsOptions>,
4036}
4037pub mod vectors_output {
4039 #[derive(Clone, PartialEq, ::prost::Oneof)]
4040 pub enum VectorsOptions {
4041 #[prost(message, tag = "1")]
4042 Vector(super::VectorOutput),
4043 #[prost(message, tag = "2")]
4044 Vectors(super::NamedVectorsOutput),
4045 }
4046}
4047#[derive(Clone, PartialEq, ::prost::Message)]
4048pub struct VectorsSelector {
4049 #[prost(string, repeated, tag = "1")]
4051 pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
4052}
4053#[derive(Clone, PartialEq, ::prost::Message)]
4054pub struct WithVectorsSelector {
4055 #[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
4056 pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
4057}
4058pub mod with_vectors_selector {
4060 #[derive(Clone, PartialEq, ::prost::Oneof)]
4061 pub enum SelectorOptions {
4062 #[prost(bool, tag = "1")]
4064 Enable(bool),
4065 #[prost(message, tag = "2")]
4067 Include(super::VectorsSelector),
4068 }
4069}
4070#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4071pub struct QuantizationSearchParams {
4072 #[prost(bool, optional, tag = "1")]
4074 pub ignore: ::core::option::Option<bool>,
4075 #[prost(bool, optional, tag = "2")]
4078 pub rescore: ::core::option::Option<bool>,
4079 #[prost(double, optional, tag = "3")]
4088 pub oversampling: ::core::option::Option<f64>,
4089}
4090#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4091pub struct AcornSearchParams {
4092 #[prost(bool, optional, tag = "1")]
4098 pub enable: ::core::option::Option<bool>,
4099 #[prost(double, optional, tag = "2")]
4107 pub max_selectivity: ::core::option::Option<f64>,
4108}
4109#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4110pub struct SearchParams {
4111 #[prost(uint64, optional, tag = "1")]
4114 pub hnsw_ef: ::core::option::Option<u64>,
4115 #[prost(bool, optional, tag = "2")]
4117 pub exact: ::core::option::Option<bool>,
4118 #[prost(message, optional, tag = "3")]
4120 pub quantization: ::core::option::Option<QuantizationSearchParams>,
4121 #[prost(bool, optional, tag = "4")]
4125 pub indexed_only: ::core::option::Option<bool>,
4126 #[prost(message, optional, tag = "5")]
4128 pub acorn: ::core::option::Option<AcornSearchParams>,
4129}
4130#[derive(Clone, PartialEq, ::prost::Message)]
4131pub struct SearchPoints {
4132 #[prost(string, tag = "1")]
4134 pub collection_name: ::prost::alloc::string::String,
4135 #[prost(float, repeated, tag = "2")]
4137 pub vector: ::prost::alloc::vec::Vec<f32>,
4138 #[prost(message, optional, tag = "3")]
4140 pub filter: ::core::option::Option<Filter>,
4141 #[prost(uint64, tag = "4")]
4143 pub limit: u64,
4144 #[prost(message, optional, tag = "6")]
4146 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4147 #[prost(message, optional, tag = "7")]
4149 pub params: ::core::option::Option<SearchParams>,
4150 #[prost(float, optional, tag = "8")]
4152 pub score_threshold: ::core::option::Option<f32>,
4153 #[prost(uint64, optional, tag = "9")]
4155 pub offset: ::core::option::Option<u64>,
4156 #[prost(string, optional, tag = "10")]
4158 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4159 #[prost(message, optional, tag = "11")]
4161 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4162 #[prost(message, optional, tag = "12")]
4164 pub read_consistency: ::core::option::Option<ReadConsistency>,
4165 #[prost(uint64, optional, tag = "13")]
4167 pub timeout: ::core::option::Option<u64>,
4168 #[prost(message, optional, tag = "14")]
4170 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4171 #[prost(message, optional, tag = "15")]
4172 pub sparse_indices: ::core::option::Option<SparseIndices>,
4173}
4174#[derive(Clone, PartialEq, ::prost::Message)]
4175pub struct SearchBatchPoints {
4176 #[prost(string, tag = "1")]
4178 pub collection_name: ::prost::alloc::string::String,
4179 #[prost(message, repeated, tag = "2")]
4180 pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
4181 #[prost(message, optional, tag = "3")]
4183 pub read_consistency: ::core::option::Option<ReadConsistency>,
4184 #[prost(uint64, optional, tag = "4")]
4186 pub timeout: ::core::option::Option<u64>,
4187}
4188#[derive(Clone, PartialEq, ::prost::Message)]
4189pub struct WithLookup {
4190 #[prost(string, tag = "1")]
4192 pub collection: ::prost::alloc::string::String,
4193 #[prost(message, optional, tag = "2")]
4195 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4196 #[prost(message, optional, tag = "3")]
4198 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4199}
4200#[derive(Clone, PartialEq, ::prost::Message)]
4201pub struct SearchPointGroups {
4202 #[prost(string, tag = "1")]
4204 pub collection_name: ::prost::alloc::string::String,
4205 #[prost(float, repeated, tag = "2")]
4207 pub vector: ::prost::alloc::vec::Vec<f32>,
4208 #[prost(message, optional, tag = "3")]
4210 pub filter: ::core::option::Option<Filter>,
4211 #[prost(uint32, tag = "4")]
4213 pub limit: u32,
4214 #[prost(message, optional, tag = "5")]
4216 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4217 #[prost(message, optional, tag = "6")]
4219 pub params: ::core::option::Option<SearchParams>,
4220 #[prost(float, optional, tag = "7")]
4222 pub score_threshold: ::core::option::Option<f32>,
4223 #[prost(string, optional, tag = "8")]
4225 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4226 #[prost(message, optional, tag = "9")]
4228 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4229 #[prost(string, tag = "10")]
4233 pub group_by: ::prost::alloc::string::String,
4234 #[prost(uint32, tag = "11")]
4236 pub group_size: u32,
4237 #[prost(message, optional, tag = "12")]
4239 pub read_consistency: ::core::option::Option<ReadConsistency>,
4240 #[prost(message, optional, tag = "13")]
4242 pub with_lookup: ::core::option::Option<WithLookup>,
4243 #[prost(uint64, optional, tag = "14")]
4245 pub timeout: ::core::option::Option<u64>,
4246 #[prost(message, optional, tag = "15")]
4248 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4249 #[prost(message, optional, tag = "16")]
4250 pub sparse_indices: ::core::option::Option<SparseIndices>,
4251}
4252#[derive(Clone, PartialEq, ::prost::Message)]
4253pub struct StartFrom {
4254 #[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
4255 pub value: ::core::option::Option<start_from::Value>,
4256}
4257pub mod start_from {
4259 #[derive(Clone, PartialEq, ::prost::Oneof)]
4260 pub enum Value {
4261 #[prost(double, tag = "1")]
4262 Float(f64),
4263 #[prost(int64, tag = "2")]
4264 Integer(i64),
4265 #[prost(message, tag = "3")]
4266 Timestamp(::prost_types::Timestamp),
4267 #[prost(string, tag = "4")]
4268 Datetime(::prost::alloc::string::String),
4269 }
4270}
4271#[derive(Clone, PartialEq, ::prost::Message)]
4272pub struct OrderBy {
4273 #[prost(string, tag = "1")]
4275 pub key: ::prost::alloc::string::String,
4276 #[prost(enumeration = "Direction", optional, tag = "2")]
4278 pub direction: ::core::option::Option<i32>,
4279 #[prost(message, optional, tag = "3")]
4281 pub start_from: ::core::option::Option<StartFrom>,
4282}
4283#[derive(Clone, PartialEq, ::prost::Message)]
4284pub struct ScrollPoints {
4285 #[prost(string, tag = "1")]
4286 pub collection_name: ::prost::alloc::string::String,
4287 #[prost(message, optional, tag = "2")]
4289 pub filter: ::core::option::Option<Filter>,
4290 #[prost(message, optional, tag = "3")]
4292 pub offset: ::core::option::Option<PointId>,
4293 #[prost(uint32, optional, tag = "4")]
4295 pub limit: ::core::option::Option<u32>,
4296 #[prost(message, optional, tag = "6")]
4298 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4299 #[prost(message, optional, tag = "7")]
4301 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4302 #[prost(message, optional, tag = "8")]
4304 pub read_consistency: ::core::option::Option<ReadConsistency>,
4305 #[prost(message, optional, tag = "9")]
4307 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4308 #[prost(message, optional, tag = "10")]
4310 pub order_by: ::core::option::Option<OrderBy>,
4311 #[prost(uint64, optional, tag = "11")]
4313 pub timeout: ::core::option::Option<u64>,
4314}
4315#[derive(Clone, PartialEq, ::prost::Message)]
4316pub struct LookupLocation {
4317 #[prost(string, tag = "1")]
4318 pub collection_name: ::prost::alloc::string::String,
4319 #[prost(string, optional, tag = "2")]
4321 pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
4322 #[prost(message, optional, tag = "3")]
4324 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4325}
4326#[derive(Clone, PartialEq, ::prost::Message)]
4327pub struct RecommendPoints {
4328 #[prost(string, tag = "1")]
4330 pub collection_name: ::prost::alloc::string::String,
4331 #[prost(message, repeated, tag = "2")]
4333 pub positive: ::prost::alloc::vec::Vec<PointId>,
4334 #[prost(message, repeated, tag = "3")]
4336 pub negative: ::prost::alloc::vec::Vec<PointId>,
4337 #[prost(message, optional, tag = "4")]
4339 pub filter: ::core::option::Option<Filter>,
4340 #[prost(uint64, tag = "5")]
4342 pub limit: u64,
4343 #[prost(message, optional, tag = "7")]
4345 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4346 #[prost(message, optional, tag = "8")]
4348 pub params: ::core::option::Option<SearchParams>,
4349 #[prost(float, optional, tag = "9")]
4351 pub score_threshold: ::core::option::Option<f32>,
4352 #[prost(uint64, optional, tag = "10")]
4354 pub offset: ::core::option::Option<u64>,
4355 #[prost(string, optional, tag = "11")]
4357 pub using: ::core::option::Option<::prost::alloc::string::String>,
4358 #[prost(message, optional, tag = "12")]
4360 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4361 #[prost(message, optional, tag = "13")]
4363 pub lookup_from: ::core::option::Option<LookupLocation>,
4364 #[prost(message, optional, tag = "14")]
4366 pub read_consistency: ::core::option::Option<ReadConsistency>,
4367 #[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
4369 pub strategy: ::core::option::Option<i32>,
4370 #[prost(message, repeated, tag = "17")]
4372 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4373 #[prost(message, repeated, tag = "18")]
4375 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4376 #[prost(uint64, optional, tag = "19")]
4378 pub timeout: ::core::option::Option<u64>,
4379 #[prost(message, optional, tag = "20")]
4381 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4382}
4383#[derive(Clone, PartialEq, ::prost::Message)]
4384pub struct RecommendBatchPoints {
4385 #[prost(string, tag = "1")]
4387 pub collection_name: ::prost::alloc::string::String,
4388 #[prost(message, repeated, tag = "2")]
4389 pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
4390 #[prost(message, optional, tag = "3")]
4392 pub read_consistency: ::core::option::Option<ReadConsistency>,
4393 #[prost(uint64, optional, tag = "4")]
4395 pub timeout: ::core::option::Option<u64>,
4396}
4397#[derive(Clone, PartialEq, ::prost::Message)]
4398pub struct RecommendPointGroups {
4399 #[prost(string, tag = "1")]
4401 pub collection_name: ::prost::alloc::string::String,
4402 #[prost(message, repeated, tag = "2")]
4404 pub positive: ::prost::alloc::vec::Vec<PointId>,
4405 #[prost(message, repeated, tag = "3")]
4407 pub negative: ::prost::alloc::vec::Vec<PointId>,
4408 #[prost(message, optional, tag = "4")]
4410 pub filter: ::core::option::Option<Filter>,
4411 #[prost(uint32, tag = "5")]
4413 pub limit: u32,
4414 #[prost(message, optional, tag = "6")]
4416 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4417 #[prost(message, optional, tag = "7")]
4419 pub params: ::core::option::Option<SearchParams>,
4420 #[prost(float, optional, tag = "8")]
4422 pub score_threshold: ::core::option::Option<f32>,
4423 #[prost(string, optional, tag = "9")]
4425 pub using: ::core::option::Option<::prost::alloc::string::String>,
4426 #[prost(message, optional, tag = "10")]
4428 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4429 #[prost(message, optional, tag = "11")]
4431 pub lookup_from: ::core::option::Option<LookupLocation>,
4432 #[prost(string, tag = "12")]
4436 pub group_by: ::prost::alloc::string::String,
4437 #[prost(uint32, tag = "13")]
4439 pub group_size: u32,
4440 #[prost(message, optional, tag = "14")]
4442 pub read_consistency: ::core::option::Option<ReadConsistency>,
4443 #[prost(message, optional, tag = "15")]
4445 pub with_lookup: ::core::option::Option<WithLookup>,
4446 #[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
4448 pub strategy: ::core::option::Option<i32>,
4449 #[prost(message, repeated, tag = "18")]
4451 pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
4452 #[prost(message, repeated, tag = "19")]
4454 pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
4455 #[prost(uint64, optional, tag = "20")]
4457 pub timeout: ::core::option::Option<u64>,
4458 #[prost(message, optional, tag = "21")]
4460 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4461}
4462#[derive(Clone, PartialEq, ::prost::Message)]
4463pub struct TargetVector {
4464 #[prost(oneof = "target_vector::Target", tags = "1")]
4465 pub target: ::core::option::Option<target_vector::Target>,
4466}
4467pub mod target_vector {
4469 #[derive(Clone, PartialEq, ::prost::Oneof)]
4470 pub enum Target {
4471 #[prost(message, tag = "1")]
4472 Single(super::VectorExample),
4473 }
4474}
4475#[derive(Clone, PartialEq, ::prost::Message)]
4476pub struct VectorExample {
4477 #[prost(oneof = "vector_example::Example", tags = "1, 2")]
4478 pub example: ::core::option::Option<vector_example::Example>,
4479}
4480pub mod vector_example {
4482 #[derive(Clone, PartialEq, ::prost::Oneof)]
4483 pub enum Example {
4484 #[prost(message, tag = "1")]
4485 Id(super::PointId),
4486 #[prost(message, tag = "2")]
4487 Vector(super::Vector),
4488 }
4489}
4490#[derive(Clone, PartialEq, ::prost::Message)]
4491pub struct ContextExamplePair {
4492 #[prost(message, optional, tag = "1")]
4493 pub positive: ::core::option::Option<VectorExample>,
4494 #[prost(message, optional, tag = "2")]
4495 pub negative: ::core::option::Option<VectorExample>,
4496}
4497#[derive(Clone, PartialEq, ::prost::Message)]
4498pub struct DiscoverPoints {
4499 #[prost(string, tag = "1")]
4501 pub collection_name: ::prost::alloc::string::String,
4502 #[prost(message, optional, tag = "2")]
4504 pub target: ::core::option::Option<TargetVector>,
4505 #[prost(message, repeated, tag = "3")]
4507 pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
4508 #[prost(message, optional, tag = "4")]
4510 pub filter: ::core::option::Option<Filter>,
4511 #[prost(uint64, tag = "5")]
4513 pub limit: u64,
4514 #[prost(message, optional, tag = "6")]
4516 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4517 #[prost(message, optional, tag = "7")]
4519 pub params: ::core::option::Option<SearchParams>,
4520 #[prost(uint64, optional, tag = "8")]
4522 pub offset: ::core::option::Option<u64>,
4523 #[prost(string, optional, tag = "9")]
4525 pub using: ::core::option::Option<::prost::alloc::string::String>,
4526 #[prost(message, optional, tag = "10")]
4528 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4529 #[prost(message, optional, tag = "11")]
4531 pub lookup_from: ::core::option::Option<LookupLocation>,
4532 #[prost(message, optional, tag = "12")]
4534 pub read_consistency: ::core::option::Option<ReadConsistency>,
4535 #[prost(uint64, optional, tag = "13")]
4537 pub timeout: ::core::option::Option<u64>,
4538 #[prost(message, optional, tag = "14")]
4540 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4541}
4542#[derive(Clone, PartialEq, ::prost::Message)]
4543pub struct DiscoverBatchPoints {
4544 #[prost(string, tag = "1")]
4546 pub collection_name: ::prost::alloc::string::String,
4547 #[prost(message, repeated, tag = "2")]
4548 pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
4549 #[prost(message, optional, tag = "3")]
4551 pub read_consistency: ::core::option::Option<ReadConsistency>,
4552 #[prost(uint64, optional, tag = "4")]
4554 pub timeout: ::core::option::Option<u64>,
4555}
4556#[derive(Clone, PartialEq, ::prost::Message)]
4557pub struct CountPoints {
4558 #[prost(string, tag = "1")]
4560 pub collection_name: ::prost::alloc::string::String,
4561 #[prost(message, optional, tag = "2")]
4563 pub filter: ::core::option::Option<Filter>,
4564 #[prost(bool, optional, tag = "3")]
4566 pub exact: ::core::option::Option<bool>,
4567 #[prost(message, optional, tag = "4")]
4569 pub read_consistency: ::core::option::Option<ReadConsistency>,
4570 #[prost(message, optional, tag = "5")]
4572 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4573 #[prost(uint64, optional, tag = "6")]
4575 pub timeout: ::core::option::Option<u64>,
4576}
4577#[derive(Clone, PartialEq, ::prost::Message)]
4578pub struct RecommendInput {
4579 #[prost(message, repeated, tag = "1")]
4581 pub positive: ::prost::alloc::vec::Vec<VectorInput>,
4582 #[prost(message, repeated, tag = "2")]
4584 pub negative: ::prost::alloc::vec::Vec<VectorInput>,
4585 #[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
4587 pub strategy: ::core::option::Option<i32>,
4588}
4589#[derive(Clone, PartialEq, ::prost::Message)]
4590pub struct ContextInputPair {
4591 #[prost(message, optional, tag = "1")]
4593 pub positive: ::core::option::Option<VectorInput>,
4594 #[prost(message, optional, tag = "2")]
4596 pub negative: ::core::option::Option<VectorInput>,
4597}
4598#[derive(Clone, PartialEq, ::prost::Message)]
4599pub struct DiscoverInput {
4600 #[prost(message, optional, tag = "1")]
4602 pub target: ::core::option::Option<VectorInput>,
4603 #[prost(message, optional, tag = "2")]
4605 pub context: ::core::option::Option<ContextInput>,
4606}
4607#[derive(Clone, PartialEq, ::prost::Message)]
4608pub struct ContextInput {
4609 #[prost(message, repeated, tag = "1")]
4611 pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
4612}
4613#[derive(Clone, PartialEq, ::prost::Message)]
4614pub struct RelevanceFeedbackInput {
4615 #[prost(message, optional, tag = "1")]
4617 pub target: ::core::option::Option<VectorInput>,
4618 #[prost(message, repeated, tag = "2")]
4620 pub feedback: ::prost::alloc::vec::Vec<FeedbackItem>,
4621 #[prost(message, optional, tag = "3")]
4623 pub strategy: ::core::option::Option<FeedbackStrategy>,
4624}
4625#[derive(Clone, PartialEq, ::prost::Message)]
4626pub struct FeedbackItem {
4627 #[prost(message, optional, tag = "1")]
4629 pub example: ::core::option::Option<VectorInput>,
4630 #[prost(float, tag = "2")]
4632 pub score: f32,
4633}
4634#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4635pub struct FeedbackStrategy {
4636 #[prost(oneof = "feedback_strategy::Variant", tags = "1")]
4637 pub variant: ::core::option::Option<feedback_strategy::Variant>,
4638}
4639pub mod feedback_strategy {
4641 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
4642 pub enum Variant {
4643 #[prost(message, tag = "1")]
4645 Naive(super::NaiveFeedbackStrategy),
4646 }
4647}
4648#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4649pub struct NaiveFeedbackStrategy {
4650 #[prost(float, tag = "1")]
4651 pub a: f32,
4652 #[prost(float, tag = "2")]
4653 pub b: f32,
4654 #[prost(float, tag = "3")]
4655 pub c: f32,
4656}
4657#[derive(Clone, PartialEq, ::prost::Message)]
4658pub struct Formula {
4659 #[prost(message, optional, tag = "1")]
4660 pub expression: ::core::option::Option<Expression>,
4661 #[prost(map = "string, message", tag = "2")]
4662 pub defaults: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
4663}
4664#[derive(Clone, PartialEq, ::prost::Message)]
4665pub struct Expression {
4666 #[prost(
4667 oneof = "expression::Variant",
4668 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
4669 )]
4670 pub variant: ::core::option::Option<expression::Variant>,
4671}
4672pub mod expression {
4674 #[derive(Clone, PartialEq, ::prost::Oneof)]
4675 pub enum Variant {
4676 #[prost(float, tag = "1")]
4677 Constant(f32),
4678 #[prost(string, tag = "2")]
4680 Variable(::prost::alloc::string::String),
4681 #[prost(message, tag = "3")]
4683 Condition(super::Condition),
4684 #[prost(message, tag = "4")]
4686 GeoDistance(super::GeoDistance),
4687 #[prost(string, tag = "5")]
4689 Datetime(::prost::alloc::string::String),
4690 #[prost(string, tag = "6")]
4692 DatetimeKey(::prost::alloc::string::String),
4693 #[prost(message, tag = "7")]
4695 Mult(super::MultExpression),
4696 #[prost(message, tag = "8")]
4698 Sum(super::SumExpression),
4699 #[prost(message, tag = "9")]
4701 Div(::prost::alloc::boxed::Box<super::DivExpression>),
4702 #[prost(message, tag = "10")]
4704 Neg(::prost::alloc::boxed::Box<super::Expression>),
4705 #[prost(message, tag = "11")]
4707 Abs(::prost::alloc::boxed::Box<super::Expression>),
4708 #[prost(message, tag = "12")]
4710 Sqrt(::prost::alloc::boxed::Box<super::Expression>),
4711 #[prost(message, tag = "13")]
4713 Pow(::prost::alloc::boxed::Box<super::PowExpression>),
4714 #[prost(message, tag = "14")]
4716 Exp(::prost::alloc::boxed::Box<super::Expression>),
4717 #[prost(message, tag = "15")]
4719 Log10(::prost::alloc::boxed::Box<super::Expression>),
4720 #[prost(message, tag = "16")]
4722 Ln(::prost::alloc::boxed::Box<super::Expression>),
4723 #[prost(message, tag = "17")]
4725 ExpDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4726 #[prost(message, tag = "18")]
4728 GaussDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4729 #[prost(message, tag = "19")]
4731 LinDecay(::prost::alloc::boxed::Box<super::DecayParamsExpression>),
4732 }
4733}
4734#[derive(Clone, PartialEq, ::prost::Message)]
4735pub struct GeoDistance {
4736 #[prost(message, optional, tag = "1")]
4737 pub origin: ::core::option::Option<GeoPoint>,
4738 #[prost(string, tag = "2")]
4739 pub to: ::prost::alloc::string::String,
4740}
4741#[derive(Clone, PartialEq, ::prost::Message)]
4742pub struct MultExpression {
4743 #[prost(message, repeated, tag = "1")]
4744 pub mult: ::prost::alloc::vec::Vec<Expression>,
4745}
4746#[derive(Clone, PartialEq, ::prost::Message)]
4747pub struct SumExpression {
4748 #[prost(message, repeated, tag = "1")]
4749 pub sum: ::prost::alloc::vec::Vec<Expression>,
4750}
4751#[derive(Clone, PartialEq, ::prost::Message)]
4752pub struct DivExpression {
4753 #[prost(message, optional, boxed, tag = "1")]
4754 pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4755 #[prost(message, optional, boxed, tag = "2")]
4756 pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4757 #[prost(float, optional, tag = "3")]
4758 pub by_zero_default: ::core::option::Option<f32>,
4759}
4760#[derive(Clone, PartialEq, ::prost::Message)]
4761pub struct PowExpression {
4762 #[prost(message, optional, boxed, tag = "1")]
4763 pub base: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4764 #[prost(message, optional, boxed, tag = "2")]
4765 pub exponent: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4766}
4767#[derive(Clone, PartialEq, ::prost::Message)]
4768pub struct DecayParamsExpression {
4769 #[prost(message, optional, boxed, tag = "1")]
4771 pub x: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4772 #[prost(message, optional, boxed, tag = "2")]
4774 pub target: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
4775 #[prost(float, optional, tag = "3")]
4778 pub scale: ::core::option::Option<f32>,
4779 #[prost(float, optional, tag = "4")]
4783 pub midpoint: ::core::option::Option<f32>,
4784}
4785#[derive(Clone, PartialEq, ::prost::Message)]
4786pub struct NearestInputWithMmr {
4787 #[prost(message, optional, tag = "1")]
4789 pub nearest: ::core::option::Option<VectorInput>,
4790 #[prost(message, optional, tag = "2")]
4793 pub mmr: ::core::option::Option<Mmr>,
4794}
4795#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4797pub struct Mmr {
4798 #[prost(float, optional, tag = "2")]
4807 pub diversity: ::core::option::Option<f32>,
4808 #[prost(uint32, optional, tag = "3")]
4812 pub candidates_limit: ::core::option::Option<u32>,
4813}
4814#[derive(Clone, PartialEq, ::prost::Message)]
4816pub struct Rrf {
4817 #[prost(uint32, optional, tag = "1")]
4819 pub k: ::core::option::Option<u32>,
4820 #[prost(float, repeated, tag = "2")]
4825 pub weights: ::prost::alloc::vec::Vec<f32>,
4826}
4827#[derive(Clone, PartialEq, ::prost::Message)]
4828pub struct Query {
4829 #[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
4830 pub variant: ::core::option::Option<query::Variant>,
4831}
4832pub mod query {
4834 #[derive(Clone, PartialEq, ::prost::Oneof)]
4835 pub enum Variant {
4836 #[prost(message, tag = "1")]
4838 Nearest(super::VectorInput),
4839 #[prost(message, tag = "2")]
4841 Recommend(super::RecommendInput),
4842 #[prost(message, tag = "3")]
4844 Discover(super::DiscoverInput),
4845 #[prost(message, tag = "4")]
4847 Context(super::ContextInput),
4848 #[prost(message, tag = "5")]
4850 OrderBy(super::OrderBy),
4851 #[prost(enumeration = "super::Fusion", tag = "6")]
4853 Fusion(i32),
4854 #[prost(enumeration = "super::Sample", tag = "7")]
4856 Sample(i32),
4857 #[prost(message, tag = "8")]
4859 Formula(super::Formula),
4860 #[prost(message, tag = "9")]
4862 NearestWithMmr(super::NearestInputWithMmr),
4863 #[prost(message, tag = "10")]
4865 Rrf(super::Rrf),
4866 #[prost(message, tag = "11")]
4868 RelevanceFeedback(super::RelevanceFeedbackInput),
4869 }
4870}
4871#[derive(Clone, PartialEq, ::prost::Message)]
4872pub struct PrefetchQuery {
4873 #[prost(message, repeated, tag = "1")]
4876 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4877 #[prost(message, optional, tag = "2")]
4880 pub query: ::core::option::Option<Query>,
4881 #[prost(string, optional, tag = "3")]
4884 pub using: ::core::option::Option<::prost::alloc::string::String>,
4885 #[prost(message, optional, tag = "4")]
4887 pub filter: ::core::option::Option<Filter>,
4888 #[prost(message, optional, tag = "5")]
4890 pub params: ::core::option::Option<SearchParams>,
4891 #[prost(float, optional, tag = "6")]
4893 pub score_threshold: ::core::option::Option<f32>,
4894 #[prost(uint64, optional, tag = "7")]
4896 pub limit: ::core::option::Option<u64>,
4897 #[prost(message, optional, tag = "8")]
4900 pub lookup_from: ::core::option::Option<LookupLocation>,
4901}
4902#[derive(Clone, PartialEq, ::prost::Message)]
4903pub struct QueryPoints {
4904 #[prost(string, tag = "1")]
4906 pub collection_name: ::prost::alloc::string::String,
4907 #[prost(message, repeated, tag = "2")]
4910 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4911 #[prost(message, optional, tag = "3")]
4913 pub query: ::core::option::Option<Query>,
4914 #[prost(string, optional, tag = "4")]
4917 pub using: ::core::option::Option<::prost::alloc::string::String>,
4918 #[prost(message, optional, tag = "5")]
4920 pub filter: ::core::option::Option<Filter>,
4921 #[prost(message, optional, tag = "6")]
4923 pub params: ::core::option::Option<SearchParams>,
4924 #[prost(float, optional, tag = "7")]
4926 pub score_threshold: ::core::option::Option<f32>,
4927 #[prost(uint64, optional, tag = "8")]
4929 pub limit: ::core::option::Option<u64>,
4930 #[prost(uint64, optional, tag = "9")]
4932 pub offset: ::core::option::Option<u64>,
4933 #[prost(message, optional, tag = "10")]
4935 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4936 #[prost(message, optional, tag = "11")]
4938 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4939 #[prost(message, optional, tag = "12")]
4941 pub read_consistency: ::core::option::Option<ReadConsistency>,
4942 #[prost(message, optional, tag = "13")]
4945 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
4946 #[prost(message, optional, tag = "14")]
4949 pub lookup_from: ::core::option::Option<LookupLocation>,
4950 #[prost(uint64, optional, tag = "15")]
4952 pub timeout: ::core::option::Option<u64>,
4953}
4954#[derive(Clone, PartialEq, ::prost::Message)]
4955pub struct QueryBatchPoints {
4956 #[prost(string, tag = "1")]
4957 pub collection_name: ::prost::alloc::string::String,
4958 #[prost(message, repeated, tag = "2")]
4959 pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
4960 #[prost(message, optional, tag = "3")]
4962 pub read_consistency: ::core::option::Option<ReadConsistency>,
4963 #[prost(uint64, optional, tag = "4")]
4965 pub timeout: ::core::option::Option<u64>,
4966}
4967#[derive(Clone, PartialEq, ::prost::Message)]
4968pub struct QueryPointGroups {
4969 #[prost(string, tag = "1")]
4971 pub collection_name: ::prost::alloc::string::String,
4972 #[prost(message, repeated, tag = "2")]
4975 pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
4976 #[prost(message, optional, tag = "3")]
4978 pub query: ::core::option::Option<Query>,
4979 #[prost(string, optional, tag = "4")]
4982 pub using: ::core::option::Option<::prost::alloc::string::String>,
4983 #[prost(message, optional, tag = "5")]
4985 pub filter: ::core::option::Option<Filter>,
4986 #[prost(message, optional, tag = "6")]
4988 pub params: ::core::option::Option<SearchParams>,
4989 #[prost(float, optional, tag = "7")]
4991 pub score_threshold: ::core::option::Option<f32>,
4992 #[prost(message, optional, tag = "8")]
4994 pub with_payload: ::core::option::Option<WithPayloadSelector>,
4995 #[prost(message, optional, tag = "9")]
4997 pub with_vectors: ::core::option::Option<WithVectorsSelector>,
4998 #[prost(message, optional, tag = "10")]
5001 pub lookup_from: ::core::option::Option<LookupLocation>,
5002 #[prost(uint64, optional, tag = "11")]
5004 pub limit: ::core::option::Option<u64>,
5005 #[prost(uint64, optional, tag = "12")]
5007 pub group_size: ::core::option::Option<u64>,
5008 #[prost(string, tag = "13")]
5012 pub group_by: ::prost::alloc::string::String,
5013 #[prost(message, optional, tag = "14")]
5015 pub read_consistency: ::core::option::Option<ReadConsistency>,
5016 #[prost(message, optional, tag = "15")]
5018 pub with_lookup: ::core::option::Option<WithLookup>,
5019 #[prost(uint64, optional, tag = "16")]
5021 pub timeout: ::core::option::Option<u64>,
5022 #[prost(message, optional, tag = "17")]
5024 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5025}
5026#[derive(Clone, PartialEq, ::prost::Message)]
5027pub struct FacetCounts {
5028 #[prost(string, tag = "1")]
5030 pub collection_name: ::prost::alloc::string::String,
5031 #[prost(string, tag = "2")]
5033 pub key: ::prost::alloc::string::String,
5034 #[prost(message, optional, tag = "3")]
5036 pub filter: ::core::option::Option<Filter>,
5037 #[prost(uint64, optional, tag = "4")]
5039 pub limit: ::core::option::Option<u64>,
5040 #[prost(bool, optional, tag = "5")]
5042 pub exact: ::core::option::Option<bool>,
5043 #[prost(uint64, optional, tag = "6")]
5045 pub timeout: ::core::option::Option<u64>,
5046 #[prost(message, optional, tag = "7")]
5048 pub read_consistency: ::core::option::Option<ReadConsistency>,
5049 #[prost(message, optional, tag = "8")]
5051 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5052}
5053#[derive(Clone, PartialEq, ::prost::Message)]
5054pub struct FacetValue {
5055 #[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
5056 pub variant: ::core::option::Option<facet_value::Variant>,
5057}
5058pub mod facet_value {
5060 #[derive(Clone, PartialEq, ::prost::Oneof)]
5061 pub enum Variant {
5062 #[prost(string, tag = "1")]
5064 StringValue(::prost::alloc::string::String),
5065 #[prost(int64, tag = "2")]
5067 IntegerValue(i64),
5068 #[prost(bool, tag = "3")]
5070 BoolValue(bool),
5071 }
5072}
5073#[derive(Clone, PartialEq, ::prost::Message)]
5074pub struct FacetHit {
5075 #[prost(message, optional, tag = "1")]
5077 pub value: ::core::option::Option<FacetValue>,
5078 #[prost(uint64, tag = "2")]
5080 pub count: u64,
5081}
5082#[derive(Clone, PartialEq, ::prost::Message)]
5083pub struct SearchMatrixPoints {
5084 #[prost(string, tag = "1")]
5086 pub collection_name: ::prost::alloc::string::String,
5087 #[prost(message, optional, tag = "2")]
5089 pub filter: ::core::option::Option<Filter>,
5090 #[prost(uint64, optional, tag = "3")]
5092 pub sample: ::core::option::Option<u64>,
5093 #[prost(uint64, optional, tag = "4")]
5095 pub limit: ::core::option::Option<u64>,
5096 #[prost(string, optional, tag = "5")]
5098 pub using: ::core::option::Option<::prost::alloc::string::String>,
5099 #[prost(uint64, optional, tag = "6")]
5101 pub timeout: ::core::option::Option<u64>,
5102 #[prost(message, optional, tag = "7")]
5104 pub read_consistency: ::core::option::Option<ReadConsistency>,
5105 #[prost(message, optional, tag = "8")]
5107 pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
5108}
5109#[derive(Clone, PartialEq, ::prost::Message)]
5110pub struct SearchMatrixPairs {
5111 #[prost(message, repeated, tag = "1")]
5113 pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
5114}
5115#[derive(Clone, PartialEq, ::prost::Message)]
5116pub struct SearchMatrixPair {
5117 #[prost(message, optional, tag = "1")]
5119 pub a: ::core::option::Option<PointId>,
5120 #[prost(message, optional, tag = "2")]
5122 pub b: ::core::option::Option<PointId>,
5123 #[prost(float, tag = "3")]
5125 pub score: f32,
5126}
5127#[derive(Clone, PartialEq, ::prost::Message)]
5128pub struct SearchMatrixOffsets {
5129 #[prost(uint64, repeated, tag = "1")]
5131 pub offsets_row: ::prost::alloc::vec::Vec<u64>,
5132 #[prost(uint64, repeated, tag = "2")]
5134 pub offsets_col: ::prost::alloc::vec::Vec<u64>,
5135 #[prost(float, repeated, tag = "3")]
5137 pub scores: ::prost::alloc::vec::Vec<f32>,
5138 #[prost(message, repeated, tag = "4")]
5140 pub ids: ::prost::alloc::vec::Vec<PointId>,
5141}
5142#[derive(Clone, PartialEq, ::prost::Message)]
5143pub struct PointsUpdateOperation {
5144 #[prost(
5145 oneof = "points_update_operation::Operation",
5146 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
5147 )]
5148 pub operation: ::core::option::Option<points_update_operation::Operation>,
5149}
5150pub mod points_update_operation {
5152 #[derive(Clone, PartialEq, ::prost::Message)]
5153 pub struct PointStructList {
5154 #[prost(message, repeated, tag = "1")]
5155 pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
5156 #[prost(message, optional, tag = "2")]
5158 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5159 #[prost(message, optional, tag = "3")]
5162 pub update_filter: ::core::option::Option<super::Filter>,
5163 #[prost(enumeration = "super::UpdateMode", optional, tag = "4")]
5165 pub update_mode: ::core::option::Option<i32>,
5166 }
5167 #[derive(Clone, PartialEq, ::prost::Message)]
5168 pub struct SetPayload {
5169 #[prost(map = "string, message", tag = "1")]
5170 pub payload: ::std::collections::HashMap<
5171 ::prost::alloc::string::String,
5172 super::Value,
5173 >,
5174 #[prost(message, optional, tag = "2")]
5176 pub points_selector: ::core::option::Option<super::PointsSelector>,
5177 #[prost(message, optional, tag = "3")]
5179 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5180 #[prost(string, optional, tag = "4")]
5182 pub key: ::core::option::Option<::prost::alloc::string::String>,
5183 }
5184 #[derive(Clone, PartialEq, ::prost::Message)]
5185 pub struct OverwritePayload {
5186 #[prost(map = "string, message", tag = "1")]
5187 pub payload: ::std::collections::HashMap<
5188 ::prost::alloc::string::String,
5189 super::Value,
5190 >,
5191 #[prost(message, optional, tag = "2")]
5193 pub points_selector: ::core::option::Option<super::PointsSelector>,
5194 #[prost(message, optional, tag = "3")]
5196 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5197 #[prost(string, optional, tag = "4")]
5199 pub key: ::core::option::Option<::prost::alloc::string::String>,
5200 }
5201 #[derive(Clone, PartialEq, ::prost::Message)]
5202 pub struct DeletePayload {
5203 #[prost(string, repeated, tag = "1")]
5204 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5205 #[prost(message, optional, tag = "2")]
5207 pub points_selector: ::core::option::Option<super::PointsSelector>,
5208 #[prost(message, optional, tag = "3")]
5210 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5211 }
5212 #[derive(Clone, PartialEq, ::prost::Message)]
5213 pub struct UpdateVectors {
5214 #[prost(message, repeated, tag = "1")]
5216 pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
5217 #[prost(message, optional, tag = "2")]
5219 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5220 #[prost(message, optional, tag = "3")]
5222 pub update_filter: ::core::option::Option<super::Filter>,
5223 }
5224 #[derive(Clone, PartialEq, ::prost::Message)]
5225 pub struct DeleteVectors {
5226 #[prost(message, optional, tag = "1")]
5228 pub points_selector: ::core::option::Option<super::PointsSelector>,
5229 #[prost(message, optional, tag = "2")]
5231 pub vectors: ::core::option::Option<super::VectorsSelector>,
5232 #[prost(message, optional, tag = "3")]
5234 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5235 }
5236 #[derive(Clone, PartialEq, ::prost::Message)]
5237 pub struct DeletePoints {
5238 #[prost(message, optional, tag = "1")]
5240 pub points: ::core::option::Option<super::PointsSelector>,
5241 #[prost(message, optional, tag = "2")]
5243 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5244 }
5245 #[derive(Clone, PartialEq, ::prost::Message)]
5246 pub struct ClearPayload {
5247 #[prost(message, optional, tag = "1")]
5249 pub points: ::core::option::Option<super::PointsSelector>,
5250 #[prost(message, optional, tag = "2")]
5252 pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
5253 }
5254 #[derive(Clone, PartialEq, ::prost::Oneof)]
5255 pub enum Operation {
5256 #[prost(message, tag = "1")]
5257 Upsert(PointStructList),
5258 #[prost(message, tag = "2")]
5259 #[deprecated(since = "1.7.0", note = "use `DeletePoints` instead")]
5260 DeleteDeprecated(super::PointsSelector),
5261 #[prost(message, tag = "3")]
5262 SetPayload(SetPayload),
5263 #[prost(message, tag = "4")]
5264 OverwritePayload(OverwritePayload),
5265 #[prost(message, tag = "5")]
5266 DeletePayload(DeletePayload),
5267 #[prost(message, tag = "6")]
5268 #[deprecated(since = "1.7.0", note = "use `ClearPayload` instead")]
5269 ClearPayloadDeprecated(super::PointsSelector),
5270 #[prost(message, tag = "7")]
5271 UpdateVectors(UpdateVectors),
5272 #[prost(message, tag = "8")]
5273 DeleteVectors(DeleteVectors),
5274 #[prost(message, tag = "9")]
5275 DeletePoints(DeletePoints),
5276 #[prost(message, tag = "10")]
5277 ClearPayload(ClearPayload),
5278 }
5279}
5280#[derive(Clone, PartialEq, ::prost::Message)]
5281pub struct UpdateBatchPoints {
5282 #[prost(string, tag = "1")]
5284 pub collection_name: ::prost::alloc::string::String,
5285 #[prost(bool, optional, tag = "2")]
5287 pub wait: ::core::option::Option<bool>,
5288 #[prost(message, repeated, tag = "3")]
5289 pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
5290 #[prost(message, optional, tag = "4")]
5292 pub ordering: ::core::option::Option<WriteOrdering>,
5293 #[prost(uint64, optional, tag = "5")]
5295 pub timeout: ::core::option::Option<u64>,
5296}
5297#[derive(Clone, PartialEq, ::prost::Message)]
5298pub struct PointsOperationResponse {
5299 #[prost(message, optional, tag = "1")]
5300 pub result: ::core::option::Option<UpdateResult>,
5301 #[prost(double, tag = "2")]
5303 pub time: f64,
5304 #[prost(message, optional, tag = "3")]
5305 pub usage: ::core::option::Option<Usage>,
5306}
5307#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5308pub struct UpdateResult {
5309 #[prost(uint64, optional, tag = "1")]
5311 pub operation_id: ::core::option::Option<u64>,
5312 #[prost(enumeration = "UpdateStatus", tag = "2")]
5314 pub status: i32,
5315}
5316#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5317pub struct OrderValue {
5318 #[prost(oneof = "order_value::Variant", tags = "1, 2")]
5319 pub variant: ::core::option::Option<order_value::Variant>,
5320}
5321pub mod order_value {
5323 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
5324 pub enum Variant {
5325 #[prost(int64, tag = "1")]
5326 Int(i64),
5327 #[prost(double, tag = "2")]
5328 Float(f64),
5329 }
5330}
5331#[derive(Clone, PartialEq, ::prost::Message)]
5332pub struct ScoredPoint {
5333 #[prost(message, optional, tag = "1")]
5335 pub id: ::core::option::Option<PointId>,
5336 #[prost(map = "string, message", tag = "2")]
5338 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5339 #[prost(float, tag = "3")]
5341 pub score: f32,
5342 #[prost(uint64, tag = "5")]
5344 pub version: u64,
5345 #[prost(message, optional, tag = "6")]
5347 pub vectors: ::core::option::Option<VectorsOutput>,
5348 #[prost(message, optional, tag = "7")]
5350 pub shard_key: ::core::option::Option<ShardKey>,
5351 #[prost(message, optional, tag = "8")]
5353 pub order_value: ::core::option::Option<OrderValue>,
5354}
5355#[derive(Clone, PartialEq, ::prost::Message)]
5356pub struct GroupId {
5357 #[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
5358 pub kind: ::core::option::Option<group_id::Kind>,
5359}
5360pub mod group_id {
5362 #[derive(Clone, PartialEq, ::prost::Oneof)]
5363 pub enum Kind {
5364 #[prost(uint64, tag = "1")]
5366 UnsignedValue(u64),
5367 #[prost(int64, tag = "2")]
5369 IntegerValue(i64),
5370 #[prost(string, tag = "3")]
5372 StringValue(::prost::alloc::string::String),
5373 }
5374}
5375#[derive(Clone, PartialEq, ::prost::Message)]
5376pub struct PointGroup {
5377 #[prost(message, optional, tag = "1")]
5379 pub id: ::core::option::Option<GroupId>,
5380 #[prost(message, repeated, tag = "2")]
5382 pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
5383 #[prost(message, optional, tag = "3")]
5385 pub lookup: ::core::option::Option<RetrievedPoint>,
5386}
5387#[derive(Clone, PartialEq, ::prost::Message)]
5388pub struct GroupsResult {
5389 #[prost(message, repeated, tag = "1")]
5391 pub groups: ::prost::alloc::vec::Vec<PointGroup>,
5392}
5393#[derive(Clone, PartialEq, ::prost::Message)]
5394pub struct SearchResponse {
5395 #[prost(message, repeated, tag = "1")]
5396 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5397 #[prost(double, tag = "2")]
5399 pub time: f64,
5400 #[prost(message, optional, tag = "3")]
5401 pub usage: ::core::option::Option<Usage>,
5402}
5403#[derive(Clone, PartialEq, ::prost::Message)]
5404pub struct QueryResponse {
5405 #[prost(message, repeated, tag = "1")]
5406 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5407 #[prost(double, tag = "2")]
5409 pub time: f64,
5410 #[prost(message, optional, tag = "3")]
5411 pub usage: ::core::option::Option<Usage>,
5412}
5413#[derive(Clone, PartialEq, ::prost::Message)]
5414pub struct QueryBatchResponse {
5415 #[prost(message, repeated, tag = "1")]
5416 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5417 #[prost(double, tag = "2")]
5419 pub time: f64,
5420 #[prost(message, optional, tag = "3")]
5421 pub usage: ::core::option::Option<Usage>,
5422}
5423#[derive(Clone, PartialEq, ::prost::Message)]
5424pub struct QueryGroupsResponse {
5425 #[prost(message, optional, tag = "1")]
5426 pub result: ::core::option::Option<GroupsResult>,
5427 #[prost(double, tag = "2")]
5429 pub time: f64,
5430 #[prost(message, optional, tag = "3")]
5431 pub usage: ::core::option::Option<Usage>,
5432}
5433#[derive(Clone, PartialEq, ::prost::Message)]
5434pub struct BatchResult {
5435 #[prost(message, repeated, tag = "1")]
5436 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5437}
5438#[derive(Clone, PartialEq, ::prost::Message)]
5439pub struct SearchBatchResponse {
5440 #[prost(message, repeated, tag = "1")]
5441 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5442 #[prost(double, tag = "2")]
5444 pub time: f64,
5445 #[prost(message, optional, tag = "3")]
5446 pub usage: ::core::option::Option<Usage>,
5447}
5448#[derive(Clone, PartialEq, ::prost::Message)]
5449pub struct SearchGroupsResponse {
5450 #[prost(message, optional, tag = "1")]
5451 pub result: ::core::option::Option<GroupsResult>,
5452 #[prost(double, tag = "2")]
5454 pub time: f64,
5455 #[prost(message, optional, tag = "3")]
5456 pub usage: ::core::option::Option<Usage>,
5457}
5458#[derive(Clone, PartialEq, ::prost::Message)]
5459pub struct CountResponse {
5460 #[prost(message, optional, tag = "1")]
5461 pub result: ::core::option::Option<CountResult>,
5462 #[prost(double, tag = "2")]
5464 pub time: f64,
5465 #[prost(message, optional, tag = "3")]
5466 pub usage: ::core::option::Option<Usage>,
5467}
5468#[derive(Clone, PartialEq, ::prost::Message)]
5469pub struct ScrollResponse {
5470 #[prost(message, optional, tag = "1")]
5472 pub next_page_offset: ::core::option::Option<PointId>,
5473 #[prost(message, repeated, tag = "2")]
5474 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5475 #[prost(double, tag = "3")]
5477 pub time: f64,
5478 #[prost(message, optional, tag = "4")]
5479 pub usage: ::core::option::Option<Usage>,
5480}
5481#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5482pub struct CountResult {
5483 #[prost(uint64, tag = "1")]
5484 pub count: u64,
5485}
5486#[derive(Clone, PartialEq, ::prost::Message)]
5487pub struct RetrievedPoint {
5488 #[prost(message, optional, tag = "1")]
5489 pub id: ::core::option::Option<PointId>,
5490 #[prost(map = "string, message", tag = "2")]
5491 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5492 #[prost(message, optional, tag = "4")]
5493 pub vectors: ::core::option::Option<VectorsOutput>,
5494 #[prost(message, optional, tag = "5")]
5496 pub shard_key: ::core::option::Option<ShardKey>,
5497 #[prost(message, optional, tag = "6")]
5499 pub order_value: ::core::option::Option<OrderValue>,
5500}
5501#[derive(Clone, PartialEq, ::prost::Message)]
5502pub struct GetResponse {
5503 #[prost(message, repeated, tag = "1")]
5504 pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
5505 #[prost(double, tag = "2")]
5507 pub time: f64,
5508 #[prost(message, optional, tag = "3")]
5509 pub usage: ::core::option::Option<Usage>,
5510}
5511#[derive(Clone, PartialEq, ::prost::Message)]
5512pub struct RecommendResponse {
5513 #[prost(message, repeated, tag = "1")]
5514 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5515 #[prost(double, tag = "2")]
5517 pub time: f64,
5518 #[prost(message, optional, tag = "3")]
5519 pub usage: ::core::option::Option<Usage>,
5520}
5521#[derive(Clone, PartialEq, ::prost::Message)]
5522pub struct RecommendBatchResponse {
5523 #[prost(message, repeated, tag = "1")]
5524 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5525 #[prost(double, tag = "2")]
5527 pub time: f64,
5528 #[prost(message, optional, tag = "3")]
5529 pub usage: ::core::option::Option<Usage>,
5530}
5531#[derive(Clone, PartialEq, ::prost::Message)]
5532pub struct DiscoverResponse {
5533 #[prost(message, repeated, tag = "1")]
5534 pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
5535 #[prost(double, tag = "2")]
5537 pub time: f64,
5538 #[prost(message, optional, tag = "3")]
5539 pub usage: ::core::option::Option<Usage>,
5540}
5541#[derive(Clone, PartialEq, ::prost::Message)]
5542pub struct DiscoverBatchResponse {
5543 #[prost(message, repeated, tag = "1")]
5544 pub result: ::prost::alloc::vec::Vec<BatchResult>,
5545 #[prost(double, tag = "2")]
5547 pub time: f64,
5548 #[prost(message, optional, tag = "3")]
5549 pub usage: ::core::option::Option<Usage>,
5550}
5551#[derive(Clone, PartialEq, ::prost::Message)]
5552pub struct RecommendGroupsResponse {
5553 #[prost(message, optional, tag = "1")]
5554 pub result: ::core::option::Option<GroupsResult>,
5555 #[prost(double, tag = "2")]
5557 pub time: f64,
5558 #[prost(message, optional, tag = "3")]
5559 pub usage: ::core::option::Option<Usage>,
5560}
5561#[derive(Clone, PartialEq, ::prost::Message)]
5562pub struct UpdateBatchResponse {
5563 #[prost(message, repeated, tag = "1")]
5564 pub result: ::prost::alloc::vec::Vec<UpdateResult>,
5565 #[prost(double, tag = "2")]
5567 pub time: f64,
5568 #[prost(message, optional, tag = "3")]
5569 pub usage: ::core::option::Option<Usage>,
5570}
5571#[derive(Clone, PartialEq, ::prost::Message)]
5572pub struct FacetResponse {
5573 #[prost(message, repeated, tag = "1")]
5574 pub hits: ::prost::alloc::vec::Vec<FacetHit>,
5575 #[prost(double, tag = "2")]
5577 pub time: f64,
5578 #[prost(message, optional, tag = "3")]
5579 pub usage: ::core::option::Option<Usage>,
5580}
5581#[derive(Clone, PartialEq, ::prost::Message)]
5582pub struct SearchMatrixPairsResponse {
5583 #[prost(message, optional, tag = "1")]
5584 pub result: ::core::option::Option<SearchMatrixPairs>,
5585 #[prost(double, tag = "2")]
5587 pub time: f64,
5588 #[prost(message, optional, tag = "3")]
5589 pub usage: ::core::option::Option<Usage>,
5590}
5591#[derive(Clone, PartialEq, ::prost::Message)]
5592pub struct SearchMatrixOffsetsResponse {
5593 #[prost(message, optional, tag = "1")]
5594 pub result: ::core::option::Option<SearchMatrixOffsets>,
5595 #[prost(double, tag = "2")]
5597 pub time: f64,
5598 #[prost(message, optional, tag = "3")]
5599 pub usage: ::core::option::Option<Usage>,
5600}
5601#[derive(Clone, PartialEq, ::prost::Message)]
5602pub struct PointsSelector {
5603 #[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
5604 pub points_selector_one_of: ::core::option::Option<
5605 points_selector::PointsSelectorOneOf,
5606 >,
5607}
5608pub mod points_selector {
5610 #[derive(Clone, PartialEq, ::prost::Oneof)]
5611 pub enum PointsSelectorOneOf {
5612 #[prost(message, tag = "1")]
5613 Points(super::PointsIdsList),
5614 #[prost(message, tag = "2")]
5615 Filter(super::Filter),
5616 }
5617}
5618#[derive(Clone, PartialEq, ::prost::Message)]
5619pub struct PointsIdsList {
5620 #[prost(message, repeated, tag = "1")]
5621 pub ids: ::prost::alloc::vec::Vec<PointId>,
5622}
5623#[derive(Clone, PartialEq, ::prost::Message)]
5624pub struct PointStruct {
5625 #[prost(message, optional, tag = "1")]
5626 pub id: ::core::option::Option<PointId>,
5627 #[prost(map = "string, message", tag = "3")]
5628 pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
5629 #[prost(message, optional, tag = "4")]
5630 pub vectors: ::core::option::Option<Vectors>,
5631}
5632#[derive(Clone, PartialEq, ::prost::Message)]
5636pub struct Usage {
5637 #[prost(message, optional, tag = "1")]
5638 pub hardware: ::core::option::Option<HardwareUsage>,
5639 #[prost(message, optional, tag = "2")]
5640 pub inference: ::core::option::Option<InferenceUsage>,
5641}
5642#[derive(Clone, PartialEq, ::prost::Message)]
5643pub struct InferenceUsage {
5644 #[prost(map = "string, message", tag = "1")]
5645 pub models: ::std::collections::HashMap<::prost::alloc::string::String, ModelUsage>,
5646}
5647#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5648pub struct ModelUsage {
5649 #[prost(uint64, tag = "1")]
5650 pub tokens: u64,
5651}
5652#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5653pub struct HardwareUsage {
5654 #[prost(uint64, tag = "1")]
5655 pub cpu: u64,
5656 #[prost(uint64, tag = "2")]
5657 pub payload_io_read: u64,
5658 #[prost(uint64, tag = "3")]
5659 pub payload_io_write: u64,
5660 #[prost(uint64, tag = "4")]
5661 pub payload_index_io_read: u64,
5662 #[prost(uint64, tag = "5")]
5663 pub payload_index_io_write: u64,
5664 #[prost(uint64, tag = "6")]
5665 pub vector_io_read: u64,
5666 #[prost(uint64, tag = "7")]
5667 pub vector_io_write: u64,
5668}
5669#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5670#[repr(i32)]
5671pub enum WriteOrderingType {
5672 Weak = 0,
5674 Medium = 1,
5677 Strong = 2,
5680}
5681impl WriteOrderingType {
5682 pub fn as_str_name(&self) -> &'static str {
5687 match self {
5688 Self::Weak => "Weak",
5689 Self::Medium => "Medium",
5690 Self::Strong => "Strong",
5691 }
5692 }
5693 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5695 match value {
5696 "Weak" => Some(Self::Weak),
5697 "Medium" => Some(Self::Medium),
5698 "Strong" => Some(Self::Strong),
5699 _ => None,
5700 }
5701 }
5702}
5703#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5705#[repr(i32)]
5706pub enum UpdateMode {
5707 Upsert = 0,
5709 InsertOnly = 1,
5711 UpdateOnly = 2,
5713}
5714impl UpdateMode {
5715 pub fn as_str_name(&self) -> &'static str {
5720 match self {
5721 Self::Upsert => "Upsert",
5722 Self::InsertOnly => "InsertOnly",
5723 Self::UpdateOnly => "UpdateOnly",
5724 }
5725 }
5726 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5728 match value {
5729 "Upsert" => Some(Self::Upsert),
5730 "InsertOnly" => Some(Self::InsertOnly),
5731 "UpdateOnly" => Some(Self::UpdateOnly),
5732 _ => None,
5733 }
5734 }
5735}
5736#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5737#[repr(i32)]
5738pub enum ReadConsistencyType {
5739 All = 0,
5741 Majority = 1,
5743 Quorum = 2,
5745}
5746impl ReadConsistencyType {
5747 pub fn as_str_name(&self) -> &'static str {
5752 match self {
5753 Self::All => "All",
5754 Self::Majority => "Majority",
5755 Self::Quorum => "Quorum",
5756 }
5757 }
5758 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5760 match value {
5761 "All" => Some(Self::All),
5762 "Majority" => Some(Self::Majority),
5763 "Quorum" => Some(Self::Quorum),
5764 _ => None,
5765 }
5766 }
5767}
5768#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5769#[repr(i32)]
5770pub enum FieldType {
5771 Keyword = 0,
5772 Integer = 1,
5773 Float = 2,
5774 Geo = 3,
5775 Text = 4,
5776 Bool = 5,
5777 Datetime = 6,
5778 Uuid = 7,
5779}
5780impl FieldType {
5781 pub fn as_str_name(&self) -> &'static str {
5786 match self {
5787 Self::Keyword => "FieldTypeKeyword",
5788 Self::Integer => "FieldTypeInteger",
5789 Self::Float => "FieldTypeFloat",
5790 Self::Geo => "FieldTypeGeo",
5791 Self::Text => "FieldTypeText",
5792 Self::Bool => "FieldTypeBool",
5793 Self::Datetime => "FieldTypeDatetime",
5794 Self::Uuid => "FieldTypeUuid",
5795 }
5796 }
5797 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5799 match value {
5800 "FieldTypeKeyword" => Some(Self::Keyword),
5801 "FieldTypeInteger" => Some(Self::Integer),
5802 "FieldTypeFloat" => Some(Self::Float),
5803 "FieldTypeGeo" => Some(Self::Geo),
5804 "FieldTypeText" => Some(Self::Text),
5805 "FieldTypeBool" => Some(Self::Bool),
5806 "FieldTypeDatetime" => Some(Self::Datetime),
5807 "FieldTypeUuid" => Some(Self::Uuid),
5808 _ => None,
5809 }
5810 }
5811}
5812#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5813#[repr(i32)]
5814pub enum Direction {
5815 Asc = 0,
5816 Desc = 1,
5817}
5818impl Direction {
5819 pub fn as_str_name(&self) -> &'static str {
5824 match self {
5825 Self::Asc => "Asc",
5826 Self::Desc => "Desc",
5827 }
5828 }
5829 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5831 match value {
5832 "Asc" => Some(Self::Asc),
5833 "Desc" => Some(Self::Desc),
5834 _ => None,
5835 }
5836 }
5837}
5838#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5840#[repr(i32)]
5841pub enum RecommendStrategy {
5842 AverageVector = 0,
5845 BestScore = 1,
5849 SumScores = 2,
5852}
5853impl RecommendStrategy {
5854 pub fn as_str_name(&self) -> &'static str {
5859 match self {
5860 Self::AverageVector => "AverageVector",
5861 Self::BestScore => "BestScore",
5862 Self::SumScores => "SumScores",
5863 }
5864 }
5865 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5867 match value {
5868 "AverageVector" => Some(Self::AverageVector),
5869 "BestScore" => Some(Self::BestScore),
5870 "SumScores" => Some(Self::SumScores),
5871 _ => None,
5872 }
5873 }
5874}
5875#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5876#[repr(i32)]
5877pub enum Fusion {
5878 Rrf = 0,
5880 Dbsf = 1,
5882}
5883impl Fusion {
5884 pub fn as_str_name(&self) -> &'static str {
5889 match self {
5890 Self::Rrf => "RRF",
5891 Self::Dbsf => "DBSF",
5892 }
5893 }
5894 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5896 match value {
5897 "RRF" => Some(Self::Rrf),
5898 "DBSF" => Some(Self::Dbsf),
5899 _ => None,
5900 }
5901 }
5902}
5903#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5909#[repr(i32)]
5910pub enum Sample {
5911 Random = 0,
5912}
5913impl Sample {
5914 pub fn as_str_name(&self) -> &'static str {
5919 match self {
5920 Self::Random => "Random",
5921 }
5922 }
5923 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5925 match value {
5926 "Random" => Some(Self::Random),
5927 _ => None,
5928 }
5929 }
5930}
5931#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5932#[repr(i32)]
5933pub enum UpdateStatus {
5934 UnknownUpdateStatus = 0,
5935 Acknowledged = 1,
5937 Completed = 2,
5939 ClockRejected = 3,
5941 WaitTimeout = 4,
5943}
5944impl UpdateStatus {
5945 pub fn as_str_name(&self) -> &'static str {
5950 match self {
5951 Self::UnknownUpdateStatus => "UnknownUpdateStatus",
5952 Self::Acknowledged => "Acknowledged",
5953 Self::Completed => "Completed",
5954 Self::ClockRejected => "ClockRejected",
5955 Self::WaitTimeout => "WaitTimeout",
5956 }
5957 }
5958 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
5960 match value {
5961 "UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
5962 "Acknowledged" => Some(Self::Acknowledged),
5963 "Completed" => Some(Self::Completed),
5964 "ClockRejected" => Some(Self::ClockRejected),
5965 "WaitTimeout" => Some(Self::WaitTimeout),
5966 _ => None,
5967 }
5968 }
5969}
5970pub mod points_client {
5972 #![allow(
5973 unused_variables,
5974 dead_code,
5975 missing_docs,
5976 clippy::wildcard_imports,
5977 clippy::let_unit_value,
5978 )]
5979 use tonic::codegen::*;
5980 use tonic::codegen::http::Uri;
5981 #[derive(Debug, Clone)]
5982 pub struct PointsClient<T> {
5983 inner: tonic::client::Grpc<T>,
5984 }
5985 impl PointsClient<tonic::transport::Channel> {
5986 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
5988 where
5989 D: TryInto<tonic::transport::Endpoint>,
5990 D::Error: Into<StdError>,
5991 {
5992 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
5993 Ok(Self::new(conn))
5994 }
5995 }
5996 impl<T> PointsClient<T>
5997 where
5998 T: tonic::client::GrpcService<tonic::body::BoxBody>,
5999 T::Error: Into<StdError>,
6000 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
6001 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
6002 {
6003 pub fn new(inner: T) -> Self {
6004 let inner = tonic::client::Grpc::new(inner);
6005 Self { inner }
6006 }
6007 pub fn with_origin(inner: T, origin: Uri) -> Self {
6008 let inner = tonic::client::Grpc::with_origin(inner, origin);
6009 Self { inner }
6010 }
6011 pub fn with_interceptor<F>(
6012 inner: T,
6013 interceptor: F,
6014 ) -> PointsClient<InterceptedService<T, F>>
6015 where
6016 F: tonic::service::Interceptor,
6017 T::ResponseBody: Default,
6018 T: tonic::codegen::Service<
6019 http::Request<tonic::body::BoxBody>,
6020 Response = http::Response<
6021 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
6022 >,
6023 >,
6024 <T as tonic::codegen::Service<
6025 http::Request<tonic::body::BoxBody>,
6026 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
6027 {
6028 PointsClient::new(InterceptedService::new(inner, interceptor))
6029 }
6030 #[must_use]
6035 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6036 self.inner = self.inner.send_compressed(encoding);
6037 self
6038 }
6039 #[must_use]
6041 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6042 self.inner = self.inner.accept_compressed(encoding);
6043 self
6044 }
6045 #[must_use]
6049 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6050 self.inner = self.inner.max_decoding_message_size(limit);
6051 self
6052 }
6053 #[must_use]
6057 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6058 self.inner = self.inner.max_encoding_message_size(limit);
6059 self
6060 }
6061 pub async fn upsert(
6064 &mut self,
6065 request: impl tonic::IntoRequest<super::UpsertPoints>,
6066 ) -> std::result::Result<
6067 tonic::Response<super::PointsOperationResponse>,
6068 tonic::Status,
6069 > {
6070 self.inner
6071 .ready()
6072 .await
6073 .map_err(|e| {
6074 tonic::Status::unknown(
6075 format!("Service was not ready: {}", e.into()),
6076 )
6077 })?;
6078 let codec = tonic::codec::ProstCodec::default();
6079 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
6080 let mut req = request.into_request();
6081 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
6082 self.inner.unary(req, path, codec).await
6083 }
6084 pub async fn delete(
6086 &mut self,
6087 request: impl tonic::IntoRequest<super::DeletePoints>,
6088 ) -> std::result::Result<
6089 tonic::Response<super::PointsOperationResponse>,
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::codec::ProstCodec::default();
6101 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
6102 let mut req = request.into_request();
6103 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
6104 self.inner.unary(req, path, codec).await
6105 }
6106 pub async fn get(
6108 &mut self,
6109 request: impl tonic::IntoRequest<super::GetPoints>,
6110 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
6111 self.inner
6112 .ready()
6113 .await
6114 .map_err(|e| {
6115 tonic::Status::unknown(
6116 format!("Service was not ready: {}", e.into()),
6117 )
6118 })?;
6119 let codec = tonic::codec::ProstCodec::default();
6120 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
6121 let mut req = request.into_request();
6122 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
6123 self.inner.unary(req, path, codec).await
6124 }
6125 pub async fn update_vectors(
6127 &mut self,
6128 request: impl tonic::IntoRequest<super::UpdatePointVectors>,
6129 ) -> std::result::Result<
6130 tonic::Response<super::PointsOperationResponse>,
6131 tonic::Status,
6132 > {
6133 self.inner
6134 .ready()
6135 .await
6136 .map_err(|e| {
6137 tonic::Status::unknown(
6138 format!("Service was not ready: {}", e.into()),
6139 )
6140 })?;
6141 let codec = tonic::codec::ProstCodec::default();
6142 let path = http::uri::PathAndQuery::from_static(
6143 "/qdrant.Points/UpdateVectors",
6144 );
6145 let mut req = request.into_request();
6146 req.extensions_mut()
6147 .insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
6148 self.inner.unary(req, path, codec).await
6149 }
6150 pub async fn delete_vectors(
6152 &mut self,
6153 request: impl tonic::IntoRequest<super::DeletePointVectors>,
6154 ) -> std::result::Result<
6155 tonic::Response<super::PointsOperationResponse>,
6156 tonic::Status,
6157 > {
6158 self.inner
6159 .ready()
6160 .await
6161 .map_err(|e| {
6162 tonic::Status::unknown(
6163 format!("Service was not ready: {}", e.into()),
6164 )
6165 })?;
6166 let codec = tonic::codec::ProstCodec::default();
6167 let path = http::uri::PathAndQuery::from_static(
6168 "/qdrant.Points/DeleteVectors",
6169 );
6170 let mut req = request.into_request();
6171 req.extensions_mut()
6172 .insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
6173 self.inner.unary(req, path, codec).await
6174 }
6175 pub async fn set_payload(
6177 &mut self,
6178 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6179 ) -> std::result::Result<
6180 tonic::Response<super::PointsOperationResponse>,
6181 tonic::Status,
6182 > {
6183 self.inner
6184 .ready()
6185 .await
6186 .map_err(|e| {
6187 tonic::Status::unknown(
6188 format!("Service was not ready: {}", e.into()),
6189 )
6190 })?;
6191 let codec = tonic::codec::ProstCodec::default();
6192 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
6193 let mut req = request.into_request();
6194 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
6195 self.inner.unary(req, path, codec).await
6196 }
6197 pub async fn overwrite_payload(
6199 &mut self,
6200 request: impl tonic::IntoRequest<super::SetPayloadPoints>,
6201 ) -> std::result::Result<
6202 tonic::Response<super::PointsOperationResponse>,
6203 tonic::Status,
6204 > {
6205 self.inner
6206 .ready()
6207 .await
6208 .map_err(|e| {
6209 tonic::Status::unknown(
6210 format!("Service was not ready: {}", e.into()),
6211 )
6212 })?;
6213 let codec = tonic::codec::ProstCodec::default();
6214 let path = http::uri::PathAndQuery::from_static(
6215 "/qdrant.Points/OverwritePayload",
6216 );
6217 let mut req = request.into_request();
6218 req.extensions_mut()
6219 .insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
6220 self.inner.unary(req, path, codec).await
6221 }
6222 pub async fn delete_payload(
6224 &mut self,
6225 request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
6226 ) -> std::result::Result<
6227 tonic::Response<super::PointsOperationResponse>,
6228 tonic::Status,
6229 > {
6230 self.inner
6231 .ready()
6232 .await
6233 .map_err(|e| {
6234 tonic::Status::unknown(
6235 format!("Service was not ready: {}", e.into()),
6236 )
6237 })?;
6238 let codec = tonic::codec::ProstCodec::default();
6239 let path = http::uri::PathAndQuery::from_static(
6240 "/qdrant.Points/DeletePayload",
6241 );
6242 let mut req = request.into_request();
6243 req.extensions_mut()
6244 .insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
6245 self.inner.unary(req, path, codec).await
6246 }
6247 pub async fn clear_payload(
6249 &mut self,
6250 request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
6251 ) -> std::result::Result<
6252 tonic::Response<super::PointsOperationResponse>,
6253 tonic::Status,
6254 > {
6255 self.inner
6256 .ready()
6257 .await
6258 .map_err(|e| {
6259 tonic::Status::unknown(
6260 format!("Service was not ready: {}", e.into()),
6261 )
6262 })?;
6263 let codec = tonic::codec::ProstCodec::default();
6264 let path = http::uri::PathAndQuery::from_static(
6265 "/qdrant.Points/ClearPayload",
6266 );
6267 let mut req = request.into_request();
6268 req.extensions_mut()
6269 .insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
6270 self.inner.unary(req, path, codec).await
6271 }
6272 pub async fn create_field_index(
6274 &mut self,
6275 request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
6276 ) -> std::result::Result<
6277 tonic::Response<super::PointsOperationResponse>,
6278 tonic::Status,
6279 > {
6280 self.inner
6281 .ready()
6282 .await
6283 .map_err(|e| {
6284 tonic::Status::unknown(
6285 format!("Service was not ready: {}", e.into()),
6286 )
6287 })?;
6288 let codec = tonic::codec::ProstCodec::default();
6289 let path = http::uri::PathAndQuery::from_static(
6290 "/qdrant.Points/CreateFieldIndex",
6291 );
6292 let mut req = request.into_request();
6293 req.extensions_mut()
6294 .insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
6295 self.inner.unary(req, path, codec).await
6296 }
6297 pub async fn delete_field_index(
6299 &mut self,
6300 request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
6301 ) -> std::result::Result<
6302 tonic::Response<super::PointsOperationResponse>,
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::codec::ProstCodec::default();
6314 let path = http::uri::PathAndQuery::from_static(
6315 "/qdrant.Points/DeleteFieldIndex",
6316 );
6317 let mut req = request.into_request();
6318 req.extensions_mut()
6319 .insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
6320 self.inner.unary(req, path, codec).await
6321 }
6322 pub async fn search(
6325 &mut self,
6326 request: impl tonic::IntoRequest<super::SearchPoints>,
6327 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
6328 self.inner
6329 .ready()
6330 .await
6331 .map_err(|e| {
6332 tonic::Status::unknown(
6333 format!("Service was not ready: {}", e.into()),
6334 )
6335 })?;
6336 let codec = tonic::codec::ProstCodec::default();
6337 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
6338 let mut req = request.into_request();
6339 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
6340 self.inner.unary(req, path, codec).await
6341 }
6342 pub async fn search_batch(
6345 &mut self,
6346 request: impl tonic::IntoRequest<super::SearchBatchPoints>,
6347 ) -> std::result::Result<
6348 tonic::Response<super::SearchBatchResponse>,
6349 tonic::Status,
6350 > {
6351 self.inner
6352 .ready()
6353 .await
6354 .map_err(|e| {
6355 tonic::Status::unknown(
6356 format!("Service was not ready: {}", e.into()),
6357 )
6358 })?;
6359 let codec = tonic::codec::ProstCodec::default();
6360 let path = http::uri::PathAndQuery::from_static(
6361 "/qdrant.Points/SearchBatch",
6362 );
6363 let mut req = request.into_request();
6364 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
6365 self.inner.unary(req, path, codec).await
6366 }
6367 pub async fn search_groups(
6370 &mut self,
6371 request: impl tonic::IntoRequest<super::SearchPointGroups>,
6372 ) -> std::result::Result<
6373 tonic::Response<super::SearchGroupsResponse>,
6374 tonic::Status,
6375 > {
6376 self.inner
6377 .ready()
6378 .await
6379 .map_err(|e| {
6380 tonic::Status::unknown(
6381 format!("Service was not ready: {}", e.into()),
6382 )
6383 })?;
6384 let codec = tonic::codec::ProstCodec::default();
6385 let path = http::uri::PathAndQuery::from_static(
6386 "/qdrant.Points/SearchGroups",
6387 );
6388 let mut req = request.into_request();
6389 req.extensions_mut()
6390 .insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
6391 self.inner.unary(req, path, codec).await
6392 }
6393 pub async fn scroll(
6395 &mut self,
6396 request: impl tonic::IntoRequest<super::ScrollPoints>,
6397 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
6398 self.inner
6399 .ready()
6400 .await
6401 .map_err(|e| {
6402 tonic::Status::unknown(
6403 format!("Service was not ready: {}", e.into()),
6404 )
6405 })?;
6406 let codec = tonic::codec::ProstCodec::default();
6407 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
6408 let mut req = request.into_request();
6409 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
6410 self.inner.unary(req, path, codec).await
6411 }
6412 pub async fn recommend(
6415 &mut self,
6416 request: impl tonic::IntoRequest<super::RecommendPoints>,
6417 ) -> std::result::Result<
6418 tonic::Response<super::RecommendResponse>,
6419 tonic::Status,
6420 > {
6421 self.inner
6422 .ready()
6423 .await
6424 .map_err(|e| {
6425 tonic::Status::unknown(
6426 format!("Service was not ready: {}", e.into()),
6427 )
6428 })?;
6429 let codec = tonic::codec::ProstCodec::default();
6430 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
6431 let mut req = request.into_request();
6432 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
6433 self.inner.unary(req, path, codec).await
6434 }
6435 pub async fn recommend_batch(
6438 &mut self,
6439 request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
6440 ) -> std::result::Result<
6441 tonic::Response<super::RecommendBatchResponse>,
6442 tonic::Status,
6443 > {
6444 self.inner
6445 .ready()
6446 .await
6447 .map_err(|e| {
6448 tonic::Status::unknown(
6449 format!("Service was not ready: {}", e.into()),
6450 )
6451 })?;
6452 let codec = tonic::codec::ProstCodec::default();
6453 let path = http::uri::PathAndQuery::from_static(
6454 "/qdrant.Points/RecommendBatch",
6455 );
6456 let mut req = request.into_request();
6457 req.extensions_mut()
6458 .insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
6459 self.inner.unary(req, path, codec).await
6460 }
6461 pub async fn recommend_groups(
6464 &mut self,
6465 request: impl tonic::IntoRequest<super::RecommendPointGroups>,
6466 ) -> std::result::Result<
6467 tonic::Response<super::RecommendGroupsResponse>,
6468 tonic::Status,
6469 > {
6470 self.inner
6471 .ready()
6472 .await
6473 .map_err(|e| {
6474 tonic::Status::unknown(
6475 format!("Service was not ready: {}", e.into()),
6476 )
6477 })?;
6478 let codec = tonic::codec::ProstCodec::default();
6479 let path = http::uri::PathAndQuery::from_static(
6480 "/qdrant.Points/RecommendGroups",
6481 );
6482 let mut req = request.into_request();
6483 req.extensions_mut()
6484 .insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
6485 self.inner.unary(req, path, codec).await
6486 }
6487 pub async fn discover(
6507 &mut self,
6508 request: impl tonic::IntoRequest<super::DiscoverPoints>,
6509 ) -> std::result::Result<
6510 tonic::Response<super::DiscoverResponse>,
6511 tonic::Status,
6512 > {
6513 self.inner
6514 .ready()
6515 .await
6516 .map_err(|e| {
6517 tonic::Status::unknown(
6518 format!("Service was not ready: {}", e.into()),
6519 )
6520 })?;
6521 let codec = tonic::codec::ProstCodec::default();
6522 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
6523 let mut req = request.into_request();
6524 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
6525 self.inner.unary(req, path, codec).await
6526 }
6527 pub async fn discover_batch(
6529 &mut self,
6530 request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
6531 ) -> std::result::Result<
6532 tonic::Response<super::DiscoverBatchResponse>,
6533 tonic::Status,
6534 > {
6535 self.inner
6536 .ready()
6537 .await
6538 .map_err(|e| {
6539 tonic::Status::unknown(
6540 format!("Service was not ready: {}", e.into()),
6541 )
6542 })?;
6543 let codec = tonic::codec::ProstCodec::default();
6544 let path = http::uri::PathAndQuery::from_static(
6545 "/qdrant.Points/DiscoverBatch",
6546 );
6547 let mut req = request.into_request();
6548 req.extensions_mut()
6549 .insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
6550 self.inner.unary(req, path, codec).await
6551 }
6552 pub async fn count(
6554 &mut self,
6555 request: impl tonic::IntoRequest<super::CountPoints>,
6556 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
6557 self.inner
6558 .ready()
6559 .await
6560 .map_err(|e| {
6561 tonic::Status::unknown(
6562 format!("Service was not ready: {}", e.into()),
6563 )
6564 })?;
6565 let codec = tonic::codec::ProstCodec::default();
6566 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
6567 let mut req = request.into_request();
6568 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
6569 self.inner.unary(req, path, codec).await
6570 }
6571 pub async fn update_batch(
6573 &mut self,
6574 request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
6575 ) -> std::result::Result<
6576 tonic::Response<super::UpdateBatchResponse>,
6577 tonic::Status,
6578 > {
6579 self.inner
6580 .ready()
6581 .await
6582 .map_err(|e| {
6583 tonic::Status::unknown(
6584 format!("Service was not ready: {}", e.into()),
6585 )
6586 })?;
6587 let codec = tonic::codec::ProstCodec::default();
6588 let path = http::uri::PathAndQuery::from_static(
6589 "/qdrant.Points/UpdateBatch",
6590 );
6591 let mut req = request.into_request();
6592 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
6593 self.inner.unary(req, path, codec).await
6594 }
6595 pub async fn query(
6599 &mut self,
6600 request: impl tonic::IntoRequest<super::QueryPoints>,
6601 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
6602 self.inner
6603 .ready()
6604 .await
6605 .map_err(|e| {
6606 tonic::Status::unknown(
6607 format!("Service was not ready: {}", e.into()),
6608 )
6609 })?;
6610 let codec = tonic::codec::ProstCodec::default();
6611 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
6612 let mut req = request.into_request();
6613 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
6614 self.inner.unary(req, path, codec).await
6615 }
6616 pub async fn query_batch(
6620 &mut self,
6621 request: impl tonic::IntoRequest<super::QueryBatchPoints>,
6622 ) -> std::result::Result<
6623 tonic::Response<super::QueryBatchResponse>,
6624 tonic::Status,
6625 > {
6626 self.inner
6627 .ready()
6628 .await
6629 .map_err(|e| {
6630 tonic::Status::unknown(
6631 format!("Service was not ready: {}", e.into()),
6632 )
6633 })?;
6634 let codec = tonic::codec::ProstCodec::default();
6635 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
6636 let mut req = request.into_request();
6637 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
6638 self.inner.unary(req, path, codec).await
6639 }
6640 pub async fn query_groups(
6644 &mut self,
6645 request: impl tonic::IntoRequest<super::QueryPointGroups>,
6646 ) -> std::result::Result<
6647 tonic::Response<super::QueryGroupsResponse>,
6648 tonic::Status,
6649 > {
6650 self.inner
6651 .ready()
6652 .await
6653 .map_err(|e| {
6654 tonic::Status::unknown(
6655 format!("Service was not ready: {}", e.into()),
6656 )
6657 })?;
6658 let codec = tonic::codec::ProstCodec::default();
6659 let path = http::uri::PathAndQuery::from_static(
6660 "/qdrant.Points/QueryGroups",
6661 );
6662 let mut req = request.into_request();
6663 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
6664 self.inner.unary(req, path, codec).await
6665 }
6666 pub async fn facet(
6670 &mut self,
6671 request: impl tonic::IntoRequest<super::FacetCounts>,
6672 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
6673 self.inner
6674 .ready()
6675 .await
6676 .map_err(|e| {
6677 tonic::Status::unknown(
6678 format!("Service was not ready: {}", e.into()),
6679 )
6680 })?;
6681 let codec = tonic::codec::ProstCodec::default();
6682 let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
6683 let mut req = request.into_request();
6684 req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
6685 self.inner.unary(req, path, codec).await
6686 }
6687 pub async fn search_matrix_pairs(
6689 &mut self,
6690 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6691 ) -> std::result::Result<
6692 tonic::Response<super::SearchMatrixPairsResponse>,
6693 tonic::Status,
6694 > {
6695 self.inner
6696 .ready()
6697 .await
6698 .map_err(|e| {
6699 tonic::Status::unknown(
6700 format!("Service was not ready: {}", e.into()),
6701 )
6702 })?;
6703 let codec = tonic::codec::ProstCodec::default();
6704 let path = http::uri::PathAndQuery::from_static(
6705 "/qdrant.Points/SearchMatrixPairs",
6706 );
6707 let mut req = request.into_request();
6708 req.extensions_mut()
6709 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
6710 self.inner.unary(req, path, codec).await
6711 }
6712 pub async fn search_matrix_offsets(
6714 &mut self,
6715 request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
6716 ) -> std::result::Result<
6717 tonic::Response<super::SearchMatrixOffsetsResponse>,
6718 tonic::Status,
6719 > {
6720 self.inner
6721 .ready()
6722 .await
6723 .map_err(|e| {
6724 tonic::Status::unknown(
6725 format!("Service was not ready: {}", e.into()),
6726 )
6727 })?;
6728 let codec = tonic::codec::ProstCodec::default();
6729 let path = http::uri::PathAndQuery::from_static(
6730 "/qdrant.Points/SearchMatrixOffsets",
6731 );
6732 let mut req = request.into_request();
6733 req.extensions_mut()
6734 .insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
6735 self.inner.unary(req, path, codec).await
6736 }
6737 }
6738}
6739pub mod points_server {
6741 #![allow(
6742 unused_variables,
6743 dead_code,
6744 missing_docs,
6745 clippy::wildcard_imports,
6746 clippy::let_unit_value,
6747 )]
6748 use tonic::codegen::*;
6749 #[async_trait]
6751 pub trait Points: std::marker::Send + std::marker::Sync + 'static {
6752 async fn upsert(
6755 &self,
6756 request: tonic::Request<super::UpsertPoints>,
6757 ) -> std::result::Result<
6758 tonic::Response<super::PointsOperationResponse>,
6759 tonic::Status,
6760 >;
6761 async fn delete(
6763 &self,
6764 request: tonic::Request<super::DeletePoints>,
6765 ) -> std::result::Result<
6766 tonic::Response<super::PointsOperationResponse>,
6767 tonic::Status,
6768 >;
6769 async fn get(
6771 &self,
6772 request: tonic::Request<super::GetPoints>,
6773 ) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
6774 async fn update_vectors(
6776 &self,
6777 request: tonic::Request<super::UpdatePointVectors>,
6778 ) -> std::result::Result<
6779 tonic::Response<super::PointsOperationResponse>,
6780 tonic::Status,
6781 >;
6782 async fn delete_vectors(
6784 &self,
6785 request: tonic::Request<super::DeletePointVectors>,
6786 ) -> std::result::Result<
6787 tonic::Response<super::PointsOperationResponse>,
6788 tonic::Status,
6789 >;
6790 async fn set_payload(
6792 &self,
6793 request: tonic::Request<super::SetPayloadPoints>,
6794 ) -> std::result::Result<
6795 tonic::Response<super::PointsOperationResponse>,
6796 tonic::Status,
6797 >;
6798 async fn overwrite_payload(
6800 &self,
6801 request: tonic::Request<super::SetPayloadPoints>,
6802 ) -> std::result::Result<
6803 tonic::Response<super::PointsOperationResponse>,
6804 tonic::Status,
6805 >;
6806 async fn delete_payload(
6808 &self,
6809 request: tonic::Request<super::DeletePayloadPoints>,
6810 ) -> std::result::Result<
6811 tonic::Response<super::PointsOperationResponse>,
6812 tonic::Status,
6813 >;
6814 async fn clear_payload(
6816 &self,
6817 request: tonic::Request<super::ClearPayloadPoints>,
6818 ) -> std::result::Result<
6819 tonic::Response<super::PointsOperationResponse>,
6820 tonic::Status,
6821 >;
6822 async fn create_field_index(
6824 &self,
6825 request: tonic::Request<super::CreateFieldIndexCollection>,
6826 ) -> std::result::Result<
6827 tonic::Response<super::PointsOperationResponse>,
6828 tonic::Status,
6829 >;
6830 async fn delete_field_index(
6832 &self,
6833 request: tonic::Request<super::DeleteFieldIndexCollection>,
6834 ) -> std::result::Result<
6835 tonic::Response<super::PointsOperationResponse>,
6836 tonic::Status,
6837 >;
6838 async fn search(
6841 &self,
6842 request: tonic::Request<super::SearchPoints>,
6843 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
6844 async fn search_batch(
6847 &self,
6848 request: tonic::Request<super::SearchBatchPoints>,
6849 ) -> std::result::Result<
6850 tonic::Response<super::SearchBatchResponse>,
6851 tonic::Status,
6852 >;
6853 async fn search_groups(
6856 &self,
6857 request: tonic::Request<super::SearchPointGroups>,
6858 ) -> std::result::Result<
6859 tonic::Response<super::SearchGroupsResponse>,
6860 tonic::Status,
6861 >;
6862 async fn scroll(
6864 &self,
6865 request: tonic::Request<super::ScrollPoints>,
6866 ) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
6867 async fn recommend(
6870 &self,
6871 request: tonic::Request<super::RecommendPoints>,
6872 ) -> std::result::Result<
6873 tonic::Response<super::RecommendResponse>,
6874 tonic::Status,
6875 >;
6876 async fn recommend_batch(
6879 &self,
6880 request: tonic::Request<super::RecommendBatchPoints>,
6881 ) -> std::result::Result<
6882 tonic::Response<super::RecommendBatchResponse>,
6883 tonic::Status,
6884 >;
6885 async fn recommend_groups(
6888 &self,
6889 request: tonic::Request<super::RecommendPointGroups>,
6890 ) -> std::result::Result<
6891 tonic::Response<super::RecommendGroupsResponse>,
6892 tonic::Status,
6893 >;
6894 async fn discover(
6914 &self,
6915 request: tonic::Request<super::DiscoverPoints>,
6916 ) -> std::result::Result<
6917 tonic::Response<super::DiscoverResponse>,
6918 tonic::Status,
6919 >;
6920 async fn discover_batch(
6922 &self,
6923 request: tonic::Request<super::DiscoverBatchPoints>,
6924 ) -> std::result::Result<
6925 tonic::Response<super::DiscoverBatchResponse>,
6926 tonic::Status,
6927 >;
6928 async fn count(
6930 &self,
6931 request: tonic::Request<super::CountPoints>,
6932 ) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
6933 async fn update_batch(
6935 &self,
6936 request: tonic::Request<super::UpdateBatchPoints>,
6937 ) -> std::result::Result<
6938 tonic::Response<super::UpdateBatchResponse>,
6939 tonic::Status,
6940 >;
6941 async fn query(
6945 &self,
6946 request: tonic::Request<super::QueryPoints>,
6947 ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
6948 async fn query_batch(
6952 &self,
6953 request: tonic::Request<super::QueryBatchPoints>,
6954 ) -> std::result::Result<
6955 tonic::Response<super::QueryBatchResponse>,
6956 tonic::Status,
6957 >;
6958 async fn query_groups(
6962 &self,
6963 request: tonic::Request<super::QueryPointGroups>,
6964 ) -> std::result::Result<
6965 tonic::Response<super::QueryGroupsResponse>,
6966 tonic::Status,
6967 >;
6968 async fn facet(
6972 &self,
6973 request: tonic::Request<super::FacetCounts>,
6974 ) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
6975 async fn search_matrix_pairs(
6977 &self,
6978 request: tonic::Request<super::SearchMatrixPoints>,
6979 ) -> std::result::Result<
6980 tonic::Response<super::SearchMatrixPairsResponse>,
6981 tonic::Status,
6982 >;
6983 async fn search_matrix_offsets(
6985 &self,
6986 request: tonic::Request<super::SearchMatrixPoints>,
6987 ) -> std::result::Result<
6988 tonic::Response<super::SearchMatrixOffsetsResponse>,
6989 tonic::Status,
6990 >;
6991 }
6992 #[derive(Debug)]
6993 pub struct PointsServer<T> {
6994 inner: Arc<T>,
6995 accept_compression_encodings: EnabledCompressionEncodings,
6996 send_compression_encodings: EnabledCompressionEncodings,
6997 max_decoding_message_size: Option<usize>,
6998 max_encoding_message_size: Option<usize>,
6999 }
7000 impl<T> PointsServer<T> {
7001 pub fn new(inner: T) -> Self {
7002 Self::from_arc(Arc::new(inner))
7003 }
7004 pub fn from_arc(inner: Arc<T>) -> Self {
7005 Self {
7006 inner,
7007 accept_compression_encodings: Default::default(),
7008 send_compression_encodings: Default::default(),
7009 max_decoding_message_size: None,
7010 max_encoding_message_size: None,
7011 }
7012 }
7013 pub fn with_interceptor<F>(
7014 inner: T,
7015 interceptor: F,
7016 ) -> InterceptedService<Self, F>
7017 where
7018 F: tonic::service::Interceptor,
7019 {
7020 InterceptedService::new(Self::new(inner), interceptor)
7021 }
7022 #[must_use]
7024 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7025 self.accept_compression_encodings.enable(encoding);
7026 self
7027 }
7028 #[must_use]
7030 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7031 self.send_compression_encodings.enable(encoding);
7032 self
7033 }
7034 #[must_use]
7038 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7039 self.max_decoding_message_size = Some(limit);
7040 self
7041 }
7042 #[must_use]
7046 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7047 self.max_encoding_message_size = Some(limit);
7048 self
7049 }
7050 }
7051 impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
7052 where
7053 T: Points,
7054 B: Body + std::marker::Send + 'static,
7055 B::Error: Into<StdError> + std::marker::Send + 'static,
7056 {
7057 type Response = http::Response<tonic::body::BoxBody>;
7058 type Error = std::convert::Infallible;
7059 type Future = BoxFuture<Self::Response, Self::Error>;
7060 fn poll_ready(
7061 &mut self,
7062 _cx: &mut Context<'_>,
7063 ) -> Poll<std::result::Result<(), Self::Error>> {
7064 Poll::Ready(Ok(()))
7065 }
7066 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7067 match req.uri().path() {
7068 "/qdrant.Points/Upsert" => {
7069 #[allow(non_camel_case_types)]
7070 struct UpsertSvc<T: Points>(pub Arc<T>);
7071 impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
7072 for UpsertSvc<T> {
7073 type Response = super::PointsOperationResponse;
7074 type Future = BoxFuture<
7075 tonic::Response<Self::Response>,
7076 tonic::Status,
7077 >;
7078 fn call(
7079 &mut self,
7080 request: tonic::Request<super::UpsertPoints>,
7081 ) -> Self::Future {
7082 let inner = Arc::clone(&self.0);
7083 let fut = async move {
7084 <T as Points>::upsert(&inner, request).await
7085 };
7086 Box::pin(fut)
7087 }
7088 }
7089 let accept_compression_encodings = self.accept_compression_encodings;
7090 let send_compression_encodings = self.send_compression_encodings;
7091 let max_decoding_message_size = self.max_decoding_message_size;
7092 let max_encoding_message_size = self.max_encoding_message_size;
7093 let inner = self.inner.clone();
7094 let fut = async move {
7095 let method = UpsertSvc(inner);
7096 let codec = tonic::codec::ProstCodec::default();
7097 let mut grpc = tonic::server::Grpc::new(codec)
7098 .apply_compression_config(
7099 accept_compression_encodings,
7100 send_compression_encodings,
7101 )
7102 .apply_max_message_size_config(
7103 max_decoding_message_size,
7104 max_encoding_message_size,
7105 );
7106 let res = grpc.unary(method, req).await;
7107 Ok(res)
7108 };
7109 Box::pin(fut)
7110 }
7111 "/qdrant.Points/Delete" => {
7112 #[allow(non_camel_case_types)]
7113 struct DeleteSvc<T: Points>(pub Arc<T>);
7114 impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
7115 for DeleteSvc<T> {
7116 type Response = super::PointsOperationResponse;
7117 type Future = BoxFuture<
7118 tonic::Response<Self::Response>,
7119 tonic::Status,
7120 >;
7121 fn call(
7122 &mut self,
7123 request: tonic::Request<super::DeletePoints>,
7124 ) -> Self::Future {
7125 let inner = Arc::clone(&self.0);
7126 let fut = async move {
7127 <T as Points>::delete(&inner, request).await
7128 };
7129 Box::pin(fut)
7130 }
7131 }
7132 let accept_compression_encodings = self.accept_compression_encodings;
7133 let send_compression_encodings = self.send_compression_encodings;
7134 let max_decoding_message_size = self.max_decoding_message_size;
7135 let max_encoding_message_size = self.max_encoding_message_size;
7136 let inner = self.inner.clone();
7137 let fut = async move {
7138 let method = DeleteSvc(inner);
7139 let codec = tonic::codec::ProstCodec::default();
7140 let mut grpc = tonic::server::Grpc::new(codec)
7141 .apply_compression_config(
7142 accept_compression_encodings,
7143 send_compression_encodings,
7144 )
7145 .apply_max_message_size_config(
7146 max_decoding_message_size,
7147 max_encoding_message_size,
7148 );
7149 let res = grpc.unary(method, req).await;
7150 Ok(res)
7151 };
7152 Box::pin(fut)
7153 }
7154 "/qdrant.Points/Get" => {
7155 #[allow(non_camel_case_types)]
7156 struct GetSvc<T: Points>(pub Arc<T>);
7157 impl<T: Points> tonic::server::UnaryService<super::GetPoints>
7158 for GetSvc<T> {
7159 type Response = super::GetResponse;
7160 type Future = BoxFuture<
7161 tonic::Response<Self::Response>,
7162 tonic::Status,
7163 >;
7164 fn call(
7165 &mut self,
7166 request: tonic::Request<super::GetPoints>,
7167 ) -> Self::Future {
7168 let inner = Arc::clone(&self.0);
7169 let fut = async move {
7170 <T as Points>::get(&inner, request).await
7171 };
7172 Box::pin(fut)
7173 }
7174 }
7175 let accept_compression_encodings = self.accept_compression_encodings;
7176 let send_compression_encodings = self.send_compression_encodings;
7177 let max_decoding_message_size = self.max_decoding_message_size;
7178 let max_encoding_message_size = self.max_encoding_message_size;
7179 let inner = self.inner.clone();
7180 let fut = async move {
7181 let method = GetSvc(inner);
7182 let codec = tonic::codec::ProstCodec::default();
7183 let mut grpc = tonic::server::Grpc::new(codec)
7184 .apply_compression_config(
7185 accept_compression_encodings,
7186 send_compression_encodings,
7187 )
7188 .apply_max_message_size_config(
7189 max_decoding_message_size,
7190 max_encoding_message_size,
7191 );
7192 let res = grpc.unary(method, req).await;
7193 Ok(res)
7194 };
7195 Box::pin(fut)
7196 }
7197 "/qdrant.Points/UpdateVectors" => {
7198 #[allow(non_camel_case_types)]
7199 struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
7200 impl<
7201 T: Points,
7202 > tonic::server::UnaryService<super::UpdatePointVectors>
7203 for UpdateVectorsSvc<T> {
7204 type Response = super::PointsOperationResponse;
7205 type Future = BoxFuture<
7206 tonic::Response<Self::Response>,
7207 tonic::Status,
7208 >;
7209 fn call(
7210 &mut self,
7211 request: tonic::Request<super::UpdatePointVectors>,
7212 ) -> Self::Future {
7213 let inner = Arc::clone(&self.0);
7214 let fut = async move {
7215 <T as Points>::update_vectors(&inner, request).await
7216 };
7217 Box::pin(fut)
7218 }
7219 }
7220 let accept_compression_encodings = self.accept_compression_encodings;
7221 let send_compression_encodings = self.send_compression_encodings;
7222 let max_decoding_message_size = self.max_decoding_message_size;
7223 let max_encoding_message_size = self.max_encoding_message_size;
7224 let inner = self.inner.clone();
7225 let fut = async move {
7226 let method = UpdateVectorsSvc(inner);
7227 let codec = tonic::codec::ProstCodec::default();
7228 let mut grpc = tonic::server::Grpc::new(codec)
7229 .apply_compression_config(
7230 accept_compression_encodings,
7231 send_compression_encodings,
7232 )
7233 .apply_max_message_size_config(
7234 max_decoding_message_size,
7235 max_encoding_message_size,
7236 );
7237 let res = grpc.unary(method, req).await;
7238 Ok(res)
7239 };
7240 Box::pin(fut)
7241 }
7242 "/qdrant.Points/DeleteVectors" => {
7243 #[allow(non_camel_case_types)]
7244 struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
7245 impl<
7246 T: Points,
7247 > tonic::server::UnaryService<super::DeletePointVectors>
7248 for DeleteVectorsSvc<T> {
7249 type Response = super::PointsOperationResponse;
7250 type Future = BoxFuture<
7251 tonic::Response<Self::Response>,
7252 tonic::Status,
7253 >;
7254 fn call(
7255 &mut self,
7256 request: tonic::Request<super::DeletePointVectors>,
7257 ) -> Self::Future {
7258 let inner = Arc::clone(&self.0);
7259 let fut = async move {
7260 <T as Points>::delete_vectors(&inner, request).await
7261 };
7262 Box::pin(fut)
7263 }
7264 }
7265 let accept_compression_encodings = self.accept_compression_encodings;
7266 let send_compression_encodings = self.send_compression_encodings;
7267 let max_decoding_message_size = self.max_decoding_message_size;
7268 let max_encoding_message_size = self.max_encoding_message_size;
7269 let inner = self.inner.clone();
7270 let fut = async move {
7271 let method = DeleteVectorsSvc(inner);
7272 let codec = tonic::codec::ProstCodec::default();
7273 let mut grpc = tonic::server::Grpc::new(codec)
7274 .apply_compression_config(
7275 accept_compression_encodings,
7276 send_compression_encodings,
7277 )
7278 .apply_max_message_size_config(
7279 max_decoding_message_size,
7280 max_encoding_message_size,
7281 );
7282 let res = grpc.unary(method, req).await;
7283 Ok(res)
7284 };
7285 Box::pin(fut)
7286 }
7287 "/qdrant.Points/SetPayload" => {
7288 #[allow(non_camel_case_types)]
7289 struct SetPayloadSvc<T: Points>(pub Arc<T>);
7290 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7291 for SetPayloadSvc<T> {
7292 type Response = super::PointsOperationResponse;
7293 type Future = BoxFuture<
7294 tonic::Response<Self::Response>,
7295 tonic::Status,
7296 >;
7297 fn call(
7298 &mut self,
7299 request: tonic::Request<super::SetPayloadPoints>,
7300 ) -> Self::Future {
7301 let inner = Arc::clone(&self.0);
7302 let fut = async move {
7303 <T as Points>::set_payload(&inner, request).await
7304 };
7305 Box::pin(fut)
7306 }
7307 }
7308 let accept_compression_encodings = self.accept_compression_encodings;
7309 let send_compression_encodings = self.send_compression_encodings;
7310 let max_decoding_message_size = self.max_decoding_message_size;
7311 let max_encoding_message_size = self.max_encoding_message_size;
7312 let inner = self.inner.clone();
7313 let fut = async move {
7314 let method = SetPayloadSvc(inner);
7315 let codec = tonic::codec::ProstCodec::default();
7316 let mut grpc = tonic::server::Grpc::new(codec)
7317 .apply_compression_config(
7318 accept_compression_encodings,
7319 send_compression_encodings,
7320 )
7321 .apply_max_message_size_config(
7322 max_decoding_message_size,
7323 max_encoding_message_size,
7324 );
7325 let res = grpc.unary(method, req).await;
7326 Ok(res)
7327 };
7328 Box::pin(fut)
7329 }
7330 "/qdrant.Points/OverwritePayload" => {
7331 #[allow(non_camel_case_types)]
7332 struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
7333 impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
7334 for OverwritePayloadSvc<T> {
7335 type Response = super::PointsOperationResponse;
7336 type Future = BoxFuture<
7337 tonic::Response<Self::Response>,
7338 tonic::Status,
7339 >;
7340 fn call(
7341 &mut self,
7342 request: tonic::Request<super::SetPayloadPoints>,
7343 ) -> Self::Future {
7344 let inner = Arc::clone(&self.0);
7345 let fut = async move {
7346 <T as Points>::overwrite_payload(&inner, request).await
7347 };
7348 Box::pin(fut)
7349 }
7350 }
7351 let accept_compression_encodings = self.accept_compression_encodings;
7352 let send_compression_encodings = self.send_compression_encodings;
7353 let max_decoding_message_size = self.max_decoding_message_size;
7354 let max_encoding_message_size = self.max_encoding_message_size;
7355 let inner = self.inner.clone();
7356 let fut = async move {
7357 let method = OverwritePayloadSvc(inner);
7358 let codec = tonic::codec::ProstCodec::default();
7359 let mut grpc = tonic::server::Grpc::new(codec)
7360 .apply_compression_config(
7361 accept_compression_encodings,
7362 send_compression_encodings,
7363 )
7364 .apply_max_message_size_config(
7365 max_decoding_message_size,
7366 max_encoding_message_size,
7367 );
7368 let res = grpc.unary(method, req).await;
7369 Ok(res)
7370 };
7371 Box::pin(fut)
7372 }
7373 "/qdrant.Points/DeletePayload" => {
7374 #[allow(non_camel_case_types)]
7375 struct DeletePayloadSvc<T: Points>(pub Arc<T>);
7376 impl<
7377 T: Points,
7378 > tonic::server::UnaryService<super::DeletePayloadPoints>
7379 for DeletePayloadSvc<T> {
7380 type Response = super::PointsOperationResponse;
7381 type Future = BoxFuture<
7382 tonic::Response<Self::Response>,
7383 tonic::Status,
7384 >;
7385 fn call(
7386 &mut self,
7387 request: tonic::Request<super::DeletePayloadPoints>,
7388 ) -> Self::Future {
7389 let inner = Arc::clone(&self.0);
7390 let fut = async move {
7391 <T as Points>::delete_payload(&inner, request).await
7392 };
7393 Box::pin(fut)
7394 }
7395 }
7396 let accept_compression_encodings = self.accept_compression_encodings;
7397 let send_compression_encodings = self.send_compression_encodings;
7398 let max_decoding_message_size = self.max_decoding_message_size;
7399 let max_encoding_message_size = self.max_encoding_message_size;
7400 let inner = self.inner.clone();
7401 let fut = async move {
7402 let method = DeletePayloadSvc(inner);
7403 let codec = tonic::codec::ProstCodec::default();
7404 let mut grpc = tonic::server::Grpc::new(codec)
7405 .apply_compression_config(
7406 accept_compression_encodings,
7407 send_compression_encodings,
7408 )
7409 .apply_max_message_size_config(
7410 max_decoding_message_size,
7411 max_encoding_message_size,
7412 );
7413 let res = grpc.unary(method, req).await;
7414 Ok(res)
7415 };
7416 Box::pin(fut)
7417 }
7418 "/qdrant.Points/ClearPayload" => {
7419 #[allow(non_camel_case_types)]
7420 struct ClearPayloadSvc<T: Points>(pub Arc<T>);
7421 impl<
7422 T: Points,
7423 > tonic::server::UnaryService<super::ClearPayloadPoints>
7424 for ClearPayloadSvc<T> {
7425 type Response = super::PointsOperationResponse;
7426 type Future = BoxFuture<
7427 tonic::Response<Self::Response>,
7428 tonic::Status,
7429 >;
7430 fn call(
7431 &mut self,
7432 request: tonic::Request<super::ClearPayloadPoints>,
7433 ) -> Self::Future {
7434 let inner = Arc::clone(&self.0);
7435 let fut = async move {
7436 <T as Points>::clear_payload(&inner, request).await
7437 };
7438 Box::pin(fut)
7439 }
7440 }
7441 let accept_compression_encodings = self.accept_compression_encodings;
7442 let send_compression_encodings = self.send_compression_encodings;
7443 let max_decoding_message_size = self.max_decoding_message_size;
7444 let max_encoding_message_size = self.max_encoding_message_size;
7445 let inner = self.inner.clone();
7446 let fut = async move {
7447 let method = ClearPayloadSvc(inner);
7448 let codec = tonic::codec::ProstCodec::default();
7449 let mut grpc = tonic::server::Grpc::new(codec)
7450 .apply_compression_config(
7451 accept_compression_encodings,
7452 send_compression_encodings,
7453 )
7454 .apply_max_message_size_config(
7455 max_decoding_message_size,
7456 max_encoding_message_size,
7457 );
7458 let res = grpc.unary(method, req).await;
7459 Ok(res)
7460 };
7461 Box::pin(fut)
7462 }
7463 "/qdrant.Points/CreateFieldIndex" => {
7464 #[allow(non_camel_case_types)]
7465 struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
7466 impl<
7467 T: Points,
7468 > tonic::server::UnaryService<super::CreateFieldIndexCollection>
7469 for CreateFieldIndexSvc<T> {
7470 type Response = super::PointsOperationResponse;
7471 type Future = BoxFuture<
7472 tonic::Response<Self::Response>,
7473 tonic::Status,
7474 >;
7475 fn call(
7476 &mut self,
7477 request: tonic::Request<super::CreateFieldIndexCollection>,
7478 ) -> Self::Future {
7479 let inner = Arc::clone(&self.0);
7480 let fut = async move {
7481 <T as Points>::create_field_index(&inner, request).await
7482 };
7483 Box::pin(fut)
7484 }
7485 }
7486 let accept_compression_encodings = self.accept_compression_encodings;
7487 let send_compression_encodings = self.send_compression_encodings;
7488 let max_decoding_message_size = self.max_decoding_message_size;
7489 let max_encoding_message_size = self.max_encoding_message_size;
7490 let inner = self.inner.clone();
7491 let fut = async move {
7492 let method = CreateFieldIndexSvc(inner);
7493 let codec = tonic::codec::ProstCodec::default();
7494 let mut grpc = tonic::server::Grpc::new(codec)
7495 .apply_compression_config(
7496 accept_compression_encodings,
7497 send_compression_encodings,
7498 )
7499 .apply_max_message_size_config(
7500 max_decoding_message_size,
7501 max_encoding_message_size,
7502 );
7503 let res = grpc.unary(method, req).await;
7504 Ok(res)
7505 };
7506 Box::pin(fut)
7507 }
7508 "/qdrant.Points/DeleteFieldIndex" => {
7509 #[allow(non_camel_case_types)]
7510 struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
7511 impl<
7512 T: Points,
7513 > tonic::server::UnaryService<super::DeleteFieldIndexCollection>
7514 for DeleteFieldIndexSvc<T> {
7515 type Response = super::PointsOperationResponse;
7516 type Future = BoxFuture<
7517 tonic::Response<Self::Response>,
7518 tonic::Status,
7519 >;
7520 fn call(
7521 &mut self,
7522 request: tonic::Request<super::DeleteFieldIndexCollection>,
7523 ) -> Self::Future {
7524 let inner = Arc::clone(&self.0);
7525 let fut = async move {
7526 <T as Points>::delete_field_index(&inner, request).await
7527 };
7528 Box::pin(fut)
7529 }
7530 }
7531 let accept_compression_encodings = self.accept_compression_encodings;
7532 let send_compression_encodings = self.send_compression_encodings;
7533 let max_decoding_message_size = self.max_decoding_message_size;
7534 let max_encoding_message_size = self.max_encoding_message_size;
7535 let inner = self.inner.clone();
7536 let fut = async move {
7537 let method = DeleteFieldIndexSvc(inner);
7538 let codec = tonic::codec::ProstCodec::default();
7539 let mut grpc = tonic::server::Grpc::new(codec)
7540 .apply_compression_config(
7541 accept_compression_encodings,
7542 send_compression_encodings,
7543 )
7544 .apply_max_message_size_config(
7545 max_decoding_message_size,
7546 max_encoding_message_size,
7547 );
7548 let res = grpc.unary(method, req).await;
7549 Ok(res)
7550 };
7551 Box::pin(fut)
7552 }
7553 "/qdrant.Points/Search" => {
7554 #[allow(non_camel_case_types)]
7555 struct SearchSvc<T: Points>(pub Arc<T>);
7556 impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
7557 for SearchSvc<T> {
7558 type Response = super::SearchResponse;
7559 type Future = BoxFuture<
7560 tonic::Response<Self::Response>,
7561 tonic::Status,
7562 >;
7563 fn call(
7564 &mut self,
7565 request: tonic::Request<super::SearchPoints>,
7566 ) -> Self::Future {
7567 let inner = Arc::clone(&self.0);
7568 let fut = async move {
7569 <T as Points>::search(&inner, request).await
7570 };
7571 Box::pin(fut)
7572 }
7573 }
7574 let accept_compression_encodings = self.accept_compression_encodings;
7575 let send_compression_encodings = self.send_compression_encodings;
7576 let max_decoding_message_size = self.max_decoding_message_size;
7577 let max_encoding_message_size = self.max_encoding_message_size;
7578 let inner = self.inner.clone();
7579 let fut = async move {
7580 let method = SearchSvc(inner);
7581 let codec = tonic::codec::ProstCodec::default();
7582 let mut grpc = tonic::server::Grpc::new(codec)
7583 .apply_compression_config(
7584 accept_compression_encodings,
7585 send_compression_encodings,
7586 )
7587 .apply_max_message_size_config(
7588 max_decoding_message_size,
7589 max_encoding_message_size,
7590 );
7591 let res = grpc.unary(method, req).await;
7592 Ok(res)
7593 };
7594 Box::pin(fut)
7595 }
7596 "/qdrant.Points/SearchBatch" => {
7597 #[allow(non_camel_case_types)]
7598 struct SearchBatchSvc<T: Points>(pub Arc<T>);
7599 impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
7600 for SearchBatchSvc<T> {
7601 type Response = super::SearchBatchResponse;
7602 type Future = BoxFuture<
7603 tonic::Response<Self::Response>,
7604 tonic::Status,
7605 >;
7606 fn call(
7607 &mut self,
7608 request: tonic::Request<super::SearchBatchPoints>,
7609 ) -> Self::Future {
7610 let inner = Arc::clone(&self.0);
7611 let fut = async move {
7612 <T as Points>::search_batch(&inner, request).await
7613 };
7614 Box::pin(fut)
7615 }
7616 }
7617 let accept_compression_encodings = self.accept_compression_encodings;
7618 let send_compression_encodings = self.send_compression_encodings;
7619 let max_decoding_message_size = self.max_decoding_message_size;
7620 let max_encoding_message_size = self.max_encoding_message_size;
7621 let inner = self.inner.clone();
7622 let fut = async move {
7623 let method = SearchBatchSvc(inner);
7624 let codec = tonic::codec::ProstCodec::default();
7625 let mut grpc = tonic::server::Grpc::new(codec)
7626 .apply_compression_config(
7627 accept_compression_encodings,
7628 send_compression_encodings,
7629 )
7630 .apply_max_message_size_config(
7631 max_decoding_message_size,
7632 max_encoding_message_size,
7633 );
7634 let res = grpc.unary(method, req).await;
7635 Ok(res)
7636 };
7637 Box::pin(fut)
7638 }
7639 "/qdrant.Points/SearchGroups" => {
7640 #[allow(non_camel_case_types)]
7641 struct SearchGroupsSvc<T: Points>(pub Arc<T>);
7642 impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
7643 for SearchGroupsSvc<T> {
7644 type Response = super::SearchGroupsResponse;
7645 type Future = BoxFuture<
7646 tonic::Response<Self::Response>,
7647 tonic::Status,
7648 >;
7649 fn call(
7650 &mut self,
7651 request: tonic::Request<super::SearchPointGroups>,
7652 ) -> Self::Future {
7653 let inner = Arc::clone(&self.0);
7654 let fut = async move {
7655 <T as Points>::search_groups(&inner, request).await
7656 };
7657 Box::pin(fut)
7658 }
7659 }
7660 let accept_compression_encodings = self.accept_compression_encodings;
7661 let send_compression_encodings = self.send_compression_encodings;
7662 let max_decoding_message_size = self.max_decoding_message_size;
7663 let max_encoding_message_size = self.max_encoding_message_size;
7664 let inner = self.inner.clone();
7665 let fut = async move {
7666 let method = SearchGroupsSvc(inner);
7667 let codec = tonic::codec::ProstCodec::default();
7668 let mut grpc = tonic::server::Grpc::new(codec)
7669 .apply_compression_config(
7670 accept_compression_encodings,
7671 send_compression_encodings,
7672 )
7673 .apply_max_message_size_config(
7674 max_decoding_message_size,
7675 max_encoding_message_size,
7676 );
7677 let res = grpc.unary(method, req).await;
7678 Ok(res)
7679 };
7680 Box::pin(fut)
7681 }
7682 "/qdrant.Points/Scroll" => {
7683 #[allow(non_camel_case_types)]
7684 struct ScrollSvc<T: Points>(pub Arc<T>);
7685 impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
7686 for ScrollSvc<T> {
7687 type Response = super::ScrollResponse;
7688 type Future = BoxFuture<
7689 tonic::Response<Self::Response>,
7690 tonic::Status,
7691 >;
7692 fn call(
7693 &mut self,
7694 request: tonic::Request<super::ScrollPoints>,
7695 ) -> Self::Future {
7696 let inner = Arc::clone(&self.0);
7697 let fut = async move {
7698 <T as Points>::scroll(&inner, request).await
7699 };
7700 Box::pin(fut)
7701 }
7702 }
7703 let accept_compression_encodings = self.accept_compression_encodings;
7704 let send_compression_encodings = self.send_compression_encodings;
7705 let max_decoding_message_size = self.max_decoding_message_size;
7706 let max_encoding_message_size = self.max_encoding_message_size;
7707 let inner = self.inner.clone();
7708 let fut = async move {
7709 let method = ScrollSvc(inner);
7710 let codec = tonic::codec::ProstCodec::default();
7711 let mut grpc = tonic::server::Grpc::new(codec)
7712 .apply_compression_config(
7713 accept_compression_encodings,
7714 send_compression_encodings,
7715 )
7716 .apply_max_message_size_config(
7717 max_decoding_message_size,
7718 max_encoding_message_size,
7719 );
7720 let res = grpc.unary(method, req).await;
7721 Ok(res)
7722 };
7723 Box::pin(fut)
7724 }
7725 "/qdrant.Points/Recommend" => {
7726 #[allow(non_camel_case_types)]
7727 struct RecommendSvc<T: Points>(pub Arc<T>);
7728 impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
7729 for RecommendSvc<T> {
7730 type Response = super::RecommendResponse;
7731 type Future = BoxFuture<
7732 tonic::Response<Self::Response>,
7733 tonic::Status,
7734 >;
7735 fn call(
7736 &mut self,
7737 request: tonic::Request<super::RecommendPoints>,
7738 ) -> Self::Future {
7739 let inner = Arc::clone(&self.0);
7740 let fut = async move {
7741 <T as Points>::recommend(&inner, request).await
7742 };
7743 Box::pin(fut)
7744 }
7745 }
7746 let accept_compression_encodings = self.accept_compression_encodings;
7747 let send_compression_encodings = self.send_compression_encodings;
7748 let max_decoding_message_size = self.max_decoding_message_size;
7749 let max_encoding_message_size = self.max_encoding_message_size;
7750 let inner = self.inner.clone();
7751 let fut = async move {
7752 let method = RecommendSvc(inner);
7753 let codec = tonic::codec::ProstCodec::default();
7754 let mut grpc = tonic::server::Grpc::new(codec)
7755 .apply_compression_config(
7756 accept_compression_encodings,
7757 send_compression_encodings,
7758 )
7759 .apply_max_message_size_config(
7760 max_decoding_message_size,
7761 max_encoding_message_size,
7762 );
7763 let res = grpc.unary(method, req).await;
7764 Ok(res)
7765 };
7766 Box::pin(fut)
7767 }
7768 "/qdrant.Points/RecommendBatch" => {
7769 #[allow(non_camel_case_types)]
7770 struct RecommendBatchSvc<T: Points>(pub Arc<T>);
7771 impl<
7772 T: Points,
7773 > tonic::server::UnaryService<super::RecommendBatchPoints>
7774 for RecommendBatchSvc<T> {
7775 type Response = super::RecommendBatchResponse;
7776 type Future = BoxFuture<
7777 tonic::Response<Self::Response>,
7778 tonic::Status,
7779 >;
7780 fn call(
7781 &mut self,
7782 request: tonic::Request<super::RecommendBatchPoints>,
7783 ) -> Self::Future {
7784 let inner = Arc::clone(&self.0);
7785 let fut = async move {
7786 <T as Points>::recommend_batch(&inner, request).await
7787 };
7788 Box::pin(fut)
7789 }
7790 }
7791 let accept_compression_encodings = self.accept_compression_encodings;
7792 let send_compression_encodings = self.send_compression_encodings;
7793 let max_decoding_message_size = self.max_decoding_message_size;
7794 let max_encoding_message_size = self.max_encoding_message_size;
7795 let inner = self.inner.clone();
7796 let fut = async move {
7797 let method = RecommendBatchSvc(inner);
7798 let codec = tonic::codec::ProstCodec::default();
7799 let mut grpc = tonic::server::Grpc::new(codec)
7800 .apply_compression_config(
7801 accept_compression_encodings,
7802 send_compression_encodings,
7803 )
7804 .apply_max_message_size_config(
7805 max_decoding_message_size,
7806 max_encoding_message_size,
7807 );
7808 let res = grpc.unary(method, req).await;
7809 Ok(res)
7810 };
7811 Box::pin(fut)
7812 }
7813 "/qdrant.Points/RecommendGroups" => {
7814 #[allow(non_camel_case_types)]
7815 struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
7816 impl<
7817 T: Points,
7818 > tonic::server::UnaryService<super::RecommendPointGroups>
7819 for RecommendGroupsSvc<T> {
7820 type Response = super::RecommendGroupsResponse;
7821 type Future = BoxFuture<
7822 tonic::Response<Self::Response>,
7823 tonic::Status,
7824 >;
7825 fn call(
7826 &mut self,
7827 request: tonic::Request<super::RecommendPointGroups>,
7828 ) -> Self::Future {
7829 let inner = Arc::clone(&self.0);
7830 let fut = async move {
7831 <T as Points>::recommend_groups(&inner, request).await
7832 };
7833 Box::pin(fut)
7834 }
7835 }
7836 let accept_compression_encodings = self.accept_compression_encodings;
7837 let send_compression_encodings = self.send_compression_encodings;
7838 let max_decoding_message_size = self.max_decoding_message_size;
7839 let max_encoding_message_size = self.max_encoding_message_size;
7840 let inner = self.inner.clone();
7841 let fut = async move {
7842 let method = RecommendGroupsSvc(inner);
7843 let codec = tonic::codec::ProstCodec::default();
7844 let mut grpc = tonic::server::Grpc::new(codec)
7845 .apply_compression_config(
7846 accept_compression_encodings,
7847 send_compression_encodings,
7848 )
7849 .apply_max_message_size_config(
7850 max_decoding_message_size,
7851 max_encoding_message_size,
7852 );
7853 let res = grpc.unary(method, req).await;
7854 Ok(res)
7855 };
7856 Box::pin(fut)
7857 }
7858 "/qdrant.Points/Discover" => {
7859 #[allow(non_camel_case_types)]
7860 struct DiscoverSvc<T: Points>(pub Arc<T>);
7861 impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
7862 for DiscoverSvc<T> {
7863 type Response = super::DiscoverResponse;
7864 type Future = BoxFuture<
7865 tonic::Response<Self::Response>,
7866 tonic::Status,
7867 >;
7868 fn call(
7869 &mut self,
7870 request: tonic::Request<super::DiscoverPoints>,
7871 ) -> Self::Future {
7872 let inner = Arc::clone(&self.0);
7873 let fut = async move {
7874 <T as Points>::discover(&inner, request).await
7875 };
7876 Box::pin(fut)
7877 }
7878 }
7879 let accept_compression_encodings = self.accept_compression_encodings;
7880 let send_compression_encodings = self.send_compression_encodings;
7881 let max_decoding_message_size = self.max_decoding_message_size;
7882 let max_encoding_message_size = self.max_encoding_message_size;
7883 let inner = self.inner.clone();
7884 let fut = async move {
7885 let method = DiscoverSvc(inner);
7886 let codec = tonic::codec::ProstCodec::default();
7887 let mut grpc = tonic::server::Grpc::new(codec)
7888 .apply_compression_config(
7889 accept_compression_encodings,
7890 send_compression_encodings,
7891 )
7892 .apply_max_message_size_config(
7893 max_decoding_message_size,
7894 max_encoding_message_size,
7895 );
7896 let res = grpc.unary(method, req).await;
7897 Ok(res)
7898 };
7899 Box::pin(fut)
7900 }
7901 "/qdrant.Points/DiscoverBatch" => {
7902 #[allow(non_camel_case_types)]
7903 struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
7904 impl<
7905 T: Points,
7906 > tonic::server::UnaryService<super::DiscoverBatchPoints>
7907 for DiscoverBatchSvc<T> {
7908 type Response = super::DiscoverBatchResponse;
7909 type Future = BoxFuture<
7910 tonic::Response<Self::Response>,
7911 tonic::Status,
7912 >;
7913 fn call(
7914 &mut self,
7915 request: tonic::Request<super::DiscoverBatchPoints>,
7916 ) -> Self::Future {
7917 let inner = Arc::clone(&self.0);
7918 let fut = async move {
7919 <T as Points>::discover_batch(&inner, request).await
7920 };
7921 Box::pin(fut)
7922 }
7923 }
7924 let accept_compression_encodings = self.accept_compression_encodings;
7925 let send_compression_encodings = self.send_compression_encodings;
7926 let max_decoding_message_size = self.max_decoding_message_size;
7927 let max_encoding_message_size = self.max_encoding_message_size;
7928 let inner = self.inner.clone();
7929 let fut = async move {
7930 let method = DiscoverBatchSvc(inner);
7931 let codec = tonic::codec::ProstCodec::default();
7932 let mut grpc = tonic::server::Grpc::new(codec)
7933 .apply_compression_config(
7934 accept_compression_encodings,
7935 send_compression_encodings,
7936 )
7937 .apply_max_message_size_config(
7938 max_decoding_message_size,
7939 max_encoding_message_size,
7940 );
7941 let res = grpc.unary(method, req).await;
7942 Ok(res)
7943 };
7944 Box::pin(fut)
7945 }
7946 "/qdrant.Points/Count" => {
7947 #[allow(non_camel_case_types)]
7948 struct CountSvc<T: Points>(pub Arc<T>);
7949 impl<T: Points> tonic::server::UnaryService<super::CountPoints>
7950 for CountSvc<T> {
7951 type Response = super::CountResponse;
7952 type Future = BoxFuture<
7953 tonic::Response<Self::Response>,
7954 tonic::Status,
7955 >;
7956 fn call(
7957 &mut self,
7958 request: tonic::Request<super::CountPoints>,
7959 ) -> Self::Future {
7960 let inner = Arc::clone(&self.0);
7961 let fut = async move {
7962 <T as Points>::count(&inner, request).await
7963 };
7964 Box::pin(fut)
7965 }
7966 }
7967 let accept_compression_encodings = self.accept_compression_encodings;
7968 let send_compression_encodings = self.send_compression_encodings;
7969 let max_decoding_message_size = self.max_decoding_message_size;
7970 let max_encoding_message_size = self.max_encoding_message_size;
7971 let inner = self.inner.clone();
7972 let fut = async move {
7973 let method = CountSvc(inner);
7974 let codec = tonic::codec::ProstCodec::default();
7975 let mut grpc = tonic::server::Grpc::new(codec)
7976 .apply_compression_config(
7977 accept_compression_encodings,
7978 send_compression_encodings,
7979 )
7980 .apply_max_message_size_config(
7981 max_decoding_message_size,
7982 max_encoding_message_size,
7983 );
7984 let res = grpc.unary(method, req).await;
7985 Ok(res)
7986 };
7987 Box::pin(fut)
7988 }
7989 "/qdrant.Points/UpdateBatch" => {
7990 #[allow(non_camel_case_types)]
7991 struct UpdateBatchSvc<T: Points>(pub Arc<T>);
7992 impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
7993 for UpdateBatchSvc<T> {
7994 type Response = super::UpdateBatchResponse;
7995 type Future = BoxFuture<
7996 tonic::Response<Self::Response>,
7997 tonic::Status,
7998 >;
7999 fn call(
8000 &mut self,
8001 request: tonic::Request<super::UpdateBatchPoints>,
8002 ) -> Self::Future {
8003 let inner = Arc::clone(&self.0);
8004 let fut = async move {
8005 <T as Points>::update_batch(&inner, request).await
8006 };
8007 Box::pin(fut)
8008 }
8009 }
8010 let accept_compression_encodings = self.accept_compression_encodings;
8011 let send_compression_encodings = self.send_compression_encodings;
8012 let max_decoding_message_size = self.max_decoding_message_size;
8013 let max_encoding_message_size = self.max_encoding_message_size;
8014 let inner = self.inner.clone();
8015 let fut = async move {
8016 let method = UpdateBatchSvc(inner);
8017 let codec = tonic::codec::ProstCodec::default();
8018 let mut grpc = tonic::server::Grpc::new(codec)
8019 .apply_compression_config(
8020 accept_compression_encodings,
8021 send_compression_encodings,
8022 )
8023 .apply_max_message_size_config(
8024 max_decoding_message_size,
8025 max_encoding_message_size,
8026 );
8027 let res = grpc.unary(method, req).await;
8028 Ok(res)
8029 };
8030 Box::pin(fut)
8031 }
8032 "/qdrant.Points/Query" => {
8033 #[allow(non_camel_case_types)]
8034 struct QuerySvc<T: Points>(pub Arc<T>);
8035 impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
8036 for QuerySvc<T> {
8037 type Response = super::QueryResponse;
8038 type Future = BoxFuture<
8039 tonic::Response<Self::Response>,
8040 tonic::Status,
8041 >;
8042 fn call(
8043 &mut self,
8044 request: tonic::Request<super::QueryPoints>,
8045 ) -> Self::Future {
8046 let inner = Arc::clone(&self.0);
8047 let fut = async move {
8048 <T as Points>::query(&inner, request).await
8049 };
8050 Box::pin(fut)
8051 }
8052 }
8053 let accept_compression_encodings = self.accept_compression_encodings;
8054 let send_compression_encodings = self.send_compression_encodings;
8055 let max_decoding_message_size = self.max_decoding_message_size;
8056 let max_encoding_message_size = self.max_encoding_message_size;
8057 let inner = self.inner.clone();
8058 let fut = async move {
8059 let method = QuerySvc(inner);
8060 let codec = tonic::codec::ProstCodec::default();
8061 let mut grpc = tonic::server::Grpc::new(codec)
8062 .apply_compression_config(
8063 accept_compression_encodings,
8064 send_compression_encodings,
8065 )
8066 .apply_max_message_size_config(
8067 max_decoding_message_size,
8068 max_encoding_message_size,
8069 );
8070 let res = grpc.unary(method, req).await;
8071 Ok(res)
8072 };
8073 Box::pin(fut)
8074 }
8075 "/qdrant.Points/QueryBatch" => {
8076 #[allow(non_camel_case_types)]
8077 struct QueryBatchSvc<T: Points>(pub Arc<T>);
8078 impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
8079 for QueryBatchSvc<T> {
8080 type Response = super::QueryBatchResponse;
8081 type Future = BoxFuture<
8082 tonic::Response<Self::Response>,
8083 tonic::Status,
8084 >;
8085 fn call(
8086 &mut self,
8087 request: tonic::Request<super::QueryBatchPoints>,
8088 ) -> Self::Future {
8089 let inner = Arc::clone(&self.0);
8090 let fut = async move {
8091 <T as Points>::query_batch(&inner, request).await
8092 };
8093 Box::pin(fut)
8094 }
8095 }
8096 let accept_compression_encodings = self.accept_compression_encodings;
8097 let send_compression_encodings = self.send_compression_encodings;
8098 let max_decoding_message_size = self.max_decoding_message_size;
8099 let max_encoding_message_size = self.max_encoding_message_size;
8100 let inner = self.inner.clone();
8101 let fut = async move {
8102 let method = QueryBatchSvc(inner);
8103 let codec = tonic::codec::ProstCodec::default();
8104 let mut grpc = tonic::server::Grpc::new(codec)
8105 .apply_compression_config(
8106 accept_compression_encodings,
8107 send_compression_encodings,
8108 )
8109 .apply_max_message_size_config(
8110 max_decoding_message_size,
8111 max_encoding_message_size,
8112 );
8113 let res = grpc.unary(method, req).await;
8114 Ok(res)
8115 };
8116 Box::pin(fut)
8117 }
8118 "/qdrant.Points/QueryGroups" => {
8119 #[allow(non_camel_case_types)]
8120 struct QueryGroupsSvc<T: Points>(pub Arc<T>);
8121 impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
8122 for QueryGroupsSvc<T> {
8123 type Response = super::QueryGroupsResponse;
8124 type Future = BoxFuture<
8125 tonic::Response<Self::Response>,
8126 tonic::Status,
8127 >;
8128 fn call(
8129 &mut self,
8130 request: tonic::Request<super::QueryPointGroups>,
8131 ) -> Self::Future {
8132 let inner = Arc::clone(&self.0);
8133 let fut = async move {
8134 <T as Points>::query_groups(&inner, request).await
8135 };
8136 Box::pin(fut)
8137 }
8138 }
8139 let accept_compression_encodings = self.accept_compression_encodings;
8140 let send_compression_encodings = self.send_compression_encodings;
8141 let max_decoding_message_size = self.max_decoding_message_size;
8142 let max_encoding_message_size = self.max_encoding_message_size;
8143 let inner = self.inner.clone();
8144 let fut = async move {
8145 let method = QueryGroupsSvc(inner);
8146 let codec = tonic::codec::ProstCodec::default();
8147 let mut grpc = tonic::server::Grpc::new(codec)
8148 .apply_compression_config(
8149 accept_compression_encodings,
8150 send_compression_encodings,
8151 )
8152 .apply_max_message_size_config(
8153 max_decoding_message_size,
8154 max_encoding_message_size,
8155 );
8156 let res = grpc.unary(method, req).await;
8157 Ok(res)
8158 };
8159 Box::pin(fut)
8160 }
8161 "/qdrant.Points/Facet" => {
8162 #[allow(non_camel_case_types)]
8163 struct FacetSvc<T: Points>(pub Arc<T>);
8164 impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
8165 for FacetSvc<T> {
8166 type Response = super::FacetResponse;
8167 type Future = BoxFuture<
8168 tonic::Response<Self::Response>,
8169 tonic::Status,
8170 >;
8171 fn call(
8172 &mut self,
8173 request: tonic::Request<super::FacetCounts>,
8174 ) -> Self::Future {
8175 let inner = Arc::clone(&self.0);
8176 let fut = async move {
8177 <T as Points>::facet(&inner, request).await
8178 };
8179 Box::pin(fut)
8180 }
8181 }
8182 let accept_compression_encodings = self.accept_compression_encodings;
8183 let send_compression_encodings = self.send_compression_encodings;
8184 let max_decoding_message_size = self.max_decoding_message_size;
8185 let max_encoding_message_size = self.max_encoding_message_size;
8186 let inner = self.inner.clone();
8187 let fut = async move {
8188 let method = FacetSvc(inner);
8189 let codec = tonic::codec::ProstCodec::default();
8190 let mut grpc = tonic::server::Grpc::new(codec)
8191 .apply_compression_config(
8192 accept_compression_encodings,
8193 send_compression_encodings,
8194 )
8195 .apply_max_message_size_config(
8196 max_decoding_message_size,
8197 max_encoding_message_size,
8198 );
8199 let res = grpc.unary(method, req).await;
8200 Ok(res)
8201 };
8202 Box::pin(fut)
8203 }
8204 "/qdrant.Points/SearchMatrixPairs" => {
8205 #[allow(non_camel_case_types)]
8206 struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
8207 impl<
8208 T: Points,
8209 > tonic::server::UnaryService<super::SearchMatrixPoints>
8210 for SearchMatrixPairsSvc<T> {
8211 type Response = super::SearchMatrixPairsResponse;
8212 type Future = BoxFuture<
8213 tonic::Response<Self::Response>,
8214 tonic::Status,
8215 >;
8216 fn call(
8217 &mut self,
8218 request: tonic::Request<super::SearchMatrixPoints>,
8219 ) -> Self::Future {
8220 let inner = Arc::clone(&self.0);
8221 let fut = async move {
8222 <T as Points>::search_matrix_pairs(&inner, request).await
8223 };
8224 Box::pin(fut)
8225 }
8226 }
8227 let accept_compression_encodings = self.accept_compression_encodings;
8228 let send_compression_encodings = self.send_compression_encodings;
8229 let max_decoding_message_size = self.max_decoding_message_size;
8230 let max_encoding_message_size = self.max_encoding_message_size;
8231 let inner = self.inner.clone();
8232 let fut = async move {
8233 let method = SearchMatrixPairsSvc(inner);
8234 let codec = tonic::codec::ProstCodec::default();
8235 let mut grpc = tonic::server::Grpc::new(codec)
8236 .apply_compression_config(
8237 accept_compression_encodings,
8238 send_compression_encodings,
8239 )
8240 .apply_max_message_size_config(
8241 max_decoding_message_size,
8242 max_encoding_message_size,
8243 );
8244 let res = grpc.unary(method, req).await;
8245 Ok(res)
8246 };
8247 Box::pin(fut)
8248 }
8249 "/qdrant.Points/SearchMatrixOffsets" => {
8250 #[allow(non_camel_case_types)]
8251 struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
8252 impl<
8253 T: Points,
8254 > tonic::server::UnaryService<super::SearchMatrixPoints>
8255 for SearchMatrixOffsetsSvc<T> {
8256 type Response = super::SearchMatrixOffsetsResponse;
8257 type Future = BoxFuture<
8258 tonic::Response<Self::Response>,
8259 tonic::Status,
8260 >;
8261 fn call(
8262 &mut self,
8263 request: tonic::Request<super::SearchMatrixPoints>,
8264 ) -> Self::Future {
8265 let inner = Arc::clone(&self.0);
8266 let fut = async move {
8267 <T as Points>::search_matrix_offsets(&inner, request).await
8268 };
8269 Box::pin(fut)
8270 }
8271 }
8272 let accept_compression_encodings = self.accept_compression_encodings;
8273 let send_compression_encodings = self.send_compression_encodings;
8274 let max_decoding_message_size = self.max_decoding_message_size;
8275 let max_encoding_message_size = self.max_encoding_message_size;
8276 let inner = self.inner.clone();
8277 let fut = async move {
8278 let method = SearchMatrixOffsetsSvc(inner);
8279 let codec = tonic::codec::ProstCodec::default();
8280 let mut grpc = tonic::server::Grpc::new(codec)
8281 .apply_compression_config(
8282 accept_compression_encodings,
8283 send_compression_encodings,
8284 )
8285 .apply_max_message_size_config(
8286 max_decoding_message_size,
8287 max_encoding_message_size,
8288 );
8289 let res = grpc.unary(method, req).await;
8290 Ok(res)
8291 };
8292 Box::pin(fut)
8293 }
8294 _ => {
8295 Box::pin(async move {
8296 let mut response = http::Response::new(empty_body());
8297 let headers = response.headers_mut();
8298 headers
8299 .insert(
8300 tonic::Status::GRPC_STATUS,
8301 (tonic::Code::Unimplemented as i32).into(),
8302 );
8303 headers
8304 .insert(
8305 http::header::CONTENT_TYPE,
8306 tonic::metadata::GRPC_CONTENT_TYPE,
8307 );
8308 Ok(response)
8309 })
8310 }
8311 }
8312 }
8313 }
8314 impl<T> Clone for PointsServer<T> {
8315 fn clone(&self) -> Self {
8316 let inner = self.inner.clone();
8317 Self {
8318 inner,
8319 accept_compression_encodings: self.accept_compression_encodings,
8320 send_compression_encodings: self.send_compression_encodings,
8321 max_decoding_message_size: self.max_decoding_message_size,
8322 max_encoding_message_size: self.max_encoding_message_size,
8323 }
8324 }
8325 }
8326 pub const SERVICE_NAME: &str = "qdrant.Points";
8328 impl<T> tonic::server::NamedService for PointsServer<T> {
8329 const NAME: &'static str = SERVICE_NAME;
8330 }
8331}
8332#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8333pub struct CreateFullSnapshotRequest {}
8334#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8335pub struct ListFullSnapshotsRequest {}
8336#[derive(Clone, PartialEq, ::prost::Message)]
8337pub struct DeleteFullSnapshotRequest {
8338 #[prost(string, tag = "1")]
8340 pub snapshot_name: ::prost::alloc::string::String,
8341}
8342#[derive(Clone, PartialEq, ::prost::Message)]
8343pub struct CreateSnapshotRequest {
8344 #[prost(string, tag = "1")]
8346 pub collection_name: ::prost::alloc::string::String,
8347}
8348#[derive(Clone, PartialEq, ::prost::Message)]
8349pub struct ListSnapshotsRequest {
8350 #[prost(string, tag = "1")]
8352 pub collection_name: ::prost::alloc::string::String,
8353}
8354#[derive(Clone, PartialEq, ::prost::Message)]
8355pub struct DeleteSnapshotRequest {
8356 #[prost(string, tag = "1")]
8358 pub collection_name: ::prost::alloc::string::String,
8359 #[prost(string, tag = "2")]
8361 pub snapshot_name: ::prost::alloc::string::String,
8362}
8363#[derive(Clone, PartialEq, ::prost::Message)]
8364pub struct SnapshotDescription {
8365 #[prost(string, tag = "1")]
8367 pub name: ::prost::alloc::string::String,
8368 #[prost(message, optional, tag = "2")]
8370 pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
8371 #[prost(int64, tag = "3")]
8373 pub size: i64,
8374 #[prost(string, optional, tag = "4")]
8376 pub checksum: ::core::option::Option<::prost::alloc::string::String>,
8377}
8378#[derive(Clone, PartialEq, ::prost::Message)]
8379pub struct CreateSnapshotResponse {
8380 #[prost(message, optional, tag = "1")]
8381 pub snapshot_description: ::core::option::Option<SnapshotDescription>,
8382 #[prost(double, tag = "2")]
8384 pub time: f64,
8385}
8386#[derive(Clone, PartialEq, ::prost::Message)]
8387pub struct ListSnapshotsResponse {
8388 #[prost(message, repeated, tag = "1")]
8389 pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
8390 #[prost(double, tag = "2")]
8392 pub time: f64,
8393}
8394#[derive(Clone, Copy, PartialEq, ::prost::Message)]
8395pub struct DeleteSnapshotResponse {
8396 #[prost(double, tag = "1")]
8398 pub time: f64,
8399}
8400pub mod snapshots_client {
8402 #![allow(
8403 unused_variables,
8404 dead_code,
8405 missing_docs,
8406 clippy::wildcard_imports,
8407 clippy::let_unit_value,
8408 )]
8409 use tonic::codegen::*;
8410 use tonic::codegen::http::Uri;
8411 #[derive(Debug, Clone)]
8412 pub struct SnapshotsClient<T> {
8413 inner: tonic::client::Grpc<T>,
8414 }
8415 impl SnapshotsClient<tonic::transport::Channel> {
8416 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
8418 where
8419 D: TryInto<tonic::transport::Endpoint>,
8420 D::Error: Into<StdError>,
8421 {
8422 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
8423 Ok(Self::new(conn))
8424 }
8425 }
8426 impl<T> SnapshotsClient<T>
8427 where
8428 T: tonic::client::GrpcService<tonic::body::BoxBody>,
8429 T::Error: Into<StdError>,
8430 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
8431 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
8432 {
8433 pub fn new(inner: T) -> Self {
8434 let inner = tonic::client::Grpc::new(inner);
8435 Self { inner }
8436 }
8437 pub fn with_origin(inner: T, origin: Uri) -> Self {
8438 let inner = tonic::client::Grpc::with_origin(inner, origin);
8439 Self { inner }
8440 }
8441 pub fn with_interceptor<F>(
8442 inner: T,
8443 interceptor: F,
8444 ) -> SnapshotsClient<InterceptedService<T, F>>
8445 where
8446 F: tonic::service::Interceptor,
8447 T::ResponseBody: Default,
8448 T: tonic::codegen::Service<
8449 http::Request<tonic::body::BoxBody>,
8450 Response = http::Response<
8451 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
8452 >,
8453 >,
8454 <T as tonic::codegen::Service<
8455 http::Request<tonic::body::BoxBody>,
8456 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
8457 {
8458 SnapshotsClient::new(InterceptedService::new(inner, interceptor))
8459 }
8460 #[must_use]
8465 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8466 self.inner = self.inner.send_compressed(encoding);
8467 self
8468 }
8469 #[must_use]
8471 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8472 self.inner = self.inner.accept_compressed(encoding);
8473 self
8474 }
8475 #[must_use]
8479 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8480 self.inner = self.inner.max_decoding_message_size(limit);
8481 self
8482 }
8483 #[must_use]
8487 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8488 self.inner = self.inner.max_encoding_message_size(limit);
8489 self
8490 }
8491 pub async fn create(
8493 &mut self,
8494 request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
8495 ) -> std::result::Result<
8496 tonic::Response<super::CreateSnapshotResponse>,
8497 tonic::Status,
8498 > {
8499 self.inner
8500 .ready()
8501 .await
8502 .map_err(|e| {
8503 tonic::Status::unknown(
8504 format!("Service was not ready: {}", e.into()),
8505 )
8506 })?;
8507 let codec = tonic::codec::ProstCodec::default();
8508 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
8509 let mut req = request.into_request();
8510 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
8511 self.inner.unary(req, path, codec).await
8512 }
8513 pub async fn list(
8515 &mut self,
8516 request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
8517 ) -> std::result::Result<
8518 tonic::Response<super::ListSnapshotsResponse>,
8519 tonic::Status,
8520 > {
8521 self.inner
8522 .ready()
8523 .await
8524 .map_err(|e| {
8525 tonic::Status::unknown(
8526 format!("Service was not ready: {}", e.into()),
8527 )
8528 })?;
8529 let codec = tonic::codec::ProstCodec::default();
8530 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
8531 let mut req = request.into_request();
8532 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
8533 self.inner.unary(req, path, codec).await
8534 }
8535 pub async fn delete(
8537 &mut self,
8538 request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
8539 ) -> std::result::Result<
8540 tonic::Response<super::DeleteSnapshotResponse>,
8541 tonic::Status,
8542 > {
8543 self.inner
8544 .ready()
8545 .await
8546 .map_err(|e| {
8547 tonic::Status::unknown(
8548 format!("Service was not ready: {}", e.into()),
8549 )
8550 })?;
8551 let codec = tonic::codec::ProstCodec::default();
8552 let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
8553 let mut req = request.into_request();
8554 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
8555 self.inner.unary(req, path, codec).await
8556 }
8557 pub async fn create_full(
8559 &mut self,
8560 request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
8561 ) -> std::result::Result<
8562 tonic::Response<super::CreateSnapshotResponse>,
8563 tonic::Status,
8564 > {
8565 self.inner
8566 .ready()
8567 .await
8568 .map_err(|e| {
8569 tonic::Status::unknown(
8570 format!("Service was not ready: {}", e.into()),
8571 )
8572 })?;
8573 let codec = tonic::codec::ProstCodec::default();
8574 let path = http::uri::PathAndQuery::from_static(
8575 "/qdrant.Snapshots/CreateFull",
8576 );
8577 let mut req = request.into_request();
8578 req.extensions_mut()
8579 .insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
8580 self.inner.unary(req, path, codec).await
8581 }
8582 pub async fn list_full(
8584 &mut self,
8585 request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
8586 ) -> std::result::Result<
8587 tonic::Response<super::ListSnapshotsResponse>,
8588 tonic::Status,
8589 > {
8590 self.inner
8591 .ready()
8592 .await
8593 .map_err(|e| {
8594 tonic::Status::unknown(
8595 format!("Service was not ready: {}", e.into()),
8596 )
8597 })?;
8598 let codec = tonic::codec::ProstCodec::default();
8599 let path = http::uri::PathAndQuery::from_static(
8600 "/qdrant.Snapshots/ListFull",
8601 );
8602 let mut req = request.into_request();
8603 req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
8604 self.inner.unary(req, path, codec).await
8605 }
8606 pub async fn delete_full(
8608 &mut self,
8609 request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
8610 ) -> std::result::Result<
8611 tonic::Response<super::DeleteSnapshotResponse>,
8612 tonic::Status,
8613 > {
8614 self.inner
8615 .ready()
8616 .await
8617 .map_err(|e| {
8618 tonic::Status::unknown(
8619 format!("Service was not ready: {}", e.into()),
8620 )
8621 })?;
8622 let codec = tonic::codec::ProstCodec::default();
8623 let path = http::uri::PathAndQuery::from_static(
8624 "/qdrant.Snapshots/DeleteFull",
8625 );
8626 let mut req = request.into_request();
8627 req.extensions_mut()
8628 .insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
8629 self.inner.unary(req, path, codec).await
8630 }
8631 }
8632}
8633pub mod snapshots_server {
8635 #![allow(
8636 unused_variables,
8637 dead_code,
8638 missing_docs,
8639 clippy::wildcard_imports,
8640 clippy::let_unit_value,
8641 )]
8642 use tonic::codegen::*;
8643 #[async_trait]
8645 pub trait Snapshots: std::marker::Send + std::marker::Sync + 'static {
8646 async fn create(
8648 &self,
8649 request: tonic::Request<super::CreateSnapshotRequest>,
8650 ) -> std::result::Result<
8651 tonic::Response<super::CreateSnapshotResponse>,
8652 tonic::Status,
8653 >;
8654 async fn list(
8656 &self,
8657 request: tonic::Request<super::ListSnapshotsRequest>,
8658 ) -> std::result::Result<
8659 tonic::Response<super::ListSnapshotsResponse>,
8660 tonic::Status,
8661 >;
8662 async fn delete(
8664 &self,
8665 request: tonic::Request<super::DeleteSnapshotRequest>,
8666 ) -> std::result::Result<
8667 tonic::Response<super::DeleteSnapshotResponse>,
8668 tonic::Status,
8669 >;
8670 async fn create_full(
8672 &self,
8673 request: tonic::Request<super::CreateFullSnapshotRequest>,
8674 ) -> std::result::Result<
8675 tonic::Response<super::CreateSnapshotResponse>,
8676 tonic::Status,
8677 >;
8678 async fn list_full(
8680 &self,
8681 request: tonic::Request<super::ListFullSnapshotsRequest>,
8682 ) -> std::result::Result<
8683 tonic::Response<super::ListSnapshotsResponse>,
8684 tonic::Status,
8685 >;
8686 async fn delete_full(
8688 &self,
8689 request: tonic::Request<super::DeleteFullSnapshotRequest>,
8690 ) -> std::result::Result<
8691 tonic::Response<super::DeleteSnapshotResponse>,
8692 tonic::Status,
8693 >;
8694 }
8695 #[derive(Debug)]
8696 pub struct SnapshotsServer<T> {
8697 inner: Arc<T>,
8698 accept_compression_encodings: EnabledCompressionEncodings,
8699 send_compression_encodings: EnabledCompressionEncodings,
8700 max_decoding_message_size: Option<usize>,
8701 max_encoding_message_size: Option<usize>,
8702 }
8703 impl<T> SnapshotsServer<T> {
8704 pub fn new(inner: T) -> Self {
8705 Self::from_arc(Arc::new(inner))
8706 }
8707 pub fn from_arc(inner: Arc<T>) -> Self {
8708 Self {
8709 inner,
8710 accept_compression_encodings: Default::default(),
8711 send_compression_encodings: Default::default(),
8712 max_decoding_message_size: None,
8713 max_encoding_message_size: None,
8714 }
8715 }
8716 pub fn with_interceptor<F>(
8717 inner: T,
8718 interceptor: F,
8719 ) -> InterceptedService<Self, F>
8720 where
8721 F: tonic::service::Interceptor,
8722 {
8723 InterceptedService::new(Self::new(inner), interceptor)
8724 }
8725 #[must_use]
8727 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8728 self.accept_compression_encodings.enable(encoding);
8729 self
8730 }
8731 #[must_use]
8733 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8734 self.send_compression_encodings.enable(encoding);
8735 self
8736 }
8737 #[must_use]
8741 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8742 self.max_decoding_message_size = Some(limit);
8743 self
8744 }
8745 #[must_use]
8749 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8750 self.max_encoding_message_size = Some(limit);
8751 self
8752 }
8753 }
8754 impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
8755 where
8756 T: Snapshots,
8757 B: Body + std::marker::Send + 'static,
8758 B::Error: Into<StdError> + std::marker::Send + 'static,
8759 {
8760 type Response = http::Response<tonic::body::BoxBody>;
8761 type Error = std::convert::Infallible;
8762 type Future = BoxFuture<Self::Response, Self::Error>;
8763 fn poll_ready(
8764 &mut self,
8765 _cx: &mut Context<'_>,
8766 ) -> Poll<std::result::Result<(), Self::Error>> {
8767 Poll::Ready(Ok(()))
8768 }
8769 fn call(&mut self, req: http::Request<B>) -> Self::Future {
8770 match req.uri().path() {
8771 "/qdrant.Snapshots/Create" => {
8772 #[allow(non_camel_case_types)]
8773 struct CreateSvc<T: Snapshots>(pub Arc<T>);
8774 impl<
8775 T: Snapshots,
8776 > tonic::server::UnaryService<super::CreateSnapshotRequest>
8777 for CreateSvc<T> {
8778 type Response = super::CreateSnapshotResponse;
8779 type Future = BoxFuture<
8780 tonic::Response<Self::Response>,
8781 tonic::Status,
8782 >;
8783 fn call(
8784 &mut self,
8785 request: tonic::Request<super::CreateSnapshotRequest>,
8786 ) -> Self::Future {
8787 let inner = Arc::clone(&self.0);
8788 let fut = async move {
8789 <T as Snapshots>::create(&inner, request).await
8790 };
8791 Box::pin(fut)
8792 }
8793 }
8794 let accept_compression_encodings = self.accept_compression_encodings;
8795 let send_compression_encodings = self.send_compression_encodings;
8796 let max_decoding_message_size = self.max_decoding_message_size;
8797 let max_encoding_message_size = self.max_encoding_message_size;
8798 let inner = self.inner.clone();
8799 let fut = async move {
8800 let method = CreateSvc(inner);
8801 let codec = tonic::codec::ProstCodec::default();
8802 let mut grpc = tonic::server::Grpc::new(codec)
8803 .apply_compression_config(
8804 accept_compression_encodings,
8805 send_compression_encodings,
8806 )
8807 .apply_max_message_size_config(
8808 max_decoding_message_size,
8809 max_encoding_message_size,
8810 );
8811 let res = grpc.unary(method, req).await;
8812 Ok(res)
8813 };
8814 Box::pin(fut)
8815 }
8816 "/qdrant.Snapshots/List" => {
8817 #[allow(non_camel_case_types)]
8818 struct ListSvc<T: Snapshots>(pub Arc<T>);
8819 impl<
8820 T: Snapshots,
8821 > tonic::server::UnaryService<super::ListSnapshotsRequest>
8822 for ListSvc<T> {
8823 type Response = super::ListSnapshotsResponse;
8824 type Future = BoxFuture<
8825 tonic::Response<Self::Response>,
8826 tonic::Status,
8827 >;
8828 fn call(
8829 &mut self,
8830 request: tonic::Request<super::ListSnapshotsRequest>,
8831 ) -> Self::Future {
8832 let inner = Arc::clone(&self.0);
8833 let fut = async move {
8834 <T as Snapshots>::list(&inner, request).await
8835 };
8836 Box::pin(fut)
8837 }
8838 }
8839 let accept_compression_encodings = self.accept_compression_encodings;
8840 let send_compression_encodings = self.send_compression_encodings;
8841 let max_decoding_message_size = self.max_decoding_message_size;
8842 let max_encoding_message_size = self.max_encoding_message_size;
8843 let inner = self.inner.clone();
8844 let fut = async move {
8845 let method = ListSvc(inner);
8846 let codec = tonic::codec::ProstCodec::default();
8847 let mut grpc = tonic::server::Grpc::new(codec)
8848 .apply_compression_config(
8849 accept_compression_encodings,
8850 send_compression_encodings,
8851 )
8852 .apply_max_message_size_config(
8853 max_decoding_message_size,
8854 max_encoding_message_size,
8855 );
8856 let res = grpc.unary(method, req).await;
8857 Ok(res)
8858 };
8859 Box::pin(fut)
8860 }
8861 "/qdrant.Snapshots/Delete" => {
8862 #[allow(non_camel_case_types)]
8863 struct DeleteSvc<T: Snapshots>(pub Arc<T>);
8864 impl<
8865 T: Snapshots,
8866 > tonic::server::UnaryService<super::DeleteSnapshotRequest>
8867 for DeleteSvc<T> {
8868 type Response = super::DeleteSnapshotResponse;
8869 type Future = BoxFuture<
8870 tonic::Response<Self::Response>,
8871 tonic::Status,
8872 >;
8873 fn call(
8874 &mut self,
8875 request: tonic::Request<super::DeleteSnapshotRequest>,
8876 ) -> Self::Future {
8877 let inner = Arc::clone(&self.0);
8878 let fut = async move {
8879 <T as Snapshots>::delete(&inner, request).await
8880 };
8881 Box::pin(fut)
8882 }
8883 }
8884 let accept_compression_encodings = self.accept_compression_encodings;
8885 let send_compression_encodings = self.send_compression_encodings;
8886 let max_decoding_message_size = self.max_decoding_message_size;
8887 let max_encoding_message_size = self.max_encoding_message_size;
8888 let inner = self.inner.clone();
8889 let fut = async move {
8890 let method = DeleteSvc(inner);
8891 let codec = tonic::codec::ProstCodec::default();
8892 let mut grpc = tonic::server::Grpc::new(codec)
8893 .apply_compression_config(
8894 accept_compression_encodings,
8895 send_compression_encodings,
8896 )
8897 .apply_max_message_size_config(
8898 max_decoding_message_size,
8899 max_encoding_message_size,
8900 );
8901 let res = grpc.unary(method, req).await;
8902 Ok(res)
8903 };
8904 Box::pin(fut)
8905 }
8906 "/qdrant.Snapshots/CreateFull" => {
8907 #[allow(non_camel_case_types)]
8908 struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
8909 impl<
8910 T: Snapshots,
8911 > tonic::server::UnaryService<super::CreateFullSnapshotRequest>
8912 for CreateFullSvc<T> {
8913 type Response = super::CreateSnapshotResponse;
8914 type Future = BoxFuture<
8915 tonic::Response<Self::Response>,
8916 tonic::Status,
8917 >;
8918 fn call(
8919 &mut self,
8920 request: tonic::Request<super::CreateFullSnapshotRequest>,
8921 ) -> Self::Future {
8922 let inner = Arc::clone(&self.0);
8923 let fut = async move {
8924 <T as Snapshots>::create_full(&inner, request).await
8925 };
8926 Box::pin(fut)
8927 }
8928 }
8929 let accept_compression_encodings = self.accept_compression_encodings;
8930 let send_compression_encodings = self.send_compression_encodings;
8931 let max_decoding_message_size = self.max_decoding_message_size;
8932 let max_encoding_message_size = self.max_encoding_message_size;
8933 let inner = self.inner.clone();
8934 let fut = async move {
8935 let method = CreateFullSvc(inner);
8936 let codec = tonic::codec::ProstCodec::default();
8937 let mut grpc = tonic::server::Grpc::new(codec)
8938 .apply_compression_config(
8939 accept_compression_encodings,
8940 send_compression_encodings,
8941 )
8942 .apply_max_message_size_config(
8943 max_decoding_message_size,
8944 max_encoding_message_size,
8945 );
8946 let res = grpc.unary(method, req).await;
8947 Ok(res)
8948 };
8949 Box::pin(fut)
8950 }
8951 "/qdrant.Snapshots/ListFull" => {
8952 #[allow(non_camel_case_types)]
8953 struct ListFullSvc<T: Snapshots>(pub Arc<T>);
8954 impl<
8955 T: Snapshots,
8956 > tonic::server::UnaryService<super::ListFullSnapshotsRequest>
8957 for ListFullSvc<T> {
8958 type Response = super::ListSnapshotsResponse;
8959 type Future = BoxFuture<
8960 tonic::Response<Self::Response>,
8961 tonic::Status,
8962 >;
8963 fn call(
8964 &mut self,
8965 request: tonic::Request<super::ListFullSnapshotsRequest>,
8966 ) -> Self::Future {
8967 let inner = Arc::clone(&self.0);
8968 let fut = async move {
8969 <T as Snapshots>::list_full(&inner, request).await
8970 };
8971 Box::pin(fut)
8972 }
8973 }
8974 let accept_compression_encodings = self.accept_compression_encodings;
8975 let send_compression_encodings = self.send_compression_encodings;
8976 let max_decoding_message_size = self.max_decoding_message_size;
8977 let max_encoding_message_size = self.max_encoding_message_size;
8978 let inner = self.inner.clone();
8979 let fut = async move {
8980 let method = ListFullSvc(inner);
8981 let codec = tonic::codec::ProstCodec::default();
8982 let mut grpc = tonic::server::Grpc::new(codec)
8983 .apply_compression_config(
8984 accept_compression_encodings,
8985 send_compression_encodings,
8986 )
8987 .apply_max_message_size_config(
8988 max_decoding_message_size,
8989 max_encoding_message_size,
8990 );
8991 let res = grpc.unary(method, req).await;
8992 Ok(res)
8993 };
8994 Box::pin(fut)
8995 }
8996 "/qdrant.Snapshots/DeleteFull" => {
8997 #[allow(non_camel_case_types)]
8998 struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
8999 impl<
9000 T: Snapshots,
9001 > tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
9002 for DeleteFullSvc<T> {
9003 type Response = super::DeleteSnapshotResponse;
9004 type Future = BoxFuture<
9005 tonic::Response<Self::Response>,
9006 tonic::Status,
9007 >;
9008 fn call(
9009 &mut self,
9010 request: tonic::Request<super::DeleteFullSnapshotRequest>,
9011 ) -> Self::Future {
9012 let inner = Arc::clone(&self.0);
9013 let fut = async move {
9014 <T as Snapshots>::delete_full(&inner, request).await
9015 };
9016 Box::pin(fut)
9017 }
9018 }
9019 let accept_compression_encodings = self.accept_compression_encodings;
9020 let send_compression_encodings = self.send_compression_encodings;
9021 let max_decoding_message_size = self.max_decoding_message_size;
9022 let max_encoding_message_size = self.max_encoding_message_size;
9023 let inner = self.inner.clone();
9024 let fut = async move {
9025 let method = DeleteFullSvc(inner);
9026 let codec = tonic::codec::ProstCodec::default();
9027 let mut grpc = tonic::server::Grpc::new(codec)
9028 .apply_compression_config(
9029 accept_compression_encodings,
9030 send_compression_encodings,
9031 )
9032 .apply_max_message_size_config(
9033 max_decoding_message_size,
9034 max_encoding_message_size,
9035 );
9036 let res = grpc.unary(method, req).await;
9037 Ok(res)
9038 };
9039 Box::pin(fut)
9040 }
9041 _ => {
9042 Box::pin(async move {
9043 let mut response = http::Response::new(empty_body());
9044 let headers = response.headers_mut();
9045 headers
9046 .insert(
9047 tonic::Status::GRPC_STATUS,
9048 (tonic::Code::Unimplemented as i32).into(),
9049 );
9050 headers
9051 .insert(
9052 http::header::CONTENT_TYPE,
9053 tonic::metadata::GRPC_CONTENT_TYPE,
9054 );
9055 Ok(response)
9056 })
9057 }
9058 }
9059 }
9060 }
9061 impl<T> Clone for SnapshotsServer<T> {
9062 fn clone(&self) -> Self {
9063 let inner = self.inner.clone();
9064 Self {
9065 inner,
9066 accept_compression_encodings: self.accept_compression_encodings,
9067 send_compression_encodings: self.send_compression_encodings,
9068 max_decoding_message_size: self.max_decoding_message_size,
9069 max_encoding_message_size: self.max_encoding_message_size,
9070 }
9071 }
9072 }
9073 pub const SERVICE_NAME: &str = "qdrant.Snapshots";
9075 impl<T> tonic::server::NamedService for SnapshotsServer<T> {
9076 const NAME: &'static str = SERVICE_NAME;
9077 }
9078}
9079#[derive(Clone, Copy, PartialEq, ::prost::Message)]
9080pub struct HealthCheckRequest {}
9081#[derive(Clone, PartialEq, ::prost::Message)]
9082pub struct HealthCheckReply {
9083 #[prost(string, tag = "1")]
9084 pub title: ::prost::alloc::string::String,
9085 #[prost(string, tag = "2")]
9086 pub version: ::prost::alloc::string::String,
9087 #[prost(string, optional, tag = "3")]
9088 pub commit: ::core::option::Option<::prost::alloc::string::String>,
9089}
9090pub mod qdrant_client {
9092 #![allow(
9093 unused_variables,
9094 dead_code,
9095 missing_docs,
9096 clippy::wildcard_imports,
9097 clippy::let_unit_value,
9098 )]
9099 use tonic::codegen::*;
9100 use tonic::codegen::http::Uri;
9101 #[derive(Debug, Clone)]
9102 pub struct QdrantClient<T> {
9103 inner: tonic::client::Grpc<T>,
9104 }
9105 impl QdrantClient<tonic::transport::Channel> {
9106 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9108 where
9109 D: TryInto<tonic::transport::Endpoint>,
9110 D::Error: Into<StdError>,
9111 {
9112 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
9113 Ok(Self::new(conn))
9114 }
9115 }
9116 impl<T> QdrantClient<T>
9117 where
9118 T: tonic::client::GrpcService<tonic::body::BoxBody>,
9119 T::Error: Into<StdError>,
9120 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9121 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9122 {
9123 pub fn new(inner: T) -> Self {
9124 let inner = tonic::client::Grpc::new(inner);
9125 Self { inner }
9126 }
9127 pub fn with_origin(inner: T, origin: Uri) -> Self {
9128 let inner = tonic::client::Grpc::with_origin(inner, origin);
9129 Self { inner }
9130 }
9131 pub fn with_interceptor<F>(
9132 inner: T,
9133 interceptor: F,
9134 ) -> QdrantClient<InterceptedService<T, F>>
9135 where
9136 F: tonic::service::Interceptor,
9137 T::ResponseBody: Default,
9138 T: tonic::codegen::Service<
9139 http::Request<tonic::body::BoxBody>,
9140 Response = http::Response<
9141 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
9142 >,
9143 >,
9144 <T as tonic::codegen::Service<
9145 http::Request<tonic::body::BoxBody>,
9146 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9147 {
9148 QdrantClient::new(InterceptedService::new(inner, interceptor))
9149 }
9150 #[must_use]
9155 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9156 self.inner = self.inner.send_compressed(encoding);
9157 self
9158 }
9159 #[must_use]
9161 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9162 self.inner = self.inner.accept_compressed(encoding);
9163 self
9164 }
9165 #[must_use]
9169 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9170 self.inner = self.inner.max_decoding_message_size(limit);
9171 self
9172 }
9173 #[must_use]
9177 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9178 self.inner = self.inner.max_encoding_message_size(limit);
9179 self
9180 }
9181 pub async fn health_check(
9182 &mut self,
9183 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
9184 ) -> std::result::Result<
9185 tonic::Response<super::HealthCheckReply>,
9186 tonic::Status,
9187 > {
9188 self.inner
9189 .ready()
9190 .await
9191 .map_err(|e| {
9192 tonic::Status::unknown(
9193 format!("Service was not ready: {}", e.into()),
9194 )
9195 })?;
9196 let codec = tonic::codec::ProstCodec::default();
9197 let path = http::uri::PathAndQuery::from_static(
9198 "/qdrant.Qdrant/HealthCheck",
9199 );
9200 let mut req = request.into_request();
9201 req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
9202 self.inner.unary(req, path, codec).await
9203 }
9204 }
9205}
9206pub mod qdrant_server {
9208 #![allow(
9209 unused_variables,
9210 dead_code,
9211 missing_docs,
9212 clippy::wildcard_imports,
9213 clippy::let_unit_value,
9214 )]
9215 use tonic::codegen::*;
9216 #[async_trait]
9218 pub trait Qdrant: std::marker::Send + std::marker::Sync + 'static {
9219 async fn health_check(
9220 &self,
9221 request: tonic::Request<super::HealthCheckRequest>,
9222 ) -> std::result::Result<
9223 tonic::Response<super::HealthCheckReply>,
9224 tonic::Status,
9225 >;
9226 }
9227 #[derive(Debug)]
9228 pub struct QdrantServer<T> {
9229 inner: Arc<T>,
9230 accept_compression_encodings: EnabledCompressionEncodings,
9231 send_compression_encodings: EnabledCompressionEncodings,
9232 max_decoding_message_size: Option<usize>,
9233 max_encoding_message_size: Option<usize>,
9234 }
9235 impl<T> QdrantServer<T> {
9236 pub fn new(inner: T) -> Self {
9237 Self::from_arc(Arc::new(inner))
9238 }
9239 pub fn from_arc(inner: Arc<T>) -> Self {
9240 Self {
9241 inner,
9242 accept_compression_encodings: Default::default(),
9243 send_compression_encodings: Default::default(),
9244 max_decoding_message_size: None,
9245 max_encoding_message_size: None,
9246 }
9247 }
9248 pub fn with_interceptor<F>(
9249 inner: T,
9250 interceptor: F,
9251 ) -> InterceptedService<Self, F>
9252 where
9253 F: tonic::service::Interceptor,
9254 {
9255 InterceptedService::new(Self::new(inner), interceptor)
9256 }
9257 #[must_use]
9259 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9260 self.accept_compression_encodings.enable(encoding);
9261 self
9262 }
9263 #[must_use]
9265 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9266 self.send_compression_encodings.enable(encoding);
9267 self
9268 }
9269 #[must_use]
9273 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9274 self.max_decoding_message_size = Some(limit);
9275 self
9276 }
9277 #[must_use]
9281 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9282 self.max_encoding_message_size = Some(limit);
9283 self
9284 }
9285 }
9286 impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
9287 where
9288 T: Qdrant,
9289 B: Body + std::marker::Send + 'static,
9290 B::Error: Into<StdError> + std::marker::Send + 'static,
9291 {
9292 type Response = http::Response<tonic::body::BoxBody>;
9293 type Error = std::convert::Infallible;
9294 type Future = BoxFuture<Self::Response, Self::Error>;
9295 fn poll_ready(
9296 &mut self,
9297 _cx: &mut Context<'_>,
9298 ) -> Poll<std::result::Result<(), Self::Error>> {
9299 Poll::Ready(Ok(()))
9300 }
9301 fn call(&mut self, req: http::Request<B>) -> Self::Future {
9302 match req.uri().path() {
9303 "/qdrant.Qdrant/HealthCheck" => {
9304 #[allow(non_camel_case_types)]
9305 struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
9306 impl<
9307 T: Qdrant,
9308 > tonic::server::UnaryService<super::HealthCheckRequest>
9309 for HealthCheckSvc<T> {
9310 type Response = super::HealthCheckReply;
9311 type Future = BoxFuture<
9312 tonic::Response<Self::Response>,
9313 tonic::Status,
9314 >;
9315 fn call(
9316 &mut self,
9317 request: tonic::Request<super::HealthCheckRequest>,
9318 ) -> Self::Future {
9319 let inner = Arc::clone(&self.0);
9320 let fut = async move {
9321 <T as Qdrant>::health_check(&inner, request).await
9322 };
9323 Box::pin(fut)
9324 }
9325 }
9326 let accept_compression_encodings = self.accept_compression_encodings;
9327 let send_compression_encodings = self.send_compression_encodings;
9328 let max_decoding_message_size = self.max_decoding_message_size;
9329 let max_encoding_message_size = self.max_encoding_message_size;
9330 let inner = self.inner.clone();
9331 let fut = async move {
9332 let method = HealthCheckSvc(inner);
9333 let codec = tonic::codec::ProstCodec::default();
9334 let mut grpc = tonic::server::Grpc::new(codec)
9335 .apply_compression_config(
9336 accept_compression_encodings,
9337 send_compression_encodings,
9338 )
9339 .apply_max_message_size_config(
9340 max_decoding_message_size,
9341 max_encoding_message_size,
9342 );
9343 let res = grpc.unary(method, req).await;
9344 Ok(res)
9345 };
9346 Box::pin(fut)
9347 }
9348 _ => {
9349 Box::pin(async move {
9350 let mut response = http::Response::new(empty_body());
9351 let headers = response.headers_mut();
9352 headers
9353 .insert(
9354 tonic::Status::GRPC_STATUS,
9355 (tonic::Code::Unimplemented as i32).into(),
9356 );
9357 headers
9358 .insert(
9359 http::header::CONTENT_TYPE,
9360 tonic::metadata::GRPC_CONTENT_TYPE,
9361 );
9362 Ok(response)
9363 })
9364 }
9365 }
9366 }
9367 }
9368 impl<T> Clone for QdrantServer<T> {
9369 fn clone(&self) -> Self {
9370 let inner = self.inner.clone();
9371 Self {
9372 inner,
9373 accept_compression_encodings: self.accept_compression_encodings,
9374 send_compression_encodings: self.send_compression_encodings,
9375 max_decoding_message_size: self.max_decoding_message_size,
9376 max_encoding_message_size: self.max_encoding_message_size,
9377 }
9378 }
9379 }
9380 pub const SERVICE_NAME: &str = "qdrant.Qdrant";
9382 impl<T> tonic::server::NamedService for QdrantServer<T> {
9383 const NAME: &'static str = SERVICE_NAME;
9384 }
9385}
9386pub use crate::manual_builder::*;
9387pub use crate::builder_types::*;
9388pub use crate::qdrant_client::builders::*;
9389pub use crate::builders::*;
9390pub use prost_types::Timestamp;