#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorParams {
#[prost(uint64, tag = "1")]
pub size: u64,
#[prost(enumeration = "Distance", tag = "2")]
pub distance: i32,
#[prost(message, optional, tag = "3")]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "4")]
pub quantization_config: ::core::option::Option<QuantizationConfig>,
#[prost(bool, optional, tag = "5")]
pub on_disk: ::core::option::Option<bool>,
#[prost(enumeration = "Datatype", optional, tag = "6")]
pub datatype: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorParamsDiff {
#[prost(message, optional, tag = "1")]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "2")]
pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
#[prost(bool, optional, tag = "3")]
pub on_disk: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorParamsMap {
#[prost(map = "string, message", tag = "1")]
pub map: ::std::collections::HashMap<::prost::alloc::string::String, VectorParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorParamsDiffMap {
#[prost(map = "string, message", tag = "1")]
pub map: ::std::collections::HashMap<
::prost::alloc::string::String,
VectorParamsDiff,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorsConfig {
#[prost(oneof = "vectors_config::Config", tags = "1, 2")]
pub config: ::core::option::Option<vectors_config::Config>,
}
pub mod vectors_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
Params(super::VectorParams),
#[prost(message, tag = "2")]
ParamsMap(super::VectorParamsMap),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorsConfigDiff {
#[prost(oneof = "vectors_config_diff::Config", tags = "1, 2")]
pub config: ::core::option::Option<vectors_config_diff::Config>,
}
pub mod vectors_config_diff {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
Params(super::VectorParamsDiff),
#[prost(message, tag = "2")]
ParamsMap(super::VectorParamsDiffMap),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparseVectorParams {
#[prost(message, optional, tag = "1")]
pub index: ::core::option::Option<SparseIndexConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparseVectorConfig {
#[prost(map = "string, message", tag = "1")]
pub map: ::std::collections::HashMap<
::prost::alloc::string::String,
SparseVectorParams,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCollectionInfoRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionExistsRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionExists {
#[prost(bool, tag = "1")]
pub exists: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionExistsResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<CollectionExists>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCollectionsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionDescription {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCollectionInfoResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<CollectionInfo>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCollectionsResponse {
#[prost(message, repeated, tag = "1")]
pub collections: ::prost::alloc::vec::Vec<CollectionDescription>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OptimizerStatus {
#[prost(bool, tag = "1")]
pub ok: bool,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HnswConfigDiff {
#[prost(uint64, optional, tag = "1")]
pub m: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "2")]
pub ef_construct: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
pub full_scan_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
pub max_indexing_threads: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "5")]
pub on_disk: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "6")]
pub payload_m: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparseIndexConfig {
#[prost(uint64, optional, tag = "1")]
pub full_scan_threshold: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "2")]
pub on_disk: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WalConfigDiff {
#[prost(uint64, optional, tag = "1")]
pub wal_capacity_mb: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "2")]
pub wal_segments_ahead: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OptimizersConfigDiff {
#[prost(double, optional, tag = "1")]
pub deleted_threshold: ::core::option::Option<f64>,
#[prost(uint64, optional, tag = "2")]
pub vacuum_min_vector_number: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
pub default_segment_number: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
pub max_segment_size: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "5")]
pub memmap_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "6")]
pub indexing_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "7")]
pub flush_interval_sec: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "8")]
pub max_optimization_threads: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScalarQuantization {
#[prost(enumeration = "QuantizationType", tag = "1")]
pub r#type: i32,
#[prost(float, optional, tag = "2")]
pub quantile: ::core::option::Option<f32>,
#[prost(bool, optional, tag = "3")]
pub always_ram: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductQuantization {
#[prost(enumeration = "CompressionRatio", tag = "1")]
pub compression: i32,
#[prost(bool, optional, tag = "2")]
pub always_ram: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BinaryQuantization {
#[prost(bool, optional, tag = "1")]
pub always_ram: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuantizationConfig {
#[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")]
pub quantization: ::core::option::Option<quantization_config::Quantization>,
}
pub mod quantization_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Quantization {
#[prost(message, tag = "1")]
Scalar(super::ScalarQuantization),
#[prost(message, tag = "2")]
Product(super::ProductQuantization),
#[prost(message, tag = "3")]
Binary(super::BinaryQuantization),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Disabled {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuantizationConfigDiff {
#[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")]
pub quantization: ::core::option::Option<quantization_config_diff::Quantization>,
}
pub mod quantization_config_diff {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Quantization {
#[prost(message, tag = "1")]
Scalar(super::ScalarQuantization),
#[prost(message, tag = "2")]
Product(super::ProductQuantization),
#[prost(message, tag = "3")]
Disabled(super::Disabled),
#[prost(message, tag = "4")]
Binary(super::BinaryQuantization),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCollection {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "5")]
pub wal_config: ::core::option::Option<WalConfigDiff>,
#[prost(message, optional, tag = "6")]
pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
#[prost(uint32, optional, tag = "7")]
pub shard_number: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "8")]
pub on_disk_payload: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "9")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "10")]
pub vectors_config: ::core::option::Option<VectorsConfig>,
#[prost(uint32, optional, tag = "11")]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "12")]
pub write_consistency_factor: ::core::option::Option<u32>,
#[prost(string, optional, tag = "13")]
pub init_from_collection: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "14")]
pub quantization_config: ::core::option::Option<QuantizationConfig>,
#[prost(enumeration = "ShardingMethod", optional, tag = "15")]
pub sharding_method: ::core::option::Option<i32>,
#[prost(message, optional, tag = "16")]
pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCollection {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
#[prost(uint64, optional, tag = "3")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "4")]
pub params: ::core::option::Option<CollectionParamsDiff>,
#[prost(message, optional, tag = "5")]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "6")]
pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
#[prost(message, optional, tag = "7")]
pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
#[prost(message, optional, tag = "8")]
pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCollection {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(uint64, optional, tag = "2")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionOperationResponse {
#[prost(bool, tag = "1")]
pub result: bool,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionParams {
#[prost(uint32, tag = "3")]
pub shard_number: u32,
#[prost(bool, tag = "4")]
pub on_disk_payload: bool,
#[prost(message, optional, tag = "5")]
pub vectors_config: ::core::option::Option<VectorsConfig>,
#[prost(uint32, optional, tag = "6")]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "7")]
pub write_consistency_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "8")]
pub read_fan_out_factor: ::core::option::Option<u32>,
#[prost(enumeration = "ShardingMethod", optional, tag = "9")]
pub sharding_method: ::core::option::Option<i32>,
#[prost(message, optional, tag = "10")]
pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionParamsDiff {
#[prost(uint32, optional, tag = "1")]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "2")]
pub write_consistency_factor: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "3")]
pub on_disk_payload: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "4")]
pub read_fan_out_factor: ::core::option::Option<u32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionConfig {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<CollectionParams>,
#[prost(message, optional, tag = "2")]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "3")]
pub optimizer_config: ::core::option::Option<OptimizersConfigDiff>,
#[prost(message, optional, tag = "4")]
pub wal_config: ::core::option::Option<WalConfigDiff>,
#[prost(message, optional, tag = "5")]
pub quantization_config: ::core::option::Option<QuantizationConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextIndexParams {
#[prost(enumeration = "TokenizerType", tag = "1")]
pub tokenizer: i32,
#[prost(bool, optional, tag = "2")]
pub lowercase: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "3")]
pub min_token_len: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
pub max_token_len: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntegerIndexParams {
#[prost(bool, tag = "1")]
pub lookup: bool,
#[prost(bool, tag = "2")]
pub range: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadIndexParams {
#[prost(oneof = "payload_index_params::IndexParams", tags = "1, 2")]
pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
}
pub mod payload_index_params {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum IndexParams {
#[prost(message, tag = "1")]
TextIndexParams(super::TextIndexParams),
#[prost(message, tag = "2")]
IntegerIndexParams(super::IntegerIndexParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadSchemaInfo {
#[prost(enumeration = "PayloadSchemaType", tag = "1")]
pub data_type: i32,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<PayloadIndexParams>,
#[prost(uint64, optional, tag = "3")]
pub points: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionInfo {
#[prost(enumeration = "CollectionStatus", tag = "1")]
pub status: i32,
#[prost(message, optional, tag = "2")]
pub optimizer_status: ::core::option::Option<OptimizerStatus>,
#[prost(uint64, optional, tag = "3")]
pub vectors_count: ::core::option::Option<u64>,
#[prost(uint64, tag = "4")]
pub segments_count: u64,
#[prost(message, optional, tag = "7")]
pub config: ::core::option::Option<CollectionConfig>,
#[prost(map = "string, message", tag = "8")]
pub payload_schema: ::std::collections::HashMap<
::prost::alloc::string::String,
PayloadSchemaInfo,
>,
#[prost(uint64, optional, tag = "9")]
pub points_count: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "10")]
pub indexed_vectors_count: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeAliases {
#[prost(message, repeated, tag = "1")]
pub actions: ::prost::alloc::vec::Vec<AliasOperations>,
#[prost(uint64, optional, tag = "2")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AliasOperations {
#[prost(oneof = "alias_operations::Action", tags = "1, 2, 3")]
pub action: ::core::option::Option<alias_operations::Action>,
}
pub mod alias_operations {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "1")]
CreateAlias(super::CreateAlias),
#[prost(message, tag = "2")]
RenameAlias(super::RenameAlias),
#[prost(message, tag = "3")]
DeleteAlias(super::DeleteAlias),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAlias {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub alias_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RenameAlias {
#[prost(string, tag = "1")]
pub old_alias_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub new_alias_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAlias {
#[prost(string, tag = "1")]
pub alias_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAliasesRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCollectionAliasesRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AliasDescription {
#[prost(string, tag = "1")]
pub alias_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAliasesResponse {
#[prost(message, repeated, tag = "1")]
pub aliases: ::prost::alloc::vec::Vec<AliasDescription>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionClusterInfoRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardKey {
#[prost(oneof = "shard_key::Key", tags = "1, 2")]
pub key: ::core::option::Option<shard_key::Key>,
}
pub mod shard_key {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Key {
#[prost(string, tag = "1")]
Keyword(::prost::alloc::string::String),
#[prost(uint64, tag = "2")]
Number(u64),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalShardInfo {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub points_count: u64,
#[prost(enumeration = "ReplicaState", tag = "3")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoteShardInfo {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub peer_id: u64,
#[prost(enumeration = "ReplicaState", tag = "3")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardTransferInfo {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub from: u64,
#[prost(uint64, tag = "3")]
pub to: u64,
#[prost(bool, tag = "4")]
pub sync: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CollectionClusterInfoResponse {
#[prost(uint64, tag = "1")]
pub peer_id: u64,
#[prost(uint64, tag = "2")]
pub shard_count: u64,
#[prost(message, repeated, tag = "3")]
pub local_shards: ::prost::alloc::vec::Vec<LocalShardInfo>,
#[prost(message, repeated, tag = "4")]
pub remote_shards: ::prost::alloc::vec::Vec<RemoteShardInfo>,
#[prost(message, repeated, tag = "5")]
pub shard_transfers: ::prost::alloc::vec::Vec<ShardTransferInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveShard {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
pub to_peer_id: u64,
#[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
pub method: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbortShardTransfer {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
pub to_peer_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartTransfer {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
pub to_peer_id: u64,
#[prost(enumeration = "ShardTransferMethod", tag = "4")]
pub method: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Replica {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub peer_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateShardKey {
#[prost(message, optional, tag = "1")]
pub shard_key: ::core::option::Option<ShardKey>,
#[prost(uint32, optional, tag = "2")]
pub shards_number: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "3")]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint64, repeated, tag = "4")]
pub placement: ::prost::alloc::vec::Vec<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteShardKey {
#[prost(message, optional, tag = "1")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCollectionClusterSetupRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(uint64, optional, tag = "6")]
pub timeout: ::core::option::Option<u64>,
#[prost(
oneof = "update_collection_cluster_setup_request::Operation",
tags = "2, 3, 4, 5, 7, 8, 9"
)]
pub operation: ::core::option::Option<
update_collection_cluster_setup_request::Operation,
>,
}
pub mod update_collection_cluster_setup_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "2")]
MoveShard(super::MoveShard),
#[prost(message, tag = "3")]
ReplicateShard(super::MoveShard),
#[prost(message, tag = "4")]
AbortTransfer(super::AbortShardTransfer),
#[prost(message, tag = "5")]
DropReplica(super::Replica),
#[prost(message, tag = "7")]
CreateShardKey(super::CreateShardKey),
#[prost(message, tag = "8")]
DeleteShardKey(super::DeleteShardKey),
#[prost(message, tag = "9")]
RestartTransfer(super::RestartTransfer),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCollectionClusterSetupResponse {
#[prost(bool, tag = "1")]
pub result: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateShardKeyRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<CreateShardKey>,
#[prost(uint64, optional, tag = "3")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteShardKeyRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<DeleteShardKey>,
#[prost(uint64, optional, tag = "3")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateShardKeyResponse {
#[prost(bool, tag = "1")]
pub result: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteShardKeyResponse {
#[prost(bool, tag = "1")]
pub result: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Datatype {
Default = 0,
Float32 = 1,
Uint8 = 2,
}
impl Datatype {
pub fn as_str_name(&self) -> &'static str {
match self {
Datatype::Default => "Default",
Datatype::Float32 => "Float32",
Datatype::Uint8 => "Uint8",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Default" => Some(Self::Default),
"Float32" => Some(Self::Float32),
"Uint8" => Some(Self::Uint8),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Distance {
UnknownDistance = 0,
Cosine = 1,
Euclid = 2,
Dot = 3,
Manhattan = 4,
}
impl Distance {
pub fn as_str_name(&self) -> &'static str {
match self {
Distance::UnknownDistance => "UnknownDistance",
Distance::Cosine => "Cosine",
Distance::Euclid => "Euclid",
Distance::Dot => "Dot",
Distance::Manhattan => "Manhattan",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UnknownDistance" => Some(Self::UnknownDistance),
"Cosine" => Some(Self::Cosine),
"Euclid" => Some(Self::Euclid),
"Dot" => Some(Self::Dot),
"Manhattan" => Some(Self::Manhattan),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CollectionStatus {
UnknownCollectionStatus = 0,
Green = 1,
Yellow = 2,
Red = 3,
Grey = 4,
}
impl CollectionStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
CollectionStatus::UnknownCollectionStatus => "UnknownCollectionStatus",
CollectionStatus::Green => "Green",
CollectionStatus::Yellow => "Yellow",
CollectionStatus::Red => "Red",
CollectionStatus::Grey => "Grey",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UnknownCollectionStatus" => Some(Self::UnknownCollectionStatus),
"Green" => Some(Self::Green),
"Yellow" => Some(Self::Yellow),
"Red" => Some(Self::Red),
"Grey" => Some(Self::Grey),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PayloadSchemaType {
UnknownType = 0,
Keyword = 1,
Integer = 2,
Float = 3,
Geo = 4,
Text = 5,
Bool = 6,
Datetime = 7,
}
impl PayloadSchemaType {
pub fn as_str_name(&self) -> &'static str {
match self {
PayloadSchemaType::UnknownType => "UnknownType",
PayloadSchemaType::Keyword => "Keyword",
PayloadSchemaType::Integer => "Integer",
PayloadSchemaType::Float => "Float",
PayloadSchemaType::Geo => "Geo",
PayloadSchemaType::Text => "Text",
PayloadSchemaType::Bool => "Bool",
PayloadSchemaType::Datetime => "Datetime",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UnknownType" => Some(Self::UnknownType),
"Keyword" => Some(Self::Keyword),
"Integer" => Some(Self::Integer),
"Float" => Some(Self::Float),
"Geo" => Some(Self::Geo),
"Text" => Some(Self::Text),
"Bool" => Some(Self::Bool),
"Datetime" => Some(Self::Datetime),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QuantizationType {
UnknownQuantization = 0,
Int8 = 1,
}
impl QuantizationType {
pub fn as_str_name(&self) -> &'static str {
match self {
QuantizationType::UnknownQuantization => "UnknownQuantization",
QuantizationType::Int8 => "Int8",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UnknownQuantization" => Some(Self::UnknownQuantization),
"Int8" => Some(Self::Int8),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CompressionRatio {
X4 = 0,
X8 = 1,
X16 = 2,
X32 = 3,
X64 = 4,
}
impl CompressionRatio {
pub fn as_str_name(&self) -> &'static str {
match self {
CompressionRatio::X4 => "x4",
CompressionRatio::X8 => "x8",
CompressionRatio::X16 => "x16",
CompressionRatio::X32 => "x32",
CompressionRatio::X64 => "x64",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"x4" => Some(Self::X4),
"x8" => Some(Self::X8),
"x16" => Some(Self::X16),
"x32" => Some(Self::X32),
"x64" => Some(Self::X64),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ShardingMethod {
Auto = 0,
Custom = 1,
}
impl ShardingMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
ShardingMethod::Auto => "Auto",
ShardingMethod::Custom => "Custom",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Auto" => Some(Self::Auto),
"Custom" => Some(Self::Custom),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TokenizerType {
Unknown = 0,
Prefix = 1,
Whitespace = 2,
Word = 3,
Multilingual = 4,
}
impl TokenizerType {
pub fn as_str_name(&self) -> &'static str {
match self {
TokenizerType::Unknown => "Unknown",
TokenizerType::Prefix => "Prefix",
TokenizerType::Whitespace => "Whitespace",
TokenizerType::Word => "Word",
TokenizerType::Multilingual => "Multilingual",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Unknown" => Some(Self::Unknown),
"Prefix" => Some(Self::Prefix),
"Whitespace" => Some(Self::Whitespace),
"Word" => Some(Self::Word),
"Multilingual" => Some(Self::Multilingual),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReplicaState {
Active = 0,
Dead = 1,
Partial = 2,
Initializing = 3,
Listener = 4,
PartialSnapshot = 5,
Recovery = 6,
}
impl ReplicaState {
pub fn as_str_name(&self) -> &'static str {
match self {
ReplicaState::Active => "Active",
ReplicaState::Dead => "Dead",
ReplicaState::Partial => "Partial",
ReplicaState::Initializing => "Initializing",
ReplicaState::Listener => "Listener",
ReplicaState::PartialSnapshot => "PartialSnapshot",
ReplicaState::Recovery => "Recovery",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Active" => Some(Self::Active),
"Dead" => Some(Self::Dead),
"Partial" => Some(Self::Partial),
"Initializing" => Some(Self::Initializing),
"Listener" => Some(Self::Listener),
"PartialSnapshot" => Some(Self::PartialSnapshot),
"Recovery" => Some(Self::Recovery),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ShardTransferMethod {
StreamRecords = 0,
Snapshot = 1,
WalDelta = 2,
}
impl ShardTransferMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
ShardTransferMethod::StreamRecords => "StreamRecords",
ShardTransferMethod::Snapshot => "Snapshot",
ShardTransferMethod::WalDelta => "WalDelta",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"StreamRecords" => Some(Self::StreamRecords),
"Snapshot" => Some(Self::Snapshot),
"WalDelta" => Some(Self::WalDelta),
_ => None,
}
}
}
pub mod collections_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct CollectionsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CollectionsClient<tonic::transport::Channel> {
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> CollectionsClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> CollectionsClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
CollectionsClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetCollectionInfoRequest>,
) -> std::result::Result<
tonic::Response<super::GetCollectionInfoResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/Get");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&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::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Collections/List");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/Create",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Create"));
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/Update",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Update"));
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/Delete",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Collections", "Delete"));
self.inner.unary(req, path, codec).await
}
pub async fn update_aliases(
&mut self,
request: impl tonic::IntoRequest<super::ChangeAliases>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/UpdateAliases",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "UpdateAliases"));
self.inner.unary(req, path, codec).await
}
pub async fn list_collection_aliases(
&mut self,
request: impl tonic::IntoRequest<super::ListCollectionAliasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAliasesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/ListCollectionAliases",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "ListCollectionAliases"));
self.inner.unary(req, path, codec).await
}
pub async fn list_aliases(
&mut self,
request: impl tonic::IntoRequest<super::ListAliasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAliasesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/ListAliases",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "ListAliases"));
self.inner.unary(req, path, codec).await
}
pub async fn collection_cluster_info(
&mut self,
request: impl tonic::IntoRequest<super::CollectionClusterInfoRequest>,
) -> std::result::Result<
tonic::Response<super::CollectionClusterInfoResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/CollectionClusterInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "CollectionClusterInfo"));
self.inner.unary(req, path, codec).await
}
pub async fn collection_exists(
&mut self,
request: impl tonic::IntoRequest<super::CollectionExistsRequest>,
) -> std::result::Result<
tonic::Response<super::CollectionExistsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/CollectionExists",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "CollectionExists"));
self.inner.unary(req, path, codec).await
}
pub async fn update_collection_cluster_setup(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCollectionClusterSetupRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateCollectionClusterSetupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/UpdateCollectionClusterSetup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("qdrant.Collections", "UpdateCollectionClusterSetup"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_shard_key(
&mut self,
request: impl tonic::IntoRequest<super::CreateShardKeyRequest>,
) -> std::result::Result<
tonic::Response<super::CreateShardKeyResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/CreateShardKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "CreateShardKey"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_shard_key(
&mut self,
request: impl tonic::IntoRequest<super::DeleteShardKeyRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteShardKeyResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Collections/DeleteShardKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Collections", "DeleteShardKey"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod collections_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Collections: Send + Sync + 'static {
async fn get(
&self,
request: tonic::Request<super::GetCollectionInfoRequest>,
) -> std::result::Result<
tonic::Response<super::GetCollectionInfoResponse>,
tonic::Status,
>;
async fn list(
&self,
request: tonic::Request<super::ListCollectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListCollectionsResponse>,
tonic::Status,
>;
async fn create(
&self,
request: tonic::Request<super::CreateCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
>;
async fn update(
&self,
request: tonic::Request<super::UpdateCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
>;
async fn delete(
&self,
request: tonic::Request<super::DeleteCollection>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
>;
async fn update_aliases(
&self,
request: tonic::Request<super::ChangeAliases>,
) -> std::result::Result<
tonic::Response<super::CollectionOperationResponse>,
tonic::Status,
>;
async fn list_collection_aliases(
&self,
request: tonic::Request<super::ListCollectionAliasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAliasesResponse>,
tonic::Status,
>;
async fn list_aliases(
&self,
request: tonic::Request<super::ListAliasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAliasesResponse>,
tonic::Status,
>;
async fn collection_cluster_info(
&self,
request: tonic::Request<super::CollectionClusterInfoRequest>,
) -> std::result::Result<
tonic::Response<super::CollectionClusterInfoResponse>,
tonic::Status,
>;
async fn collection_exists(
&self,
request: tonic::Request<super::CollectionExistsRequest>,
) -> std::result::Result<
tonic::Response<super::CollectionExistsResponse>,
tonic::Status,
>;
async fn update_collection_cluster_setup(
&self,
request: tonic::Request<super::UpdateCollectionClusterSetupRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateCollectionClusterSetupResponse>,
tonic::Status,
>;
async fn create_shard_key(
&self,
request: tonic::Request<super::CreateShardKeyRequest>,
) -> std::result::Result<
tonic::Response<super::CreateShardKeyResponse>,
tonic::Status,
>;
async fn delete_shard_key(
&self,
request: tonic::Request<super::DeleteShardKeyRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteShardKeyResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct CollectionsServer<T: Collections> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Collections> CollectionsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for CollectionsServer<T>
where
T: Collections,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/qdrant.Collections/Get" => {
#[allow(non_camel_case_types)]
struct GetSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::GetCollectionInfoRequest>
for GetSvc<T> {
type Response = super::GetCollectionInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetCollectionInfoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).get(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/List" => {
#[allow(non_camel_case_types)]
struct ListSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::ListCollectionsRequest>
for ListSvc<T> {
type Response = super::ListCollectionsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListCollectionsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).list(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/Create" => {
#[allow(non_camel_case_types)]
struct CreateSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::CreateCollection>
for CreateSvc<T> {
type Response = super::CollectionOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateCollection>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).create(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/Update" => {
#[allow(non_camel_case_types)]
struct UpdateSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::UpdateCollection>
for UpdateSvc<T> {
type Response = super::CollectionOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdateCollection>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).update(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/Delete" => {
#[allow(non_camel_case_types)]
struct DeleteSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::DeleteCollection>
for DeleteSvc<T> {
type Response = super::CollectionOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteCollection>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/UpdateAliases" => {
#[allow(non_camel_case_types)]
struct UpdateAliasesSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::ChangeAliases>
for UpdateAliasesSvc<T> {
type Response = super::CollectionOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ChangeAliases>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_aliases(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateAliasesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/ListCollectionAliases" => {
#[allow(non_camel_case_types)]
struct ListCollectionAliasesSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::ListCollectionAliasesRequest>
for ListCollectionAliasesSvc<T> {
type Response = super::ListAliasesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListCollectionAliasesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).list_collection_aliases(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListCollectionAliasesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/ListAliases" => {
#[allow(non_camel_case_types)]
struct ListAliasesSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::ListAliasesRequest>
for ListAliasesSvc<T> {
type Response = super::ListAliasesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListAliasesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).list_aliases(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListAliasesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/CollectionClusterInfo" => {
#[allow(non_camel_case_types)]
struct CollectionClusterInfoSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::CollectionClusterInfoRequest>
for CollectionClusterInfoSvc<T> {
type Response = super::CollectionClusterInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CollectionClusterInfoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).collection_cluster_info(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CollectionClusterInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/CollectionExists" => {
#[allow(non_camel_case_types)]
struct CollectionExistsSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::CollectionExistsRequest>
for CollectionExistsSvc<T> {
type Response = super::CollectionExistsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CollectionExistsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).collection_exists(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CollectionExistsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/UpdateCollectionClusterSetup" => {
#[allow(non_camel_case_types)]
struct UpdateCollectionClusterSetupSvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<
super::UpdateCollectionClusterSetupRequest,
> for UpdateCollectionClusterSetupSvc<T> {
type Response = super::UpdateCollectionClusterSetupResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::UpdateCollectionClusterSetupRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_collection_cluster_setup(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateCollectionClusterSetupSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/CreateShardKey" => {
#[allow(non_camel_case_types)]
struct CreateShardKeySvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::CreateShardKeyRequest>
for CreateShardKeySvc<T> {
type Response = super::CreateShardKeyResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateShardKeyRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).create_shard_key(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateShardKeySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Collections/DeleteShardKey" => {
#[allow(non_camel_case_types)]
struct DeleteShardKeySvc<T: Collections>(pub Arc<T>);
impl<
T: Collections,
> tonic::server::UnaryService<super::DeleteShardKeyRequest>
for DeleteShardKeySvc<T> {
type Response = super::DeleteShardKeyResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteShardKeyRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).delete_shard_key(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteShardKeySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Collections> Clone for CollectionsServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Collections> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Collections> tonic::server::NamedService for CollectionsServer<T> {
const NAME: &'static str = "qdrant.Collections";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Struct {
#[prost(map = "string, message", tag = "1")]
pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
pub kind: ::core::option::Option<value::Kind>,
}
pub mod value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(enumeration = "super::NullValue", tag = "1")]
NullValue(i32),
#[prost(double, tag = "2")]
DoubleValue(f64),
#[prost(int64, tag = "3")]
IntegerValue(i64),
#[prost(string, tag = "4")]
StringValue(::prost::alloc::string::String),
#[prost(bool, tag = "5")]
BoolValue(bool),
#[prost(message, tag = "6")]
StructValue(super::Struct),
#[prost(message, tag = "7")]
ListValue(super::ListValue),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListValue {
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<Value>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NullValue {
NullValue = 0,
}
impl NullValue {
pub fn as_str_name(&self) -> &'static str {
match self {
NullValue::NullValue => "NULL_VALUE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NULL_VALUE" => Some(Self::NullValue),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteOrdering {
#[prost(enumeration = "WriteOrderingType", tag = "1")]
pub r#type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadConsistency {
#[prost(oneof = "read_consistency::Value", tags = "1, 2")]
pub value: ::core::option::Option<read_consistency::Value>,
}
pub mod read_consistency {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(enumeration = "super::ReadConsistencyType", tag = "1")]
Type(i32),
#[prost(uint64, tag = "2")]
Factor(u64),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointId {
#[prost(oneof = "point_id::PointIdOptions", tags = "1, 2")]
pub point_id_options: ::core::option::Option<point_id::PointIdOptions>,
}
pub mod point_id {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PointIdOptions {
#[prost(uint64, tag = "1")]
Num(u64),
#[prost(string, tag = "2")]
Uuid(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparseIndices {
#[prost(uint32, repeated, tag = "1")]
pub data: ::prost::alloc::vec::Vec<u32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vector {
#[prost(float, repeated, tag = "1")]
pub data: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "2")]
pub indices: ::core::option::Option<SparseIndices>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardKeySelector {
#[prost(message, repeated, tag = "1")]
pub shard_keys: ::prost::alloc::vec::Vec<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpsertPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
pub points: ::prost::alloc::vec::Vec<PointStruct>,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub points: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub ids: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "5")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "6")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "7")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePointVectors {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
pub points: ::prost::alloc::vec::Vec<PointVectors>,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointVectors {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<PointId>,
#[prost(message, optional, tag = "2")]
pub vectors: ::core::option::Option<Vectors>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePointVectors {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
pub vectors: ::core::option::Option<VectorsSelector>,
#[prost(message, optional, tag = "5")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "6")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPayloadPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(map = "string, message", tag = "3")]
pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
#[prost(message, optional, tag = "5")]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "6")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "7")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(string, optional, tag = "8")]
pub key: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePayloadPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(string, repeated, tag = "3")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "6")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "7")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearPayloadPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub points: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFieldIndexCollection {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(string, tag = "3")]
pub field_name: ::prost::alloc::string::String,
#[prost(enumeration = "FieldType", optional, tag = "4")]
pub field_type: ::core::option::Option<i32>,
#[prost(message, optional, tag = "5")]
pub field_index_params: ::core::option::Option<PayloadIndexParams>,
#[prost(message, optional, tag = "6")]
pub ordering: ::core::option::Option<WriteOrdering>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFieldIndexCollection {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(string, tag = "3")]
pub field_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadIncludeSelector {
#[prost(string, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PayloadExcludeSelector {
#[prost(string, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithPayloadSelector {
#[prost(oneof = "with_payload_selector::SelectorOptions", tags = "1, 2, 3")]
pub selector_options: ::core::option::Option<with_payload_selector::SelectorOptions>,
}
pub mod with_payload_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SelectorOptions {
#[prost(bool, tag = "1")]
Enable(bool),
#[prost(message, tag = "2")]
Include(super::PayloadIncludeSelector),
#[prost(message, tag = "3")]
Exclude(super::PayloadExcludeSelector),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NamedVectors {
#[prost(map = "string, message", tag = "1")]
pub vectors: ::std::collections::HashMap<::prost::alloc::string::String, Vector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vectors {
#[prost(oneof = "vectors::VectorsOptions", tags = "1, 2")]
pub vectors_options: ::core::option::Option<vectors::VectorsOptions>,
}
pub mod vectors {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum VectorsOptions {
#[prost(message, tag = "1")]
Vector(super::Vector),
#[prost(message, tag = "2")]
Vectors(super::NamedVectors),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorsSelector {
#[prost(string, repeated, tag = "1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithVectorsSelector {
#[prost(oneof = "with_vectors_selector::SelectorOptions", tags = "1, 2")]
pub selector_options: ::core::option::Option<with_vectors_selector::SelectorOptions>,
}
pub mod with_vectors_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SelectorOptions {
#[prost(bool, tag = "1")]
Enable(bool),
#[prost(message, tag = "2")]
Include(super::VectorsSelector),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuantizationSearchParams {
#[prost(bool, optional, tag = "1")]
pub ignore: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
pub rescore: ::core::option::Option<bool>,
#[prost(double, optional, tag = "3")]
pub oversampling: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchParams {
#[prost(uint64, optional, tag = "1")]
pub hnsw_ef: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "2")]
pub exact: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub quantization: ::core::option::Option<QuantizationSearchParams>,
#[prost(bool, optional, tag = "4")]
pub indexed_only: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(float, repeated, tag = "2")]
pub vector: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "4")]
pub limit: u64,
#[prost(message, optional, tag = "6")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "8")]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "9")]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "10")]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "11")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "12")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "13")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "14")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "15")]
pub sparse_indices: ::core::option::Option<SparseIndices>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchBatchPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
#[prost(message, optional, tag = "3")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithLookup {
#[prost(string, tag = "1")]
pub collection: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "3")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPointGroups {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(float, repeated, tag = "2")]
pub vector: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
pub filter: ::core::option::Option<Filter>,
#[prost(uint32, tag = "4")]
pub limit: u32,
#[prost(message, optional, tag = "5")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "6")]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "7")]
pub score_threshold: ::core::option::Option<f32>,
#[prost(string, optional, tag = "8")]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(string, tag = "10")]
pub group_by: ::prost::alloc::string::String,
#[prost(uint32, tag = "11")]
pub group_size: u32,
#[prost(message, optional, tag = "12")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "13")]
pub with_lookup: ::core::option::Option<WithLookup>,
#[prost(uint64, optional, tag = "14")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "15")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "16")]
pub sparse_indices: ::core::option::Option<SparseIndices>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartFrom {
#[prost(oneof = "start_from::Value", tags = "1, 2, 3, 4")]
pub value: ::core::option::Option<start_from::Value>,
}
pub mod start_from {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(double, tag = "1")]
Float(f64),
#[prost(int64, tag = "2")]
Integer(i64),
#[prost(message, tag = "3")]
Timestamp(::prost_types::Timestamp),
#[prost(string, tag = "4")]
Datetime(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderBy {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(enumeration = "Direction", optional, tag = "2")]
pub direction: ::core::option::Option<i32>,
#[prost(message, optional, tag = "3")]
pub start_from: ::core::option::Option<StartFrom>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScrollPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<Filter>,
#[prost(message, optional, tag = "3")]
pub offset: ::core::option::Option<PointId>,
#[prost(uint32, optional, tag = "4")]
pub limit: ::core::option::Option<u32>,
#[prost(message, optional, tag = "6")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "8")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "9")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "10")]
pub order_by: ::core::option::Option<OrderBy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupLocation {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub positive: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, repeated, tag = "3")]
pub negative: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "5")]
pub limit: u64,
#[prost(message, optional, tag = "7")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "8")]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "9")]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "10")]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "11")]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "12")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "13")]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(message, optional, tag = "14")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
pub strategy: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "17")]
pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(message, repeated, tag = "18")]
pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(uint64, optional, tag = "19")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "20")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendBatchPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
#[prost(message, optional, tag = "3")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendPointGroups {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub positive: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, repeated, tag = "3")]
pub negative: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
pub filter: ::core::option::Option<Filter>,
#[prost(uint32, tag = "5")]
pub limit: u32,
#[prost(message, optional, tag = "6")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "8")]
pub score_threshold: ::core::option::Option<f32>,
#[prost(string, optional, tag = "9")]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "10")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "11")]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(string, tag = "12")]
pub group_by: ::prost::alloc::string::String,
#[prost(uint32, tag = "13")]
pub group_size: u32,
#[prost(message, optional, tag = "14")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "15")]
pub with_lookup: ::core::option::Option<WithLookup>,
#[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
pub strategy: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "18")]
pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(message, repeated, tag = "19")]
pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(uint64, optional, tag = "20")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "21")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetVector {
#[prost(oneof = "target_vector::Target", tags = "1")]
pub target: ::core::option::Option<target_vector::Target>,
}
pub mod target_vector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Target {
#[prost(message, tag = "1")]
Single(super::VectorExample),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorExample {
#[prost(oneof = "vector_example::Example", tags = "1, 2")]
pub example: ::core::option::Option<vector_example::Example>,
}
pub mod vector_example {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Example {
#[prost(message, tag = "1")]
Id(super::PointId),
#[prost(message, tag = "2")]
Vector(super::Vector),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContextExamplePair {
#[prost(message, optional, tag = "1")]
pub positive: ::core::option::Option<VectorExample>,
#[prost(message, optional, tag = "2")]
pub negative: ::core::option::Option<VectorExample>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub target: ::core::option::Option<TargetVector>,
#[prost(message, repeated, tag = "3")]
pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
#[prost(message, optional, tag = "4")]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "5")]
pub limit: u64,
#[prost(message, optional, tag = "6")]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
pub params: ::core::option::Option<SearchParams>,
#[prost(uint64, optional, tag = "8")]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "9")]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "10")]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "11")]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(message, optional, tag = "12")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "13")]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "14")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverBatchPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
#[prost(message, optional, tag = "3")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<Filter>,
#[prost(bool, optional, tag = "3")]
pub exact: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "5")]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointsUpdateOperation {
#[prost(
oneof = "points_update_operation::Operation",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
)]
pub operation: ::core::option::Option<points_update_operation::Operation>,
}
pub mod points_update_operation {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointStructList {
#[prost(message, repeated, tag = "1")]
pub points: ::prost::alloc::vec::Vec<super::PointStruct>,
#[prost(message, optional, tag = "2")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPayload {
#[prost(map = "string, message", tag = "1")]
pub payload: ::std::collections::HashMap<
::prost::alloc::string::String,
super::Value,
>,
#[prost(message, optional, tag = "2")]
pub points_selector: ::core::option::Option<super::PointsSelector>,
#[prost(message, optional, tag = "3")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
#[prost(string, optional, tag = "4")]
pub key: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePayload {
#[prost(string, repeated, tag = "1")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub points_selector: ::core::option::Option<super::PointsSelector>,
#[prost(message, optional, tag = "3")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVectors {
#[prost(message, repeated, tag = "1")]
pub points: ::prost::alloc::vec::Vec<super::PointVectors>,
#[prost(message, optional, tag = "2")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVectors {
#[prost(message, optional, tag = "1")]
pub points_selector: ::core::option::Option<super::PointsSelector>,
#[prost(message, optional, tag = "2")]
pub vectors: ::core::option::Option<super::VectorsSelector>,
#[prost(message, optional, tag = "3")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePoints {
#[prost(message, optional, tag = "1")]
pub points: ::core::option::Option<super::PointsSelector>,
#[prost(message, optional, tag = "2")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearPayload {
#[prost(message, optional, tag = "1")]
pub points: ::core::option::Option<super::PointsSelector>,
#[prost(message, optional, tag = "2")]
pub shard_key_selector: ::core::option::Option<super::ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Upsert(PointStructList),
#[prost(message, tag = "2")]
DeleteDeprecated(super::PointsSelector),
#[prost(message, tag = "3")]
SetPayload(SetPayload),
#[prost(message, tag = "4")]
OverwritePayload(SetPayload),
#[prost(message, tag = "5")]
DeletePayload(DeletePayload),
#[prost(message, tag = "6")]
ClearPayloadDeprecated(super::PointsSelector),
#[prost(message, tag = "7")]
UpdateVectors(UpdateVectors),
#[prost(message, tag = "8")]
DeleteVectors(DeleteVectors),
#[prost(message, tag = "9")]
DeletePoints(DeletePoints),
#[prost(message, tag = "10")]
ClearPayload(ClearPayload),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBatchPoints {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
#[prost(message, optional, tag = "4")]
pub ordering: ::core::option::Option<WriteOrdering>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointsOperationResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<UpdateResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateResult {
#[prost(uint64, optional, tag = "1")]
pub operation_id: ::core::option::Option<u64>,
#[prost(enumeration = "UpdateStatus", tag = "2")]
pub status: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScoredPoint {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<PointId>,
#[prost(map = "string, message", tag = "2")]
pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
#[prost(float, tag = "3")]
pub score: f32,
#[prost(uint64, tag = "5")]
pub version: u64,
#[prost(message, optional, tag = "6")]
pub vectors: ::core::option::Option<Vectors>,
#[prost(message, optional, tag = "7")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupId {
#[prost(oneof = "group_id::Kind", tags = "1, 2, 3")]
pub kind: ::core::option::Option<group_id::Kind>,
}
pub mod group_id {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(uint64, tag = "1")]
UnsignedValue(u64),
#[prost(int64, tag = "2")]
IntegerValue(i64),
#[prost(string, tag = "3")]
StringValue(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointGroup {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<GroupId>,
#[prost(message, repeated, tag = "2")]
pub hits: ::prost::alloc::vec::Vec<ScoredPoint>,
#[prost(message, optional, tag = "3")]
pub lookup: ::core::option::Option<RetrievedPoint>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GroupsResult {
#[prost(message, repeated, tag = "1")]
pub groups: ::prost::alloc::vec::Vec<PointGroup>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchResult {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchBatchResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<BatchResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGroupsResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<GroupsResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<CountResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScrollResponse {
#[prost(message, optional, tag = "1")]
pub next_page_offset: ::core::option::Option<PointId>,
#[prost(message, repeated, tag = "2")]
pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
#[prost(double, tag = "3")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountResult {
#[prost(uint64, tag = "1")]
pub count: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrievedPoint {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<PointId>,
#[prost(map = "string, message", tag = "2")]
pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
#[prost(message, optional, tag = "4")]
pub vectors: ::core::option::Option<Vectors>,
#[prost(message, optional, tag = "5")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<RetrievedPoint>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendBatchResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<BatchResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<ScoredPoint>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverBatchResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<BatchResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendGroupsResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<GroupsResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBatchResponse {
#[prost(message, repeated, tag = "1")]
pub result: ::prost::alloc::vec::Vec<UpdateResult>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Filter {
#[prost(message, repeated, tag = "1")]
pub should: ::prost::alloc::vec::Vec<Condition>,
#[prost(message, repeated, tag = "2")]
pub must: ::prost::alloc::vec::Vec<Condition>,
#[prost(message, repeated, tag = "3")]
pub must_not: ::prost::alloc::vec::Vec<Condition>,
#[prost(message, optional, tag = "4")]
pub min_should: ::core::option::Option<MinShould>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MinShould {
#[prost(message, repeated, tag = "1")]
pub conditions: ::prost::alloc::vec::Vec<Condition>,
#[prost(uint64, tag = "2")]
pub min_count: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Condition {
#[prost(oneof = "condition::ConditionOneOf", tags = "1, 2, 3, 4, 5, 6")]
pub condition_one_of: ::core::option::Option<condition::ConditionOneOf>,
}
pub mod condition {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConditionOneOf {
#[prost(message, tag = "1")]
Field(super::FieldCondition),
#[prost(message, tag = "2")]
IsEmpty(super::IsEmptyCondition),
#[prost(message, tag = "3")]
HasId(super::HasIdCondition),
#[prost(message, tag = "4")]
Filter(super::Filter),
#[prost(message, tag = "5")]
IsNull(super::IsNullCondition),
#[prost(message, tag = "6")]
Nested(super::NestedCondition),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IsEmptyCondition {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IsNullCondition {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HasIdCondition {
#[prost(message, repeated, tag = "1")]
pub has_id: ::prost::alloc::vec::Vec<PointId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NestedCondition {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<Filter>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldCondition {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub r#match: ::core::option::Option<Match>,
#[prost(message, optional, tag = "3")]
pub range: ::core::option::Option<Range>,
#[prost(message, optional, tag = "4")]
pub geo_bounding_box: ::core::option::Option<GeoBoundingBox>,
#[prost(message, optional, tag = "5")]
pub geo_radius: ::core::option::Option<GeoRadius>,
#[prost(message, optional, tag = "6")]
pub values_count: ::core::option::Option<ValuesCount>,
#[prost(message, optional, tag = "7")]
pub geo_polygon: ::core::option::Option<GeoPolygon>,
#[prost(message, optional, tag = "8")]
pub datetime_range: ::core::option::Option<DatetimeRange>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Match {
#[prost(oneof = "r#match::MatchValue", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
pub match_value: ::core::option::Option<r#match::MatchValue>,
}
pub mod r#match {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum MatchValue {
#[prost(string, tag = "1")]
Keyword(::prost::alloc::string::String),
#[prost(int64, tag = "2")]
Integer(i64),
#[prost(bool, tag = "3")]
Boolean(bool),
#[prost(string, tag = "4")]
Text(::prost::alloc::string::String),
#[prost(message, tag = "5")]
Keywords(super::RepeatedStrings),
#[prost(message, tag = "6")]
Integers(super::RepeatedIntegers),
#[prost(message, tag = "7")]
ExceptIntegers(super::RepeatedIntegers),
#[prost(message, tag = "8")]
ExceptKeywords(super::RepeatedStrings),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatedStrings {
#[prost(string, repeated, tag = "1")]
pub strings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatedIntegers {
#[prost(int64, repeated, tag = "1")]
pub integers: ::prost::alloc::vec::Vec<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Range {
#[prost(double, optional, tag = "1")]
pub lt: ::core::option::Option<f64>,
#[prost(double, optional, tag = "2")]
pub gt: ::core::option::Option<f64>,
#[prost(double, optional, tag = "3")]
pub gte: ::core::option::Option<f64>,
#[prost(double, optional, tag = "4")]
pub lte: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatetimeRange {
#[prost(message, optional, tag = "1")]
pub lt: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub gt: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub gte: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub lte: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoBoundingBox {
#[prost(message, optional, tag = "1")]
pub top_left: ::core::option::Option<GeoPoint>,
#[prost(message, optional, tag = "2")]
pub bottom_right: ::core::option::Option<GeoPoint>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoRadius {
#[prost(message, optional, tag = "1")]
pub center: ::core::option::Option<GeoPoint>,
#[prost(float, tag = "2")]
pub radius: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoLineString {
#[prost(message, repeated, tag = "1")]
pub points: ::prost::alloc::vec::Vec<GeoPoint>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoPolygon {
#[prost(message, optional, tag = "1")]
pub exterior: ::core::option::Option<GeoLineString>,
#[prost(message, repeated, tag = "2")]
pub interiors: ::prost::alloc::vec::Vec<GeoLineString>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValuesCount {
#[prost(uint64, optional, tag = "1")]
pub lt: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "2")]
pub gt: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
pub gte: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
pub lte: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointsSelector {
#[prost(oneof = "points_selector::PointsSelectorOneOf", tags = "1, 2")]
pub points_selector_one_of: ::core::option::Option<
points_selector::PointsSelectorOneOf,
>,
}
pub mod points_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PointsSelectorOneOf {
#[prost(message, tag = "1")]
Points(super::PointsIdsList),
#[prost(message, tag = "2")]
Filter(super::Filter),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointsIdsList {
#[prost(message, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<PointId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PointStruct {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<PointId>,
#[prost(map = "string, message", tag = "3")]
pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
#[prost(message, optional, tag = "4")]
pub vectors: ::core::option::Option<Vectors>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoPoint {
#[prost(double, tag = "1")]
pub lon: f64,
#[prost(double, tag = "2")]
pub lat: f64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WriteOrderingType {
Weak = 0,
Medium = 1,
Strong = 2,
}
impl WriteOrderingType {
pub fn as_str_name(&self) -> &'static str {
match self {
WriteOrderingType::Weak => "Weak",
WriteOrderingType::Medium => "Medium",
WriteOrderingType::Strong => "Strong",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Weak" => Some(Self::Weak),
"Medium" => Some(Self::Medium),
"Strong" => Some(Self::Strong),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReadConsistencyType {
All = 0,
Majority = 1,
Quorum = 2,
}
impl ReadConsistencyType {
pub fn as_str_name(&self) -> &'static str {
match self {
ReadConsistencyType::All => "All",
ReadConsistencyType::Majority => "Majority",
ReadConsistencyType::Quorum => "Quorum",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"All" => Some(Self::All),
"Majority" => Some(Self::Majority),
"Quorum" => Some(Self::Quorum),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FieldType {
Keyword = 0,
Integer = 1,
Float = 2,
Geo = 3,
Text = 4,
Bool = 5,
Datetime = 6,
}
impl FieldType {
pub fn as_str_name(&self) -> &'static str {
match self {
FieldType::Keyword => "FieldTypeKeyword",
FieldType::Integer => "FieldTypeInteger",
FieldType::Float => "FieldTypeFloat",
FieldType::Geo => "FieldTypeGeo",
FieldType::Text => "FieldTypeText",
FieldType::Bool => "FieldTypeBool",
FieldType::Datetime => "FieldTypeDatetime",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FieldTypeKeyword" => Some(Self::Keyword),
"FieldTypeInteger" => Some(Self::Integer),
"FieldTypeFloat" => Some(Self::Float),
"FieldTypeGeo" => Some(Self::Geo),
"FieldTypeText" => Some(Self::Text),
"FieldTypeBool" => Some(Self::Bool),
"FieldTypeDatetime" => Some(Self::Datetime),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Direction {
Asc = 0,
Desc = 1,
}
impl Direction {
pub fn as_str_name(&self) -> &'static str {
match self {
Direction::Asc => "Asc",
Direction::Desc => "Desc",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Asc" => Some(Self::Asc),
"Desc" => Some(Self::Desc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RecommendStrategy {
AverageVector = 0,
BestScore = 1,
}
impl RecommendStrategy {
pub fn as_str_name(&self) -> &'static str {
match self {
RecommendStrategy::AverageVector => "AverageVector",
RecommendStrategy::BestScore => "BestScore",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AverageVector" => Some(Self::AverageVector),
"BestScore" => Some(Self::BestScore),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UpdateStatus {
UnknownUpdateStatus = 0,
Acknowledged = 1,
Completed = 2,
ClockRejected = 3,
}
impl UpdateStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
UpdateStatus::UnknownUpdateStatus => "UnknownUpdateStatus",
UpdateStatus::Acknowledged => "Acknowledged",
UpdateStatus::Completed => "Completed",
UpdateStatus::ClockRejected => "ClockRejected",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UnknownUpdateStatus" => Some(Self::UnknownUpdateStatus),
"Acknowledged" => Some(Self::Acknowledged),
"Completed" => Some(Self::Completed),
"ClockRejected" => Some(Self::ClockRejected),
_ => None,
}
}
}
pub mod points_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct PointsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl PointsClient<tonic::transport::Channel> {
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> PointsClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> PointsClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
PointsClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn upsert(
&mut self,
request: impl tonic::IntoRequest<super::UpsertPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Upsert");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Upsert"));
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeletePoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Delete");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Delete"));
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetPoints>,
) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Get");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn update_vectors(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePointVectors>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/UpdateVectors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "UpdateVectors"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_vectors(
&mut self,
request: impl tonic::IntoRequest<super::DeletePointVectors>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/DeleteVectors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "DeleteVectors"));
self.inner.unary(req, path, codec).await
}
pub async fn set_payload(
&mut self,
request: impl tonic::IntoRequest<super::SetPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/SetPayload");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SetPayload"));
self.inner.unary(req, path, codec).await
}
pub async fn overwrite_payload(
&mut self,
request: impl tonic::IntoRequest<super::SetPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/OverwritePayload",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "OverwritePayload"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_payload(
&mut self,
request: impl tonic::IntoRequest<super::DeletePayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/DeletePayload",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "DeletePayload"));
self.inner.unary(req, path, codec).await
}
pub async fn clear_payload(
&mut self,
request: impl tonic::IntoRequest<super::ClearPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/ClearPayload",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "ClearPayload"));
self.inner.unary(req, path, codec).await
}
pub async fn create_field_index(
&mut self,
request: impl tonic::IntoRequest<super::CreateFieldIndexCollection>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/CreateFieldIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "CreateFieldIndex"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_field_index(
&mut self,
request: impl tonic::IntoRequest<super::DeleteFieldIndexCollection>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/DeleteFieldIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "DeleteFieldIndex"));
self.inner.unary(req, path, codec).await
}
pub async fn search(
&mut self,
request: impl tonic::IntoRequest<super::SearchPoints>,
) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Search");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Search"));
self.inner.unary(req, path, codec).await
}
pub async fn search_batch(
&mut self,
request: impl tonic::IntoRequest<super::SearchBatchPoints>,
) -> std::result::Result<
tonic::Response<super::SearchBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/SearchBatch",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "SearchBatch"));
self.inner.unary(req, path, codec).await
}
pub async fn search_groups(
&mut self,
request: impl tonic::IntoRequest<super::SearchPointGroups>,
) -> std::result::Result<
tonic::Response<super::SearchGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/SearchGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "SearchGroups"));
self.inner.unary(req, path, codec).await
}
pub async fn scroll(
&mut self,
request: impl tonic::IntoRequest<super::ScrollPoints>,
) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Scroll");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Scroll"));
self.inner.unary(req, path, codec).await
}
pub async fn recommend(
&mut self,
request: impl tonic::IntoRequest<super::RecommendPoints>,
) -> std::result::Result<
tonic::Response<super::RecommendResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Recommend");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Recommend"));
self.inner.unary(req, path, codec).await
}
pub async fn recommend_batch(
&mut self,
request: impl tonic::IntoRequest<super::RecommendBatchPoints>,
) -> std::result::Result<
tonic::Response<super::RecommendBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/RecommendBatch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "RecommendBatch"));
self.inner.unary(req, path, codec).await
}
pub async fn recommend_groups(
&mut self,
request: impl tonic::IntoRequest<super::RecommendPointGroups>,
) -> std::result::Result<
tonic::Response<super::RecommendGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/RecommendGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "RecommendGroups"));
self.inner.unary(req, path, codec).await
}
pub async fn discover(
&mut self,
request: impl tonic::IntoRequest<super::DiscoverPoints>,
) -> std::result::Result<
tonic::Response<super::DiscoverResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Discover");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Discover"));
self.inner.unary(req, path, codec).await
}
pub async fn discover_batch(
&mut self,
request: impl tonic::IntoRequest<super::DiscoverBatchPoints>,
) -> std::result::Result<
tonic::Response<super::DiscoverBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/DiscoverBatch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "DiscoverBatch"));
self.inner.unary(req, path, codec).await
}
pub async fn count(
&mut self,
request: impl tonic::IntoRequest<super::CountPoints>,
) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Count");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Count"));
self.inner.unary(req, path, codec).await
}
pub async fn update_batch(
&mut self,
request: impl tonic::IntoRequest<super::UpdateBatchPoints>,
) -> std::result::Result<
tonic::Response<super::UpdateBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/UpdateBatch",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "UpdateBatch"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod points_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Points: Send + Sync + 'static {
async fn upsert(
&self,
request: tonic::Request<super::UpsertPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn delete(
&self,
request: tonic::Request<super::DeletePoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn get(
&self,
request: tonic::Request<super::GetPoints>,
) -> std::result::Result<tonic::Response<super::GetResponse>, tonic::Status>;
async fn update_vectors(
&self,
request: tonic::Request<super::UpdatePointVectors>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn delete_vectors(
&self,
request: tonic::Request<super::DeletePointVectors>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn set_payload(
&self,
request: tonic::Request<super::SetPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn overwrite_payload(
&self,
request: tonic::Request<super::SetPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn delete_payload(
&self,
request: tonic::Request<super::DeletePayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn clear_payload(
&self,
request: tonic::Request<super::ClearPayloadPoints>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn create_field_index(
&self,
request: tonic::Request<super::CreateFieldIndexCollection>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn delete_field_index(
&self,
request: tonic::Request<super::DeleteFieldIndexCollection>,
) -> std::result::Result<
tonic::Response<super::PointsOperationResponse>,
tonic::Status,
>;
async fn search(
&self,
request: tonic::Request<super::SearchPoints>,
) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status>;
async fn search_batch(
&self,
request: tonic::Request<super::SearchBatchPoints>,
) -> std::result::Result<
tonic::Response<super::SearchBatchResponse>,
tonic::Status,
>;
async fn search_groups(
&self,
request: tonic::Request<super::SearchPointGroups>,
) -> std::result::Result<
tonic::Response<super::SearchGroupsResponse>,
tonic::Status,
>;
async fn scroll(
&self,
request: tonic::Request<super::ScrollPoints>,
) -> std::result::Result<tonic::Response<super::ScrollResponse>, tonic::Status>;
async fn recommend(
&self,
request: tonic::Request<super::RecommendPoints>,
) -> std::result::Result<
tonic::Response<super::RecommendResponse>,
tonic::Status,
>;
async fn recommend_batch(
&self,
request: tonic::Request<super::RecommendBatchPoints>,
) -> std::result::Result<
tonic::Response<super::RecommendBatchResponse>,
tonic::Status,
>;
async fn recommend_groups(
&self,
request: tonic::Request<super::RecommendPointGroups>,
) -> std::result::Result<
tonic::Response<super::RecommendGroupsResponse>,
tonic::Status,
>;
async fn discover(
&self,
request: tonic::Request<super::DiscoverPoints>,
) -> std::result::Result<
tonic::Response<super::DiscoverResponse>,
tonic::Status,
>;
async fn discover_batch(
&self,
request: tonic::Request<super::DiscoverBatchPoints>,
) -> std::result::Result<
tonic::Response<super::DiscoverBatchResponse>,
tonic::Status,
>;
async fn count(
&self,
request: tonic::Request<super::CountPoints>,
) -> std::result::Result<tonic::Response<super::CountResponse>, tonic::Status>;
async fn update_batch(
&self,
request: tonic::Request<super::UpdateBatchPoints>,
) -> std::result::Result<
tonic::Response<super::UpdateBatchResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct PointsServer<T: Points> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Points> PointsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for PointsServer<T>
where
T: Points,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/qdrant.Points/Upsert" => {
#[allow(non_camel_case_types)]
struct UpsertSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::UpsertPoints>
for UpsertSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpsertPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).upsert(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpsertSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Delete" => {
#[allow(non_camel_case_types)]
struct DeleteSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::DeletePoints>
for DeleteSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeletePoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Get" => {
#[allow(non_camel_case_types)]
struct GetSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::GetPoints>
for GetSvc<T> {
type Response = super::GetResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).get(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/UpdateVectors" => {
#[allow(non_camel_case_types)]
struct UpdateVectorsSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::UpdatePointVectors>
for UpdateVectorsSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdatePointVectors>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_vectors(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateVectorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/DeleteVectors" => {
#[allow(non_camel_case_types)]
struct DeleteVectorsSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::DeletePointVectors>
for DeleteVectorsSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeletePointVectors>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).delete_vectors(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteVectorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/SetPayload" => {
#[allow(non_camel_case_types)]
struct SetPayloadSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
for SetPayloadSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetPayloadPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).set_payload(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SetPayloadSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/OverwritePayload" => {
#[allow(non_camel_case_types)]
struct OverwritePayloadSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::SetPayloadPoints>
for OverwritePayloadSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetPayloadPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).overwrite_payload(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = OverwritePayloadSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/DeletePayload" => {
#[allow(non_camel_case_types)]
struct DeletePayloadSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::DeletePayloadPoints>
for DeletePayloadSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeletePayloadPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).delete_payload(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeletePayloadSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/ClearPayload" => {
#[allow(non_camel_case_types)]
struct ClearPayloadSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::ClearPayloadPoints>
for ClearPayloadSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ClearPayloadPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).clear_payload(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ClearPayloadSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/CreateFieldIndex" => {
#[allow(non_camel_case_types)]
struct CreateFieldIndexSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::CreateFieldIndexCollection>
for CreateFieldIndexSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateFieldIndexCollection>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).create_field_index(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateFieldIndexSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/DeleteFieldIndex" => {
#[allow(non_camel_case_types)]
struct DeleteFieldIndexSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::DeleteFieldIndexCollection>
for DeleteFieldIndexSvc<T> {
type Response = super::PointsOperationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteFieldIndexCollection>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).delete_field_index(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteFieldIndexSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Search" => {
#[allow(non_camel_case_types)]
struct SearchSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::SearchPoints>
for SearchSvc<T> {
type Response = super::SearchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).search(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SearchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/SearchBatch" => {
#[allow(non_camel_case_types)]
struct SearchBatchSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::SearchBatchPoints>
for SearchBatchSvc<T> {
type Response = super::SearchBatchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchBatchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).search_batch(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SearchBatchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/SearchGroups" => {
#[allow(non_camel_case_types)]
struct SearchGroupsSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::SearchPointGroups>
for SearchGroupsSvc<T> {
type Response = super::SearchGroupsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchPointGroups>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).search_groups(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SearchGroupsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Scroll" => {
#[allow(non_camel_case_types)]
struct ScrollSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::ScrollPoints>
for ScrollSvc<T> {
type Response = super::ScrollResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ScrollPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).scroll(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ScrollSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Recommend" => {
#[allow(non_camel_case_types)]
struct RecommendSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::RecommendPoints>
for RecommendSvc<T> {
type Response = super::RecommendResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RecommendPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).recommend(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RecommendSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/RecommendBatch" => {
#[allow(non_camel_case_types)]
struct RecommendBatchSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::RecommendBatchPoints>
for RecommendBatchSvc<T> {
type Response = super::RecommendBatchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RecommendBatchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).recommend_batch(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RecommendBatchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/RecommendGroups" => {
#[allow(non_camel_case_types)]
struct RecommendGroupsSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::RecommendPointGroups>
for RecommendGroupsSvc<T> {
type Response = super::RecommendGroupsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RecommendPointGroups>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).recommend_groups(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RecommendGroupsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Discover" => {
#[allow(non_camel_case_types)]
struct DiscoverSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::DiscoverPoints>
for DiscoverSvc<T> {
type Response = super::DiscoverResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DiscoverPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).discover(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DiscoverSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/DiscoverBatch" => {
#[allow(non_camel_case_types)]
struct DiscoverBatchSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::DiscoverBatchPoints>
for DiscoverBatchSvc<T> {
type Response = super::DiscoverBatchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DiscoverBatchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).discover_batch(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DiscoverBatchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/Count" => {
#[allow(non_camel_case_types)]
struct CountSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::CountPoints>
for CountSvc<T> {
type Response = super::CountResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CountPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).count(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CountSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Points/UpdateBatch" => {
#[allow(non_camel_case_types)]
struct UpdateBatchSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::UpdateBatchPoints>
for UpdateBatchSvc<T> {
type Response = super::UpdateBatchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdateBatchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).update_batch(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateBatchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Points> Clone for PointsServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Points> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Points> tonic::server::NamedService for PointsServer<T> {
const NAME: &'static str = "qdrant.Points";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFullSnapshotRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFullSnapshotsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFullSnapshotRequest {
#[prost(string, tag = "1")]
pub snapshot_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSnapshotRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSnapshotRequest {
#[prost(string, tag = "1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub snapshot_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotDescription {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub creation_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "3")]
pub size: i64,
#[prost(string, optional, tag = "4")]
pub checksum: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSnapshotResponse {
#[prost(message, optional, tag = "1")]
pub snapshot_description: ::core::option::Option<SnapshotDescription>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsResponse {
#[prost(message, repeated, tag = "1")]
pub snapshot_descriptions: ::prost::alloc::vec::Vec<SnapshotDescription>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSnapshotResponse {
#[prost(double, tag = "1")]
pub time: f64,
}
pub mod snapshots_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SnapshotsClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SnapshotsClient<tonic::transport::Channel> {
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> SnapshotsClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> SnapshotsClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
SnapshotsClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSnapshotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Create");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Create"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListSnapshotsRequest>,
) -> std::result::Result<
tonic::Response<super::ListSnapshotsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/List");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteSnapshotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Snapshots/Delete");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "Delete"));
self.inner.unary(req, path, codec).await
}
pub async fn create_full(
&mut self,
request: impl tonic::IntoRequest<super::CreateFullSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSnapshotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Snapshots/CreateFull",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Snapshots", "CreateFull"));
self.inner.unary(req, path, codec).await
}
pub async fn list_full(
&mut self,
request: impl tonic::IntoRequest<super::ListFullSnapshotsRequest>,
) -> std::result::Result<
tonic::Response<super::ListSnapshotsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Snapshots/ListFull",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Snapshots", "ListFull"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_full(
&mut self,
request: impl tonic::IntoRequest<super::DeleteFullSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteSnapshotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Snapshots/DeleteFull",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Snapshots", "DeleteFull"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod snapshots_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Snapshots: Send + Sync + 'static {
async fn create(
&self,
request: tonic::Request<super::CreateSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSnapshotResponse>,
tonic::Status,
>;
async fn list(
&self,
request: tonic::Request<super::ListSnapshotsRequest>,
) -> std::result::Result<
tonic::Response<super::ListSnapshotsResponse>,
tonic::Status,
>;
async fn delete(
&self,
request: tonic::Request<super::DeleteSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteSnapshotResponse>,
tonic::Status,
>;
async fn create_full(
&self,
request: tonic::Request<super::CreateFullSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSnapshotResponse>,
tonic::Status,
>;
async fn list_full(
&self,
request: tonic::Request<super::ListFullSnapshotsRequest>,
) -> std::result::Result<
tonic::Response<super::ListSnapshotsResponse>,
tonic::Status,
>;
async fn delete_full(
&self,
request: tonic::Request<super::DeleteFullSnapshotRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteSnapshotResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct SnapshotsServer<T: Snapshots> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Snapshots> SnapshotsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotsServer<T>
where
T: Snapshots,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/qdrant.Snapshots/Create" => {
#[allow(non_camel_case_types)]
struct CreateSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::CreateSnapshotRequest>
for CreateSvc<T> {
type Response = super::CreateSnapshotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSnapshotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).create(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Snapshots/List" => {
#[allow(non_camel_case_types)]
struct ListSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::ListSnapshotsRequest>
for ListSvc<T> {
type Response = super::ListSnapshotsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListSnapshotsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).list(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Snapshots/Delete" => {
#[allow(non_camel_case_types)]
struct DeleteSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::DeleteSnapshotRequest>
for DeleteSvc<T> {
type Response = super::DeleteSnapshotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteSnapshotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Snapshots/CreateFull" => {
#[allow(non_camel_case_types)]
struct CreateFullSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::CreateFullSnapshotRequest>
for CreateFullSvc<T> {
type Response = super::CreateSnapshotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateFullSnapshotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).create_full(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateFullSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Snapshots/ListFull" => {
#[allow(non_camel_case_types)]
struct ListFullSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::ListFullSnapshotsRequest>
for ListFullSvc<T> {
type Response = super::ListSnapshotsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListFullSnapshotsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).list_full(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListFullSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/qdrant.Snapshots/DeleteFull" => {
#[allow(non_camel_case_types)]
struct DeleteFullSvc<T: Snapshots>(pub Arc<T>);
impl<
T: Snapshots,
> tonic::server::UnaryService<super::DeleteFullSnapshotRequest>
for DeleteFullSvc<T> {
type Response = super::DeleteSnapshotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteFullSnapshotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move { (*inner).delete_full(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteFullSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Snapshots> Clone for SnapshotsServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Snapshots> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Snapshots> tonic::server::NamedService for SnapshotsServer<T> {
const NAME: &'static str = "qdrant.Snapshots";
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckReply {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub commit: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod qdrant_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QdrantClient<T> {
inner: tonic::client::Grpc<T>,
}
impl QdrantClient<tonic::transport::Channel> {
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> QdrantClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> QdrantClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
QdrantClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn health_check(
&mut self,
request: impl tonic::IntoRequest<super::HealthCheckRequest>,
) -> std::result::Result<
tonic::Response<super::HealthCheckReply>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Qdrant/HealthCheck",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Qdrant", "HealthCheck"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod qdrant_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Qdrant: Send + Sync + 'static {
async fn health_check(
&self,
request: tonic::Request<super::HealthCheckRequest>,
) -> std::result::Result<
tonic::Response<super::HealthCheckReply>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QdrantServer<T: Qdrant> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
struct _Inner<T>(Arc<T>);
impl<T: Qdrant> QdrantServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QdrantServer<T>
where
T: Qdrant,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/qdrant.Qdrant/HealthCheck" => {
#[allow(non_camel_case_types)]
struct HealthCheckSvc<T: Qdrant>(pub Arc<T>);
impl<
T: Qdrant,
> tonic::server::UnaryService<super::HealthCheckRequest>
for HealthCheckSvc<T> {
type Response = super::HealthCheckReply;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HealthCheckRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).health_check(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = HealthCheckSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: Qdrant> Clone for QdrantServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
impl<T: Qdrant> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Qdrant> tonic::server::NamedService for QdrantServer<T> {
const NAME: &'static str = "qdrant.Qdrant";
}
}