Skip to main content

actordb_protocol/generated/
meta.rs

1// This file is @generated by prost-build.
2/// Handshake: identifies the connecting node
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct Hello {
5    #[prost(string, tag = "1")]
6    pub node_id: ::prost::alloc::string::String,
7    /// Retained at its original field number for safe protobuf field evolution.
8    /// Since protocol v2 this field must be empty; the challenge-bound proof is
9    /// carried in HelloAuth.
10    #[prost(bytes = "vec", tag = "2")]
11    pub auth_tag: ::prost::alloc::vec::Vec<u8>,
12    /// Inclusive wire-version range understood by this peer. Both are nonzero;
13    /// a connection proceeds only when the ranges overlap.
14    #[prost(uint32, tag = "3")]
15    pub min_protocol_version: u32,
16    #[prost(uint32, tag = "4")]
17    pub max_protocol_version: u32,
18    /// Feature bitset. Required bits are checked before either side installs the
19    /// connection, so mixed binaries fail closed rather than mis-acknowledging
20    /// mutations or replication.
21    #[prost(uint64, tag = "5")]
22    pub capabilities: u64,
23    /// Fresh 256-bit challenge generated independently for every physical
24    /// connection. Both peers' complete Hellos are bound into each HelloAuth.
25    #[prost(bytes = "vec", tag = "6")]
26    pub challenge: ::prost::alloc::vec::Vec<u8>,
27}
28/// Second handshake flight. With a configured cluster secret, auth_tag is an
29/// HMAC-SHA256 over the ordered dialer/listener Hello transcript and the
30/// proving role. Without a secret it is empty, but the flight still makes
31/// handshake completion explicit before either peer publishes the connection.
32#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
33pub struct HelloAuth {
34    #[prost(bytes = "vec", tag = "1")]
35    pub auth_tag: ::prost::alloc::vec::Vec<u8>,
36}
37/// A single replicated write, sent from a fragment's coordinator to the
38/// other replica holders. Delivery is at-least-once; receivers merge with
39/// last-writer-wins on (timestamp_ms, node_id) and do NOT re-forward.
40/// `seq`/`boot_id` are propagation metadata.
41#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
42pub struct ReplicateOp {
43    #[prost(string, tag = "1")]
44    pub key: ::prost::alloc::string::String,
45    #[prost(bytes = "vec", tag = "2")]
46    pub value: ::prost::alloc::vec::Vec<u8>,
47    #[prost(uint64, tag = "3")]
48    pub timestamp_ms: u64,
49    #[prost(string, tag = "4")]
50    pub node_id: ::prost::alloc::string::String,
51    #[prost(uint64, tag = "5")]
52    pub seq: u64,
53    /// Random per process start. Carried as origin metadata; replay safety is
54    /// provided by the value's LWW version rather than transport deduplication.
55    #[prost(uint64, tag = "6")]
56    pub boot_id: u64,
57    /// Optional key expiry (wall-clock ms). 0/absent = no expiry.
58    #[prost(uint64, tag = "7")]
59    pub expires_at_ms: u64,
60    /// True if this is a deletion tombstone.
61    #[prost(bool, tag = "8")]
62    pub is_tombstone: bool,
63    #[prost(uint64, tag = "9")]
64    pub logical_counter: u64,
65}
66/// A client-routed write: "you own this key's fragment — apply it as
67/// coordinator and replicate to the other holders." One network hop.
68#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
69pub struct ForwardedPut {
70    #[prost(string, tag = "1")]
71    pub key: ::prost::alloc::string::String,
72    #[prost(bytes = "vec", tag = "2")]
73    pub value: ::prost::alloc::vec::Vec<u8>,
74    #[prost(uint64, tag = "3")]
75    pub timestamp_ms: u64,
76    #[prost(string, tag = "4")]
77    pub node_id: ::prost::alloc::string::String,
78    #[prost(uint64, tag = "5")]
79    pub seq: u64,
80    #[prost(uint64, tag = "6")]
81    pub boot_id: u64,
82    /// Optional key expiry (wall-clock ms). 0/absent = no expiry.
83    #[prost(uint64, tag = "7")]
84    pub expires_at_ms: u64,
85    /// True if this is a deletion tombstone.
86    #[prost(bool, tag = "8")]
87    pub is_tombstone: bool,
88    /// Phase 7: priority the receiving node should apply this op with.
89    #[prost(enumeration = "Priority", tag = "9")]
90    pub priority: i32,
91    /// Phase 8: re-forward count. A node that receives a ForwardedPut for a
92    /// fragment it no longer serves (stale placement maps during
93    /// migration) re-forwards it to the current owner instead of
94    /// dropping it; hops bounds the chain.
95    #[prost(uint32, tag = "10")]
96    pub hops: u32,
97    /// Correlates the exact apply outcome back to the originating node.
98    #[prost(uint64, tag = "11")]
99    pub req_id: u64,
100    /// Optional encoded WriteConcernPolicy. Absence preserves local acknowledgement.
101    #[prost(bytes = "vec", optional, tag = "12")]
102    pub write_concern: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
103    #[prost(uint64, tag = "13")]
104    pub logical_counter: u64,
105}
106/// A single-key routed read. The origin tries configured holders in order; a
107/// non-serving holder may relay it under a fresh request id while placement
108/// maps converge. GetResponse has no unavailable value, so routing/actor
109/// unavailability produces no false not-found reply and the origin times out.
110#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
111pub struct ForwardedGet {
112    #[prost(string, tag = "1")]
113    pub key: ::prost::alloc::string::String,
114    #[prost(uint64, tag = "2")]
115    pub req_id: u64,
116    /// Phase 7: priority the receiving node should serve this read with.
117    #[prost(enumeration = "Priority", tag = "3")]
118    pub priority: i32,
119    /// Phase 8: re-forward count, as with ForwardedPut. A non-serving node
120    /// relays the read to the current owner and relays the response back.
121    #[prost(uint32, tag = "4")]
122    pub hops: u32,
123}
124#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
125pub struct GetResponse {
126    #[prost(uint64, tag = "1")]
127    pub req_id: u64,
128    #[prost(bool, tag = "2")]
129    pub found: bool,
130    #[prost(bytes = "vec", tag = "3")]
131    pub value: ::prost::alloc::vec::Vec<u8>,
132    #[prost(uint64, tag = "4")]
133    pub timestamp_ms: u64,
134    #[prost(string, tag = "5")]
135    pub node_id: ::prost::alloc::string::String,
136    /// Optional key expiry (wall-clock ms). 0/absent = no expiry.
137    #[prost(uint64, tag = "6")]
138    pub expires_at_ms: u64,
139    /// True if this is a deletion tombstone.
140    #[prost(bool, tag = "7")]
141    pub is_tombstone: bool,
142    /// Phase 7: true if the read was shed due to backpressure (distinct
143    /// from not-found).
144    #[prost(bool, tag = "8")]
145    pub shed: bool,
146    #[prost(uint64, tag = "9")]
147    pub logical_counter: u64,
148}
149/// Retired protocol-v1/v2 full-state frames. They remain generated for source
150/// compatibility, but a protocol-v3 connection closes if either is received.
151#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
152pub struct SyncRequest {
153    #[prost(uint32, repeated, tag = "1")]
154    pub fragments: ::prost::alloc::vec::Vec<u32>,
155}
156/// Retired peer full-state response; see SyncRequest above.
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct SyncResponse {
159    #[prost(message, repeated, tag = "1")]
160    pub entries: ::prost::alloc::vec::Vec<SyncEntry>,
161}
162#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
163pub struct SyncEntry {
164    #[prost(string, tag = "1")]
165    pub key: ::prost::alloc::string::String,
166    #[prost(bytes = "vec", tag = "2")]
167    pub value: ::prost::alloc::vec::Vec<u8>,
168    #[prost(uint64, tag = "3")]
169    pub timestamp_ms: u64,
170    #[prost(string, tag = "4")]
171    pub node_id: ::prost::alloc::string::String,
172    /// Optional key expiry (wall-clock ms). 0/absent = no expiry.
173    #[prost(uint64, tag = "5")]
174    pub expires_at_ms: u64,
175    /// True if this is a deletion tombstone.
176    #[prost(bool, tag = "6")]
177    pub is_tombstone: bool,
178    #[prost(uint64, tag = "7")]
179    pub logical_counter: u64,
180}
181/// Top-level wire envelope, length-delimited on the wire
182/// Phase 5: async sender/receiver replication. The sender batches ops per
183/// (fragment, peer) and ships them on a timer. Tracked batches receive an ACK
184/// reporting the achieved durability after apply and any requested flush attempt,
185/// or a NACK on execution failure; reconciliation batches are untracked.
186/// Session ids distinguish pairings
187/// across reconnects; stale batches (old session) are discarded.
188#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
189pub struct SessionStart {
190    #[prost(uint64, tag = "1")]
191    pub session_id: u64,
192    #[prost(uint32, tag = "2")]
193    pub fragment: u32,
194}
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct ReplicateBatch {
197    #[prost(uint64, tag = "1")]
198    pub session_id: u64,
199    #[prost(uint64, tag = "2")]
200    pub batch_seq: u64,
201    #[prost(uint32, tag = "3")]
202    pub fragment: u32,
203    #[prost(message, repeated, tag = "4")]
204    pub ops: ::prost::alloc::vec::Vec<ReplicateOp>,
205    /// Minimum fence the sender requires before this tracked batch may retire.
206    /// Ignored for untracked reconciliation batches.
207    #[prost(enumeration = "ReplicationAckLevel", tag = "5")]
208    pub required_ack_level: i32,
209}
210#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
211pub struct BatchAck {
212    #[prost(uint64, tag = "1")]
213    pub session_id: u64,
214    #[prost(uint64, tag = "2")]
215    pub batch_seq: u64,
216    #[prost(uint32, tag = "3")]
217    pub fragment: u32,
218    /// Distinguishes volatile in-memory application from a successful flush to
219    /// the receiver's configured KvStore.
220    #[prost(enumeration = "ReplicationAckLevel", tag = "4")]
221    pub level: i32,
222}
223/// A receiver could not account for or persist a batch. The sender retains
224/// and retries the exact idempotent operations instead of treating them as
225/// delivered.
226#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
227pub struct BatchNack {
228    #[prost(uint64, tag = "1")]
229    pub session_id: u64,
230    #[prost(uint64, tag = "2")]
231    pub batch_seq: u64,
232    #[prost(uint32, tag = "3")]
233    pub fragment: u32,
234    #[prost(string, tag = "4")]
235    pub error: ::prost::alloc::string::String,
236}
237/// Incremental anti-entropy: exchange version and content-digest summaries,
238/// then only the divergent keys.
239#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
240pub struct KeySummary {
241    #[prost(string, tag = "1")]
242    pub key: ::prost::alloc::string::String,
243    #[prost(uint64, tag = "2")]
244    pub timestamp_ms: u64,
245    #[prost(string, tag = "3")]
246    pub node_id: ::prost::alloc::string::String,
247    #[prost(bool, tag = "4")]
248    pub is_tombstone: bool,
249    #[prost(uint64, tag = "5")]
250    pub logical_counter: u64,
251    /// Exactly 32 bytes: SHA-256 over canonical payload and optional TTL deadline.
252    #[prost(bytes = "vec", tag = "6")]
253    pub content_digest: ::prost::alloc::vec::Vec<u8>,
254}
255#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
256pub struct ReconcileRequest {
257    #[prost(uint32, tag = "1")]
258    pub fragment: u32,
259    /// Correlates the request to the active SessionStart on this connection.
260    #[prost(uint64, tag = "2")]
261    pub session_id: u64,
262    /// Monotonic within a sender session. Responses from older rounds are stale.
263    #[prost(uint64, tag = "3")]
264    pub round_id: u64,
265    /// V3 byte-bounded summary pagination. Page zero starts a pass; later pages
266    /// echo its cursor, observed revision, and pinned TTL time. Revision drift is
267    /// allowed during the bounded pass and forces a fresh verification pass.
268    #[prost(uint64, tag = "4")]
269    pub page_seq: u64,
270    #[prost(string, tag = "5")]
271    pub after_key: ::prost::alloc::string::String,
272    #[prost(uint64, tag = "6")]
273    pub snapshot_revision: u64,
274    #[prost(uint64, tag = "7")]
275    pub snapshot_time_ms: u64,
276    /// Explicit full-outage recovery authority; absent during ordinary startup.
277    #[prost(bytes = "vec", tag = "8")]
278    pub recovery_epoch: ::prost::alloc::vec::Vec<u8>,
279    #[prost(bytes = "vec", tag = "9")]
280    pub recovery_replica_digest: ::prost::alloc::vec::Vec<u8>,
281}
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct ReconcileResponse {
284    #[prost(uint32, tag = "1")]
285    pub fragment: u32,
286    #[prost(message, repeated, tag = "2")]
287    pub summaries: ::prost::alloc::vec::Vec<KeySummary>,
288    #[prost(uint64, tag = "3")]
289    pub session_id: u64,
290    #[prost(uint64, tag = "4")]
291    pub round_id: u64,
292    /// V3 page correlation and continuation metadata.
293    #[prost(uint64, tag = "5")]
294    pub page_seq: u64,
295    #[prost(string, tag = "6")]
296    pub next_after_key: ::prost::alloc::string::String,
297    #[prost(uint64, tag = "7")]
298    pub snapshot_revision: u64,
299    #[prost(uint64, tag = "8")]
300    pub snapshot_time_ms: u64,
301    #[prost(bool, tag = "9")]
302    pub done: bool,
303    /// The responder could not continue this pass; discard its partial result
304    /// and begin again with a fresh nonzero round id.
305    #[prost(bool, tag = "10")]
306    pub restart: bool,
307}
308#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
309pub struct ReconcileFetch {
310    #[prost(uint32, tag = "1")]
311    pub fragment: u32,
312    #[prost(string, repeated, tag = "2")]
313    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
314    #[prost(uint64, tag = "3")]
315    pub session_id: u64,
316    #[prost(uint64, tag = "4")]
317    pub round_id: u64,
318    /// Identifies the requested page within the round.
319    #[prost(uint64, tag = "5")]
320    pub chunk_seq: u64,
321}
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct ReconcileData {
324    #[prost(uint32, tag = "1")]
325    pub fragment: u32,
326    #[prost(message, repeated, tag = "2")]
327    pub entries: ::prost::alloc::vec::Vec<SyncEntry>,
328    #[prost(uint64, tag = "3")]
329    pub session_id: u64,
330    #[prost(uint64, tag = "4")]
331    pub round_id: u64,
332    #[prost(uint64, tag = "5")]
333    pub chunk_seq: u64,
334    /// V3 page correlation within one bounded fetch chunk. Large value sets are
335    /// streamed across exact-byte-bounded pages.
336    #[prost(uint64, tag = "6")]
337    pub page_seq: u64,
338    #[prost(bool, tag = "7")]
339    pub done: bool,
340}
341/// Phase 6: multi-key fan-out. One message per remote fragment/owner attempt.
342#[derive(Clone, PartialEq, ::prost::Message)]
343pub struct BatchPut {
344    #[prost(message, repeated, tag = "1")]
345    pub puts: ::prost::alloc::vec::Vec<ForwardedPut>,
346    /// Phase 7: priority applied to every put in the batch.
347    #[prost(enumeration = "Priority", tag = "2")]
348    pub priority: i32,
349    /// Correlates one ordered result per `puts` entry.
350    #[prost(uint64, tag = "3")]
351    pub req_id: u64,
352}
353#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
354pub struct MutationResult {
355    #[prost(string, tag = "1")]
356    pub key: ::prost::alloc::string::String,
357    #[prost(enumeration = "MutationStatus", tag = "2")]
358    pub status: i32,
359    #[prost(string, tag = "3")]
360    pub error: ::prost::alloc::string::String,
361    #[prost(uint64, tag = "4")]
362    pub winner_timestamp_ms: u64,
363    #[prost(string, tag = "5")]
364    pub winner_node_id: ::prost::alloc::string::String,
365    #[prost(bool, tag = "6")]
366    pub winner_is_tombstone: bool,
367    #[prost(uint32, tag = "7")]
368    pub request_index: u32,
369    /// Encoded WriteConcernResult, present only when a policy was requested.
370    #[prost(bytes = "vec", optional, tag = "8")]
371    pub write_concern: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
372    #[prost(uint64, tag = "9")]
373    pub winner_logical_counter: u64,
374}
375#[non_exhaustive]
376#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
377pub struct WriteConcernPolicy {
378    #[prost(enumeration = "WriteConcernLevel", tag = "1")]
379    pub level: i32,
380    #[prost(uint32, tag = "2")]
381    pub acknowledgements: u32,
382    #[prost(uint64, tag = "3")]
383    pub timeout_ms: u64,
384    #[prost(bool, tag = "4")]
385    pub require_other_region: bool,
386}
387#[non_exhaustive]
388#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
389pub struct WriteConcernResult {
390    #[prost(enumeration = "WriteConcernStatus", tag = "1")]
391    pub status: i32,
392    #[prost(string, tag = "2")]
393    pub receiving_node: ::prost::alloc::string::String,
394    #[prost(uint32, tag = "3")]
395    pub replica_count: u32,
396    #[prost(uint32, tag = "4")]
397    pub requested_acknowledgements: u32,
398    #[prost(uint32, tag = "5")]
399    pub required_acknowledgements: u32,
400    #[prost(string, repeated, tag = "6")]
401    pub acknowledged_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
402    #[prost(string, tag = "7")]
403    pub error: ::prost::alloc::string::String,
404    #[prost(string, optional, tag = "8")]
405    pub receiving_region: ::core::option::Option<::prost::alloc::string::String>,
406    #[prost(string, repeated, tag = "9")]
407    pub outside_region_acknowledged_nodes: ::prost::alloc::vec::Vec<
408        ::prost::alloc::string::String,
409    >,
410}
411#[derive(Clone, PartialEq, ::prost::Message)]
412pub struct MutationResponse {
413    #[prost(uint64, tag = "1")]
414    pub req_id: u64,
415    #[prost(message, repeated, tag = "2")]
416    pub results: ::prost::alloc::vec::Vec<MutationResult>,
417}
418#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
419pub struct BatchGet {
420    #[prost(uint64, tag = "1")]
421    pub req_id: u64,
422    #[prost(string, repeated, tag = "2")]
423    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
424    /// Phase 7: priority applied to every get in the batch.
425    #[prost(enumeration = "Priority", tag = "3")]
426    pub priority: i32,
427}
428#[derive(Clone, PartialEq, ::prost::Message)]
429pub struct BatchGetResponse {
430    #[prost(uint64, tag = "1")]
431    pub req_id: u64,
432    /// With CAPABILITY_BYTE_BOUNDED_BATCHES, a non-empty request returns either
433    /// an empty unavailable response or a non-empty ordered prefix. The caller
434    /// resumes an omitted suffix under a fresh request id.
435    #[prost(message, repeated, tag = "2")]
436    pub results: ::prost::alloc::vec::Vec<batch_get_response::KeyValue>,
437}
438/// Nested message and enum types in `BatchGetResponse`.
439pub mod batch_get_response {
440    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
441    pub struct KeyValue {
442        #[prost(string, tag = "1")]
443        pub key: ::prost::alloc::string::String,
444        #[prost(bool, tag = "2")]
445        pub found: bool,
446        #[prost(bytes = "vec", tag = "3")]
447        pub value: ::prost::alloc::vec::Vec<u8>,
448        #[prost(uint64, tag = "4")]
449        pub timestamp_ms: u64,
450        #[prost(string, tag = "5")]
451        pub node_id: ::prost::alloc::string::String,
452        #[prost(uint64, tag = "6")]
453        pub expires_at_ms: u64,
454        #[prost(bool, tag = "7")]
455        pub is_tombstone: bool,
456        /// Phase 7: true if the read was shed due to backpressure (distinct
457        /// from not-found).
458        #[prost(bool, tag = "8")]
459        pub shed: bool,
460        #[prost(uint64, tag = "9")]
461        pub logical_counter: u64,
462    }
463}
464#[derive(Clone, PartialEq, ::prost::Message)]
465pub struct Envelope {
466    #[prost(
467        oneof = "envelope::Msg",
468        tags = "1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24"
469    )]
470    pub msg: ::core::option::Option<envelope::Msg>,
471}
472/// Nested message and enum types in `Envelope`.
473pub mod envelope {
474    #[derive(Clone, PartialEq, ::prost::Oneof)]
475    pub enum Msg {
476        #[prost(message, tag = "1")]
477        Hello(super::Hello),
478        /// Phase 5: ReplicateOp (2) retired; batches carry Repeated ReplicateOp.
479        #[prost(message, tag = "3")]
480        SyncRequest(super::SyncRequest),
481        #[prost(message, tag = "4")]
482        SyncResponse(super::SyncResponse),
483        #[prost(message, tag = "5")]
484        ForwardedPut(super::ForwardedPut),
485        #[prost(message, tag = "6")]
486        ForwardedGet(super::ForwardedGet),
487        #[prost(message, tag = "7")]
488        GetResponse(super::GetResponse),
489        #[prost(message, tag = "8")]
490        SessionStart(super::SessionStart),
491        #[prost(message, tag = "9")]
492        ReplicateBatch(super::ReplicateBatch),
493        #[prost(message, tag = "10")]
494        BatchAck(super::BatchAck),
495        #[prost(message, tag = "11")]
496        ReconcileRequest(super::ReconcileRequest),
497        #[prost(message, tag = "12")]
498        ReconcileResponse(super::ReconcileResponse),
499        #[prost(message, tag = "13")]
500        ReconcileFetch(super::ReconcileFetch),
501        #[prost(message, tag = "14")]
502        ReconcileData(super::ReconcileData),
503        #[prost(message, tag = "15")]
504        BatchPut(super::BatchPut),
505        #[prost(message, tag = "16")]
506        BatchGet(super::BatchGet),
507        #[prost(message, tag = "17")]
508        BatchGetResponse(super::BatchGetResponse),
509        #[prost(message, tag = "18")]
510        MutationResponse(super::MutationResponse),
511        #[prost(message, tag = "19")]
512        BatchNack(super::BatchNack),
513        #[prost(message, tag = "20")]
514        HelloAuth(super::HelloAuth),
515        #[prost(message, tag = "21")]
516        ScanRequest(super::ScanRequest),
517        #[prost(message, tag = "22")]
518        ScanResponse(super::ScanResponse),
519        #[prost(message, tag = "23")]
520        QueryPageRequest(super::QueryPageRequest),
521        #[prost(message, tag = "24")]
522        QueryPageResponse(super::QueryPageResponse),
523    }
524}
525/// Distributed scan: coordinator -> fragment holder. Mirrors ForwardedGet:
526/// one holder per fragment, failover across replica_order, hop-bounded
527/// re-forwarding during placement migration. The spec is data, never code.
528#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
529pub struct ScanRequest {
530    #[prost(uint64, tag = "1")]
531    pub req_id: u64,
532    #[prost(uint32, tag = "2")]
533    pub fragment: u32,
534    /// Matcher descriptor: 0=all, 1=key prefix.
535    #[prost(uint32, tag = "3")]
536    pub matcher_kind: u32,
537    /// Matcher argument: prefix bytes when matcher_kind=1.
538    #[prost(bytes = "vec", tag = "4")]
539    pub matcher_arg: ::prost::alloc::vec::Vec<u8>,
540    /// Transform descriptor: 0=identity, 1=key_only, 2=prefix_bytes.
541    #[prost(uint32, tag = "5")]
542    pub transform_kind: u32,
543    /// Transform argument: N when transform_kind=2.
544    #[prost(uint32, tag = "6")]
545    pub transform_arg: u32,
546    /// Per-fragment match bound. 0 = server default. This bound is also the
547    /// wire-size safety: the response is a single envelope, so limit *
548    /// avg value size must stay comfortably under the 16 MiB frame cap.
549    #[prost(uint32, tag = "7")]
550    pub limit: u32,
551    /// Skip-first-N pagination cursor (deterministic key order).
552    #[prost(uint64, tag = "8")]
553    pub offset: u64,
554    /// Always PRIORITY_BACKGROUND for scans.
555    #[prost(enumeration = "Priority", tag = "9")]
556    pub priority: i32,
557    /// Re-forward bound, as with ForwardedGet.
558    #[prost(uint32, tag = "10")]
559    pub hops: u32,
560}
561/// Holder -> coordinator. A single response per request; the per-fragment
562/// limit keeps it under the frame cap.
563#[derive(Clone, PartialEq, ::prost::Message)]
564pub struct ScanResponse {
565    #[prost(uint64, tag = "1")]
566    pub req_id: u64,
567    #[prost(message, repeated, tag = "2")]
568    pub matches: ::prost::alloc::vec::Vec<ScanMatch>,
569    /// Non-empty = this holder could not serve the scan (not serving, bad
570    /// spec, shed). The coordinator fails over to the next replica holder.
571    #[prost(string, tag = "3")]
572    pub error: ::prost::alloc::string::String,
573}
574#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
575pub struct ScanMatch {
576    #[prost(string, tag = "1")]
577    pub key: ::prost::alloc::string::String,
578    /// Transformed value. Empty when the transform is key_only.
579    #[prost(bytes = "vec", tag = "2")]
580    pub value: ::prost::alloc::vec::Vec<u8>,
581}
582/// Bounded declarative query traversal. Continuations pin one holder incarnation,
583/// revision, and TTL observation time. SQL is validated as data, never executed code.
584#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
585pub struct QueryPageRequest {
586    #[prost(uint64, tag = "1")]
587    pub req_id: u64,
588    #[prost(uint32, tag = "2")]
589    pub fragment: u32,
590    #[prost(string, tag = "3")]
591    pub sql: ::prost::alloc::string::String,
592    #[prost(string, tag = "4")]
593    pub after_key: ::prost::alloc::string::String,
594    #[prost(bool, tag = "5")]
595    pub continuation: bool,
596    #[prost(uint64, tag = "6")]
597    pub revision: u64,
598    #[prost(uint64, tag = "7")]
599    pub snapshot_time_ms: u64,
600    #[prost(uint64, tag = "8")]
601    pub incarnation: u64,
602    #[prost(uint32, tag = "9")]
603    pub max_rows: u32,
604    #[prost(uint32, tag = "10")]
605    pub max_bytes: u32,
606    #[prost(uint32, tag = "11")]
607    pub max_visits: u32,
608    #[prost(bool, tag = "12")]
609    pub verify_only: bool,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct QueryPageResponse {
613    #[prost(uint64, tag = "1")]
614    pub req_id: u64,
615    #[prost(uint32, tag = "2")]
616    pub fragment: u32,
617    #[prost(message, repeated, tag = "3")]
618    pub rows: ::prost::alloc::vec::Vec<QueryPageRow>,
619    #[prost(string, tag = "4")]
620    pub next_after_key: ::prost::alloc::string::String,
621    #[prost(bool, tag = "5")]
622    pub done: bool,
623    #[prost(uint64, tag = "6")]
624    pub revision: u64,
625    #[prost(uint64, tag = "7")]
626    pub snapshot_time_ms: u64,
627    #[prost(uint64, tag = "8")]
628    pub incarnation: u64,
629    #[prost(uint32, tag = "9")]
630    pub visited: u32,
631    #[prost(uint64, tag = "10")]
632    pub work_bytes: u64,
633    #[prost(enumeration = "QueryPageStatus", tag = "11")]
634    pub status: i32,
635    #[prost(string, tag = "12")]
636    pub error: ::prost::alloc::string::String,
637}
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct QueryPageRow {
640    #[prost(string, tag = "1")]
641    pub key: ::prost::alloc::string::String,
642    #[prost(message, repeated, tag = "2")]
643    pub cells: ::prost::alloc::vec::Vec<QueryCell>,
644}
645#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
646pub struct QueryCell {
647    #[prost(oneof = "query_cell::Value", tags = "1, 2, 3, 4")]
648    pub value: ::core::option::Option<query_cell::Value>,
649}
650/// Nested message and enum types in `QueryCell`.
651pub mod query_cell {
652    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
653    pub enum Value {
654        #[prost(bool, tag = "1")]
655        Null(bool),
656        #[prost(string, tag = "2")]
657        Text(::prost::alloc::string::String),
658        #[prost(bytes, tag = "3")]
659        Bytes(::prost::alloc::vec::Vec<u8>),
660        /// Canonical base-ten integer; preserves full i128 precision in every SDK.
661        #[prost(string, tag = "4")]
662        Integer(::prost::alloc::string::String),
663    }
664}
665/// Phase 7: operation priority for traffic isolation. Wire values are
666/// stable; PRIORITY_DEFAULT = 0 so an absent/unknown field degrades to
667/// normal priority rather than misrouting.
668#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
669#[repr(i32)]
670pub enum Priority {
671    Default = 0,
672    High = 1,
673    Background = 2,
674}
675impl Priority {
676    /// String value of the enum field names used in the ProtoBuf definition.
677    ///
678    /// The values are not transformed in any way and thus are considered stable
679    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
680    pub fn as_str_name(&self) -> &'static str {
681        match self {
682            Self::Default => "PRIORITY_DEFAULT",
683            Self::High => "PRIORITY_HIGH",
684            Self::Background => "PRIORITY_BACKGROUND",
685        }
686    }
687    /// Creates an enum from field names used in the ProtoBuf definition.
688    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
689        match value {
690            "PRIORITY_DEFAULT" => Some(Self::Default),
691            "PRIORITY_HIGH" => Some(Self::High),
692            "PRIORITY_BACKGROUND" => Some(Self::Background),
693            _ => None,
694        }
695    }
696}
697#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
698#[repr(i32)]
699pub enum ReplicationAckLevel {
700    Unknown = 0,
701    Applied = 1,
702    StoreCommitted = 2,
703    StableCommitted = 3,
704}
705impl ReplicationAckLevel {
706    /// String value of the enum field names used in the ProtoBuf definition.
707    ///
708    /// The values are not transformed in any way and thus are considered stable
709    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
710    pub fn as_str_name(&self) -> &'static str {
711        match self {
712            Self::Unknown => "REPLICATION_ACK_LEVEL_UNKNOWN",
713            Self::Applied => "REPLICATION_ACK_LEVEL_APPLIED",
714            Self::StoreCommitted => "REPLICATION_ACK_LEVEL_STORE_COMMITTED",
715            Self::StableCommitted => "REPLICATION_ACK_LEVEL_STABLE_COMMITTED",
716        }
717    }
718    /// Creates an enum from field names used in the ProtoBuf definition.
719    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
720        match value {
721            "REPLICATION_ACK_LEVEL_UNKNOWN" => Some(Self::Unknown),
722            "REPLICATION_ACK_LEVEL_APPLIED" => Some(Self::Applied),
723            "REPLICATION_ACK_LEVEL_STORE_COMMITTED" => Some(Self::StoreCommitted),
724            "REPLICATION_ACK_LEVEL_STABLE_COMMITTED" => Some(Self::StableCommitted),
725            _ => None,
726        }
727    }
728}
729/// Exact result of one remotely forwarded mutation. Results in a
730/// MutationResponse have the same order and cardinality as the request.
731#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
732#[repr(i32)]
733pub enum MutationStatus {
734    Unknown = 0,
735    Applied = 1,
736    AlreadyPresent = 2,
737    Superseded = 3,
738    Expired = 4,
739    Backpressure = 5,
740    StorageError = 6,
741    ActorError = 7,
742    Unavailable = 8,
743    /// The mutation may have applied; a fresh-version retry is unsafe.
744    UnknownOutcome = 9,
745}
746impl MutationStatus {
747    /// String value of the enum field names used in the ProtoBuf definition.
748    ///
749    /// The values are not transformed in any way and thus are considered stable
750    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
751    pub fn as_str_name(&self) -> &'static str {
752        match self {
753            Self::Unknown => "MUTATION_STATUS_UNKNOWN",
754            Self::Applied => "MUTATION_STATUS_APPLIED",
755            Self::AlreadyPresent => "MUTATION_STATUS_ALREADY_PRESENT",
756            Self::Superseded => "MUTATION_STATUS_SUPERSEDED",
757            Self::Expired => "MUTATION_STATUS_EXPIRED",
758            Self::Backpressure => "MUTATION_STATUS_BACKPRESSURE",
759            Self::StorageError => "MUTATION_STATUS_STORAGE_ERROR",
760            Self::ActorError => "MUTATION_STATUS_ACTOR_ERROR",
761            Self::Unavailable => "MUTATION_STATUS_UNAVAILABLE",
762            Self::UnknownOutcome => "MUTATION_STATUS_UNKNOWN_OUTCOME",
763        }
764    }
765    /// Creates an enum from field names used in the ProtoBuf definition.
766    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
767        match value {
768            "MUTATION_STATUS_UNKNOWN" => Some(Self::Unknown),
769            "MUTATION_STATUS_APPLIED" => Some(Self::Applied),
770            "MUTATION_STATUS_ALREADY_PRESENT" => Some(Self::AlreadyPresent),
771            "MUTATION_STATUS_SUPERSEDED" => Some(Self::Superseded),
772            "MUTATION_STATUS_EXPIRED" => Some(Self::Expired),
773            "MUTATION_STATUS_BACKPRESSURE" => Some(Self::Backpressure),
774            "MUTATION_STATUS_STORAGE_ERROR" => Some(Self::StorageError),
775            "MUTATION_STATUS_ACTOR_ERROR" => Some(Self::ActorError),
776            "MUTATION_STATUS_UNAVAILABLE" => Some(Self::Unavailable),
777            "MUTATION_STATUS_UNKNOWN_OUTCOME" => Some(Self::UnknownOutcome),
778            _ => None,
779        }
780    }
781}
782#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
783#[repr(i32)]
784pub enum WriteConcernLevel {
785    WriteConcernLocal = 0,
786    WriteConcernCount = 1,
787    WriteConcernMajority = 2,
788}
789impl WriteConcernLevel {
790    /// String value of the enum field names used in the ProtoBuf definition.
791    ///
792    /// The values are not transformed in any way and thus are considered stable
793    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
794    pub fn as_str_name(&self) -> &'static str {
795        match self {
796            Self::WriteConcernLocal => "WRITE_CONCERN_LOCAL",
797            Self::WriteConcernCount => "WRITE_CONCERN_COUNT",
798            Self::WriteConcernMajority => "WRITE_CONCERN_MAJORITY",
799        }
800    }
801    /// Creates an enum from field names used in the ProtoBuf definition.
802    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
803        match value {
804            "WRITE_CONCERN_LOCAL" => Some(Self::WriteConcernLocal),
805            "WRITE_CONCERN_COUNT" => Some(Self::WriteConcernCount),
806            "WRITE_CONCERN_MAJORITY" => Some(Self::WriteConcernMajority),
807            _ => None,
808        }
809    }
810}
811#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
812#[repr(i32)]
813pub enum WriteConcernStatus {
814    WriteConcernSatisfied = 0,
815    WriteConcernTimedOut = 1,
816    WriteConcernInvalid = 2,
817    WriteConcernBackpressure = 3,
818    WriteConcernUnsupported = 4,
819}
820impl WriteConcernStatus {
821    /// String value of the enum field names used in the ProtoBuf definition.
822    ///
823    /// The values are not transformed in any way and thus are considered stable
824    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
825    pub fn as_str_name(&self) -> &'static str {
826        match self {
827            Self::WriteConcernSatisfied => "WRITE_CONCERN_SATISFIED",
828            Self::WriteConcernTimedOut => "WRITE_CONCERN_TIMED_OUT",
829            Self::WriteConcernInvalid => "WRITE_CONCERN_INVALID",
830            Self::WriteConcernBackpressure => "WRITE_CONCERN_BACKPRESSURE",
831            Self::WriteConcernUnsupported => "WRITE_CONCERN_UNSUPPORTED",
832        }
833    }
834    /// Creates an enum from field names used in the ProtoBuf definition.
835    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
836        match value {
837            "WRITE_CONCERN_SATISFIED" => Some(Self::WriteConcernSatisfied),
838            "WRITE_CONCERN_TIMED_OUT" => Some(Self::WriteConcernTimedOut),
839            "WRITE_CONCERN_INVALID" => Some(Self::WriteConcernInvalid),
840            "WRITE_CONCERN_BACKPRESSURE" => Some(Self::WriteConcernBackpressure),
841            "WRITE_CONCERN_UNSUPPORTED" => Some(Self::WriteConcernUnsupported),
842            _ => None,
843        }
844    }
845}
846#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
847#[repr(i32)]
848pub enum QueryPageStatus {
849    Unknown = 0,
850    Ok = 1,
851    Changed = 2,
852    Backpressure = 3,
853    Unavailable = 4,
854    Invalid = 5,
855    Budget = 6,
856}
857impl QueryPageStatus {
858    /// String value of the enum field names used in the ProtoBuf definition.
859    ///
860    /// The values are not transformed in any way and thus are considered stable
861    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
862    pub fn as_str_name(&self) -> &'static str {
863        match self {
864            Self::Unknown => "QUERY_PAGE_STATUS_UNKNOWN",
865            Self::Ok => "QUERY_PAGE_STATUS_OK",
866            Self::Changed => "QUERY_PAGE_STATUS_CHANGED",
867            Self::Backpressure => "QUERY_PAGE_STATUS_BACKPRESSURE",
868            Self::Unavailable => "QUERY_PAGE_STATUS_UNAVAILABLE",
869            Self::Invalid => "QUERY_PAGE_STATUS_INVALID",
870            Self::Budget => "QUERY_PAGE_STATUS_BUDGET",
871        }
872    }
873    /// Creates an enum from field names used in the ProtoBuf definition.
874    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
875        match value {
876            "QUERY_PAGE_STATUS_UNKNOWN" => Some(Self::Unknown),
877            "QUERY_PAGE_STATUS_OK" => Some(Self::Ok),
878            "QUERY_PAGE_STATUS_CHANGED" => Some(Self::Changed),
879            "QUERY_PAGE_STATUS_BACKPRESSURE" => Some(Self::Backpressure),
880            "QUERY_PAGE_STATUS_UNAVAILABLE" => Some(Self::Unavailable),
881            "QUERY_PAGE_STATUS_INVALID" => Some(Self::Invalid),
882            "QUERY_PAGE_STATUS_BUDGET" => Some(Self::Budget),
883            _ => None,
884        }
885    }
886}