diff --git a/src/qdrant.rs b/src/qdrant.rs index ad807e4..a5ab0ea 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -19,11 +19,11 @@ pub struct VectorParams { /// Configuration of vector quantization config. If omitted - the collection configuration will be used #[prost(message, optional, tag = "4")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.quantization_config)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.quantization_config)" + ) )] pub quantization_config: ::core::option::Option, /// If true - serve vectors from disk. If set to false, the vectors will be loaded in RAM. @@ -35,6 +35,7 @@ pub struct VectorParams { #[builder(default, setter(into, strip_option))] pub datatype: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorParamsDiff { @@ -48,24 +49,28 @@ pub struct VectorParamsDiff { #[prost(bool, optional, tag = "3")] pub on_disk: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `VectorsConfig`. pub mod vectors_config { #[allow(clippy::derive_partial_eq_without_eq)] @@ -77,12 +82,14 @@ pub mod vectors_config { 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, } + /// Nested message and enum types in `VectorsConfigDiff`. pub mod vectors_config_diff { #[allow(clippy::derive_partial_eq_without_eq)] @@ -94,6 +101,7 @@ pub mod vectors_config_diff { ParamsMap(super::VectorParamsDiffMap), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseVectorParams { @@ -101,12 +109,14 @@ pub struct SparseVectorParams { #[prost(message, optional, tag = "1")] pub index: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseVectorConfig { #[prost(map = "string, message", tag = "1")] pub map: ::std::collections::HashMap<::prost::alloc::string::String, SparseVectorParams>, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetCollectionInfoRequest { @@ -114,18 +124,21 @@ pub struct GetCollectionInfoRequest { #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionExistsRequest { #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionExists { #[prost(bool, tag = "1")] pub exists: bool, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionExistsResponse { @@ -135,9 +148,11 @@ pub struct CollectionExistsResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCollectionsRequest {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionDescription { @@ -145,6 +160,7 @@ 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 { @@ -154,6 +170,7 @@ pub struct GetCollectionInfoResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCollectionsResponse { @@ -163,6 +180,7 @@ pub struct ListCollectionsResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OptimizerStatus { @@ -171,6 +189,7 @@ pub struct OptimizerStatus { #[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"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -213,6 +232,7 @@ pub struct HnswConfigDiff { #[builder(default, setter(strip_option))] pub payload_m: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SparseIndexConfig { @@ -226,6 +246,7 @@ pub struct SparseIndexConfig { #[prost(bool, optional, tag = "2")] pub on_disk: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, error = "std::convert::Infallible", name = "build_inner"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -240,6 +261,7 @@ pub struct WalConfigDiff { #[builder(default, setter(strip_option))] pub wal_segments_ahead: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, error = "std::convert::Infallible", name = "build_inner"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -316,6 +338,7 @@ pub struct OptimizersConfigDiff { #[builder(default, setter(strip_option))] pub max_optimization_threads: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -333,6 +356,7 @@ pub struct ScalarQuantization { #[builder(default, setter(strip_option))] pub always_ram: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -346,6 +370,7 @@ pub struct ProductQuantization { #[builder(default, setter(strip_option))] pub always_ram: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -356,12 +381,14 @@ pub struct BinaryQuantization { #[builder(default, setter(strip_option))] pub always_ram: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuantizationConfig { #[prost(oneof = "quantization_config::Quantization", tags = "1, 2, 3")] pub quantization: ::core::option::Option, } + /// Nested message and enum types in `QuantizationConfig`. pub mod quantization_config { #[allow(clippy::derive_partial_eq_without_eq)] @@ -375,15 +402,18 @@ pub mod quantization_config { Binary(super::BinaryQuantization), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Disabled {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QuantizationConfigDiff { #[prost(oneof = "quantization_config_diff::Quantization", tags = "1, 2, 3, 4")] pub quantization: ::core::option::Option, } + /// Nested message and enum types in `QuantizationConfigDiff`. pub mod quantization_config_diff { #[allow(clippy::derive_partial_eq_without_eq)] @@ -399,6 +429,7 @@ pub mod quantization_config_diff { Binary(super::BinaryQuantization), } } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, error = "std::convert::Infallible", name = "build_inner"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -435,11 +466,11 @@ pub struct CreateCollection { /// Configuration for vectors #[prost(message, optional, tag = "10")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.vectors_config)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.vectors_config)" + ) )] pub vectors_config: ::core::option::Option, /// Number of replicas of each shard that network tries to maintain, default = 1 @@ -457,11 +488,11 @@ pub struct CreateCollection { /// Quantization configuration of vector #[prost(message, optional, tag = "14")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.quantization_config)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.quantization_config)" + ) )] pub quantization_config: ::core::option::Option, /// Sharding method @@ -473,6 +504,7 @@ pub struct CreateCollection { #[builder(default, setter(into, strip_option))] pub sparse_vectors_config: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -510,6 +542,7 @@ pub struct UpdateCollection { #[builder(default, setter(into, strip_option))] pub sparse_vectors_config: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteCollection { @@ -520,6 +553,7 @@ pub struct DeleteCollection { #[prost(uint64, optional, tag = "2")] pub timeout: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionOperationResponse { @@ -530,6 +564,7 @@ pub struct CollectionOperationResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionParams { @@ -558,6 +593,7 @@ pub struct CollectionParams { #[prost(message, optional, tag = "10")] pub sparse_vectors_config: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionParamsDiff { @@ -574,6 +610,7 @@ pub struct CollectionParamsDiff { #[prost(uint32, optional, tag = "4")] pub read_fan_out_factor: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionConfig { @@ -593,6 +630,7 @@ pub struct CollectionConfig { #[prost(message, optional, tag = "5")] pub quantization_config: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TextIndexParams { @@ -609,6 +647,7 @@ pub struct TextIndexParams { #[prost(uint64, optional, tag = "4")] pub max_token_len: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntegerIndexParams { @@ -619,12 +658,14 @@ pub struct IntegerIndexParams { #[prost(bool, tag = "2")] pub range: bool, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadIndexParams { #[prost(oneof = "payload_index_params::IndexParams", tags = "1, 2")] pub index_params: ::core::option::Option, } + /// Nested message and enum types in `PayloadIndexParams`. pub mod payload_index_params { #[allow(clippy::derive_partial_eq_without_eq)] @@ -638,6 +679,7 @@ pub mod payload_index_params { IntegerIndexParams(super::IntegerIndexParams), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadSchemaInfo { @@ -651,6 +693,7 @@ pub struct PayloadSchemaInfo { #[prost(uint64, optional, tag = "3")] pub points: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionInfo { @@ -672,7 +715,7 @@ pub struct CollectionInfo { /// Collection data types #[prost(map = "string, message", tag = "8")] pub payload_schema: - ::std::collections::HashMap<::prost::alloc::string::String, PayloadSchemaInfo>, + ::std::collections::HashMap<::prost::alloc::string::String, PayloadSchemaInfo>, /// Approximate number of points in the collection #[prost(uint64, optional, tag = "9")] pub points_count: ::core::option::Option, @@ -680,6 +723,7 @@ pub struct CollectionInfo { #[prost(uint64, optional, tag = "10")] pub indexed_vectors_count: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangeAliases { @@ -690,12 +734,14 @@ pub struct ChangeAliases { #[prost(uint64, optional, tag = "2")] pub timeout: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `AliasOperations`. pub mod alias_operations { #[allow(clippy::derive_partial_eq_without_eq)] @@ -709,6 +755,7 @@ pub mod alias_operations { DeleteAlias(super::DeleteAlias), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAlias { @@ -719,6 +766,7 @@ pub struct CreateAlias { #[prost(string, tag = "2")] pub alias_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RenameAlias { @@ -729,6 +777,7 @@ pub struct RenameAlias { #[prost(string, tag = "2")] pub new_alias_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteAlias { @@ -736,9 +785,11 @@ pub struct DeleteAlias { #[prost(string, tag = "1")] pub alias_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAliasesRequest {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListCollectionAliasesRequest { @@ -746,6 +797,7 @@ 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 { @@ -756,6 +808,7 @@ pub struct AliasDescription { #[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 { @@ -765,6 +818,7 @@ pub struct ListAliasesResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionClusterInfoRequest { @@ -772,12 +826,14 @@ 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, } + /// Nested message and enum types in `ShardKey`. pub mod shard_key { #[allow(clippy::derive_partial_eq_without_eq)] @@ -791,6 +847,7 @@ pub mod shard_key { Number(u64), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LocalShardInfo { @@ -807,6 +864,7 @@ pub struct LocalShardInfo { #[prost(message, optional, tag = "4")] pub shard_key: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RemoteShardInfo { @@ -823,6 +881,7 @@ pub struct RemoteShardInfo { #[prost(message, optional, tag = "4")] pub shard_key: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ShardTransferInfo { @@ -837,6 +896,7 @@ pub struct ShardTransferInfo { #[prost(bool, tag = "4")] pub sync: bool, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CollectionClusterInfoResponse { @@ -856,6 +916,7 @@ pub struct CollectionClusterInfoResponse { #[prost(message, repeated, tag = "5")] pub shard_transfers: ::prost::alloc::vec::Vec, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MoveShard { @@ -869,6 +930,7 @@ pub struct MoveShard { #[prost(enumeration = "ShardTransferMethod", optional, tag = "4")] pub method: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AbortShardTransfer { @@ -880,6 +942,7 @@ pub struct AbortShardTransfer { #[prost(uint64, tag = "3")] pub to_peer_id: u64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RestartTransfer { @@ -893,6 +956,7 @@ pub struct RestartTransfer { #[prost(enumeration = "ShardTransferMethod", tag = "4")] pub method: i32, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Replica { @@ -901,6 +965,7 @@ pub struct Replica { #[prost(uint64, tag = "2")] pub peer_id: u64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateShardKey { @@ -917,6 +982,7 @@ pub struct CreateShardKey { #[prost(uint64, repeated, tag = "4")] pub placement: ::prost::alloc::vec::Vec, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteShardKey { @@ -924,6 +990,7 @@ pub struct DeleteShardKey { #[prost(message, optional, tag = "1")] pub shard_key: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateCollectionClusterSetupRequest { @@ -934,11 +1001,12 @@ pub struct UpdateCollectionClusterSetupRequest { #[prost(uint64, optional, tag = "6")] pub timeout: ::core::option::Option, #[prost( - oneof = "update_collection_cluster_setup_request::Operation", - tags = "2, 3, 4, 5, 7, 8, 9" + oneof = "update_collection_cluster_setup_request::Operation", + tags = "2, 3, 4, 5, 7, 8, 9" )] pub operation: ::core::option::Option, } + /// Nested message and enum types in `UpdateCollectionClusterSetupRequest`. pub mod update_collection_cluster_setup_request { #[allow(clippy::derive_partial_eq_without_eq)] @@ -960,12 +1028,14 @@ pub mod update_collection_cluster_setup_request { RestartTransfer(super::RestartTransfer), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateCollectionClusterSetupResponse { #[prost(bool, tag = "1")] pub result: bool, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateShardKeyRequest { @@ -979,6 +1049,7 @@ pub struct CreateShardKeyRequest { #[prost(uint64, optional, tag = "3")] pub timeout: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteShardKeyRequest { @@ -992,18 +1063,21 @@ pub struct DeleteShardKeyRequest { #[prost(uint64, optional, tag = "3")] pub timeout: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateShardKeyResponse { #[prost(bool, tag = "1")] pub result: bool, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteShardKeyResponse { #[prost(bool, tag = "1")] pub result: bool, } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Datatype { @@ -1011,6 +1085,7 @@ pub enum Datatype { Float32 = 1, Uint8 = 2, } + impl Datatype { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1033,6 +1108,7 @@ impl Datatype { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Distance { @@ -1042,6 +1118,7 @@ pub enum Distance { Dot = 3, Manhattan = 4, } + impl Distance { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1068,6 +1145,7 @@ impl Distance { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CollectionStatus { @@ -1081,6 +1159,7 @@ pub enum CollectionStatus { /// Optimization is pending Grey = 4, } + impl CollectionStatus { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1107,6 +1186,7 @@ impl CollectionStatus { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum PayloadSchemaType { @@ -1119,6 +1199,7 @@ pub enum PayloadSchemaType { Bool = 6, Datetime = 7, } + impl PayloadSchemaType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1151,12 +1232,14 @@ impl PayloadSchemaType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum QuantizationType { UnknownQuantization = 0, Int8 = 1, } + impl QuantizationType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1177,6 +1260,7 @@ impl QuantizationType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CompressionRatio { @@ -1186,6 +1270,7 @@ pub enum CompressionRatio { X32 = 3, X64 = 4, } + impl CompressionRatio { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1212,6 +1297,7 @@ impl CompressionRatio { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ShardingMethod { @@ -1220,6 +1306,7 @@ pub enum ShardingMethod { /// Shard by user-defined key Custom = 1, } + impl ShardingMethod { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1240,6 +1327,7 @@ impl ShardingMethod { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum TokenizerType { @@ -1249,6 +1337,7 @@ pub enum TokenizerType { Word = 3, Multilingual = 4, } + impl TokenizerType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1275,6 +1364,7 @@ impl TokenizerType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ReplicaState { @@ -1293,6 +1383,7 @@ pub enum ReplicaState { /// Shard is undergoing recovered by an external node; Normally rejects updates, accepts updates if force is true Recovery = 6, } + impl ReplicaState { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1323,6 +1414,7 @@ impl ReplicaState { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ShardTransferMethod { @@ -1333,6 +1425,7 @@ pub enum ShardTransferMethod { /// Resolve WAL delta between peers and transfer the difference WalDelta = 2, } + impl ShardTransferMethod { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -1355,32 +1448,37 @@ impl ShardTransferMethod { } } } + /// Generated client implementations. pub mod collections_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; use tonic::codegen::*; + #[derive(Debug, Clone)] pub struct CollectionsClient { inner: tonic::client::Grpc, } + impl CollectionsClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, + where + D: TryInto, + D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } + impl CollectionsClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -1394,16 +1492,16 @@ pub mod collections_client { inner: T, interceptor: F, ) -> CollectionsClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response=http::Response< + >::ResponseBody, + >, >, - >, - >>::Error: + >>::Error: Into + Send + Sync, { CollectionsClient::new(InterceptedService::new(inner, interceptor)) @@ -1713,10 +1811,13 @@ pub mod collections_client { } } } + /// Generated server implementations. pub mod collections_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with CollectionsServer. #[async_trait] pub trait Collections: Send + Sync + 'static { @@ -1802,6 +1903,7 @@ pub mod collections_server { request: tonic::Request, ) -> std::result::Result, tonic::Status>; } + #[derive(Debug)] pub struct CollectionsServer { inner: _Inner, @@ -1810,7 +1912,9 @@ pub mod collections_server { max_decoding_message_size: Option, max_encoding_message_size: Option, } + struct _Inner(Arc); + impl CollectionsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) @@ -1826,8 +1930,8 @@ pub mod collections_server { } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, + where + F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } @@ -1860,11 +1964,12 @@ pub mod collections_server { self } } + impl tonic::codegen::Service> for CollectionsServer - where - T: Collections, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + where + T: Collections, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -1882,7 +1987,7 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct GetSvc(pub Arc); impl - tonic::server::UnaryService for GetSvc + tonic::server::UnaryService for GetSvc { type Response = super::GetCollectionInfoResponse; type Future = BoxFuture, tonic::Status>; @@ -2118,8 +2223,8 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct ListCollectionAliasesSvc(pub Arc); impl - tonic::server::UnaryService - for ListCollectionAliasesSvc + tonic::server::UnaryService + for ListCollectionAliasesSvc { type Response = super::ListAliasesResponse; type Future = BoxFuture, tonic::Status>; @@ -2201,8 +2306,8 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct CollectionClusterInfoSvc(pub Arc); impl - tonic::server::UnaryService - for CollectionClusterInfoSvc + tonic::server::UnaryService + for CollectionClusterInfoSvc { type Response = super::CollectionClusterInfoResponse; type Future = BoxFuture, tonic::Status>; @@ -2244,7 +2349,7 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct CollectionExistsSvc(pub Arc); impl tonic::server::UnaryService - for CollectionExistsSvc + for CollectionExistsSvc { type Response = super::CollectionExistsResponse; type Future = BoxFuture, tonic::Status>; @@ -2286,8 +2391,8 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct UpdateCollectionClusterSetupSvc(pub Arc); impl - tonic::server::UnaryService - for UpdateCollectionClusterSetupSvc + tonic::server::UnaryService + for UpdateCollectionClusterSetupSvc { type Response = super::UpdateCollectionClusterSetupResponse; type Future = BoxFuture, tonic::Status>; @@ -2330,7 +2435,7 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct CreateShardKeySvc(pub Arc); impl tonic::server::UnaryService - for CreateShardKeySvc + for CreateShardKeySvc { type Response = super::CreateShardKeyResponse; type Future = BoxFuture, tonic::Status>; @@ -2372,7 +2477,7 @@ pub mod collections_server { #[allow(non_camel_case_types)] struct DeleteShardKeySvc(pub Arc); impl tonic::server::UnaryService - for DeleteShardKeySvc + for DeleteShardKeySvc { type Response = super::DeleteShardKeyResponse; type Future = BoxFuture, tonic::Status>; @@ -2421,6 +2526,7 @@ pub mod collections_server { } } } + impl Clone for CollectionsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); @@ -2433,20 +2539,24 @@ pub mod collections_server { } } } + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } + impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } + impl tonic::server::NamedService for CollectionsServer { const NAME: &'static str = "qdrant.Collections"; } } + /// `Struct` represents a structured data value, consisting of fields /// which map to dynamically typed values. In some languages, `Struct` /// might be supported by a native representation. For example, in @@ -2462,6 +2572,7 @@ pub struct Struct { #[prost(map = "string, message", tag = "1")] pub fields: ::std::collections::HashMap<::prost::alloc::string::String, Value>, } + /// `Value` represents a dynamically typed value which can be either /// null, a number, a string, a boolean, a recursive struct value, or a /// list of values. A producer of value is expected to set one of those @@ -2475,6 +2586,7 @@ pub struct Value { #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")] pub kind: ::core::option::Option, } + /// Nested message and enum types in `Value`. pub mod value { /// The kind of value. @@ -2504,6 +2616,7 @@ pub mod value { ListValue(super::ListValue), } } + /// `ListValue` is a wrapper around a repeated field of values. /// /// The JSON representation for `ListValue` is a JSON array. @@ -2514,6 +2627,7 @@ pub struct ListValue { #[prost(message, repeated, tag = "1")] pub values: ::prost::alloc::vec::Vec, } + /// `NullValue` is a singleton enumeration to represent the null value for the /// `Value` type union. /// @@ -2524,6 +2638,7 @@ pub enum NullValue { /// Null value. NullValue = 0, } + impl NullValue { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -2542,6 +2657,7 @@ impl NullValue { } } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WriteOrdering { @@ -2549,12 +2665,14 @@ pub struct WriteOrdering { #[prost(enumeration = "WriteOrderingType", tag = "1")] pub r#type: i32, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReadConsistency { #[prost(oneof = "read_consistency::Value", tags = "1, 2")] pub value: ::core::option::Option, } + /// Nested message and enum types in `ReadConsistency`. pub mod read_consistency { #[allow(clippy::derive_partial_eq_without_eq)] @@ -2568,12 +2686,14 @@ pub mod read_consistency { 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, } + /// Nested message and enum types in `PointId`. pub mod point_id { #[allow(clippy::derive_partial_eq_without_eq)] @@ -2587,12 +2707,14 @@ pub mod point_id { 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, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Vector { @@ -2601,6 +2723,7 @@ pub struct Vector { #[prost(message, optional, tag = "2")] pub indices: ::core::option::Option, } + /// --------------------------------------------- /// ----------------- ShardKeySelector ---------- /// --------------------------------------------- @@ -2611,6 +2734,7 @@ pub struct ShardKeySelector { #[prost(message, repeated, tag = "1")] pub shard_keys: ::prost::alloc::vec::Vec, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2635,6 +2759,7 @@ pub struct UpsertPoints { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePoints { @@ -2654,6 +2779,7 @@ pub struct DeletePoints { #[prost(message, optional, tag = "5")] pub shard_key_selector: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2668,31 +2794,31 @@ pub struct GetPoints { /// Options for specifying which payload to include or not #[prost(message, optional, tag = "4")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_payload)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) )] pub with_payload: ::core::option::Option, /// Options for specifying which vectors to include into response #[prost(message, optional, tag = "5")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_vectors)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) )] pub with_vectors: ::core::option::Option, /// Options for specifying read consistency guarantees #[prost(message, optional, tag = "6")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.read_consistency)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.read_consistency)" + ) )] pub read_consistency: ::core::option::Option, /// Specify in which shards to look for the points, if not specified - look in all shards @@ -2700,6 +2826,7 @@ pub struct GetPoints { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2724,6 +2851,7 @@ pub struct UpdatePointVectors { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointVectors { @@ -2734,6 +2862,7 @@ pub struct PointVectors { #[prost(message, optional, tag = "2")] pub vectors: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2749,11 +2878,11 @@ pub struct DeletePointVectors { /// Affected points #[prost(message, optional, tag = "3")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.points_selector)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.points_selector)" + ) )] pub points_selector: ::core::option::Option, /// List of vector names to delete @@ -2769,6 +2898,7 @@ pub struct DeletePointVectors { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2787,11 +2917,11 @@ pub struct SetPayloadPoints { /// Affected points #[prost(message, optional, tag = "5")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.points_selector)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.points_selector)" + ) )] pub points_selector: ::core::option::Option, /// Write ordering guarantees @@ -2807,6 +2937,7 @@ pub struct SetPayloadPoints { #[builder(default, setter(into, strip_option))] pub key: ::core::option::Option<::prost::alloc::string::String>, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2825,11 +2956,11 @@ pub struct DeletePayloadPoints { /// Affected points #[prost(message, optional, tag = "5")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.points_selector)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.points_selector)" + ) )] pub points_selector: ::core::option::Option, /// Write ordering guarantees @@ -2841,6 +2972,7 @@ pub struct DeletePayloadPoints { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -2856,11 +2988,11 @@ pub struct ClearPayloadPoints { /// Affected points #[prost(message, optional, tag = "3")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.points)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.points)" + ) )] pub points: ::core::option::Option, /// Write ordering guarantees @@ -2872,6 +3004,7 @@ pub struct ClearPayloadPoints { #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateFieldIndexCollection { @@ -2894,6 +3027,7 @@ pub struct CreateFieldIndexCollection { #[prost(message, optional, tag = "6")] pub ordering: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFieldIndexCollection { @@ -2910,6 +3044,7 @@ pub struct DeleteFieldIndexCollection { #[prost(message, optional, tag = "4")] pub ordering: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadIncludeSelector { @@ -2917,6 +3052,7 @@ 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 { @@ -2924,12 +3060,14 @@ 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, } + /// Nested message and enum types in `WithPayloadSelector`. pub mod with_payload_selector { #[allow(clippy::derive_partial_eq_without_eq)] @@ -2944,18 +3082,21 @@ pub mod with_payload_selector { 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, } + /// Nested message and enum types in `Vectors`. pub mod vectors { #[allow(clippy::derive_partial_eq_without_eq)] @@ -2967,6 +3108,7 @@ pub mod vectors { Vectors(super::NamedVectors), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct VectorsSelector { @@ -2974,12 +3116,14 @@ 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, } + /// Nested message and enum types in `WithVectorsSelector`. pub mod with_vectors_selector { #[allow(clippy::derive_partial_eq_without_eq)] @@ -2993,6 +3137,7 @@ pub mod with_vectors_selector { Include(super::VectorsSelector), } } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, error = "std::convert::Infallible", name = "build_inner"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3020,6 +3165,7 @@ pub struct QuantizationSearchParams { #[builder(default, setter(strip_option))] pub oversampling: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, error = "std::convert::Infallible", name = "build_inner"))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3049,6 +3195,7 @@ pub struct SearchParams { #[builder(default, setter(strip_option))] pub indexed_only: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3070,11 +3217,11 @@ pub struct SearchPoints { /// Options for specifying which payload to include or not #[prost(message, optional, tag = "6")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_payload)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) )] pub with_payload: ::core::option::Option, /// Search config @@ -3096,21 +3243,21 @@ pub struct SearchPoints { /// Options for specifying which vectors to include into response #[prost(message, optional, tag = "11")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_vectors)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) )] pub with_vectors: ::core::option::Option, /// Options for specifying read consistency guarantees #[prost(message, optional, tag = "12")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.read_consistency)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.read_consistency)" + ) )] pub read_consistency: ::core::option::Option, /// If set, overrides global timeout setting for this request. Unit is seconds. @@ -3125,6 +3272,7 @@ pub struct SearchPoints { #[builder(default, setter(into, strip_option))] pub sparse_indices: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3138,11 +3286,11 @@ pub struct SearchBatchPoints { /// Options for specifying read consistency guarantees #[prost(message, optional, tag = "3")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.read_consistency)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.read_consistency)" + ) )] pub read_consistency: ::core::option::Option, /// If set, overrides global timeout setting for this request. Unit is seconds. @@ -3150,6 +3298,7 @@ pub struct SearchBatchPoints { #[builder(default, setter(strip_option))] pub timeout: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3161,24 +3310,25 @@ pub struct WithLookup { /// Options for specifying which payload to include (or not) #[prost(message, optional, tag = "2")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_payload)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) )] pub with_payload: ::core::option::Option, /// Options for specifying which vectors to include (or not) #[prost(message, optional, tag = "3")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_vectors)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) )] pub with_vectors: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3200,11 +3350,11 @@ pub struct SearchPointGroups { /// Options for specifying which payload to include or not #[prost(message, optional, tag = "5")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_payload)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) )] pub with_payload: ::core::option::Option, /// Search config @@ -3222,11 +3372,11 @@ pub struct SearchPointGroups { /// Options for specifying which vectors to include into response #[prost(message, optional, tag = "9")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_vectors)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) )] pub with_vectors: ::core::option::Option, /// Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups. @@ -3238,11 +3388,11 @@ pub struct SearchPointGroups { /// Options for specifying read consistency guarantees #[prost(message, optional, tag = "12")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.read_consistency)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.read_consistency)" + ) )] pub read_consistency: ::core::option::Option, /// Options for specifying how to use the group id to lookup points in another collection @@ -3261,12 +3411,14 @@ pub struct SearchPointGroups { #[builder(default, setter(into, strip_option))] pub sparse_indices: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `StartFrom`. pub mod start_from { #[allow(clippy::derive_partial_eq_without_eq)] @@ -3282,6 +3434,7 @@ pub mod start_from { Datetime(::prost::alloc::string::String), } } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3297,14 +3450,15 @@ pub struct OrderBy { /// Start from this value #[prost(message, optional, tag = "3")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.start_from)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.start_from)" + ) )] pub start_from: ::core::option::Option, } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3327,21 +3481,21 @@ pub struct ScrollPoints { /// Options for specifying which payload to include or not #[prost(message, optional, tag = "6")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_payload)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) )] pub with_payload: ::core::option::Option, /// Options for specifying which vectors to include into response #[prost(message, optional, tag = "7")] #[builder( - setter(into, strip_option), - field( - ty = "Option", - build = "convert_option(&self.with_vectors)" - ) + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) )] pub with_vectors: ::core::option::Option, /// Options for specifying read consistency guarantees @@ -3357,6 +3511,9 @@ pub struct ScrollPoints { #[builder(default, setter(into, strip_option))] pub order_by: ::core::option::Option, } + +#[derive(derive_builder::Builder)] +#[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LookupLocation { @@ -3364,11 +3521,16 @@ pub struct LookupLocation { pub collection_name: ::prost::alloc::string::String, /// Which vector to use for search, if not specified - use default vector #[prost(string, optional, tag = "2")] + #[builder(default, setter(into, strip_option))] pub vector_name: ::core::option::Option<::prost::alloc::string::String>, /// Specify in which shards to look for the points, if not specified - look in all shards #[prost(message, optional, tag = "3")] + #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + +#[derive(derive_builder::Builder)] +#[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendPoints { @@ -3383,36 +3545,59 @@ pub struct RecommendPoints { pub negative: ::prost::alloc::vec::Vec, /// Filter conditions - return only those points that satisfy the specified conditions #[prost(message, optional, tag = "4")] + #[builder(default, setter(into, strip_option))] pub filter: ::core::option::Option, /// Max number of result #[prost(uint64, tag = "5")] pub limit: u64, /// Options for specifying which payload to include or not #[prost(message, optional, tag = "7")] + #[builder( + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_payload)" + ) + )] pub with_payload: ::core::option::Option, /// Search config #[prost(message, optional, tag = "8")] + #[builder(default, setter(into, strip_option))] pub params: ::core::option::Option, /// If provided - cut off results with worse scores #[prost(float, optional, tag = "9")] + #[builder(default, setter(strip_option))] pub score_threshold: ::core::option::Option, /// Offset of the result #[prost(uint64, optional, tag = "10")] + #[builder(default, setter(strip_option))] pub offset: ::core::option::Option, /// Define which vector to use for recommendation, if not specified - default vector #[prost(string, optional, tag = "11")] + #[builder(default, setter(into, strip_option))] pub using: ::core::option::Option<::prost::alloc::string::String>, /// Options for specifying which vectors to include into response #[prost(message, optional, tag = "12")] + #[builder( + setter(into, strip_option), + field( + ty = "Option", + build = "convert_option(&self.with_vectors)" + ) + )] pub with_vectors: ::core::option::Option, + /// Name of the collection to use for points lookup, if not specified - use current collection #[prost(message, optional, tag = "13")] + #[builder(default, setter(into, strip_option))] pub lookup_from: ::core::option::Option, /// Options for specifying read consistency guarantees #[prost(message, optional, tag = "14")] + #[builder(default, setter(into, strip_option))] pub read_consistency: ::core::option::Option, /// How to use the example vectors to find the results #[prost(enumeration = "RecommendStrategy", optional, tag = "16")] + #[builder(default, setter(into, strip_option))] pub strategy: ::core::option::Option, /// Look for vectors closest to those #[prost(message, repeated, tag = "17")] @@ -3422,11 +3607,14 @@ pub struct RecommendPoints { pub negative_vectors: ::prost::alloc::vec::Vec, /// If set, overrides global timeout setting for this request. Unit is seconds. #[prost(uint64, optional, tag = "19")] + #[builder(default, setter(strip_option))] pub timeout: ::core::option::Option, /// Specify in which shards to look for the points, if not specified - look in all shards #[prost(message, optional, tag = "20")] + #[builder(default, setter(into, strip_option))] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendBatchPoints { @@ -3442,6 +3630,7 @@ pub struct RecommendBatchPoints { #[prost(uint64, optional, tag = "4")] pub timeout: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendPointGroups { @@ -3506,12 +3695,14 @@ pub struct RecommendPointGroups { #[prost(message, optional, tag = "21")] pub shard_key_selector: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `TargetVector`. pub mod target_vector { #[allow(clippy::derive_partial_eq_without_eq)] @@ -3521,12 +3712,14 @@ pub mod target_vector { 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, } + /// Nested message and enum types in `VectorExample`. pub mod vector_example { #[allow(clippy::derive_partial_eq_without_eq)] @@ -3538,6 +3731,7 @@ pub mod vector_example { Vector(super::Vector), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ContextExamplePair { @@ -3546,6 +3740,7 @@ pub struct ContextExamplePair { #[prost(message, optional, tag = "2")] pub negative: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverPoints { @@ -3592,6 +3787,7 @@ pub struct DiscoverPoints { #[prost(message, optional, tag = "14")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverBatchPoints { @@ -3607,6 +3803,7 @@ pub struct DiscoverBatchPoints { #[prost(uint64, optional, tag = "4")] pub timeout: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CountPoints { @@ -3626,15 +3823,17 @@ pub struct CountPoints { #[prost(message, optional, tag = "5")] pub shard_key_selector: ::core::option::Option, } + #[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" + oneof = "points_update_operation::Operation", + tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" )] pub operation: ::core::option::Option, } + /// Nested message and enum types in `PointsUpdateOperation`. pub mod points_update_operation { #[allow(clippy::derive_partial_eq_without_eq)] @@ -3646,6 +3845,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetPayload { @@ -3661,6 +3861,7 @@ pub mod points_update_operation { #[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 { @@ -3673,6 +3874,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "3")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateVectors { @@ -3683,6 +3885,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteVectors { @@ -3696,6 +3899,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "3")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePoints { @@ -3706,6 +3910,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClearPayload { @@ -3716,6 +3921,7 @@ pub mod points_update_operation { #[prost(message, optional, tag = "2")] pub shard_key_selector: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Operation { @@ -3741,6 +3947,7 @@ pub mod points_update_operation { ClearPayload(ClearPayload), } } + #[derive(derive_builder::Builder)] #[builder(build_fn(private, name = "build_inner"), custom_constructor)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -3760,6 +3967,7 @@ pub struct UpdateBatchPoints { #[builder(default, setter(into, strip_option))] pub ordering: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointsOperationResponse { @@ -3769,6 +3977,7 @@ pub struct PointsOperationResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateResult { @@ -3779,6 +3988,7 @@ pub struct UpdateResult { #[prost(enumeration = "UpdateStatus", tag = "2")] pub status: i32, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScoredPoint { @@ -3801,12 +4011,14 @@ pub struct ScoredPoint { #[prost(message, optional, tag = "7")] pub shard_key: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `GroupId`. pub mod group_id { #[allow(clippy::derive_partial_eq_without_eq)] @@ -3823,6 +4035,7 @@ pub mod group_id { StringValue(::prost::alloc::string::String), } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointGroup { @@ -3836,6 +4049,7 @@ pub struct PointGroup { #[prost(message, optional, tag = "3")] pub lookup: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GroupsResult { @@ -3843,6 +4057,7 @@ pub struct GroupsResult { #[prost(message, repeated, tag = "1")] pub groups: ::prost::alloc::vec::Vec, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchResponse { @@ -3852,12 +4067,14 @@ pub struct SearchResponse { #[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, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchBatchResponse { @@ -3867,6 +4084,7 @@ pub struct SearchBatchResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SearchGroupsResponse { @@ -3876,6 +4094,7 @@ pub struct SearchGroupsResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CountResponse { @@ -3885,6 +4104,7 @@ pub struct CountResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScrollResponse { @@ -3897,12 +4117,14 @@ pub struct ScrollResponse { #[prost(double, tag = "3")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CountResult { #[prost(uint64, tag = "1")] pub count: u64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RetrievedPoint { @@ -3916,6 +4138,7 @@ pub struct RetrievedPoint { #[prost(message, optional, tag = "5")] pub shard_key: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetResponse { @@ -3925,6 +4148,7 @@ pub struct GetResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendResponse { @@ -3934,6 +4158,7 @@ pub struct RecommendResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendBatchResponse { @@ -3943,6 +4168,7 @@ pub struct RecommendBatchResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverResponse { @@ -3952,6 +4178,7 @@ pub struct DiscoverResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DiscoverBatchResponse { @@ -3961,6 +4188,7 @@ pub struct DiscoverBatchResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RecommendGroupsResponse { @@ -3970,6 +4198,7 @@ pub struct RecommendGroupsResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateBatchResponse { @@ -3979,6 +4208,7 @@ pub struct UpdateBatchResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Filter { @@ -3995,6 +4225,7 @@ pub struct Filter { #[prost(message, optional, tag = "4")] pub min_should: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MinShould { @@ -4003,12 +4234,14 @@ pub struct MinShould { #[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, } + /// Nested message and enum types in `Condition`. pub mod condition { #[allow(clippy::derive_partial_eq_without_eq)] @@ -4028,24 +4261,28 @@ pub mod condition { 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, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NestedCondition { @@ -4056,6 +4293,7 @@ pub struct NestedCondition { #[prost(message, optional, tag = "2")] pub filter: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FieldCondition { @@ -4083,12 +4321,14 @@ pub struct FieldCondition { #[prost(message, optional, tag = "8")] pub datetime_range: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `Match`. pub mod r#match { #[allow(clippy::derive_partial_eq_without_eq)] @@ -4120,18 +4360,21 @@ pub mod r#match { 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, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Range { @@ -4144,6 +4387,7 @@ pub struct Range { #[prost(double, optional, tag = "4")] pub lte: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DatetimeRange { @@ -4156,6 +4400,7 @@ pub struct DatetimeRange { #[prost(message, optional, tag = "4")] pub lte: ::core::option::Option<::prost_types::Timestamp>, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoBoundingBox { @@ -4166,6 +4411,7 @@ pub struct GeoBoundingBox { #[prost(message, optional, tag = "2")] pub bottom_right: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoRadius { @@ -4176,6 +4422,7 @@ pub struct GeoRadius { #[prost(float, tag = "2")] pub radius: f32, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoLineString { @@ -4183,6 +4430,7 @@ pub struct GeoLineString { #[prost(message, repeated, tag = "1")] pub points: ::prost::alloc::vec::Vec, } + /// For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points. /// Additionally, the first and last points of each GeoLineString must be the same. #[allow(clippy::derive_partial_eq_without_eq)] @@ -4195,6 +4443,7 @@ pub struct GeoPolygon { #[prost(message, repeated, tag = "2")] pub interiors: ::prost::alloc::vec::Vec, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValuesCount { @@ -4207,12 +4456,14 @@ pub struct ValuesCount { #[prost(uint64, optional, tag = "4")] pub lte: ::core::option::Option, } + #[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, } + /// Nested message and enum types in `PointsSelector`. pub mod points_selector { #[allow(clippy::derive_partial_eq_without_eq)] @@ -4224,12 +4475,14 @@ pub mod points_selector { 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, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PointStruct { @@ -4240,6 +4493,7 @@ pub struct PointStruct { #[prost(message, optional, tag = "4")] pub vectors: ::core::option::Option, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GeoPoint { @@ -4248,6 +4502,7 @@ pub struct GeoPoint { #[prost(double, tag = "2")] pub lat: f64, } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum WriteOrderingType { @@ -4258,6 +4513,7 @@ pub enum WriteOrderingType { /// Write operations go through the permanent leader, consistent, but may be unavailable if leader is down Strong = 2, } + impl WriteOrderingType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4280,6 +4536,7 @@ impl WriteOrderingType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ReadConsistencyType { @@ -4290,6 +4547,7 @@ pub enum ReadConsistencyType { /// Send requests to half + 1 nodes, return points which are present on all of them Quorum = 2, } + impl ReadConsistencyType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4312,6 +4570,7 @@ impl ReadConsistencyType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum FieldType { @@ -4323,6 +4582,7 @@ pub enum FieldType { Bool = 5, Datetime = 6, } + impl FieldType { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4353,12 +4613,14 @@ impl FieldType { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Direction { Asc = 0, Desc = 1, } + impl Direction { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4379,6 +4641,7 @@ impl Direction { } } } + /// How to use positive and negative vectors to find the results, default is `AverageVector`: #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -4391,6 +4654,7 @@ pub enum RecommendStrategy { /// If the `max_neg_score` is chosen then it is squared and negated. BestScore = 1, } + impl RecommendStrategy { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4411,6 +4675,7 @@ impl RecommendStrategy { } } } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum UpdateStatus { @@ -4422,6 +4687,7 @@ pub enum UpdateStatus { /// Internal: update is rejected due to an outdated clock ClockRejected = 3, } + impl UpdateStatus { /// String value of the enum field names used in the ProtoBuf definition. /// @@ -4446,32 +4712,37 @@ impl UpdateStatus { } } } + /// Generated client implementations. pub mod points_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; use tonic::codegen::*; + #[derive(Debug, Clone)] pub struct PointsClient { inner: tonic::client::Grpc, } + impl PointsClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, + where + D: TryInto, + D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } + impl PointsClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -4485,16 +4756,16 @@ pub mod points_client { inner: T, interceptor: F, ) -> PointsClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response=http::Response< + >::ResponseBody, + >, >, - >, - >>::Error: + >>::Error: Into + Send + Sync, { PointsClient::new(InterceptedService::new(inner, interceptor)) @@ -4980,10 +5251,13 @@ pub mod points_client { } } } + /// Generated server implementations. pub mod points_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with PointsServer. #[async_trait] pub trait Points: Send + Sync + 'static { @@ -5134,6 +5408,7 @@ pub mod points_server { request: tonic::Request, ) -> std::result::Result, tonic::Status>; } + #[derive(Debug)] pub struct PointsServer { inner: _Inner, @@ -5142,7 +5417,9 @@ pub mod points_server { max_decoding_message_size: Option, max_encoding_message_size: Option, } + struct _Inner(Arc); + impl PointsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) @@ -5158,8 +5435,8 @@ pub mod points_server { } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, + where + F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } @@ -5192,11 +5469,12 @@ pub mod points_server { self } } + impl tonic::codegen::Service> for PointsServer - where - T: Points, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + where + T: Points, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -5563,7 +5841,7 @@ pub mod points_server { #[allow(non_camel_case_types)] struct CreateFieldIndexSvc(pub Arc); impl tonic::server::UnaryService - for CreateFieldIndexSvc + for CreateFieldIndexSvc { type Response = super::PointsOperationResponse; type Future = BoxFuture, tonic::Status>; @@ -5605,7 +5883,7 @@ pub mod points_server { #[allow(non_camel_case_types)] struct DeleteFieldIndexSvc(pub Arc); impl tonic::server::UnaryService - for DeleteFieldIndexSvc + for DeleteFieldIndexSvc { type Response = super::PointsOperationResponse; type Future = BoxFuture, tonic::Status>; @@ -6081,6 +6359,7 @@ pub mod points_server { } } } + impl Clone for PointsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); @@ -6093,26 +6372,32 @@ pub mod points_server { } } } + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } + impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } + impl tonic::server::NamedService for PointsServer { const NAME: &'static str = "qdrant.Points"; } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateFullSnapshotRequest {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListFullSnapshotsRequest {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFullSnapshotRequest { @@ -6120,6 +6405,7 @@ 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 { @@ -6127,6 +6413,7 @@ 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 { @@ -6134,6 +6421,7 @@ pub struct ListSnapshotsRequest { #[prost(string, tag = "1")] pub collection_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSnapshotRequest { @@ -6144,6 +6432,7 @@ pub struct DeleteSnapshotRequest { #[prost(string, tag = "2")] pub snapshot_name: ::prost::alloc::string::String, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SnapshotDescription { @@ -6160,6 +6449,7 @@ pub struct SnapshotDescription { #[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 { @@ -6169,6 +6459,7 @@ pub struct CreateSnapshotResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSnapshotsResponse { @@ -6178,6 +6469,7 @@ pub struct ListSnapshotsResponse { #[prost(double, tag = "2")] pub time: f64, } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSnapshotResponse { @@ -6185,32 +6477,37 @@ pub struct DeleteSnapshotResponse { #[prost(double, tag = "1")] pub time: f64, } + /// Generated client implementations. pub mod snapshots_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; use tonic::codegen::*; + #[derive(Debug, Clone)] pub struct SnapshotsClient { inner: tonic::client::Grpc, } + impl SnapshotsClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, + where + D: TryInto, + D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } + impl SnapshotsClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -6224,16 +6521,16 @@ pub mod snapshots_client { inner: T, interceptor: F, ) -> SnapshotsClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response=http::Response< + >::ResponseBody, + >, >, - >, - >>::Error: + >>::Error: Into + Send + Sync, { SnapshotsClient::new(InterceptedService::new(inner, interceptor)) @@ -6391,10 +6688,13 @@ pub mod snapshots_client { } } } + /// Generated server implementations. pub mod snapshots_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with SnapshotsServer. #[async_trait] pub trait Snapshots: Send + Sync + 'static { @@ -6435,6 +6735,7 @@ pub mod snapshots_server { request: tonic::Request, ) -> std::result::Result, tonic::Status>; } + #[derive(Debug)] pub struct SnapshotsServer { inner: _Inner, @@ -6443,7 +6744,9 @@ pub mod snapshots_server { max_decoding_message_size: Option, max_encoding_message_size: Option, } + struct _Inner(Arc); + impl SnapshotsServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) @@ -6459,8 +6762,8 @@ pub mod snapshots_server { } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, + where + F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } @@ -6493,11 +6796,12 @@ pub mod snapshots_server { self } } + impl tonic::codegen::Service> for SnapshotsServer - where - T: Snapshots, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + where + T: Snapshots, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -6631,7 +6935,7 @@ pub mod snapshots_server { #[allow(non_camel_case_types)] struct CreateFullSvc(pub Arc); impl tonic::server::UnaryService - for CreateFullSvc + for CreateFullSvc { type Response = super::CreateSnapshotResponse; type Future = BoxFuture, tonic::Status>; @@ -6711,7 +7015,7 @@ pub mod snapshots_server { #[allow(non_camel_case_types)] struct DeleteFullSvc(pub Arc); impl tonic::server::UnaryService - for DeleteFullSvc + for DeleteFullSvc { type Response = super::DeleteSnapshotResponse; type Future = BoxFuture, tonic::Status>; @@ -6759,6 +7063,7 @@ pub mod snapshots_server { } } } + impl Clone for SnapshotsServer { fn clone(&self) -> Self { let inner = self.inner.clone(); @@ -6771,23 +7076,28 @@ pub mod snapshots_server { } } } + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } + impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } + impl tonic::server::NamedService for SnapshotsServer { const NAME: &'static str = "qdrant.Snapshots"; } } + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HealthCheckRequest {} + #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HealthCheckReply { @@ -6798,32 +7108,37 @@ pub struct HealthCheckReply { #[prost(string, optional, tag = "3")] pub commit: ::core::option::Option<::prost::alloc::string::String>, } + /// Generated client implementations. pub mod qdrant_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::http::Uri; use tonic::codegen::*; + #[derive(Debug, Clone)] pub struct QdrantClient { inner: tonic::client::Grpc, } + impl QdrantClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, + where + D: TryInto, + D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } + impl QdrantClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -6837,16 +7152,16 @@ pub mod qdrant_client { inner: T, interceptor: F, ) -> QdrantClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response=http::Response< + >::ResponseBody, + >, >, - >, - >>::Error: + >>::Error: Into + Send + Sync, { QdrantClient::new(InterceptedService::new(inner, interceptor)) @@ -6901,10 +7216,13 @@ pub mod qdrant_client { } } } + /// Generated server implementations. pub mod qdrant_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with QdrantServer. #[async_trait] pub trait Qdrant: Send + Sync + 'static { @@ -6913,6 +7231,7 @@ pub mod qdrant_server { request: tonic::Request, ) -> std::result::Result, tonic::Status>; } + #[derive(Debug)] pub struct QdrantServer { inner: _Inner, @@ -6921,7 +7240,9 @@ pub mod qdrant_server { max_decoding_message_size: Option, max_encoding_message_size: Option, } + struct _Inner(Arc); + impl QdrantServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) @@ -6937,8 +7258,8 @@ pub mod qdrant_server { } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService - where - F: tonic::service::Interceptor, + where + F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } @@ -6971,11 +7292,12 @@ pub mod qdrant_server { self } } + impl tonic::codegen::Service> for QdrantServer - where - T: Qdrant, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + where + T: Qdrant, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -7039,6 +7361,7 @@ pub mod qdrant_server { } } } + impl Clone for QdrantServer { fn clone(&self) -> Self { let inner = self.inner.clone(); @@ -7051,16 +7374,19 @@ pub mod qdrant_server { } } } + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } + impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } + impl tonic::server::NamedService for QdrantServer { const NAME: &'static str = "qdrant.Qdrant"; } @@ -7099,9 +7425,9 @@ macro_rules! builder_type_conversions { /// Helper function to convert from &Option to Option if U: From is satisfied. fn convert_option(input: &Option) -> Option -where - U: From, - T: Clone, + where + U: From, + T: Clone, { let input = input.as_ref()?; Some(input.clone().into()) @@ -7132,6 +7458,8 @@ builder_type_conversions!(DeletePointVectors, DeletePointVectorsBuilder); builder_type_conversions!(UpdatePointVectors, UpdatePointVectorsBuilder); builder_type_conversions!(ScrollPoints, ScrollPointsBuilder); builder_type_conversions!(OrderBy, OrderByBuilder); +builder_type_conversions!(RecommendPoints, RecommendPointsBuilder); +builder_type_conversions!(LookupLocation, LookupLocationBuilder); use std::collections::HashMap; @@ -7320,3 +7648,31 @@ impl OrderByBuilder { builder } } + +impl RecommendPointsBuilder { + pub fn new( + collection_name: impl Into, + positive: impl Into>, + negative: impl Into>, + positive_vectors: impl Into>, + negative_vectors: impl Into>, + limit: u64, + ) -> Self { + let mut builder = Self::create_empty(); + builder.collection_name = Some(collection_name.into()); + builder.positive = Some(positive.into()); + builder.negative = Some(negative.into()); + builder.positive_vectors = Some(positive_vectors.into()); + builder.negative_vectors = Some(negative_vectors.into()); + builder.limit = Some(limit); + builder + } +} + +impl LookupLocationBuilder { + pub fn new(collection_name: impl Into) -> Self { + let mut builder = Self::create_empty(); + builder.collection_name = Some(collection_name.into()); + builder + } +} diff --git a/tests/builder_coverage.rs b/tests/builder_coverage.rs index 48bbc56..593c26b 100644 --- a/tests/builder_coverage.rs +++ b/tests/builder_coverage.rs @@ -1,8 +1,9 @@ use qdrant_client::prelude::Distance; use qdrant_client::qdrant::{ BinaryQuantizationBuilder, ClearPayloadPointsBuilder, DeletePayloadPointsBuilder, - DeletePointVectorsBuilder, GetPointsBuilder, OrderByBuilder, ProductQuantizationBuilder, - QuantizationType, ScalarQuantizationBuilder, ScrollPointsBuilder, SearchBatchPointsBuilder, + DeletePointVectorsBuilder, GetPointsBuilder, LookupLocationBuilder, OrderByBuilder, + ProductQuantizationBuilder, QuantizationType, RecommendPointsBuilder, + ScalarQuantizationBuilder, ScrollPointsBuilder, SearchBatchPointsBuilder, SearchPointGroupsBuilder, SearchPointsBuilder, SetPayloadPointsBuilder, UpdateBatchPointsBuilder, UpdateCollectionBuilder, UpdatePointVectorsBuilder, VectorParamsBuilder, WithLookupBuilder, @@ -26,18 +27,20 @@ fn builder_coverage() { ScalarQuantizationBuilder::new(QuantizationType::Int8).build(); ProductQuantizationBuilder::new(1).build(); BinaryQuantizationBuilder::new(true).build(); - SearchPointsBuilder::new("mycollection", vec![11.; 5], 3).build(); + SearchPointsBuilder::new("mycollection", [11.; 5], 3).build(); UpdateCollectionBuilder::new("mycollection").build(); SetPayloadPointsBuilder::new("mycollection", HashMap::default()).build(); - UpdateBatchPointsBuilder::new("mycollection", vec![]).build(); - DeletePayloadPointsBuilder::new("mycollection", vec![]).build(); + UpdateBatchPointsBuilder::new("mycollection", []).build(); + DeletePayloadPointsBuilder::new("mycollection", []).build(); ClearPayloadPointsBuilder::new("mycollection").build(); - GetPointsBuilder::new("mycollection", vec![]).build(); - SearchBatchPointsBuilder::new("mycollection", vec![]).build(); - SearchPointGroupsBuilder::new("mycollection", vec![11.; 5], 10, "mygroup", 5).build(); + GetPointsBuilder::new("mycollection", []).build(); + SearchBatchPointsBuilder::new("mycollection", []).build(); + SearchPointGroupsBuilder::new("mycollection", [11.; 5], 10, "mygroup", 5).build(); WithLookupBuilder::new("mycollection").build(); DeletePointVectorsBuilder::new("mycollection").build(); - UpdatePointVectorsBuilder::new("mycollection", vec![]).build(); + UpdatePointVectorsBuilder::new("mycollection", []).build(); ScrollPointsBuilder::new("mycollection").build(); OrderByBuilder::new("key").build(); + RecommendPointsBuilder::new("", [], [], [], [], 10).build(); + LookupLocationBuilder::new("mycollection").build(); } diff --git a/tests/protos.rs b/tests/protos.rs index a955f96..e84cb1a 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -360,6 +360,28 @@ fn configure_builder(builder: Builder) -> Builder { "OrderBy.start_from", builder_custom_into!(start_from::Value, self.start_from), ), + // RecommendPoints + ("RecommendPoints.filter", DEFAULT_OPTION_INTO), + ( + "RecommendPoints.with_payload", + builder_custom_into!(with_payload_selector::SelectorOptions, self.with_payload), + ), + ("RecommendPoints.params", DEFAULT_OPTION_INTO), + ("RecommendPoints.score_threshold", DEFAULT_OPTION), + ("RecommendPoints.offset", DEFAULT_OPTION), + ("RecommendPoints.using", DEFAULT_OPTION_INTO), + ( + "RecommendPoints.with_vectors", + builder_custom_into!(with_vectors_selector::SelectorOptions, self.with_vectors), + ), + ("RecommendPoints.lookup_from", DEFAULT_OPTION_INTO), + ("RecommendPoints.read_consistency", DEFAULT_OPTION_INTO), + ("RecommendPoints.strategy", DEFAULT_OPTION_INTO), + ("RecommendPoints.timeout", DEFAULT_OPTION), + ("RecommendPoints.shard_key_selector", DEFAULT_OPTION_INTO), + // LookupLocation + ("LookupLocation.vector_name", DEFAULT_OPTION_INTO), + ("LookupLocation.shard_key_selector", DEFAULT_OPTION_INTO), ], builder_derive_options(), ) @@ -434,6 +456,8 @@ fn builder_derive_options() -> &'static [BuildDeriveOptions] { ), ("ScrollPoints", NO_DEFAULT_BUILDER_DERIVE_OPTIONS, true), ("OrderBy", NO_DEFAULT_BUILDER_DERIVE_OPTIONS, true), + ("RecommendPoints", NO_DEFAULT_BUILDER_DERIVE_OPTIONS, true), + ("LookupLocation", NO_DEFAULT_BUILDER_DERIVE_OPTIONS, true), ] } diff --git a/tests/protos_append/builder_ext.rs b/tests/protos_append/builder_ext.rs index 19ff730..a0c3adf 100644 --- a/tests/protos_append/builder_ext.rs +++ b/tests/protos_append/builder_ext.rs @@ -185,3 +185,31 @@ impl OrderByBuilder { builder } } + +impl RecommendPointsBuilder { + pub fn new( + collection_name: impl Into, + positive: impl Into>, + negative: impl Into>, + positive_vectors: impl Into>, + negative_vectors: impl Into>, + limit: u64, + ) -> Self { + let mut builder = Self::create_empty(); + builder.collection_name = Some(collection_name.into()); + builder.positive = Some(positive.into()); + builder.negative = Some(negative.into()); + builder.positive_vectors = Some(positive_vectors.into()); + builder.negative_vectors = Some(negative_vectors.into()); + builder.limit = Some(limit); + builder + } +} + +impl LookupLocationBuilder { + pub fn new(collection_name: impl Into) -> Self { + let mut builder = Self::create_empty(); + builder.collection_name = Some(collection_name.into()); + builder + } +}