1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct Hello {
5 #[prost(string, tag = "1")]
6 pub node_id: ::prost::alloc::string::String,
7 #[prost(bytes = "vec", tag = "2")]
11 pub auth_tag: ::prost::alloc::vec::Vec<u8>,
12 #[prost(uint32, tag = "3")]
15 pub min_protocol_version: u32,
16 #[prost(uint32, tag = "4")]
17 pub max_protocol_version: u32,
18 #[prost(uint64, tag = "5")]
22 pub capabilities: u64,
23 #[prost(bytes = "vec", tag = "6")]
26 pub challenge: ::prost::alloc::vec::Vec<u8>,
27}
28#[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#[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 #[prost(uint64, tag = "6")]
56 pub boot_id: u64,
57 #[prost(uint64, tag = "7")]
59 pub expires_at_ms: u64,
60 #[prost(bool, tag = "8")]
62 pub is_tombstone: bool,
63 #[prost(uint64, tag = "9")]
64 pub logical_counter: u64,
65}
66#[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 #[prost(uint64, tag = "7")]
84 pub expires_at_ms: u64,
85 #[prost(bool, tag = "8")]
87 pub is_tombstone: bool,
88 #[prost(enumeration = "Priority", tag = "9")]
90 pub priority: i32,
91 #[prost(uint32, tag = "10")]
96 pub hops: u32,
97 #[prost(uint64, tag = "11")]
99 pub req_id: u64,
100 #[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#[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 #[prost(enumeration = "Priority", tag = "3")]
118 pub priority: i32,
119 #[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 #[prost(uint64, tag = "6")]
138 pub expires_at_ms: u64,
139 #[prost(bool, tag = "7")]
141 pub is_tombstone: bool,
142 #[prost(bool, tag = "8")]
145 pub shed: bool,
146 #[prost(uint64, tag = "9")]
147 pub logical_counter: u64,
148}
149#[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#[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 #[prost(uint64, tag = "5")]
174 pub expires_at_ms: u64,
175 #[prost(bool, tag = "6")]
177 pub is_tombstone: bool,
178 #[prost(uint64, tag = "7")]
179 pub logical_counter: u64,
180}
181#[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 #[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 #[prost(enumeration = "ReplicationAckLevel", tag = "4")]
221 pub level: i32,
222}
223#[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#[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 #[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 #[prost(uint64, tag = "2")]
261 pub session_id: u64,
262 #[prost(uint64, tag = "3")]
264 pub round_id: u64,
265 #[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 #[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 #[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 #[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 #[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 #[prost(uint64, tag = "6")]
337 pub page_seq: u64,
338 #[prost(bool, tag = "7")]
339 pub done: bool,
340}
341#[derive(Clone, PartialEq, ::prost::Message)]
343pub struct BatchPut {
344 #[prost(message, repeated, tag = "1")]
345 pub puts: ::prost::alloc::vec::Vec<ForwardedPut>,
346 #[prost(enumeration = "Priority", tag = "2")]
348 pub priority: i32,
349 #[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 #[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 #[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 #[prost(message, repeated, tag = "2")]
436 pub results: ::prost::alloc::vec::Vec<batch_get_response::KeyValue>,
437}
438pub 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 #[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}
472pub mod envelope {
474 #[derive(Clone, PartialEq, ::prost::Oneof)]
475 pub enum Msg {
476 #[prost(message, tag = "1")]
477 Hello(super::Hello),
478 #[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#[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 #[prost(uint32, tag = "3")]
536 pub matcher_kind: u32,
537 #[prost(bytes = "vec", tag = "4")]
539 pub matcher_arg: ::prost::alloc::vec::Vec<u8>,
540 #[prost(uint32, tag = "5")]
542 pub transform_kind: u32,
543 #[prost(uint32, tag = "6")]
545 pub transform_arg: u32,
546 #[prost(uint32, tag = "7")]
550 pub limit: u32,
551 #[prost(uint64, tag = "8")]
553 pub offset: u64,
554 #[prost(enumeration = "Priority", tag = "9")]
556 pub priority: i32,
557 #[prost(uint32, tag = "10")]
559 pub hops: u32,
560}
561#[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 #[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 #[prost(bytes = "vec", tag = "2")]
580 pub value: ::prost::alloc::vec::Vec<u8>,
581}
582#[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}
650pub 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 #[prost(string, tag = "4")]
662 Integer(::prost::alloc::string::String),
663 }
664}
665#[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 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 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 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 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#[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 UnknownOutcome = 9,
745}
746impl MutationStatus {
747 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 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 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 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 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 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 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 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}