cipherstash_grpc/generated/
stash.grpc.v1.documents.rs

1#[derive(Clone, PartialEq, ::prost::Message)]
2pub struct Document {
3    #[prost(bytes="vec", tag="1")]
4    pub id: ::prost::alloc::vec::Vec<u8>,
5    #[prost(bytes="vec", tag="2")]
6    pub source: ::prost::alloc::vec::Vec<u8>,
7}
8///
9/// A term represents an indexed term value
10/// and a posting link that relates to the source
11/// document it indexes.
12/// 
13/// Term and bits should be a oneof, but protobuf does not
14/// support repeated fields within a oneof. Wrapping these
15/// fields within another message as a oneof and adding that as a repeated
16/// field would work, but would be a breaking change.
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct Term {
19    #[prost(bytes="vec", repeated, tag="1")]
20    pub term: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
21    #[prost(bytes="vec", tag="2")]
22    pub link: ::prost::alloc::vec::Vec<u8>,
23    #[prost(uint32, repeated, tag="3")]
24    pub bits: ::prost::alloc::vec::Vec<u32>,
25}
26///
27/// A vector represents a set of ciphertext terms
28/// generated for the document by the Index (indexId)
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct Vector {
31    #[prost(bytes="vec", tag="1")]
32    pub index_id: ::prost::alloc::vec::Vec<u8>,
33    #[prost(message, repeated, tag="2")]
34    pub terms: ::prost::alloc::vec::Vec<Term>,
35}
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct PutRequest {
38    #[prost(bytes="vec", tag="1")]
39    pub collection_id: ::prost::alloc::vec::Vec<u8>,
40    #[prost(message, optional, tag="2")]
41    pub source: ::core::option::Option<Document>,
42    #[prost(message, repeated, tag="3")]
43    pub vectors: ::prost::alloc::vec::Vec<Vector>,
44    #[prost(uint32, tag="4")]
45    pub first_schema_version: u32,
46    #[prost(uint32, tag="5")]
47    pub last_schema_version: u32,
48}
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct PutReply {
51    #[prost(enumeration="put_reply::PutError", tag="2048")]
52    pub error: i32,
53}
54/// Nested message and enum types in `PutReply`.
55pub mod put_reply {
56    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
57    #[repr(i32)]
58    pub enum PutError {
59        NoError = 0,
60        ErrUnknownSchemaVersion = 1,
61        ErrIncompleteSchemaVersionCoverage = 3,
62    }
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct StreamingPutBegin {
66    #[prost(bytes="vec", tag="1")]
67    pub collection_id: ::prost::alloc::vec::Vec<u8>,
68    #[prost(uint32, tag="2")]
69    pub first_schema_version: u32,
70    #[prost(uint32, tag="3")]
71    pub last_schema_version: u32,
72}
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct StreamingPutDocument {
75    #[prost(message, optional, tag="2")]
76    pub source: ::core::option::Option<Document>,
77    #[prost(message, repeated, tag="3")]
78    pub vectors: ::prost::alloc::vec::Vec<Vector>,
79}
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct StreamingPutRequest {
82    #[prost(oneof="streaming_put_request::Payload", tags="1, 2")]
83    pub payload: ::core::option::Option<streaming_put_request::Payload>,
84}
85/// Nested message and enum types in `StreamingPutRequest`.
86pub mod streaming_put_request {
87    #[derive(Clone, PartialEq, ::prost::Oneof)]
88    pub enum Payload {
89        #[prost(message, tag="1")]
90        Begin(super::StreamingPutBegin),
91        #[prost(message, tag="2")]
92        Document(super::StreamingPutDocument),
93    }
94}
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct StreamingPutReply {
97    #[prost(uint32, tag="1")]
98    pub num_inserted: u32,
99    #[prost(enumeration="streaming_put_reply::StreamingPutError", tag="2048")]
100    pub error: i32,
101}
102/// Nested message and enum types in `StreamingPutReply`.
103pub mod streaming_put_reply {
104    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
105    #[repr(i32)]
106    pub enum StreamingPutError {
107        NoError = 0,
108        ErrUnknownSchemaVersion = 1,
109        ErrIncompleteSchemaVersionCoverage = 3,
110    }
111}
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct GetRequest {
114    #[prost(bytes="vec", tag="1")]
115    pub collection_id: ::prost::alloc::vec::Vec<u8>,
116    #[prost(bytes="vec", tag="2")]
117    pub id: ::prost::alloc::vec::Vec<u8>,
118}
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct GetReply {
121    #[prost(message, optional, tag="1")]
122    pub source: ::core::option::Option<Document>,
123}
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct GetAllRequest {
126    #[prost(bytes="vec", tag="1")]
127    pub collection_id: ::prost::alloc::vec::Vec<u8>,
128    #[prost(bytes="vec", repeated, tag="2")]
129    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct GetAllReply {
133    #[prost(message, repeated, tag="1")]
134    pub documents: ::prost::alloc::vec::Vec<Document>,
135}
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct DeleteRequest {
138    #[prost(bytes="vec", tag="1")]
139    pub collection_id: ::prost::alloc::vec::Vec<u8>,
140    #[prost(bytes="vec", tag="2")]
141    pub id: ::prost::alloc::vec::Vec<u8>,
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct DeleteReply {
145}
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct MigrateRequest {
148    #[prost(enumeration="migrate_request::MigrateRequestType", tag="1")]
149    pub r#type: i32,
150    /// Used when type == Record
151    #[prost(message, optional, tag="2")]
152    pub record: ::core::option::Option<Document>,
153    #[prost(message, repeated, tag="3")]
154    pub vectors: ::prost::alloc::vec::Vec<Vector>,
155    /// Used when type == Init
156    #[prost(bytes="vec", tag="16")]
157    pub collection_id: ::prost::alloc::vec::Vec<u8>,
158    #[prost(uint32, tag="17")]
159    pub first_schema_version: u32,
160    #[prost(uint32, tag="18")]
161    pub last_schema_version: u32,
162}
163/// Nested message and enum types in `MigrateRequest`.
164pub mod migrate_request {
165    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
166    #[repr(i32)]
167    pub enum MigrateRequestType {
168        Invalid = 0,
169        Init = 1,
170        Record = 2,
171        Barrier = 3,
172    }
173}
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct MigrateReply {
176    #[prost(enumeration="migrate_reply::MigrateReplyType", tag="1")]
177    pub r#type: i32,
178    /// Used when type == Record
179    #[prost(message, optional, tag="2")]
180    pub record: ::core::option::Option<Document>,
181    #[prost(enumeration="migrate_reply::MigrateError", tag="2048")]
182    pub error: i32,
183}
184/// Nested message and enum types in `MigrateReply`.
185pub mod migrate_reply {
186    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
187    #[repr(i32)]
188    pub enum MigrateReplyType {
189        Invalid = 0,
190        Done = 1,
191        Record = 2,
192        Barrier = 3,
193        Error = 16,
194    }
195    /// Used when type == Error
196    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
197    #[repr(i32)]
198    pub enum MigrateError {
199        NoError = 0,
200        ErrUnknownSchemaVersion = 1,
201        ErrIncompleteSchemaVersionCoverage = 3,
202    }
203}