#[allow(non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
#[repr(i32)]
pub enum ResponseCode {
RESPONSE_CODE_UNSPECIFIED = 0i32,
RESPONSE_CODE_FOUND = 1i32,
RESPONSE_CODE_NOT_FOUND = 2i32,
RESPONSE_CODE_NOT_FOUND_FINALIZE = 4i32,
}
impl ResponseCode {
#[allow(non_upper_case_globals)]
pub const Unspecified: Self = Self::RESPONSE_CODE_UNSPECIFIED;
#[allow(non_upper_case_globals)]
pub const Found: Self = Self::RESPONSE_CODE_FOUND;
#[allow(non_upper_case_globals)]
pub const NotFound: Self = Self::RESPONSE_CODE_NOT_FOUND;
#[allow(non_upper_case_globals)]
pub const NotFoundFinalize: Self = Self::RESPONSE_CODE_NOT_FOUND_FINALIZE;
}
impl ::core::default::Default for ResponseCode {
fn default() -> Self {
Self::RESPONSE_CODE_UNSPECIFIED
}
}
impl ::buffa::Enumeration for ResponseCode {
fn from_i32(value: i32) -> ::core::option::Option<Self> {
match value {
0i32 => ::core::option::Option::Some(Self::RESPONSE_CODE_UNSPECIFIED),
1i32 => ::core::option::Option::Some(Self::RESPONSE_CODE_FOUND),
2i32 => ::core::option::Option::Some(Self::RESPONSE_CODE_NOT_FOUND),
4i32 => ::core::option::Option::Some(Self::RESPONSE_CODE_NOT_FOUND_FINALIZE),
_ => ::core::option::Option::None,
}
}
fn to_i32(&self) -> i32 {
*self as i32
}
fn proto_name(&self) -> &'static str {
match self {
Self::RESPONSE_CODE_UNSPECIFIED => "RESPONSE_CODE_UNSPECIFIED",
Self::RESPONSE_CODE_FOUND => "RESPONSE_CODE_FOUND",
Self::RESPONSE_CODE_NOT_FOUND => "RESPONSE_CODE_NOT_FOUND",
Self::RESPONSE_CODE_NOT_FOUND_FINALIZE => "RESPONSE_CODE_NOT_FOUND_FINALIZE",
}
}
fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
match name {
"RESPONSE_CODE_UNSPECIFIED" => {
::core::option::Option::Some(Self::RESPONSE_CODE_UNSPECIFIED)
}
"RESPONSE_CODE_FOUND" => {
::core::option::Option::Some(Self::RESPONSE_CODE_FOUND)
}
"RESPONSE_CODE_NOT_FOUND" => {
::core::option::Option::Some(Self::RESPONSE_CODE_NOT_FOUND)
}
"RESPONSE_CODE_NOT_FOUND_FINALIZE" => {
::core::option::Option::Some(Self::RESPONSE_CODE_NOT_FOUND_FINALIZE)
}
_ => ::core::option::Option::None,
}
}
fn values() -> &'static [Self] {
&[
Self::RESPONSE_CODE_UNSPECIFIED,
Self::RESPONSE_CODE_FOUND,
Self::RESPONSE_CODE_NOT_FOUND,
Self::RESPONSE_CODE_NOT_FOUND_FINALIZE,
]
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Key {
pub bytes: ::buffa::alloc::vec::Vec<u8>,
}
impl ::core::fmt::Debug for Key {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Key").field("bytes", &self.bytes).finish()
}
}
impl Key {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Key";
}
::buffa::impl_default_instance!(Key);
impl ::buffa::MessageName for Key {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "Key";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.Key";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Key";
}
impl ::buffa::Message for Key {
#[allow(clippy::let_and_return)]
fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
if !self.bytes.is_empty() {
size += 1u64 + ::buffa::types::bytes_encoded_len(&self.bytes) as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
_cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
if !self.bytes.is_empty() {
::buffa::types::put_shared_bytes_field(1u32, &self.bytes, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::types::merge_bytes(&mut self.bytes, buf)?;
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.bytes.clear();
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Keys {
pub keys: ::buffa::alloc::vec::Vec<Key>,
}
impl ::core::fmt::Debug for Keys {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Keys").field("keys", &self.keys).finish()
}
}
impl Keys {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Keys";
}
::buffa::impl_default_instance!(Keys);
impl ::buffa::MessageName for Keys {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "Keys";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.Keys";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Keys";
}
impl ::buffa::Message for Keys {
#[allow(clippy::let_and_return)]
fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
for v in &self.keys {
let __slot = __cache.reserve();
let inner_size = v.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
__cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
for v in &self.keys {
::buffa::types::put_len_delimited_header(
1u32,
u64::from(__cache.consume_next()),
buf,
);
v.write_to(__cache, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
let mut elem = ::core::default::Default::default();
ctx.register_element_memory(
::buffa::__private::element_footprint(&elem),
)?;
::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
self.keys.push(elem);
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.keys.clear();
}
}
#[derive(Clone, PartialEq, Default)]
pub struct Entry {
pub key: ::buffa::MessageField<Key, ::buffa::Inline<Key>>,
pub value: ::buffa::MessageField<
::buffa_types::google::protobuf::Any,
::buffa::Inline<::buffa_types::google::protobuf::Any>,
>,
}
impl ::core::fmt::Debug for Entry {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("Entry")
.field("key", &self.key)
.field("value", &self.value)
.finish()
}
}
impl Entry {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Entry";
}
::buffa::impl_default_instance!(Entry);
impl ::buffa::MessageName for Entry {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "Entry";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.Entry";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.Entry";
}
impl ::buffa::Message for Entry {
#[allow(clippy::let_and_return)]
fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
if self.key.is_set() {
let __slot = __cache.reserve();
let inner_size = self.key.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
if self.value.is_set() {
let __slot = __cache.reserve();
let inner_size = self.value.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
__cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
if self.key.is_set() {
::buffa::types::put_len_delimited_header(
2u32,
u64::from(__cache.consume_next()),
buf,
);
self.key.write_to(__cache, buf);
}
if self.value.is_set() {
::buffa::types::put_len_delimited_header(
4u32,
u64::from(__cache.consume_next()),
buf,
);
self.value.write_to(__cache, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::Message::merge_length_delimited(
self.key.get_or_insert_default(),
buf,
ctx,
)?;
}
4u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::Message::merge_length_delimited(
self.value.get_or_insert_default(),
buf,
ctx,
)?;
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.key = ::buffa::MessageField::none();
self.value = ::buffa::MessageField::none();
}
}
#[derive(Clone, PartialEq, Default)]
pub struct SinkEntries {
pub entries: ::buffa::alloc::vec::Vec<Entry>,
pub if_not_exist: bool,
}
impl ::core::fmt::Debug for SinkEntries {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("SinkEntries")
.field("entries", &self.entries)
.field("if_not_exist", &self.if_not_exist)
.finish()
}
}
impl SinkEntries {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.SinkEntries";
}
::buffa::impl_default_instance!(SinkEntries);
impl ::buffa::MessageName for SinkEntries {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "SinkEntries";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.SinkEntries";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.SinkEntries";
}
impl ::buffa::Message for SinkEntries {
#[allow(clippy::let_and_return)]
fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
for v in &self.entries {
let __slot = __cache.reserve();
let inner_size = v.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
if self.if_not_exist {
size += 1u64 + ::buffa::types::BOOL_ENCODED_LEN as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
__cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
for v in &self.entries {
::buffa::types::put_len_delimited_header(
1u32,
u64::from(__cache.consume_next()),
buf,
);
v.write_to(__cache, buf);
}
if self.if_not_exist {
::buffa::types::put_bool_field(2u32, self.if_not_exist, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
let mut elem = ::core::default::Default::default();
ctx.register_element_memory(
::buffa::__private::element_footprint(&elem),
)?;
::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
self.entries.push(elem);
}
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.if_not_exist = ::buffa::types::decode_bool(buf)?;
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.entries.clear();
self.if_not_exist = false;
}
}
#[derive(Clone, PartialEq, Default)]
pub struct QueriedEntry {
pub code: ::buffa::EnumValue<ResponseCode>,
pub entry: ::buffa::MessageField<Entry, ::buffa::Inline<Entry>>,
}
impl ::core::fmt::Debug for QueriedEntry {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("QueriedEntry")
.field("code", &self.code)
.field("entry", &self.entry)
.finish()
}
}
impl QueriedEntry {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.QueriedEntry";
}
::buffa::impl_default_instance!(QueriedEntry);
impl ::buffa::MessageName for QueriedEntry {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "QueriedEntry";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.QueriedEntry";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.QueriedEntry";
}
impl ::buffa::Message for QueriedEntry {
#[allow(clippy::let_and_return)]
fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
{
let val = self.code.to_i32();
if val != 0 {
size += 1u64 + ::buffa::types::int32_encoded_len(val) as u64;
}
}
if self.entry.is_set() {
let __slot = __cache.reserve();
let inner_size = self.entry.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
__cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
{
let val = self.code.to_i32();
if val != 0 {
::buffa::types::put_int32_field(1u32, val, buf);
}
}
if self.entry.is_set() {
::buffa::types::put_len_delimited_header(
2u32,
u64::from(__cache.consume_next()),
buf,
);
self.entry.write_to(__cache, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
1u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::Varint,
)?;
self.code = ::buffa::EnumValue::from(::buffa::types::decode_int32(buf)?);
}
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
::buffa::Message::merge_length_delimited(
self.entry.get_or_insert_default(),
buf,
ctx,
)?;
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.code = ::buffa::EnumValue::from(0);
self.entry = ::buffa::MessageField::none();
}
}
#[derive(Clone, PartialEq, Default)]
pub struct QueriedEntries {
pub entries: ::buffa::alloc::vec::Vec<QueriedEntry>,
}
impl ::core::fmt::Debug for QueriedEntries {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("QueriedEntries").field("entries", &self.entries).finish()
}
}
impl QueriedEntries {
pub const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.QueriedEntries";
}
::buffa::impl_default_instance!(QueriedEntries);
impl ::buffa::MessageName for QueriedEntries {
const PACKAGE: &'static str = "sf.substreams.foundational_store.model.v2";
const NAME: &'static str = "QueriedEntries";
const FULL_NAME: &'static str = "sf.substreams.foundational_store.model.v2.QueriedEntries";
const TYPE_URL: &'static str = "type.googleapis.com/sf.substreams.foundational_store.model.v2.QueriedEntries";
}
impl ::buffa::Message for QueriedEntries {
#[allow(clippy::let_and_return)]
fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
let mut size = 0u64;
for v in &self.entries {
let __slot = __cache.reserve();
let inner_size = v.compute_size(__cache);
__cache.set(__slot, inner_size);
size
+= 1u64 + ::buffa::encoding::varint_len(inner_size as u64) as u64
+ inner_size as u64;
}
::buffa::saturate_size(size)
}
fn write_to(
&self,
__cache: &mut ::buffa::SizeCache,
buf: &mut impl ::buffa::EncodeSink,
) {
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
for v in &self.entries {
::buffa::types::put_len_delimited_header(
2u32,
u64::from(__cache.consume_next()),
buf,
);
v.write_to(__cache, buf);
}
}
fn merge_field(
&mut self,
tag: ::buffa::encoding::Tag,
buf: &mut impl ::buffa::bytes::Buf,
ctx: ::buffa::DecodeContext<'_>,
) -> ::core::result::Result<(), ::buffa::DecodeError> {
#[allow(unused_imports)]
use ::buffa::bytes::Buf as _;
#[allow(unused_imports)]
use ::buffa::Enumeration as _;
match tag.field_number() {
2u32 => {
::buffa::encoding::check_wire_type(
tag,
::buffa::encoding::WireType::LengthDelimited,
)?;
let mut elem = ::core::default::Default::default();
ctx.register_element_memory(
::buffa::__private::element_footprint(&elem),
)?;
::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
self.entries.push(elem);
}
_ => {
::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
}
}
::core::result::Result::Ok(())
}
fn clear(&mut self) {
self.entries.clear();
}
}