substreams_entity_change/pb/
sf.substreams.sink.entity.v1.rs

1// @generated
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct EntityChanges {
5    #[prost(message, repeated, tag="5")]
6    pub entity_changes: ::prost::alloc::vec::Vec<EntityChange>,
7}
8#[allow(clippy::derive_partial_eq_without_eq)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct EntityChange {
11    #[prost(string, tag="1")]
12    pub entity: ::prost::alloc::string::String,
13    #[prost(string, tag="2")]
14    pub id: ::prost::alloc::string::String,
15    /// Deprecated, this is not used within `graph-node`.
16    #[prost(uint64, tag="3")]
17    #[deprecated(since="1.3.0",note="not used by 'graph-node', will be removed")]
18    pub ordinal: u64,
19    #[prost(enumeration="entity_change::Operation", tag="4")]
20    pub operation: i32,
21    #[prost(message, repeated, tag="5")]
22    pub fields: ::prost::alloc::vec::Vec<Field>,
23}
24/// Nested message and enum types in `EntityChange`.
25pub mod entity_change {
26    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
27    #[repr(i32)]
28    pub enum Operation {
29        /// Protobuf default should not be used, this is used so that the consume can ensure that the value was actually specified
30        Unspecified = 0,
31        Create = 1,
32        Update = 2,
33        Delete = 3,
34        Final = 4,
35    }
36    impl Operation {
37        /// String value of the enum field names used in the ProtoBuf definition.
38        ///
39        /// The values are not transformed in any way and thus are considered stable
40        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
41        pub fn as_str_name(&self) -> &'static str {
42            match self {
43                Operation::Unspecified => "OPERATION_UNSPECIFIED",
44                Operation::Create => "OPERATION_CREATE",
45                Operation::Update => "OPERATION_UPDATE",
46                Operation::Delete => "OPERATION_DELETE",
47                Operation::Final => "OPERATION_FINAL",
48            }
49        }
50        /// Creates an enum from field names used in the ProtoBuf definition.
51        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
52            match value {
53                "OPERATION_UNSPECIFIED" => Some(Self::Unspecified),
54                "OPERATION_CREATE" => Some(Self::Create),
55                "OPERATION_UPDATE" => Some(Self::Update),
56                "OPERATION_DELETE" => Some(Self::Delete),
57                "OPERATION_FINAL" => Some(Self::Final),
58                _ => None,
59            }
60        }
61    }
62}
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct Value {
66    #[prost(oneof="value::Typed", tags="1, 2, 3, 4, 5, 6, 7, 10")]
67    pub typed: ::core::option::Option<value::Typed>,
68}
69/// Nested message and enum types in `Value`.
70pub mod value {
71    #[allow(clippy::derive_partial_eq_without_eq)]
72#[derive(Clone, PartialEq, ::prost::Oneof)]
73    pub enum Typed {
74        #[prost(int32, tag="1")]
75        Int32(i32),
76        #[prost(string, tag="2")]
77        Bigdecimal(::prost::alloc::string::String),
78        #[prost(string, tag="3")]
79        Bigint(::prost::alloc::string::String),
80        #[prost(string, tag="4")]
81        String(::prost::alloc::string::String),
82        #[prost(string, tag="5")]
83        Bytes(::prost::alloc::string::String),
84        #[prost(bool, tag="6")]
85        Bool(bool),
86        #[prost(int64, tag="7")]
87        Timestamp(i64),
88        // reserved 8 to 9;  // For future types
89
90        #[prost(message, tag="10")]
91        Array(super::Array),
92    }
93}
94#[allow(clippy::derive_partial_eq_without_eq)]
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct Array {
97    #[prost(message, repeated, tag="1")]
98    pub value: ::prost::alloc::vec::Vec<Value>,
99}
100#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct Field {
103    #[prost(string, tag="1")]
104    pub name: ::prost::alloc::string::String,
105    #[prost(message, optional, tag="3")]
106    pub new_value: ::core::option::Option<Value>,
107    /// Deprecated, this is not used within `graph-node`.
108    #[prost(message, optional, tag="5")]
109    #[deprecated(since="1.3.0",note="not used by 'graph-node', will be removed")]
110    pub old_value: ::core::option::Option<Value>,
111}
112// @@protoc_insertion_point(module)