#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRequest {
#[prost(uint64, tag="1")]
pub block_number: u64,
#[prost(bytes="vec", tag="2")]
pub block_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag="3")]
pub omit_deleted: bool,
#[prost(bytes="vec", tag="4")]
pub key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResponse {
#[prost(bool, tag="3")]
pub block_reached: bool,
#[prost(enumeration="ResponseCode", tag="4")]
pub code: i32,
#[prost(message, optional, tag="5")]
pub value: ::core::option::Option<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAllRequest {
#[prost(uint64, tag="1")]
pub block_number: u64,
#[prost(bytes="vec", tag="2")]
pub block_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag="3")]
pub omit_deleted: bool,
#[prost(bytes="vec", repeated, tag="4")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseEntry {
#[prost(bytes="vec", tag="1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="2")]
pub response: ::core::option::Option<GetResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAllResponse {
#[prost(message, repeated, tag="1")]
pub entries: ::prost::alloc::vec::Vec<ResponseEntry>,
#[prost(bool, tag="2")]
pub block_reached: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
#[prost(bytes="vec", tag="2")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="4")]
pub value: ::core::option::Option<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entries {
#[prost(message, repeated, tag="1")]
pub entries: ::prost::alloc::vec::Vec<Entry>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResponseCode {
Unspecified = 0,
Found = 1,
NotFound = 2,
NotFoundFinalize = 4,
NotFoundBlockNotReached = 5,
}
impl ResponseCode {
pub fn as_str_name(&self) -> &'static str {
match self {
ResponseCode::Unspecified => "RESPONSE_CODE_UNSPECIFIED",
ResponseCode::Found => "RESPONSE_CODE_FOUND",
ResponseCode::NotFound => "RESPONSE_CODE_NOT_FOUND",
ResponseCode::NotFoundFinalize => "RESPONSE_CODE_NOT_FOUND_FINALIZE",
ResponseCode::NotFoundBlockNotReached => "RESPONSE_CODE_NOT_FOUND_BLOCK_NOT_REACHED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESPONSE_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"RESPONSE_CODE_FOUND" => Some(Self::Found),
"RESPONSE_CODE_NOT_FOUND" => Some(Self::NotFound),
"RESPONSE_CODE_NOT_FOUND_FINALIZE" => Some(Self::NotFoundFinalize),
"RESPONSE_CODE_NOT_FOUND_BLOCK_NOT_REACHED" => Some(Self::NotFoundBlockNotReached),
_ => None,
}
}
}