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