substreams 0.7.6

Substreams SDK - A streaming data engine for The Graph - by StreamingFast
Documentation
// @generated
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Key {
    #[prost(bytes="vec", tag="1")]
    pub bytes: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Keys {
    #[prost(message, repeated, tag="1")]
    pub keys: ::prost::alloc::vec::Vec<Key>,
}
/// by both consumer and sinker Substreams
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
    #[prost(message, optional, tag="2")]
    pub key: ::core::option::Option<Key>,
    #[prost(message, optional, tag="4")]
    pub value: ::core::option::Option<::prost_types::Any>,
}
/// Use by sinker Substreams
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SinkEntries {
    #[prost(message, repeated, tag="1")]
    pub entries: ::prost::alloc::vec::Vec<Entry>,
    #[prost(bool, tag="2")]
    pub if_not_exist: bool,
}
/// GETTER: Use by consumer Substreams
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueriedEntry {
    #[prost(enumeration="ResponseCode", tag="1")]
    pub code: i32,
    #[prost(message, optional, tag="2")]
    pub entry: ::core::option::Option<Entry>,
}
/// GETTER: Use by consumer Substreams
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueriedEntries {
    #[prost(message, repeated, tag="2")]
    pub entries: ::prost::alloc::vec::Vec<QueriedEntry>,
}
/// Indicates the result of a get operation with detailed status information
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResponseCode {
    /// Default value, should not be used
    Unspecified = 0,
    /// Key exists and value was retrieved successfully
    Found = 1,
    /// Key does not exist at the requested block
    NotFound = 2,
    /// Key was deleted after finality (LIB) -> historical reference
    NotFoundFinalize = 4,
}
impl ResponseCode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    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",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    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),
            _ => None,
        }
    }
}
// @@protoc_insertion_point(module)