spyglass_cli/pb/
sf.substreams.v1.rs

1// @generated
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Modules {
5    #[prost(message, repeated, tag="1")]
6    pub modules: ::prost::alloc::vec::Vec<Module>,
7    #[prost(message, repeated, tag="2")]
8    pub binaries: ::prost::alloc::vec::Vec<Binary>,
9}
10/// Binary represents some code compiled to its binary form.
11#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct Binary {
14    #[prost(string, tag="1")]
15    pub r#type: ::prost::alloc::string::String,
16    #[prost(bytes="vec", tag="2")]
17    pub content: ::prost::alloc::vec::Vec<u8>,
18}
19#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct Module {
22    #[prost(string, tag="1")]
23    pub name: ::prost::alloc::string::String,
24    #[prost(uint32, tag="4")]
25    pub binary_index: u32,
26    #[prost(string, tag="5")]
27    pub binary_entrypoint: ::prost::alloc::string::String,
28    #[prost(message, repeated, tag="6")]
29    pub inputs: ::prost::alloc::vec::Vec<module::Input>,
30    #[prost(message, optional, tag="7")]
31    pub output: ::core::option::Option<module::Output>,
32    #[prost(uint64, tag="8")]
33    pub initial_block: u64,
34    #[prost(oneof="module::Kind", tags="2, 3")]
35    pub kind: ::core::option::Option<module::Kind>,
36}
37/// Nested message and enum types in `Module`.
38pub mod module {
39    #[allow(clippy::derive_partial_eq_without_eq)]
40#[derive(Clone, PartialEq, ::prost::Message)]
41    pub struct KindMap {
42        #[prost(string, tag="1")]
43        pub output_type: ::prost::alloc::string::String,
44    }
45    #[allow(clippy::derive_partial_eq_without_eq)]
46#[derive(Clone, PartialEq, ::prost::Message)]
47    pub struct KindStore {
48        /// The `update_policy` determines the functions available to mutate the store
49        /// (like `set()`, `set_if_not_exists()` or `sum()`, etc..) in
50        /// order to ensure that parallel operations are possible and deterministic
51        ///
52        /// Say a store cumulates keys from block 0 to 1M, and a second store
53        /// cumulates keys from block 1M to 2M. When we want to use this
54        /// store as a dependency for a downstream module, we will merge the
55        /// two stores according to this policy.
56        #[prost(enumeration="kind_store::UpdatePolicy", tag="1")]
57        pub update_policy: i32,
58        #[prost(string, tag="2")]
59        pub value_type: ::prost::alloc::string::String,
60    }
61    /// Nested message and enum types in `KindStore`.
62    pub mod kind_store {
63        #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
64        #[repr(i32)]
65        pub enum UpdatePolicy {
66            Unset = 0,
67            /// Provides a store where you can `set()` keys, and the latest key wins
68            Set = 1,
69            /// Provides a store where you can `set_if_not_exists()` keys, and the first key wins
70            SetIfNotExists = 2,
71            /// Provides a store where you can `add_*()` keys, where two stores merge by summing its values.
72            Add = 3,
73            /// Provides a store where you can `min_*()` keys, where two stores merge by leaving the minimum value.
74            Min = 4,
75            /// Provides a store where you can `max_*()` keys, where two stores merge by leaving the maximum value.
76            Max = 5,
77            /// Provides a store where you can `append()` keys, where two stores merge by concatenating the bytes in order.
78            Append = 6,
79        }
80        impl UpdatePolicy {
81            /// String value of the enum field names used in the ProtoBuf definition.
82            ///
83            /// The values are not transformed in any way and thus are considered stable
84            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
85            pub fn as_str_name(&self) -> &'static str {
86                match self {
87                    UpdatePolicy::Unset => "UPDATE_POLICY_UNSET",
88                    UpdatePolicy::Set => "UPDATE_POLICY_SET",
89                    UpdatePolicy::SetIfNotExists => "UPDATE_POLICY_SET_IF_NOT_EXISTS",
90                    UpdatePolicy::Add => "UPDATE_POLICY_ADD",
91                    UpdatePolicy::Min => "UPDATE_POLICY_MIN",
92                    UpdatePolicy::Max => "UPDATE_POLICY_MAX",
93                    UpdatePolicy::Append => "UPDATE_POLICY_APPEND",
94                }
95            }
96            /// Creates an enum from field names used in the ProtoBuf definition.
97            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
98                match value {
99                    "UPDATE_POLICY_UNSET" => Some(Self::Unset),
100                    "UPDATE_POLICY_SET" => Some(Self::Set),
101                    "UPDATE_POLICY_SET_IF_NOT_EXISTS" => Some(Self::SetIfNotExists),
102                    "UPDATE_POLICY_ADD" => Some(Self::Add),
103                    "UPDATE_POLICY_MIN" => Some(Self::Min),
104                    "UPDATE_POLICY_MAX" => Some(Self::Max),
105                    "UPDATE_POLICY_APPEND" => Some(Self::Append),
106                    _ => None,
107                }
108            }
109        }
110    }
111    #[allow(clippy::derive_partial_eq_without_eq)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113    pub struct Input {
114        #[prost(oneof="input::Input", tags="1, 2, 3, 4")]
115        pub input: ::core::option::Option<input::Input>,
116    }
117    /// Nested message and enum types in `Input`.
118    pub mod input {
119        #[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121        pub struct Source {
122            /// ex: "sf.ethereum.type.v1.Block"
123            #[prost(string, tag="1")]
124            pub r#type: ::prost::alloc::string::String,
125        }
126        #[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(Clone, PartialEq, ::prost::Message)]
128        pub struct Map {
129            /// ex: "block_to_pairs"
130            #[prost(string, tag="1")]
131            pub module_name: ::prost::alloc::string::String,
132        }
133        #[allow(clippy::derive_partial_eq_without_eq)]
134#[derive(Clone, PartialEq, ::prost::Message)]
135        pub struct Store {
136            #[prost(string, tag="1")]
137            pub module_name: ::prost::alloc::string::String,
138            #[prost(enumeration="store::Mode", tag="2")]
139            pub mode: i32,
140        }
141        /// Nested message and enum types in `Store`.
142        pub mod store {
143            #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
144            #[repr(i32)]
145            pub enum Mode {
146                Unset = 0,
147                Get = 1,
148                Deltas = 2,
149            }
150            impl Mode {
151                /// String value of the enum field names used in the ProtoBuf definition.
152                ///
153                /// The values are not transformed in any way and thus are considered stable
154                /// (if the ProtoBuf definition does not change) and safe for programmatic use.
155                pub fn as_str_name(&self) -> &'static str {
156                    match self {
157                        Mode::Unset => "UNSET",
158                        Mode::Get => "GET",
159                        Mode::Deltas => "DELTAS",
160                    }
161                }
162                /// Creates an enum from field names used in the ProtoBuf definition.
163                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
164                    match value {
165                        "UNSET" => Some(Self::Unset),
166                        "GET" => Some(Self::Get),
167                        "DELTAS" => Some(Self::Deltas),
168                        _ => None,
169                    }
170                }
171            }
172        }
173        #[allow(clippy::derive_partial_eq_without_eq)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175        pub struct Params {
176            #[prost(string, tag="1")]
177            pub value: ::prost::alloc::string::String,
178        }
179        #[allow(clippy::derive_partial_eq_without_eq)]
180#[derive(Clone, PartialEq, ::prost::Oneof)]
181        pub enum Input {
182            #[prost(message, tag="1")]
183            Source(Source),
184            #[prost(message, tag="2")]
185            Map(Map),
186            #[prost(message, tag="3")]
187            Store(Store),
188            #[prost(message, tag="4")]
189            Params(Params),
190        }
191    }
192    #[allow(clippy::derive_partial_eq_without_eq)]
193#[derive(Clone, PartialEq, ::prost::Message)]
194    pub struct Output {
195        #[prost(string, tag="1")]
196        pub r#type: ::prost::alloc::string::String,
197    }
198    #[allow(clippy::derive_partial_eq_without_eq)]
199#[derive(Clone, PartialEq, ::prost::Oneof)]
200    pub enum Kind {
201        #[prost(message, tag="2")]
202        KindMap(KindMap),
203        #[prost(message, tag="3")]
204        KindStore(KindStore),
205    }
206}
207#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct Package {
210    /// Needs to be one so this file can be used _directly_ as a
211    /// buf `Image` andor a ProtoSet for grpcurl and other tools
212    #[prost(message, repeated, tag="1")]
213    pub proto_files: ::prost::alloc::vec::Vec<::prost_types::FileDescriptorProto>,
214    #[prost(uint64, tag="5")]
215    pub version: u64,
216    #[prost(message, optional, tag="6")]
217    pub modules: ::core::option::Option<Modules>,
218    #[prost(message, repeated, tag="7")]
219    pub module_meta: ::prost::alloc::vec::Vec<ModuleMetadata>,
220    #[prost(message, repeated, tag="8")]
221    pub package_meta: ::prost::alloc::vec::Vec<PackageMetadata>,
222    /// Source network for Substreams to fetch its data from.
223    #[prost(string, tag="9")]
224    pub network: ::prost::alloc::string::String,
225    #[prost(message, optional, tag="10")]
226    pub sink_config: ::core::option::Option<::prost_types::Any>,
227    #[prost(string, tag="11")]
228    pub sink_module: ::prost::alloc::string::String,
229}
230#[allow(clippy::derive_partial_eq_without_eq)]
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct PackageMetadata {
233    #[prost(string, tag="1")]
234    pub version: ::prost::alloc::string::String,
235    #[prost(string, tag="2")]
236    pub url: ::prost::alloc::string::String,
237    #[prost(string, tag="3")]
238    pub name: ::prost::alloc::string::String,
239    #[prost(string, tag="4")]
240    pub doc: ::prost::alloc::string::String,
241}
242#[allow(clippy::derive_partial_eq_without_eq)]
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct ModuleMetadata {
245    /// Corresponds to the index in `Package.metadata.package_meta`
246    #[prost(uint64, tag="1")]
247    pub package_index: u64,
248    #[prost(string, tag="2")]
249    pub doc: ::prost::alloc::string::String,
250}
251// @@protoc_insertion_point(module)