#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct VectorParams {
#[prost(uint64, tag = "1")]
#[builder(default, field(vis = "pub(crate)"))]
pub size: u64,
#[prost(enumeration = "Distance", tag = "2")]
#[builder(default, setter(into), field(vis = "pub(crate)"))]
pub distance: i32,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "4")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<quantization_config::Quantization>",
build = "convert_option(&self.quantization_config)"
)
)]
pub quantization_config: ::core::option::Option<QuantizationConfig>,
#[prost(bool, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
#[prost(enumeration = "Datatype", optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub datatype: ::core::option::Option<i32>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub multivector_config: ::core::option::Option<MultiVectorConfig>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct VectorParamsDiff {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "2")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<quantization_config_diff::Quantization>",
build = "convert_option(&self.quantization_config)"
)
)]
pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
#[prost(bool, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SparseVectorParams {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub index: ::core::option::Option<SparseIndexConfig>,
#[prost(enumeration = "Modifier", optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub modifier: ::core::option::Option<i32>,
}
#[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,
>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MultiVectorConfig {
#[prost(enumeration = "MultiVectorComparator", tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub comparator: i32,
}
#[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, Copy, PartialEq, ::prost::Message)]
pub struct CollectionExists {
#[prost(bool, tag = "1")]
pub exists: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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, Copy, 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,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HnswConfigDiff {
#[prost(uint64, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub m: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub ef_construct: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub full_scan_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_indexing_threads: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub payload_m: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SparseIndexConfig {
#[prost(uint64, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub full_scan_threshold: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
#[prost(enumeration = "Datatype", optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub datatype: ::core::option::Option<i32>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WalConfigDiff {
#[prost(uint64, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wal_capacity_mb: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wal_segments_ahead: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OptimizersConfigDiff {
#[prost(double, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub deleted_threshold: ::core::option::Option<f64>,
#[prost(uint64, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub vacuum_min_vector_number: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub default_segment_number: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_segment_size: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub memmap_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub indexing_threshold: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "7")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub flush_interval_sec: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_optimization_threads: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScalarQuantization {
#[prost(enumeration = "QuantizationType", tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub r#type: i32,
#[prost(float, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub quantile: ::core::option::Option<f32>,
#[prost(bool, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub always_ram: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProductQuantization {
#[prost(enumeration = "CompressionRatio", tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub compression: i32,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub always_ram: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BinaryQuantization {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub always_ram: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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, Copy, 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, Copy, PartialEq, ::prost::Message)]
pub struct Disabled {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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, Copy, 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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StrictModeConfig {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub enabled: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_query_limit: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_timeout: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub unindexed_filtering_retrieve: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub unindexed_filtering_update: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub search_max_hnsw_ef: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "7")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub search_allow_exact: ::core::option::Option<bool>,
#[prost(float, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub search_max_oversampling: ::core::option::Option<f32>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCollection {
#[prost(string, tag = "1")]
#[builder(default, setter(into), field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub wal_config: ::core::option::Option<WalConfigDiff>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
#[prost(uint32, optional, tag = "7")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub shard_number: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk_payload: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "9")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "10")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vectors_config: ::core::option::Option<VectorsConfig>,
#[prost(uint32, optional, tag = "11")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "12")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub write_consistency_factor: ::core::option::Option<u32>,
#[prost(string, optional, tag = "13")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub init_from_collection: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "14")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<quantization_config::Quantization>",
build = "convert_option(&self.quantization_config)"
)
)]
pub quantization_config: ::core::option::Option<QuantizationConfig>,
#[prost(enumeration = "ShardingMethod", optional, tag = "15")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub sharding_method: ::core::option::Option<i32>,
#[prost(message, optional, tag = "16")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
#[prost(message, optional, tag = "17")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCollection {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub optimizers_config: ::core::option::Option<OptimizersConfigDiff>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<CollectionParamsDiff>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub hnsw_config: ::core::option::Option<HnswConfigDiff>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vectors_config: ::core::option::Option<VectorsConfigDiff>,
#[prost(message, optional, tag = "7")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<quantization_config_diff::Quantization>",
build = "convert_option(&self.quantization_config)"
)
)]
pub quantization_config: ::core::option::Option<QuantizationConfigDiff>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub sparse_vectors_config: ::core::option::Option<SparseVectorConfig>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCollection {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(uint64, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CollectionParamsDiff {
#[prost(uint32, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub write_consistency_factor: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk_payload: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
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>,
#[prost(message, optional, tag = "6")]
pub strict_mode_config: ::core::option::Option<StrictModeConfig>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct KeywordIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub is_tenant: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IntegerIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub range: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub is_principal: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FloatIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub is_principal: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GeoIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TextIndexParams {
#[prost(enumeration = "TokenizerType", tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub tokenizer: i32,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub lowercase: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub min_token_len: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub max_token_len: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BoolIndexParams {}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DatetimeIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub is_principal: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UuidIndexParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub is_tenant: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub on_disk: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PayloadIndexParams {
#[prost(
oneof = "payload_index_params::IndexParams",
tags = "3, 2, 4, 5, 1, 6, 7, 8"
)]
pub index_params: ::core::option::Option<payload_index_params::IndexParams>,
}
pub mod payload_index_params {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum IndexParams {
#[prost(message, tag = "3")]
KeywordIndexParams(super::KeywordIndexParams),
#[prost(message, tag = "2")]
IntegerIndexParams(super::IntegerIndexParams),
#[prost(message, tag = "4")]
FloatIndexParams(super::FloatIndexParams),
#[prost(message, tag = "5")]
GeoIndexParams(super::GeoIndexParams),
#[prost(message, tag = "1")]
TextIndexParams(super::TextIndexParams),
#[prost(message, tag = "6")]
BoolIndexParams(super::BoolIndexParams),
#[prost(message, tag = "7")]
DatetimeIndexParams(super::DatetimeIndexParams),
#[prost(message, tag = "8")]
UuidIndexParams(super::UuidIndexParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAlias {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub alias_name: ::prost::alloc::string::String,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RenameAlias {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub old_alias_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
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, Copy, 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, Copy, PartialEq, ::prost::Message)]
pub struct ShardTransferInfo {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint32, optional, tag = "5")]
pub to_shard_id: ::core::option::Option<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 ReshardingInfo {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
pub peer_id: u64,
#[prost(message, optional, tag = "3")]
pub shard_key: ::core::option::Option<ShardKey>,
}
#[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>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MoveShard {
#[prost(uint32, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub shard_id: u32,
#[prost(uint32, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub to_shard_id: ::core::option::Option<u32>,
#[prost(uint64, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub to_peer_id: u64,
#[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub method: ::core::option::Option<i32>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReplicateShard {
#[prost(uint32, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub shard_id: u32,
#[prost(uint32, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub to_shard_id: ::core::option::Option<u32>,
#[prost(uint64, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub to_peer_id: u64,
#[prost(enumeration = "ShardTransferMethod", optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub method: ::core::option::Option<i32>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AbortShardTransfer {
#[prost(uint32, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub shard_id: u32,
#[prost(uint32, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub to_shard_id: ::core::option::Option<u32>,
#[prost(uint64, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub from_peer_id: u64,
#[prost(uint64, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub to_peer_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RestartTransfer {
#[prost(uint32, tag = "1")]
pub shard_id: u32,
#[prost(uint32, optional, tag = "5")]
pub to_shard_id: ::core::option::Option<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,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Replica {
#[prost(uint32, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub shard_id: u32,
#[prost(uint64, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub peer_id: u64,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateShardKey {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key: ::core::option::Option<ShardKey>,
#[prost(uint32, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub shards_number: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub replication_factor: ::core::option::Option<u32>,
#[prost(uint64, repeated, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
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>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCollectionClusterSetupRequest {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(
oneof = "update_collection_cluster_setup_request::Operation",
tags = "2, 3, 4, 5, 7, 8, 9"
)]
#[builder(field(vis = "pub(crate)"))]
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::ReplicateShard),
#[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, Copy, PartialEq, ::prost::Message)]
pub struct UpdateCollectionClusterSetupResponse {
#[prost(bool, tag = "1")]
pub result: bool,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateShardKeyRequest {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub request: ::core::option::Option<CreateShardKey>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteShardKeyRequest {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub request: ::core::option::Option<DeleteShardKey>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateShardKeyResponse {
#[prost(bool, tag = "1")]
pub result: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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,
Float16 = 3,
}
impl Datatype {
pub fn as_str_name(&self) -> &'static str {
match self {
Datatype::Default => "Default",
Datatype::Float32 => "Float32",
Datatype::Uint8 => "Uint8",
Datatype::Float16 => "Float16",
}
}
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),
"Float16" => Some(Self::Float16),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Modifier {
None = 0,
Idf = 1,
}
impl Modifier {
pub fn as_str_name(&self) -> &'static str {
match self {
Modifier::None => "None",
Modifier::Idf => "Idf",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"None" => Some(Self::None),
"Idf" => Some(Self::Idf),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MultiVectorComparator {
MaxSim = 0,
}
impl MultiVectorComparator {
pub fn as_str_name(&self) -> &'static str {
match self {
MultiVectorComparator::MaxSim => "MaxSim",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MaxSim" => Some(Self::MaxSim),
_ => 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,
Uuid = 8,
}
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",
PayloadSchemaType::Uuid => "Uuid",
}
}
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),
"Uuid" => Some(Self::Uuid),
_ => 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,
Resharding = 7,
}
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",
ReplicaState::Resharding => "Resharding",
}
}
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),
"Resharding" => Some(Self::Resharding),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ShardTransferMethod {
StreamRecords = 0,
Snapshot = 1,
WalDelta = 2,
ReshardingStreamRecords = 3,
}
impl ShardTransferMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
ShardTransferMethod::StreamRecords => "StreamRecords",
ShardTransferMethod::Snapshot => "Snapshot",
ShardTransferMethod::WalDelta => "WalDelta",
ShardTransferMethod::ReshardingStreamRecords => "ReshardingStreamRecords",
}
}
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),
"ReshardingStreamRecords" => Some(Self::ReshardingStreamRecords),
_ => None,
}
}
}
pub mod collections_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
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> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> 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> + std::marker::Send + std::marker::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::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::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::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::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::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::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::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::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::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::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::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::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::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::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Collections: std::marker::Send + std::marker::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> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> CollectionsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
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 + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::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 {
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 {
<T as Collections>::get(&inner, 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 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 {
<T as Collections>::list(&inner, 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 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 {
<T as Collections>::create(&inner, 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 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 {
<T as Collections>::update(&inner, 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 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 {
<T as Collections>::delete(&inner, 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 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 {
<T as Collections>::update_aliases(&inner, 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 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 {
<T as Collections>::list_collection_aliases(&inner, 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 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 {
<T as Collections>::list_aliases(&inner, 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 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 {
<T as Collections>::collection_cluster_info(&inner, 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 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 {
<T as Collections>::collection_exists(&inner, 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 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 {
<T as Collections>::update_collection_cluster_setup(
&inner,
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 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 {
<T as Collections>::create_shard_key(&inner, 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 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 {
<T as Collections>::delete_shard_key(&inner, 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 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 {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> 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,
}
}
}
pub const SERVICE_NAME: &str = "qdrant.Collections";
impl<T> tonic::server::NamedService for CollectionsServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[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, Copy, PartialEq, ::prost::Message)]
pub struct WriteOrdering {
#[prost(enumeration = "WriteOrderingType", tag = "1")]
pub r#type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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, Copy, 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>,
#[prost(uint32, optional, tag = "3")]
pub vectors_count: ::core::option::Option<u32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DenseVector {
#[prost(float, repeated, tag = "1")]
pub data: ::prost::alloc::vec::Vec<f32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparseVector {
#[prost(float, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<f32>,
#[prost(uint32, repeated, tag = "2")]
pub indices: ::prost::alloc::vec::Vec<u32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiDenseVector {
#[prost(message, repeated, tag = "1")]
pub vectors: ::prost::alloc::vec::Vec<DenseVector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorInput {
#[prost(oneof = "vector_input::Variant", tags = "1, 2, 3, 4")]
pub variant: ::core::option::Option<vector_input::Variant>,
}
pub mod vector_input {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Variant {
#[prost(message, tag = "1")]
Id(super::PointId),
#[prost(message, tag = "2")]
Dense(super::DenseVector),
#[prost(message, tag = "3")]
Sparse(super::SparseVector),
#[prost(message, tag = "4")]
MultiDense(super::MultiDenseVector),
}
}
#[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>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpsertPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub points: ::prost::alloc::vec::Vec<PointStruct>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<points_selector::PointsSelectorOneOf>",
build = "convert_option(&self.points)"
)
)]
pub points: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub ids: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "5")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "6")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(uint64, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePointVectors {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub points: ::prost::alloc::vec::Vec<PointVectors>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
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>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePointVectors {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<points_selector::PointsSelectorOneOf>",
build = "convert_option(&self.points_selector)"
)
)]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vectors: ::core::option::Option<VectorsSelector>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPayloadPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(map = "string, message", tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub payload: ::std::collections::HashMap<::prost::alloc::string::String, Value>,
#[prost(message, optional, tag = "5")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<points_selector::PointsSelectorOneOf>",
build = "convert_option(&self.points_selector)"
)
)]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(string, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePayloadPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(string, repeated, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<points_selector::PointsSelectorOneOf>",
build = "convert_option(&self.points_selector)"
)
)]
pub points_selector: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearPayloadPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<points_selector::PointsSelectorOneOf>",
build = "convert_option(&self.points)"
)
)]
pub points: ::core::option::Option<PointsSelector>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFieldIndexCollection {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(string, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub field_name: ::prost::alloc::string::String,
#[prost(enumeration = "FieldType", optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub field_type: ::core::option::Option<i32>,
#[prost(message, optional, tag = "5")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<payload_index_params::IndexParams>",
build = "convert_option(&self.field_index_params)"
)
)]
pub field_index_params: ::core::option::Option<PayloadIndexParams>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFieldIndexCollection {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(string, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub field_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QuantizationSearchParams {
#[prost(bool, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub ignore: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub rescore: ::core::option::Option<bool>,
#[prost(double, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub oversampling: ::core::option::Option<f64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SearchParams {
#[prost(uint64, optional, tag = "1")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub hnsw_ef: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub exact: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub quantization: ::core::option::Option<QuantizationSearchParams>,
#[prost(bool, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub indexed_only: ::core::option::Option<bool>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(float, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub vector: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "4")]
#[builder(field(vis = "pub(crate)"))]
pub limit: u64,
#[prost(message, optional, tag = "6")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "9")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "10")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "11")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "12")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "13")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "14")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "15")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub sparse_indices: ::core::option::Option<SparseIndices>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchBatchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub search_points: ::prost::alloc::vec::Vec<SearchPoints>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithLookup {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPointGroups {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(float, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub vector: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint32, tag = "4")]
#[builder(field(vis = "pub(crate)"))]
pub limit: u32,
#[prost(message, optional, tag = "5")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(string, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(string, tag = "10")]
#[builder(field(vis = "pub(crate)"))]
pub group_by: ::prost::alloc::string::String,
#[prost(uint32, tag = "11")]
#[builder(field(vis = "pub(crate)"))]
pub group_size: u32,
#[prost(message, optional, tag = "12")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "13")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub with_lookup: ::core::option::Option<WithLookup>,
#[prost(uint64, optional, tag = "14")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "15")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "16")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderBy {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub key: ::prost::alloc::string::String,
#[prost(enumeration = "Direction", optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub direction: ::core::option::Option<i32>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<start_from::Value>",
build = "convert_option(&self.start_from)"
)
)]
pub start_from: ::core::option::Option<StartFrom>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScrollPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub offset: ::core::option::Option<PointId>,
#[prost(uint32, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u32>,
#[prost(message, optional, tag = "6")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "8")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "9")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "10")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub order_by: ::core::option::Option<OrderBy>,
#[prost(uint64, optional, tag = "11")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupLocation {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub vector_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub positive: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, repeated, tag = "3")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub negative: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "5")]
#[builder(field(vis = "pub(crate)"))]
pub limit: u64,
#[prost(message, optional, tag = "7")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "9")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "10")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "11")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "12")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "13")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(message, optional, tag = "14")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(enumeration = "RecommendStrategy", optional, tag = "16")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub strategy: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "17")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(message, repeated, tag = "18")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(uint64, optional, tag = "19")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "20")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendBatchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub recommend_points: ::prost::alloc::vec::Vec<RecommendPoints>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendPointGroups {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub positive: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, repeated, tag = "3")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub negative: ::prost::alloc::vec::Vec<PointId>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint32, tag = "5")]
#[builder(field(vis = "pub(crate)"))]
pub limit: u32,
#[prost(message, optional, tag = "6")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(string, optional, tag = "9")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "10")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "11")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(string, tag = "12")]
#[builder(field(vis = "pub(crate)"))]
pub group_by: ::prost::alloc::string::String,
#[prost(uint32, tag = "13")]
#[builder(field(vis = "pub(crate)"))]
pub group_size: u32,
#[prost(message, optional, tag = "14")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "15")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub with_lookup: ::core::option::Option<WithLookup>,
#[prost(enumeration = "RecommendStrategy", optional, tag = "17")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub strategy: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "18")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub positive_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(message, repeated, tag = "19")]
#[builder(default, setter(custom), field(vis = "pub(crate)"))]
pub negative_vectors: ::prost::alloc::vec::Vec<Vector>,
#[prost(uint64, optional, tag = "20")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "21")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContextExamplePair {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub positive: ::core::option::Option<VectorExample>,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub negative: ::core::option::Option<VectorExample>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub target: ::core::option::Option<TargetVector>,
#[prost(message, repeated, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub context: ::prost::alloc::vec::Vec<ContextExamplePair>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, tag = "5")]
#[builder(field(vis = "pub(crate)"))]
pub limit: u64,
#[prost(message, optional, tag = "6")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(uint64, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub offset: ::core::option::Option<u64>,
#[prost(string, optional, tag = "9")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "10")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "11")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(message, optional, tag = "12")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "13")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "14")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverBatchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub discover_points: ::prost::alloc::vec::Vec<DiscoverPoints>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(bool, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub exact: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecommendInput {
#[prost(message, repeated, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub positive: ::prost::alloc::vec::Vec<VectorInput>,
#[prost(message, repeated, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub negative: ::prost::alloc::vec::Vec<VectorInput>,
#[prost(enumeration = "RecommendStrategy", optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub strategy: ::core::option::Option<i32>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContextInputPair {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub positive: ::core::option::Option<VectorInput>,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub negative: ::core::option::Option<VectorInput>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverInput {
#[prost(message, optional, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub target: ::core::option::Option<VectorInput>,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub context: ::core::option::Option<ContextInput>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContextInput {
#[prost(message, repeated, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub pairs: ::prost::alloc::vec::Vec<ContextInputPair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Query {
#[prost(oneof = "query::Variant", tags = "1, 2, 3, 4, 5, 6, 7")]
pub variant: ::core::option::Option<query::Variant>,
}
pub mod query {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Variant {
#[prost(message, tag = "1")]
Nearest(super::VectorInput),
#[prost(message, tag = "2")]
Recommend(super::RecommendInput),
#[prost(message, tag = "3")]
Discover(super::DiscoverInput),
#[prost(message, tag = "4")]
Context(super::ContextInput),
#[prost(message, tag = "5")]
OrderBy(super::OrderBy),
#[prost(enumeration = "super::Fusion", tag = "6")]
Fusion(i32),
#[prost(enumeration = "super::Sample", tag = "7")]
Sample(i32),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, error = "std::convert::Infallible", name = "build_inner"),
pattern = "owned"
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrefetchQuery {
#[prost(message, repeated, tag = "1")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub query: ::core::option::Option<Query>,
#[prost(string, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u64>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub query: ::core::option::Option<Query>,
#[prost(string, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(uint64, optional, tag = "8")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "9")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub offset: ::core::option::Option<u64>,
#[prost(message, optional, tag = "10")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_vectors_selector::SelectorOptions>",
build = "convert_option(&self.with_vectors)"
)
)]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "11")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<with_payload_selector::SelectorOptions>",
build = "convert_option(&self.with_payload)"
)
)]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "12")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "13")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
#[prost(message, optional, tag = "14")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(uint64, optional, tag = "15")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryBatchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub query_points: ::prost::alloc::vec::Vec<QueryPoints>,
#[prost(message, optional, tag = "3")]
#[builder(
setter(into, strip_option),
field(
ty = "Option<read_consistency::Value>",
build = "convert_option(&self.read_consistency)"
)
)]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPointGroups {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub prefetch: ::prost::alloc::vec::Vec<PrefetchQuery>,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub query: ::core::option::Option<Query>,
#[prost(string, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(message, optional, tag = "6")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub params: ::core::option::Option<SearchParams>,
#[prost(float, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub score_threshold: ::core::option::Option<f32>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub with_payload: ::core::option::Option<WithPayloadSelector>,
#[prost(message, optional, tag = "9")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub with_vectors: ::core::option::Option<WithVectorsSelector>,
#[prost(message, optional, tag = "10")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub lookup_from: ::core::option::Option<LookupLocation>,
#[prost(uint64, optional, tag = "11")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "12")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub group_size: ::core::option::Option<u64>,
#[prost(string, tag = "13")]
#[builder(field(vis = "pub(crate)"))]
pub group_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "14")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "15")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub with_lookup: ::core::option::Option<WithLookup>,
#[prost(uint64, optional, tag = "16")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "17")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FacetCounts {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
pub key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "5")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub exact: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FacetValue {
#[prost(oneof = "facet_value::Variant", tags = "1, 2, 3")]
pub variant: ::core::option::Option<facet_value::Variant>,
}
pub mod facet_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Variant {
#[prost(string, tag = "1")]
StringValue(::prost::alloc::string::String),
#[prost(int64, tag = "2")]
IntegerValue(i64),
#[prost(bool, tag = "3")]
BoolValue(bool),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FacetHit {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<FacetValue>,
#[prost(uint64, tag = "2")]
pub count: u64,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub filter: ::core::option::Option<Filter>,
#[prost(uint64, optional, tag = "3")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub sample: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "4")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub limit: ::core::option::Option<u64>,
#[prost(string, optional, tag = "5")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub using: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "6")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub timeout: ::core::option::Option<u64>,
#[prost(message, optional, tag = "7")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub read_consistency: ::core::option::Option<ReadConsistency>,
#[prost(message, optional, tag = "8")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub shard_key_selector: ::core::option::Option<ShardKeySelector>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixPairs {
#[prost(message, repeated, tag = "1")]
pub pairs: ::prost::alloc::vec::Vec<SearchMatrixPair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixPair {
#[prost(message, optional, tag = "1")]
pub a: ::core::option::Option<PointId>,
#[prost(message, optional, tag = "2")]
pub b: ::core::option::Option<PointId>,
#[prost(float, tag = "3")]
pub score: f32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixOffsets {
#[prost(uint64, repeated, tag = "1")]
pub offsets_row: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "2")]
pub offsets_col: ::prost::alloc::vec::Vec<u64>,
#[prost(float, repeated, tag = "3")]
pub scores: ::prost::alloc::vec::Vec<f32>,
#[prost(message, repeated, tag = "4")]
pub ids: ::prost::alloc::vec::Vec<PointId>,
}
#[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 OverwritePayload {
#[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")]
#[deprecated(since = "1.7.0", note = "use `DeletePoints` instead")]
DeleteDeprecated(super::PointsSelector),
#[prost(message, tag = "3")]
SetPayload(SetPayload),
#[prost(message, tag = "4")]
OverwritePayload(OverwritePayload),
#[prost(message, tag = "5")]
DeletePayload(DeletePayload),
#[prost(message, tag = "6")]
#[deprecated(since = "1.7.0", note = "use `ClearPayload` instead")]
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),
}
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBatchPoints {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
#[builder(default, setter(strip_option), field(vis = "pub(crate)"))]
pub wait: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
#[builder(field(vis = "pub(crate)"))]
pub operations: ::prost::alloc::vec::Vec<PointsUpdateOperation>,
#[prost(message, optional, tag = "4")]
#[builder(default, setter(into, strip_option), field(vis = "pub(crate)"))]
pub ordering: ::core::option::Option<WriteOrdering>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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, Copy, 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, Copy, PartialEq, ::prost::Message)]
pub struct OrderValue {
#[prost(oneof = "order_value::Variant", tags = "1, 2")]
pub variant: ::core::option::Option<order_value::Variant>,
}
pub mod order_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Variant {
#[prost(int64, tag = "1")]
Int(i64),
#[prost(double, tag = "2")]
Float(f64),
}
}
#[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>,
#[prost(message, optional, tag = "8")]
pub order_value: ::core::option::Option<OrderValue>,
}
#[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 QueryResponse {
#[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 QueryBatchResponse {
#[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 QueryGroupsResponse {
#[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 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, Copy, 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, Copy, 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>,
#[prost(message, optional, tag = "6")]
pub order_value: ::core::option::Option<OrderValue>,
}
#[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 FacetResponse {
#[prost(message, repeated, tag = "1")]
pub hits: ::prost::alloc::vec::Vec<FacetHit>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixPairsResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<SearchMatrixPairs>,
#[prost(double, tag = "2")]
pub time: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMatrixOffsetsResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<SearchMatrixOffsets>,
#[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, Copy, 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, Copy, 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, Copy, 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, Copy, 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, Copy, 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, Copy, 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,
Uuid = 7,
}
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",
FieldType::Uuid => "FieldTypeUuid",
}
}
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),
"FieldTypeUuid" => Some(Self::Uuid),
_ => 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 Fusion {
Rrf = 0,
Dbsf = 1,
}
impl Fusion {
pub fn as_str_name(&self) -> &'static str {
match self {
Fusion::Rrf => "RRF",
Fusion::Dbsf => "DBSF",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RRF" => Some(Self::Rrf),
"DBSF" => Some(Self::Dbsf),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Sample {
Random = 0,
}
impl Sample {
pub fn as_str_name(&self) -> &'static str {
match self {
Sample::Random => "Random",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Random" => Some(Self::Random),
_ => 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::wildcard_imports,
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> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> 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> + std::marker::Send + std::marker::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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 async fn query(
&mut self,
request: impl tonic::IntoRequest<super::QueryPoints>,
) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Query");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Query"));
self.inner.unary(req, path, codec).await
}
pub async fn query_batch(
&mut self,
request: impl tonic::IntoRequest<super::QueryBatchPoints>,
) -> std::result::Result<
tonic::Response<super::QueryBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/QueryBatch");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryBatch"));
self.inner.unary(req, path, codec).await
}
pub async fn query_groups(
&mut self,
request: impl tonic::IntoRequest<super::QueryPointGroups>,
) -> std::result::Result<
tonic::Response<super::QueryGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/QueryGroups",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "QueryGroups"));
self.inner.unary(req, path, codec).await
}
pub async fn facet(
&mut self,
request: impl tonic::IntoRequest<super::FacetCounts>,
) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/qdrant.Points/Facet");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("qdrant.Points", "Facet"));
self.inner.unary(req, path, codec).await
}
pub async fn search_matrix_pairs(
&mut self,
request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
) -> std::result::Result<
tonic::Response<super::SearchMatrixPairsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/SearchMatrixPairs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "SearchMatrixPairs"));
self.inner.unary(req, path, codec).await
}
pub async fn search_matrix_offsets(
&mut self,
request: impl tonic::IntoRequest<super::SearchMatrixPoints>,
) -> std::result::Result<
tonic::Response<super::SearchMatrixOffsetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/qdrant.Points/SearchMatrixOffsets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("qdrant.Points", "SearchMatrixOffsets"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod points_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Points: std::marker::Send + std::marker::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,
>;
async fn query(
&self,
request: tonic::Request<super::QueryPoints>,
) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status>;
async fn query_batch(
&self,
request: tonic::Request<super::QueryBatchPoints>,
) -> std::result::Result<
tonic::Response<super::QueryBatchResponse>,
tonic::Status,
>;
async fn query_groups(
&self,
request: tonic::Request<super::QueryPointGroups>,
) -> std::result::Result<
tonic::Response<super::QueryGroupsResponse>,
tonic::Status,
>;
async fn facet(
&self,
request: tonic::Request<super::FacetCounts>,
) -> std::result::Result<tonic::Response<super::FacetResponse>, tonic::Status>;
async fn search_matrix_pairs(
&self,
request: tonic::Request<super::SearchMatrixPoints>,
) -> std::result::Result<
tonic::Response<super::SearchMatrixPairsResponse>,
tonic::Status,
>;
async fn search_matrix_offsets(
&self,
request: tonic::Request<super::SearchMatrixPoints>,
) -> std::result::Result<
tonic::Response<super::SearchMatrixOffsetsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct PointsServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> PointsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
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 + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::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 {
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 {
<T as Points>::upsert(&inner, 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 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 {
<T as Points>::delete(&inner, 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 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 {
<T as Points>::get(&inner, 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 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 {
<T as Points>::update_vectors(&inner, 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 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 {
<T as Points>::delete_vectors(&inner, 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 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 {
<T as Points>::set_payload(&inner, 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 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 {
<T as Points>::overwrite_payload(&inner, 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 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 {
<T as Points>::delete_payload(&inner, 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 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 {
<T as Points>::clear_payload(&inner, 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 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 {
<T as Points>::create_field_index(&inner, 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 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 {
<T as Points>::delete_field_index(&inner, 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 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 {
<T as Points>::search(&inner, 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 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 {
<T as Points>::search_batch(&inner, 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 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 {
<T as Points>::search_groups(&inner, 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 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 {
<T as Points>::scroll(&inner, 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 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 {
<T as Points>::recommend(&inner, 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 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 {
<T as Points>::recommend_batch(&inner, 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 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 {
<T as Points>::recommend_groups(&inner, 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 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 {
<T as Points>::discover(&inner, 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 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 {
<T as Points>::discover_batch(&inner, 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 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 {
<T as Points>::count(&inner, 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 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 {
<T as Points>::update_batch(&inner, 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 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)
}
"/qdrant.Points/Query" => {
#[allow(non_camel_case_types)]
struct QuerySvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::QueryPoints>
for QuerySvc<T> {
type Response = super::QueryResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::query(&inner, 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 method = QuerySvc(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/QueryBatch" => {
#[allow(non_camel_case_types)]
struct QueryBatchSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::QueryBatchPoints>
for QueryBatchSvc<T> {
type Response = super::QueryBatchResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryBatchPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::query_batch(&inner, 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 method = QueryBatchSvc(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/QueryGroups" => {
#[allow(non_camel_case_types)]
struct QueryGroupsSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::QueryPointGroups>
for QueryGroupsSvc<T> {
type Response = super::QueryGroupsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPointGroups>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::query_groups(&inner, 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 method = QueryGroupsSvc(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/Facet" => {
#[allow(non_camel_case_types)]
struct FacetSvc<T: Points>(pub Arc<T>);
impl<T: Points> tonic::server::UnaryService<super::FacetCounts>
for FacetSvc<T> {
type Response = super::FacetResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::FacetCounts>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::facet(&inner, 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 method = FacetSvc(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/SearchMatrixPairs" => {
#[allow(non_camel_case_types)]
struct SearchMatrixPairsSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::SearchMatrixPoints>
for SearchMatrixPairsSvc<T> {
type Response = super::SearchMatrixPairsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchMatrixPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::search_matrix_pairs(&inner, 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 method = SearchMatrixPairsSvc(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/SearchMatrixOffsets" => {
#[allow(non_camel_case_types)]
struct SearchMatrixOffsetsSvc<T: Points>(pub Arc<T>);
impl<
T: Points,
> tonic::server::UnaryService<super::SearchMatrixPoints>
for SearchMatrixOffsetsSvc<T> {
type Response = super::SearchMatrixOffsetsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchMatrixPoints>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Points>::search_matrix_offsets(&inner, 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 method = SearchMatrixOffsetsSvc(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 {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> 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,
}
}
}
pub const SERVICE_NAME: &str = "qdrant.Points";
impl<T> tonic::server::NamedService for PointsServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateFullSnapshotRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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,
}
#[derive(derive_builder::Builder)]
#[builder(
build_fn(private, name = "build_inner"),
pattern = "owned",
custom_constructor
)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSnapshotRequest {
#[prost(string, tag = "1")]
#[builder(field(vis = "pub(crate)"))]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
#[builder(field(vis = "pub(crate)"))]
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, Copy, 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::wildcard_imports,
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> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> 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> + std::marker::Send + std::marker::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::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::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::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::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::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::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::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Snapshots: std::marker::Send + std::marker::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> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> SnapshotsServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
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 + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::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 {
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 {
<T as Snapshots>::create(&inner, 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 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 {
<T as Snapshots>::list(&inner, 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 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 {
<T as Snapshots>::delete(&inner, 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 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 {
<T as Snapshots>::create_full(&inner, 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 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 {
<T as Snapshots>::list_full(&inner, 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 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 {
<T as Snapshots>::delete_full(&inner, 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 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 {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> 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,
}
}
}
pub const SERVICE_NAME: &str = "qdrant.Snapshots";
impl<T> tonic::server::NamedService for SnapshotsServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, 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::wildcard_imports,
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> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> 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> + std::marker::Send + std::marker::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::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::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Qdrant: std::marker::Send + std::marker::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> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> QdrantServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
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 + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::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 {
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 {
<T as Qdrant>::health_check(&inner, 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 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 {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> 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,
}
}
}
pub const SERVICE_NAME: &str = "qdrant.Qdrant";
impl<T> tonic::server::NamedService for QdrantServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
use crate::grpc_macros::*;
builder_type_conversions!(CreateCollection, CreateCollectionBuilder);
builder_type_conversions!(VectorParams, VectorParamsBuilder, true);
builder_type_conversions!(HnswConfigDiff, HnswConfigDiffBuilder);
builder_type_conversions!(ScalarQuantization, ScalarQuantizationBuilder, true);
builder_type_conversions!(ProductQuantization, ProductQuantizationBuilder, true);
builder_type_conversions!(BinaryQuantization, BinaryQuantizationBuilder, true);
builder_type_conversions!(OptimizersConfigDiff, OptimizersConfigDiffBuilder);
builder_type_conversions!(WalConfigDiff, WalConfigDiffBuilder);
builder_type_conversions!(SearchPoints, SearchPointsBuilder, true);
builder_type_conversions!(SearchParams, SearchParamsBuilder);
builder_type_conversions!(QuantizationSearchParams, QuantizationSearchParamsBuilder);
builder_type_conversions!(UpdateCollection, UpdateCollectionBuilder, true);
builder_type_conversions!(SetPayloadPoints, SetPayloadPointsBuilder, true);
builder_type_conversions!(UpsertPoints, UpsertPointsBuilder, true);
builder_type_conversions!(UpdateBatchPoints, UpdateBatchPointsBuilder, true);
builder_type_conversions!(DeletePayloadPoints, DeletePayloadPointsBuilder, true);
builder_type_conversions!(ClearPayloadPoints, ClearPayloadPointsBuilder, true);
builder_type_conversions!(GetPoints, GetPointsBuilder, true);
builder_type_conversions!(SearchBatchPoints, SearchBatchPointsBuilder, true);
builder_type_conversions!(SearchPointGroups, SearchPointGroupsBuilder, true);
builder_type_conversions!(WithLookup, WithLookupBuilder, true);
builder_type_conversions!(DeletePointVectors, DeletePointVectorsBuilder, true);
builder_type_conversions!(UpdatePointVectors, UpdatePointVectorsBuilder, true);
builder_type_conversions!(ScrollPoints, ScrollPointsBuilder, true);
builder_type_conversions!(OrderBy, OrderByBuilder, true);
builder_type_conversions!(RecommendPoints, RecommendPointsBuilder, true);
builder_type_conversions!(LookupLocation, LookupLocationBuilder, true);
builder_type_conversions!(RecommendBatchPoints, RecommendBatchPointsBuilder, true);
builder_type_conversions!(RecommendPointGroups, RecommendPointGroupsBuilder, true);
builder_type_conversions!(DiscoverPoints, DiscoverPointsBuilder, true);
builder_type_conversions!(DiscoverBatchPoints, DiscoverBatchPointsBuilder, true);
builder_type_conversions!(QueryPoints, QueryPointsBuilder, true);
builder_type_conversions!(QueryBatchPoints, QueryBatchPointsBuilder, true);
builder_type_conversions!(CountPoints, CountPointsBuilder, true);
builder_type_conversions!(CreateFieldIndexCollection, CreateFieldIndexCollectionBuilder, true);
builder_type_conversions!(DeleteFieldIndexCollection, DeleteFieldIndexCollectionBuilder, true);
builder_type_conversions!(UpdateCollectionClusterSetupRequest, UpdateCollectionClusterSetupRequestBuilder, true);
builder_type_conversions!(MoveShard, MoveShardBuilder, true);
builder_type_conversions!(ReplicateShard, ReplicateShardBuilder, true);
builder_type_conversions!(AbortShardTransfer, AbortShardTransferBuilder, true);
builder_type_conversions!(Replica, ReplicaBuilder, true);
builder_type_conversions!(CreateShardKeyRequest, CreateShardKeyRequestBuilder, true);
builder_type_conversions!(DeleteShardKeyRequest, DeleteShardKeyRequestBuilder, true);
builder_type_conversions!(DeleteCollection, DeleteCollectionBuilder, true);
builder_type_conversions!(CollectionParamsDiff, CollectionParamsDiffBuilder);
builder_type_conversions!(VectorParamsDiff, VectorParamsDiffBuilder);
builder_type_conversions!(SparseVectorParams, SparseVectorParamsBuilder);
builder_type_conversions!(SparseIndexConfig, SparseIndexConfigBuilder);
builder_type_conversions!(CreateShardKey, CreateShardKeyBuilder);
builder_type_conversions!(ContextExamplePair, ContextExamplePairBuilder);
builder_type_conversions!(TextIndexParams, TextIndexParamsBuilder, true);
builder_type_conversions!(IntegerIndexParams, IntegerIndexParamsBuilder, true);
builder_type_conversions!(KeywordIndexParams, KeywordIndexParamsBuilder);
builder_type_conversions!(DatetimeIndexParams, DatetimeIndexParamsBuilder);
builder_type_conversions!(UuidIndexParams, UuidIndexParamsBuilder);
builder_type_conversions!(FloatIndexParams, FloatIndexParamsBuilder);
builder_type_conversions!(GeoIndexParams, GeoIndexParamsBuilder);
builder_type_conversions!(CreateAlias, CreateAliasBuilder, true);
builder_type_conversions!(RenameAlias, RenameAliasBuilder, true);
builder_type_conversions!(DeleteSnapshotRequest, DeleteSnapshotRequestBuilder, true);
builder_type_conversions!(PrefetchQuery, PrefetchQueryBuilder);
builder_type_conversions!(RecommendInput, RecommendInputBuilder);
builder_type_conversions!(DiscoverInput, DiscoverInputBuilder, true);
builder_type_conversions!(ContextInput, ContextInputBuilder);
builder_type_conversions!(ContextInputPair, ContextInputPairBuilder, true);
builder_type_conversions!(MultiVectorConfig, MultiVectorConfigBuilder, true);
builder_type_conversions!(QueryPointGroups, QueryPointGroupsBuilder, true);
builder_type_conversions!(StrictModeConfig, StrictModeConfigBuilder);
builder_type_conversions!(FacetCounts, FacetCountsBuilder, true);
builder_type_conversions!(SearchMatrixPoints, SearchMatrixPointsBuilder, true);
builder_type_conversions!(DeletePoints, DeletePointsBuilder, true);
pub use crate::manual_builder::*;
pub use crate::builder_types::*;
pub use crate::qdrant_client::builders::*;
pub use prost_types::Timestamp;