qdrant-client 1.20.0

Rust client for Qdrant Vector Search Engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
// @generated by tonic-prost-build. DO NOT EDIT.
// Regenerate: cargo test --test serverless_protos -- --ignored --nocapture
// This file is @generated by prost-build.
/// Configuration of a single dense (embedding) vector.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DenseVectorConfig {
    /// Dimensionality of the embedding, e.g. 512 (CLIP), 1536, 3072.
    #[prost(uint64, tag = "1")]
    pub size: u64,
    /// Distance metric used to compare vectors.
    #[prost(enumeration = "Distance", tag = "2")]
    pub distance: i32,
    /// Store several sub-vectors per point and compare with max-sim, for
    /// late-interaction models (ColBERT, ColPali, ...).
    #[prost(bool, tag = "3")]
    pub multivector: bool,
    /// Precision/cost trade-off for this vector. Unset: HIGH.
    #[prost(enumeration = "PrecisionTier", optional, tag = "4")]
    pub precision_tier: ::core::option::Option<i32>,
}
/// Configuration of a single sparse vector.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SparseVectorConfig {
    /// Apply the IDF modifier at query time. Enable for BM25-style models that
    /// expect inverse-document-frequency weighting.
    #[prost(bool, tag = "1")]
    pub use_idf: bool,
    /// Precision/cost trade-off for this vector. Unset: HIGH.
    #[prost(enumeration = "PrecisionTier", optional, tag = "2")]
    pub precision_tier: ::core::option::Option<i32>,
}
/// Exact match on string values, e.g. `color: "red"`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeywordIndex {
    /// If set, enable prefix matching (`match: { "prefix": ... }`) on this field.
    /// Presence of this message enables prefix matching; it has no options yet.
    #[prost(message, optional, tag = "1")]
    pub prefix: ::core::option::Option<KeywordPrefixParams>,
}
/// Prefix matching options for the keyword index. Has no options yet:
/// presence of this message enables prefix matching.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeywordPrefixParams {}
/// Exact match and/or range filters on integers, e.g. `age: 25`. Both are on
/// by default; turning one off shrinks the index.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IntegerIndex {
    /// Support exact-match filters.
    #[prost(bool, optional, tag = "1")]
    pub lookup: ::core::option::Option<bool>,
    /// Support range filters.
    #[prost(bool, optional, tag = "2")]
    pub range: ::core::option::Option<bool>,
}
/// Range filters on floating point (and integer) numbers, e.g. `price: 99.5`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FloatIndex {}
/// Exact match on UUID strings; like keyword but stored compactly.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UuidIndex {}
/// Range filters on RFC 3339 datetimes, e.g. `created_at: "2023-02-08T10:49:00Z"`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DatetimeIndex {}
/// Tokens ignored by a full-text index. Language names match qdrant (e.g.
/// "english"); predefined lists and custom tokens are merged.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopwordsSet {
    /// Languages whose predefined stopword lists to apply.
    #[prost(string, repeated, tag = "1")]
    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Extra stopwords to ignore, merged with the language lists.
    #[prost(string, repeated, tag = "2")]
    pub custom: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Snowball stemming for a full-text index.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SnowballParams {
    /// Language for the snowball algorithm, e.g. "english".
    #[prost(string, tag = "1")]
    pub language: ::prost::alloc::string::String,
}
/// Explicitly disable stemming (overrides any language default).
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisabledStemmer {}
/// Stemming algorithm for a full-text index. Unset: no stemming.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StemmingAlgorithm {
    /// Which stemming algorithm to use.
    #[prost(oneof = "stemming_algorithm::StemmingParams", tags = "1, 2")]
    pub stemming_params: ::core::option::Option<stemming_algorithm::StemmingParams>,
}
/// Nested message and enum types in `StemmingAlgorithm`.
pub mod stemming_algorithm {
    /// Which stemming algorithm to use.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum StemmingParams {
        /// Snowball stemmer for the given language.
        #[prost(message, tag = "1")]
        Snowball(super::SnowballParams),
        /// Explicitly disable stemming.
        #[prost(message, tag = "2")]
        Disabled(super::DisabledStemmer),
    }
}
/// Full-text filtering on string values.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TextIndex {
    /// Tokenizer to split text with. Unset: WHITESPACE.
    #[prost(enumeration = "Tokenizer", optional, tag = "1")]
    pub tokenizer: ::core::option::Option<i32>,
    /// Lowercase text before indexing. Default true.
    #[prost(bool, optional, tag = "2")]
    pub lowercase: ::core::option::Option<bool>,
    /// Support phrase queries; extra index structure. Default true.
    #[prost(bool, optional, tag = "3")]
    pub phrase_matching: ::core::option::Option<bool>,
    /// Minimum token length to index.
    #[prost(uint64, optional, tag = "4")]
    pub min_token_len: ::core::option::Option<u64>,
    /// Maximum token length to index.
    #[prost(uint64, optional, tag = "5")]
    pub max_token_len: ::core::option::Option<u64>,
    /// Fold accented characters to ASCII. Default false.
    #[prost(bool, optional, tag = "6")]
    pub ascii_folding: ::core::option::Option<bool>,
    /// Tokens to ignore at index and query time.
    #[prost(message, optional, tag = "7")]
    pub stopwords: ::core::option::Option<StopwordsSet>,
    /// Stemming algorithm. Unset: engine default (no stemming).
    #[prost(message, optional, tag = "8")]
    pub stemmer: ::core::option::Option<StemmingAlgorithm>,
}
/// Geo radius / bounding box / polygon filters on `{lon, lat}` values.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GeoIndex {}
/// Exact match on booleans, e.g. `is_active: true`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BoolIndex {}
/// One payload index. Only the *kind* of filter the field supports is chosen
/// here; storage placement of the index is the manager's decision.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PayloadIndexConfig {
    /// The kind of filter the field supports.
    #[prost(oneof = "payload_index_config::Index", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
    pub index: ::core::option::Option<payload_index_config::Index>,
}
/// Nested message and enum types in `PayloadIndexConfig`.
pub mod payload_index_config {
    /// The kind of filter the field supports.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Index {
        /// Exact match on strings.
        #[prost(message, tag = "1")]
        Keyword(super::KeywordIndex),
        /// Exact match and/or range filters on integers.
        #[prost(message, tag = "2")]
        Integer(super::IntegerIndex),
        /// Range filters on numbers.
        #[prost(message, tag = "3")]
        Float(super::FloatIndex),
        /// Exact match on UUIDs.
        #[prost(message, tag = "4")]
        Uuid(super::UuidIndex),
        /// Range filters on datetimes.
        #[prost(message, tag = "5")]
        Datetime(super::DatetimeIndex),
        /// Full-text filtering.
        #[prost(message, tag = "6")]
        Text(super::TextIndex),
        /// Geo filters.
        #[prost(message, tag = "7")]
        Geo(super::GeoIndex),
        /// Exact match on booleans.
        #[prost(message, tag = "8")]
        Bool(super::BoolIndex),
    }
}
/// The tenant's collection config. Persisted verbatim. At least one dense or
/// sparse vector is required.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionConfig {
    /// Keyed by vector name. The empty name "" is the unnamed default vector, as
    /// in qdrant; a collection either has the single unnamed vector or named ones.
    #[prost(map = "string, message", tag = "1")]
    pub dense_vectors: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        DenseVectorConfig,
    >,
    /// Keyed by vector name.
    #[prost(map = "string, message", tag = "2")]
    pub sparse_vectors: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        SparseVectorConfig,
    >,
    /// Keyed by payload field name (JSON path, e.g. `user_id` or `meta.tags`).
    #[prost(map = "string, message", tag = "3")]
    pub payload_indexes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        PayloadIndexConfig,
    >,
}
/// Every request names the collection by its tenant-facing name only. The
/// tenant (`x-account-id`, `x-space-id`) travels in gRPC metadata, injected by
/// auth. The storage id is the manager's: minted on create, resolved
/// internally on get/delete.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCollectionRequest {
    /// Tenant-facing name of the collection to create.
    #[prost(string, tag = "1")]
    pub collection_name: ::prost::alloc::string::String,
    /// The collection's configuration.
    #[prost(message, optional, tag = "2")]
    pub config: ::core::option::Option<CollectionConfig>,
}
/// Result of a create.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCollectionResponse {
    /// Tenant-facing name of the collection.
    #[prost(string, tag = "1")]
    pub collection_name: ::prost::alloc::string::String,
    /// Outcome, e.g. "created", "already exists".
    #[prost(string, tag = "2")]
    pub result: ::prost::alloc::string::String,
    /// Time spent to process
    #[prost(double, tag = "3")]
    pub time: f64,
}
/// Names the collection to delete.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteCollectionRequest {
    /// Tenant-facing name of the collection to delete.
    #[prost(string, tag = "1")]
    pub collection_name: ::prost::alloc::string::String,
}
/// Result of a delete.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteCollectionResponse {
    /// Whether the collection existed and was deleted.
    #[prost(bool, tag = "1")]
    pub deleted: bool,
    /// Time spent to process
    #[prost(double, tag = "2")]
    pub time: f64,
}
/// Names the collection to fetch.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetCollectionRequest {
    /// Tenant-facing name of the collection.
    #[prost(string, tag = "1")]
    pub collection_name: ::prost::alloc::string::String,
}
/// The collection's configuration and stats, if it exists.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCollectionResponse {
    /// Whether the collection exists.
    #[prost(bool, tag = "1")]
    pub exists: bool,
    /// The configuration the collection was created with.
    #[prost(message, optional, tag = "2")]
    pub config: ::core::option::Option<CollectionConfig>,
    /// Available points as of the last applied write (eventually consistent);
    /// absent until the updater has written stats for the collection.
    #[prost(uint64, optional, tag = "3")]
    pub point_count: ::core::option::Option<u64>,
    /// Time spent to process
    #[prost(double, tag = "4")]
    pub time: f64,
}
/// Lists the caller's collections. The tenant travels in metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListCollectionsRequest {
    /// Maximum number of collections to return. Defaults to 20 and must not
    /// exceed 100.
    #[prost(uint32, optional, tag = "1")]
    pub limit: ::core::option::Option<u32>,
    /// Opaque token returned as `next_offset_token` by the previous page. Clients
    /// must not interpret this value.
    #[prost(string, optional, tag = "2")]
    pub offset_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// One collection in a listing.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CollectionSummary {
    /// Tenant-facing name of the collection.
    #[prost(string, tag = "1")]
    pub collection_name: ::prost::alloc::string::String,
    /// Available points as of the last applied write (eventually consistent);
    /// absent until the updater has written stats for the collection.
    #[prost(uint64, optional, tag = "2")]
    pub point_count: ::core::option::Option<u64>,
}
/// The caller's collections.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCollectionsResponse {
    /// Collections in this page.
    #[prost(message, repeated, tag = "1")]
    pub collections: ::prost::alloc::vec::Vec<CollectionSummary>,
    /// Opaque token to pass as `offset_token` to retrieve the next page. Absent
    /// when there are no more results.
    #[prost(string, optional, tag = "2")]
    pub next_offset_token: ::core::option::Option<::prost::alloc::string::String>,
    /// Time spent to process
    #[prost(double, tag = "3")]
    pub time: f64,
}
/// Distance metric used to compare dense vectors.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Distance {
    /// Unset; a concrete metric is required.
    Unspecified = 0,
    /// Cosine similarity.
    Cosine = 1,
    /// Euclidean (L2) distance.
    Euclid = 2,
    /// Dot product.
    Dot = 3,
    /// Manhattan (L1) distance.
    Manhattan = 4,
}
impl Distance {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "DISTANCE_UNSPECIFIED",
            Self::Cosine => "COSINE",
            Self::Euclid => "EUCLID",
            Self::Dot => "DOT",
            Self::Manhattan => "MANHATTAN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DISTANCE_UNSPECIFIED" => Some(Self::Unspecified),
            "COSINE" => Some(Self::Cosine),
            "EUCLID" => Some(Self::Euclid),
            "DOT" => Some(Self::Dot),
            "MANHATTAN" => Some(Self::Manhattan),
            _ => None,
        }
    }
}
/// How much of the original vector precision may be traded for cost. The manager
/// turns this into a concrete quantization / datatype choice; the tenant never
/// picks scalar/product/binary quantization or its parameters directly.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PrecisionTier {
    /// Unset: HIGH.
    Unspecified = 0,
    /// Aggressive compression, lowest cost, approximate results.
    Low = 1,
    /// Moderate compression with a small accuracy trade-off.
    Medium = 2,
    /// Light compression, near-exact results.
    High = 3,
    /// No lossy compression: exact vectors, fully in memory. Highest cost.
    Full = 4,
}
impl PrecisionTier {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "PRECISION_TIER_UNSPECIFIED",
            Self::Low => "LOW",
            Self::Medium => "MEDIUM",
            Self::High => "HIGH",
            Self::Full => "FULL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRECISION_TIER_UNSPECIFIED" => Some(Self::Unspecified),
            "LOW" => Some(Self::Low),
            "MEDIUM" => Some(Self::Medium),
            "HIGH" => Some(Self::High),
            "FULL" => Some(Self::Full),
            _ => None,
        }
    }
}
/// Full-text tokenizer, mirrors qdrant's `TokenizerType`.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Tokenizer {
    /// Unset: WHITESPACE.
    Unspecified = 0,
    /// Index every prefix of each token.
    Prefix = 1,
    /// Split on whitespace.
    Whitespace = 2,
    /// Split on word boundaries.
    Word = 3,
    /// Language-aware tokenization.
    Multilingual = 4,
}
impl Tokenizer {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TOKENIZER_UNSPECIFIED",
            Self::Prefix => "PREFIX",
            Self::Whitespace => "WHITESPACE",
            Self::Word => "WORD",
            Self::Multilingual => "MULTILINGUAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TOKENIZER_UNSPECIFIED" => Some(Self::Unspecified),
            "PREFIX" => Some(Self::Prefix),
            "WHITESPACE" => Some(Self::Whitespace),
            "WORD" => Some(Self::Word),
            "MULTILINGUAL" => Some(Self::Multilingual),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod collections_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// CollectionsService manages the collections of a qdrant serverless space.
    /// Unlike the qdrant server API, it exposes only a simplified configuration:
    /// the manager turns it into concrete qdrant settings, which are never
    /// exposed to the tenant.
    #[derive(Debug, Clone)]
    pub struct CollectionsServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl CollectionsServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> CollectionsServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> CollectionsServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            CollectionsServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Creates a collection with the given tenant-facing configuration.
        pub async fn create_collection(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateCollectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateCollectionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/qdrant.serverless.CollectionsService/CreateCollection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "qdrant.serverless.CollectionsService",
                        "CreateCollection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a collection and all of its data.
        pub async fn delete_collection(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteCollectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteCollectionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/qdrant.serverless.CollectionsService/DeleteCollection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "qdrant.serverless.CollectionsService",
                        "DeleteCollection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns a single collection's configuration and stats.
        pub async fn get_collection(
            &mut self,
            request: impl tonic::IntoRequest<super::GetCollectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetCollectionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/qdrant.serverless.CollectionsService/GetCollection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "qdrant.serverless.CollectionsService",
                        "GetCollection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the caller's collections.
        pub async fn list_collections(
            &mut self,
            request: impl tonic::IntoRequest<super::ListCollectionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListCollectionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/qdrant.serverless.CollectionsService/ListCollections",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "qdrant.serverless.CollectionsService",
                        "ListCollections",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}