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}
64#[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 #[prost(uint64, tag = "7")]
82 pub expires_at_ms: u64,
83 #[prost(bool, tag = "8")]
85 pub is_tombstone: bool,
86 #[prost(enumeration = "Priority", tag = "9")]
88 pub priority: i32,
89 #[prost(uint32, tag = "10")]
94 pub hops: u32,
95 #[prost(uint64, tag = "11")]
97 pub req_id: u64,
98 #[prost(bytes = "vec", optional, tag = "12")]
100 pub write_concern: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
101}
102#[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 #[prost(enumeration = "Priority", tag = "3")]
114 pub priority: i32,
115 #[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 #[prost(uint64, tag = "6")]
134 pub expires_at_ms: u64,
135 #[prost(bool, tag = "7")]
137 pub is_tombstone: bool,
138 #[prost(bool, tag = "8")]
141 pub shed: bool,
142}
143#[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#[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 #[prost(uint64, tag = "5")]
168 pub expires_at_ms: u64,
169 #[prost(bool, tag = "6")]
171 pub is_tombstone: bool,
172}
173#[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 #[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 #[prost(enumeration = "ReplicationAckLevel", tag = "4")]
213 pub level: i32,
214}
215#[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#[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 #[prost(uint64, tag = "2")]
248 pub session_id: u64,
249 #[prost(uint64, tag = "3")]
251 pub round_id: u64,
252 #[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 #[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 #[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 #[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 #[prost(uint64, tag = "6")]
319 pub page_seq: u64,
320 #[prost(bool, tag = "7")]
321 pub done: bool,
322}
323#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct BatchPut {
326 #[prost(message, repeated, tag = "1")]
327 pub puts: ::prost::alloc::vec::Vec<ForwardedPut>,
328 #[prost(enumeration = "Priority", tag = "2")]
330 pub priority: i32,
331 #[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 #[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 #[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 #[prost(message, repeated, tag = "2")]
416 pub results: ::prost::alloc::vec::Vec<batch_get_response::KeyValue>,
417}
418pub 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 #[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}
450pub mod envelope {
452 #[derive(Clone, PartialEq, ::prost::Oneof)]
453 pub enum Msg {
454 #[prost(message, tag = "1")]
455 Hello(super::Hello),
456 #[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#[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 #[prost(uint32, tag = "3")]
514 pub matcher_kind: u32,
515 #[prost(bytes = "vec", tag = "4")]
517 pub matcher_arg: ::prost::alloc::vec::Vec<u8>,
518 #[prost(uint32, tag = "5")]
520 pub transform_kind: u32,
521 #[prost(uint32, tag = "6")]
523 pub transform_arg: u32,
524 #[prost(uint32, tag = "7")]
528 pub limit: u32,
529 #[prost(uint64, tag = "8")]
531 pub offset: u64,
532 #[prost(enumeration = "Priority", tag = "9")]
534 pub priority: i32,
535 #[prost(uint32, tag = "10")]
537 pub hops: u32,
538}
539#[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 #[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 #[prost(bytes = "vec", tag = "2")]
558 pub value: ::prost::alloc::vec::Vec<u8>,
559}
560#[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}
628pub 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 #[prost(string, tag = "4")]
640 Integer(::prost::alloc::string::String),
641 }
642}
643#[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 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 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 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 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#[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 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 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 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 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 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 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 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 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}