#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Hello {
#[prost(string, tag = "1")]
pub node_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub auth_tag: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub min_protocol_version: u32,
#[prost(uint32, tag = "4")]
pub max_protocol_version: u32,
#[prost(uint64, tag = "5")]
pub capabilities: u64,
#[prost(bytes = "vec", tag = "6")]
pub challenge: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HelloAuth {
#[prost(bytes = "vec", tag = "1")]
pub auth_tag: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplicateOp {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub timestamp_ms: u64,
#[prost(string, tag = "4")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub seq: u64,
#[prost(uint64, tag = "6")]
pub boot_id: u64,
#[prost(uint64, tag = "7")]
pub expires_at_ms: u64,
#[prost(bool, tag = "8")]
pub is_tombstone: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ForwardedPut {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub timestamp_ms: u64,
#[prost(string, tag = "4")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub seq: u64,
#[prost(uint64, tag = "6")]
pub boot_id: u64,
#[prost(uint64, tag = "7")]
pub expires_at_ms: u64,
#[prost(bool, tag = "8")]
pub is_tombstone: bool,
#[prost(enumeration = "Priority", tag = "9")]
pub priority: i32,
#[prost(uint32, tag = "10")]
pub hops: u32,
#[prost(uint64, tag = "11")]
pub req_id: u64,
#[prost(bytes = "vec", optional, tag = "12")]
pub write_concern: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ForwardedGet {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub req_id: u64,
#[prost(enumeration = "Priority", tag = "3")]
pub priority: i32,
#[prost(uint32, tag = "4")]
pub hops: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetResponse {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(bool, tag = "2")]
pub found: bool,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub timestamp_ms: u64,
#[prost(string, tag = "5")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "6")]
pub expires_at_ms: u64,
#[prost(bool, tag = "7")]
pub is_tombstone: bool,
#[prost(bool, tag = "8")]
pub shed: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncRequest {
#[prost(uint32, repeated, tag = "1")]
pub fragments: ::prost::alloc::vec::Vec<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncResponse {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<SyncEntry>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SyncEntry {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub timestamp_ms: u64,
#[prost(string, tag = "4")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub expires_at_ms: u64,
#[prost(bool, tag = "6")]
pub is_tombstone: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionStart {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint32, tag = "2")]
pub fragment: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplicateBatch {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub batch_seq: u64,
#[prost(uint32, tag = "3")]
pub fragment: u32,
#[prost(message, repeated, tag = "4")]
pub ops: ::prost::alloc::vec::Vec<ReplicateOp>,
#[prost(enumeration = "ReplicationAckLevel", tag = "5")]
pub required_ack_level: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchAck {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub batch_seq: u64,
#[prost(uint32, tag = "3")]
pub fragment: u32,
#[prost(enumeration = "ReplicationAckLevel", tag = "4")]
pub level: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchNack {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub batch_seq: u64,
#[prost(uint32, tag = "3")]
pub fragment: u32,
#[prost(string, tag = "4")]
pub error: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeySummary {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub timestamp_ms: u64,
#[prost(string, tag = "3")]
pub node_id: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub is_tombstone: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReconcileRequest {
#[prost(uint32, tag = "1")]
pub fragment: u32,
#[prost(uint64, tag = "2")]
pub session_id: u64,
#[prost(uint64, tag = "3")]
pub round_id: u64,
#[prost(uint64, tag = "4")]
pub page_seq: u64,
#[prost(string, tag = "5")]
pub after_key: ::prost::alloc::string::String,
#[prost(uint64, tag = "6")]
pub snapshot_revision: u64,
#[prost(uint64, tag = "7")]
pub snapshot_time_ms: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconcileResponse {
#[prost(uint32, tag = "1")]
pub fragment: u32,
#[prost(message, repeated, tag = "2")]
pub summaries: ::prost::alloc::vec::Vec<KeySummary>,
#[prost(uint64, tag = "3")]
pub session_id: u64,
#[prost(uint64, tag = "4")]
pub round_id: u64,
#[prost(uint64, tag = "5")]
pub page_seq: u64,
#[prost(string, tag = "6")]
pub next_after_key: ::prost::alloc::string::String,
#[prost(uint64, tag = "7")]
pub snapshot_revision: u64,
#[prost(uint64, tag = "8")]
pub snapshot_time_ms: u64,
#[prost(bool, tag = "9")]
pub done: bool,
#[prost(bool, tag = "10")]
pub restart: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReconcileFetch {
#[prost(uint32, tag = "1")]
pub fragment: u32,
#[prost(string, repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "3")]
pub session_id: u64,
#[prost(uint64, tag = "4")]
pub round_id: u64,
#[prost(uint64, tag = "5")]
pub chunk_seq: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconcileData {
#[prost(uint32, tag = "1")]
pub fragment: u32,
#[prost(message, repeated, tag = "2")]
pub entries: ::prost::alloc::vec::Vec<SyncEntry>,
#[prost(uint64, tag = "3")]
pub session_id: u64,
#[prost(uint64, tag = "4")]
pub round_id: u64,
#[prost(uint64, tag = "5")]
pub chunk_seq: u64,
#[prost(uint64, tag = "6")]
pub page_seq: u64,
#[prost(bool, tag = "7")]
pub done: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchPut {
#[prost(message, repeated, tag = "1")]
pub puts: ::prost::alloc::vec::Vec<ForwardedPut>,
#[prost(enumeration = "Priority", tag = "2")]
pub priority: i32,
#[prost(uint64, tag = "3")]
pub req_id: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MutationResult {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(enumeration = "MutationStatus", tag = "2")]
pub status: i32,
#[prost(string, tag = "3")]
pub error: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub winner_timestamp_ms: u64,
#[prost(string, tag = "5")]
pub winner_node_id: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub winner_is_tombstone: bool,
#[prost(uint32, tag = "7")]
pub request_index: u32,
#[prost(bytes = "vec", optional, tag = "8")]
pub write_concern: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[non_exhaustive]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WriteConcernPolicy {
#[prost(enumeration = "WriteConcernLevel", tag = "1")]
pub level: i32,
#[prost(uint32, tag = "2")]
pub acknowledgements: u32,
#[prost(uint64, tag = "3")]
pub timeout_ms: u64,
#[prost(bool, tag = "4")]
pub require_other_region: bool,
}
#[non_exhaustive]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WriteConcernResult {
#[prost(enumeration = "WriteConcernStatus", tag = "1")]
pub status: i32,
#[prost(string, tag = "2")]
pub receiving_node: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub replica_count: u32,
#[prost(uint32, tag = "4")]
pub requested_acknowledgements: u32,
#[prost(uint32, tag = "5")]
pub required_acknowledgements: u32,
#[prost(string, repeated, tag = "6")]
pub acknowledged_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "7")]
pub error: ::prost::alloc::string::String,
#[prost(string, optional, tag = "8")]
pub receiving_region: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub outside_region_acknowledged_nodes: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutationResponse {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutationResult>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchGet {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, repeated, tag = "2")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "Priority", tag = "3")]
pub priority: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetResponse {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<batch_get_response::KeyValue>,
}
pub mod batch_get_response {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeyValue {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub found: bool,
#[prost(bytes = "vec", tag = "3")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub timestamp_ms: u64,
#[prost(string, tag = "5")]
pub node_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "6")]
pub expires_at_ms: u64,
#[prost(bool, tag = "7")]
pub is_tombstone: bool,
#[prost(bool, tag = "8")]
pub shed: bool,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Envelope {
#[prost(
oneof = "envelope::Msg",
tags = "1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24"
)]
pub msg: ::core::option::Option<envelope::Msg>,
}
pub mod envelope {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Msg {
#[prost(message, tag = "1")]
Hello(super::Hello),
#[prost(message, tag = "3")]
SyncRequest(super::SyncRequest),
#[prost(message, tag = "4")]
SyncResponse(super::SyncResponse),
#[prost(message, tag = "5")]
ForwardedPut(super::ForwardedPut),
#[prost(message, tag = "6")]
ForwardedGet(super::ForwardedGet),
#[prost(message, tag = "7")]
GetResponse(super::GetResponse),
#[prost(message, tag = "8")]
SessionStart(super::SessionStart),
#[prost(message, tag = "9")]
ReplicateBatch(super::ReplicateBatch),
#[prost(message, tag = "10")]
BatchAck(super::BatchAck),
#[prost(message, tag = "11")]
ReconcileRequest(super::ReconcileRequest),
#[prost(message, tag = "12")]
ReconcileResponse(super::ReconcileResponse),
#[prost(message, tag = "13")]
ReconcileFetch(super::ReconcileFetch),
#[prost(message, tag = "14")]
ReconcileData(super::ReconcileData),
#[prost(message, tag = "15")]
BatchPut(super::BatchPut),
#[prost(message, tag = "16")]
BatchGet(super::BatchGet),
#[prost(message, tag = "17")]
BatchGetResponse(super::BatchGetResponse),
#[prost(message, tag = "18")]
MutationResponse(super::MutationResponse),
#[prost(message, tag = "19")]
BatchNack(super::BatchNack),
#[prost(message, tag = "20")]
HelloAuth(super::HelloAuth),
#[prost(message, tag = "21")]
ScanRequest(super::ScanRequest),
#[prost(message, tag = "22")]
ScanResponse(super::ScanResponse),
#[prost(message, tag = "23")]
QueryPageRequest(super::QueryPageRequest),
#[prost(message, tag = "24")]
QueryPageResponse(super::QueryPageResponse),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScanRequest {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(uint32, tag = "2")]
pub fragment: u32,
#[prost(uint32, tag = "3")]
pub matcher_kind: u32,
#[prost(bytes = "vec", tag = "4")]
pub matcher_arg: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "5")]
pub transform_kind: u32,
#[prost(uint32, tag = "6")]
pub transform_arg: u32,
#[prost(uint32, tag = "7")]
pub limit: u32,
#[prost(uint64, tag = "8")]
pub offset: u64,
#[prost(enumeration = "Priority", tag = "9")]
pub priority: i32,
#[prost(uint32, tag = "10")]
pub hops: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScanResponse {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(message, repeated, tag = "2")]
pub matches: ::prost::alloc::vec::Vec<ScanMatch>,
#[prost(string, tag = "3")]
pub error: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScanMatch {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryPageRequest {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(uint32, tag = "2")]
pub fragment: u32,
#[prost(string, tag = "3")]
pub sql: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub after_key: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub continuation: bool,
#[prost(uint64, tag = "6")]
pub revision: u64,
#[prost(uint64, tag = "7")]
pub snapshot_time_ms: u64,
#[prost(uint64, tag = "8")]
pub incarnation: u64,
#[prost(uint32, tag = "9")]
pub max_rows: u32,
#[prost(uint32, tag = "10")]
pub max_bytes: u32,
#[prost(uint32, tag = "11")]
pub max_visits: u32,
#[prost(bool, tag = "12")]
pub verify_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPageResponse {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(uint32, tag = "2")]
pub fragment: u32,
#[prost(message, repeated, tag = "3")]
pub rows: ::prost::alloc::vec::Vec<QueryPageRow>,
#[prost(string, tag = "4")]
pub next_after_key: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub done: bool,
#[prost(uint64, tag = "6")]
pub revision: u64,
#[prost(uint64, tag = "7")]
pub snapshot_time_ms: u64,
#[prost(uint64, tag = "8")]
pub incarnation: u64,
#[prost(uint32, tag = "9")]
pub visited: u32,
#[prost(uint64, tag = "10")]
pub work_bytes: u64,
#[prost(enumeration = "QueryPageStatus", tag = "11")]
pub status: i32,
#[prost(string, tag = "12")]
pub error: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPageRow {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub cells: ::prost::alloc::vec::Vec<QueryCell>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryCell {
#[prost(oneof = "query_cell::Value", tags = "1, 2, 3, 4")]
pub value: ::core::option::Option<query_cell::Value>,
}
pub mod query_cell {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Value {
#[prost(bool, tag = "1")]
Null(bool),
#[prost(string, tag = "2")]
Text(::prost::alloc::string::String),
#[prost(bytes, tag = "3")]
Bytes(::prost::alloc::vec::Vec<u8>),
#[prost(string, tag = "4")]
Integer(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Priority {
Default = 0,
High = 1,
Background = 2,
}
impl Priority {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Default => "PRIORITY_DEFAULT",
Self::High => "PRIORITY_HIGH",
Self::Background => "PRIORITY_BACKGROUND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRIORITY_DEFAULT" => Some(Self::Default),
"PRIORITY_HIGH" => Some(Self::High),
"PRIORITY_BACKGROUND" => Some(Self::Background),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReplicationAckLevel {
Unknown = 0,
Applied = 1,
StoreCommitted = 2,
StableCommitted = 3,
}
impl ReplicationAckLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "REPLICATION_ACK_LEVEL_UNKNOWN",
Self::Applied => "REPLICATION_ACK_LEVEL_APPLIED",
Self::StoreCommitted => "REPLICATION_ACK_LEVEL_STORE_COMMITTED",
Self::StableCommitted => "REPLICATION_ACK_LEVEL_STABLE_COMMITTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REPLICATION_ACK_LEVEL_UNKNOWN" => Some(Self::Unknown),
"REPLICATION_ACK_LEVEL_APPLIED" => Some(Self::Applied),
"REPLICATION_ACK_LEVEL_STORE_COMMITTED" => Some(Self::StoreCommitted),
"REPLICATION_ACK_LEVEL_STABLE_COMMITTED" => Some(Self::StableCommitted),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MutationStatus {
Unknown = 0,
Applied = 1,
AlreadyPresent = 2,
Superseded = 3,
Expired = 4,
Backpressure = 5,
StorageError = 6,
ActorError = 7,
Unavailable = 8,
}
impl MutationStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "MUTATION_STATUS_UNKNOWN",
Self::Applied => "MUTATION_STATUS_APPLIED",
Self::AlreadyPresent => "MUTATION_STATUS_ALREADY_PRESENT",
Self::Superseded => "MUTATION_STATUS_SUPERSEDED",
Self::Expired => "MUTATION_STATUS_EXPIRED",
Self::Backpressure => "MUTATION_STATUS_BACKPRESSURE",
Self::StorageError => "MUTATION_STATUS_STORAGE_ERROR",
Self::ActorError => "MUTATION_STATUS_ACTOR_ERROR",
Self::Unavailable => "MUTATION_STATUS_UNAVAILABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MUTATION_STATUS_UNKNOWN" => Some(Self::Unknown),
"MUTATION_STATUS_APPLIED" => Some(Self::Applied),
"MUTATION_STATUS_ALREADY_PRESENT" => Some(Self::AlreadyPresent),
"MUTATION_STATUS_SUPERSEDED" => Some(Self::Superseded),
"MUTATION_STATUS_EXPIRED" => Some(Self::Expired),
"MUTATION_STATUS_BACKPRESSURE" => Some(Self::Backpressure),
"MUTATION_STATUS_STORAGE_ERROR" => Some(Self::StorageError),
"MUTATION_STATUS_ACTOR_ERROR" => Some(Self::ActorError),
"MUTATION_STATUS_UNAVAILABLE" => Some(Self::Unavailable),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WriteConcernLevel {
WriteConcernLocal = 0,
WriteConcernCount = 1,
WriteConcernMajority = 2,
}
impl WriteConcernLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::WriteConcernLocal => "WRITE_CONCERN_LOCAL",
Self::WriteConcernCount => "WRITE_CONCERN_COUNT",
Self::WriteConcernMajority => "WRITE_CONCERN_MAJORITY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WRITE_CONCERN_LOCAL" => Some(Self::WriteConcernLocal),
"WRITE_CONCERN_COUNT" => Some(Self::WriteConcernCount),
"WRITE_CONCERN_MAJORITY" => Some(Self::WriteConcernMajority),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WriteConcernStatus {
WriteConcernSatisfied = 0,
WriteConcernTimedOut = 1,
WriteConcernInvalid = 2,
WriteConcernBackpressure = 3,
WriteConcernUnsupported = 4,
}
impl WriteConcernStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::WriteConcernSatisfied => "WRITE_CONCERN_SATISFIED",
Self::WriteConcernTimedOut => "WRITE_CONCERN_TIMED_OUT",
Self::WriteConcernInvalid => "WRITE_CONCERN_INVALID",
Self::WriteConcernBackpressure => "WRITE_CONCERN_BACKPRESSURE",
Self::WriteConcernUnsupported => "WRITE_CONCERN_UNSUPPORTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WRITE_CONCERN_SATISFIED" => Some(Self::WriteConcernSatisfied),
"WRITE_CONCERN_TIMED_OUT" => Some(Self::WriteConcernTimedOut),
"WRITE_CONCERN_INVALID" => Some(Self::WriteConcernInvalid),
"WRITE_CONCERN_BACKPRESSURE" => Some(Self::WriteConcernBackpressure),
"WRITE_CONCERN_UNSUPPORTED" => Some(Self::WriteConcernUnsupported),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QueryPageStatus {
Unknown = 0,
Ok = 1,
Changed = 2,
Backpressure = 3,
Unavailable = 4,
Invalid = 5,
Budget = 6,
}
impl QueryPageStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "QUERY_PAGE_STATUS_UNKNOWN",
Self::Ok => "QUERY_PAGE_STATUS_OK",
Self::Changed => "QUERY_PAGE_STATUS_CHANGED",
Self::Backpressure => "QUERY_PAGE_STATUS_BACKPRESSURE",
Self::Unavailable => "QUERY_PAGE_STATUS_UNAVAILABLE",
Self::Invalid => "QUERY_PAGE_STATUS_INVALID",
Self::Budget => "QUERY_PAGE_STATUS_BUDGET",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUERY_PAGE_STATUS_UNKNOWN" => Some(Self::Unknown),
"QUERY_PAGE_STATUS_OK" => Some(Self::Ok),
"QUERY_PAGE_STATUS_CHANGED" => Some(Self::Changed),
"QUERY_PAGE_STATUS_BACKPRESSURE" => Some(Self::Backpressure),
"QUERY_PAGE_STATUS_UNAVAILABLE" => Some(Self::Unavailable),
"QUERY_PAGE_STATUS_INVALID" => Some(Self::Invalid),
"QUERY_PAGE_STATUS_BUDGET" => Some(Self::Budget),
_ => None,
}
}
}