Skip to main content

exocore_protos/generated/
exocore.store.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Entity {
4    #[prost(string, tag = "1")]
5    pub id: ::prost::alloc::string::String,
6    #[prost(message, repeated, tag = "4")]
7    pub traits: ::prost::alloc::vec::Vec<Trait>,
8    #[prost(message, optional, tag = "5")]
9    pub creation_date: ::core::option::Option<::prost_types::Timestamp>,
10    #[prost(message, optional, tag = "6")]
11    pub modification_date: ::core::option::Option<::prost_types::Timestamp>,
12    #[prost(message, optional, tag = "7")]
13    pub deletion_date: ::core::option::Option<::prost_types::Timestamp>,
14    #[prost(uint64, tag = "8")]
15    pub last_operation_id: u64,
16}
17#[allow(clippy::derive_partial_eq_without_eq)]
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct Trait {
20    #[prost(string, tag = "1")]
21    pub id: ::prost::alloc::string::String,
22    #[prost(message, optional, tag = "2")]
23    pub message: ::core::option::Option<::prost_types::Any>,
24    #[prost(message, optional, tag = "3")]
25    pub creation_date: ::core::option::Option<::prost_types::Timestamp>,
26    #[prost(message, optional, tag = "4")]
27    pub modification_date: ::core::option::Option<::prost_types::Timestamp>,
28    #[prost(message, optional, tag = "6")]
29    pub deletion_date: ::core::option::Option<::prost_types::Timestamp>,
30    #[prost(uint64, tag = "7")]
31    pub last_operation_id: u64,
32    #[prost(enumeration = "TraitDetails", tag = "5")]
33    pub details: i32,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct Reference {
38    #[prost(string, tag = "1")]
39    pub entity_id: ::prost::alloc::string::String,
40    #[prost(string, tag = "2")]
41    pub trait_id: ::prost::alloc::string::String,
42}
43#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
44#[repr(i32)]
45pub enum TraitDetails {
46    Full = 0,
47    Partial = 1,
48}
49impl TraitDetails {
50    /// String value of the enum field names used in the ProtoBuf definition.
51    ///
52    /// The values are not transformed in any way and thus are considered stable
53    /// (if the ProtoBuf definition does not change) and safe for programmatic
54    /// use.
55    pub fn as_str_name(&self) -> &'static str {
56        match self {
57            TraitDetails::Full => "TRAIT_DETAILS_FULL",
58            TraitDetails::Partial => "TRAIT_DETAILS_PARTIAL",
59        }
60    }
61    /// Creates an enum from field names used in the ProtoBuf definition.
62    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
63        match value {
64            "TRAIT_DETAILS_FULL" => Some(Self::Full),
65            "TRAIT_DETAILS_PARTIAL" => Some(Self::Partial),
66            _ => None,
67        }
68    }
69}
70#[allow(clippy::derive_partial_eq_without_eq)]
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct EntityQuery {
73    /// Optional projections on traits and fields to be returned.
74    #[prost(message, repeated, tag = "7")]
75    pub projections: ::prost::alloc::vec::Vec<Projection>,
76    /// Query paging requested.
77    #[prost(message, optional, tag = "5")]
78    pub paging: ::core::option::Option<Paging>,
79    /// Query ordering.
80    #[prost(message, optional, tag = "6")]
81    pub ordering: ::core::option::Option<Ordering>,
82    /// Optional watch token if this query is to be used for watching.
83    #[prost(uint64, tag = "8")]
84    pub watch_token: u64,
85    /// If specified, if results from server matches this hash, results will be
86    /// empty with the `skipped_hash` field set to `true`.
87    #[prost(uint64, tag = "9")]
88    pub result_hash: u64,
89    /// Include deleted mutations matches. This can be used to return recently
90    /// modified entities that also include deletions. Deleted traits will
91    /// be included in the results but will have a `deletion_date` field
92    /// with the date of the deletion.
93    #[prost(bool, tag = "12")]
94    pub include_deleted: bool,
95    /// Indicates that the query comes from an automated / programmatic logic.
96    /// This is used since chain indexation may be deferred until no user
97    /// queries got received for a while.
98    #[prost(bool, tag = "13")]
99    pub programmatic: bool,
100    /// Main search predicate on individual traits of the entity.
101    #[prost(
102        oneof = "entity_query::Predicate",
103        tags = "1, 2, 3, 4, 10, 11, 14, 15, 99"
104    )]
105    pub predicate: ::core::option::Option<entity_query::Predicate>,
106}
107/// Nested message and enum types in `EntityQuery`.
108pub mod entity_query {
109    /// Main search predicate on individual traits of the entity.
110    #[allow(clippy::derive_partial_eq_without_eq)]
111    #[derive(Clone, PartialEq, ::prost::Oneof)]
112    pub enum Predicate {
113        #[prost(message, tag = "1")]
114        Match(super::MatchPredicate),
115        #[prost(message, tag = "2")]
116        Trait(super::TraitPredicate),
117        #[prost(message, tag = "3")]
118        Ids(super::IdsPredicate),
119        #[prost(message, tag = "4")]
120        Reference(super::ReferencePredicate),
121        #[prost(message, tag = "10")]
122        Operations(super::OperationsPredicate),
123        #[prost(message, tag = "11")]
124        All(super::AllPredicate),
125        #[prost(message, tag = "14")]
126        Boolean(super::BooleanPredicate),
127        #[prost(message, tag = "15")]
128        QueryString(super::QueryStringPredicate),
129        #[prost(message, tag = "99")]
130        Test(super::TestPredicate),
131    }
132}
133#[allow(clippy::derive_partial_eq_without_eq)]
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct Projection {
136    /// If specified, a prefix match will be done against traits' Protobuf full
137    /// name (`some.package.Name`). If ends with a dollar sign "$", an exact
138    /// match is required (ex: `some.package.Name$` will only match this
139    /// message)
140    #[prost(string, repeated, tag = "1")]
141    pub package: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
142    /// Skips the trait if the projection matches.
143    #[prost(bool, tag = "2")]
144    pub skip: bool,
145    /// If specified, only return these fields.
146    #[prost(uint32, repeated, tag = "4")]
147    pub field_ids: ::prost::alloc::vec::Vec<u32>,
148    /// If specified, only return fields annotated with
149    /// `options.proto`.`field_group_id` matching ids.
150    #[prost(uint32, repeated, tag = "5")]
151    pub field_group_ids: ::prost::alloc::vec::Vec<u32>,
152}
153/// Query entities by text match on all indexed fields across all traits.
154#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct MatchPredicate {
157    /// Text query.
158    #[prost(string, tag = "1")]
159    pub query: ::prost::alloc::string::String,
160    /// Disable fuzzy matching.
161    #[prost(bool, tag = "2")]
162    pub no_fuzzy: bool,
163}
164/// Query entities by IDs.
165#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct IdsPredicate {
168    #[prost(string, repeated, tag = "1")]
169    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
170}
171/// Query entities by mutations' operation ids.
172/// Used to return entities on which mutations with these operation ids were
173/// applied and indexed.
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct OperationsPredicate {
177    #[prost(uint64, repeated, tag = "1")]
178    pub operation_ids: ::prost::alloc::vec::Vec<u64>,
179}
180/// Query all entities.
181#[allow(clippy::derive_partial_eq_without_eq)]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct AllPredicate {}
184/// Used for tests.
185#[allow(clippy::derive_partial_eq_without_eq)]
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct TestPredicate {
188    #[prost(bool, tag = "1")]
189    pub success: bool,
190}
191/// Boolean query constructed of different sub-queries with boolean operators.
192#[allow(clippy::derive_partial_eq_without_eq)]
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct BooleanPredicate {
195    #[prost(message, repeated, tag = "1")]
196    pub queries: ::prost::alloc::vec::Vec<boolean_predicate::SubQuery>,
197}
198/// Nested message and enum types in `BooleanPredicate`.
199pub mod boolean_predicate {
200    #[allow(clippy::derive_partial_eq_without_eq)]
201    #[derive(Clone, PartialEq, ::prost::Message)]
202    pub struct SubQuery {
203        #[prost(enumeration = "Occur", tag = "1")]
204        pub occur: i32,
205        #[prost(oneof = "sub_query::Predicate", tags = "2, 3, 4, 5, 6, 7, 8")]
206        pub predicate: ::core::option::Option<sub_query::Predicate>,
207    }
208    /// Nested message and enum types in `SubQuery`.
209    pub mod sub_query {
210        #[allow(clippy::derive_partial_eq_without_eq)]
211        #[derive(Clone, PartialEq, ::prost::Oneof)]
212        pub enum Predicate {
213            #[prost(message, tag = "2")]
214            Match(super::super::MatchPredicate),
215            #[prost(message, tag = "3")]
216            Trait(super::super::TraitPredicate),
217            #[prost(message, tag = "4")]
218            Ids(super::super::IdsPredicate),
219            #[prost(message, tag = "5")]
220            Reference(super::super::ReferencePredicate),
221            #[prost(message, tag = "6")]
222            Operations(super::super::OperationsPredicate),
223            #[prost(message, tag = "7")]
224            All(super::super::AllPredicate),
225            #[prost(message, tag = "8")]
226            Boolean(super::super::BooleanPredicate),
227        }
228    }
229    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
230    #[repr(i32)]
231    pub enum Occur {
232        Should = 0,
233        Must = 1,
234        MustNot = 2,
235    }
236    impl Occur {
237        /// String value of the enum field names used in the ProtoBuf
238        /// definition.
239        ///
240        /// The values are not transformed in any way and thus are considered
241        /// stable (if the ProtoBuf definition does not change) and safe
242        /// for programmatic use.
243        pub fn as_str_name(&self) -> &'static str {
244            match self {
245                Occur::Should => "SHOULD",
246                Occur::Must => "MUST",
247                Occur::MustNot => "MUST_NOT",
248            }
249        }
250        /// Creates an enum from field names used in the ProtoBuf definition.
251        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
252            match value {
253                "SHOULD" => Some(Self::Should),
254                "MUST" => Some(Self::Must),
255                "MUST_NOT" => Some(Self::MustNot),
256                _ => None,
257            }
258        }
259    }
260}
261/// Query entities that have a specified trait and optionally matching a trait
262/// query.
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct TraitPredicate {
266    #[prost(string, tag = "1")]
267    pub trait_name: ::prost::alloc::string::String,
268    #[prost(message, optional, tag = "2")]
269    pub query: ::core::option::Option<TraitQuery>,
270}
271#[allow(clippy::derive_partial_eq_without_eq)]
272#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct TraitQuery {
274    #[prost(oneof = "trait_query::Predicate", tags = "1, 2, 3, 4")]
275    pub predicate: ::core::option::Option<trait_query::Predicate>,
276}
277/// Nested message and enum types in `TraitQuery`.
278pub mod trait_query {
279    #[allow(clippy::derive_partial_eq_without_eq)]
280    #[derive(Clone, PartialEq, ::prost::Oneof)]
281    pub enum Predicate {
282        #[prost(message, tag = "1")]
283        Match(super::MatchPredicate),
284        #[prost(message, tag = "2")]
285        Field(super::TraitFieldPredicate),
286        #[prost(message, tag = "3")]
287        Reference(super::TraitFieldReferencePredicate),
288        #[prost(message, tag = "4")]
289        QueryString(super::QueryStringPredicate),
290    }
291}
292#[allow(clippy::derive_partial_eq_without_eq)]
293#[derive(Clone, PartialEq, ::prost::Message)]
294pub struct TraitFieldPredicate {
295    #[prost(string, tag = "1")]
296    pub field: ::prost::alloc::string::String,
297    #[prost(enumeration = "trait_field_predicate::Operator", tag = "6")]
298    pub operator: i32,
299    #[prost(oneof = "trait_field_predicate::Value", tags = "2, 3, 4, 5")]
300    pub value: ::core::option::Option<trait_field_predicate::Value>,
301}
302/// Nested message and enum types in `TraitFieldPredicate`.
303pub mod trait_field_predicate {
304    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
305    #[repr(i32)]
306    pub enum Operator {
307        Equal = 0,
308        Gt = 1,
309        Gte = 2,
310        Lt = 3,
311        Lte = 4,
312    }
313    impl Operator {
314        /// String value of the enum field names used in the ProtoBuf
315        /// definition.
316        ///
317        /// The values are not transformed in any way and thus are considered
318        /// stable (if the ProtoBuf definition does not change) and safe
319        /// for programmatic use.
320        pub fn as_str_name(&self) -> &'static str {
321            match self {
322                Operator::Equal => "EQUAL",
323                Operator::Gt => "GT",
324                Operator::Gte => "GTE",
325                Operator::Lt => "LT",
326                Operator::Lte => "LTE",
327            }
328        }
329        /// Creates an enum from field names used in the ProtoBuf definition.
330        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
331            match value {
332                "EQUAL" => Some(Self::Equal),
333                "GT" => Some(Self::Gt),
334                "GTE" => Some(Self::Gte),
335                "LT" => Some(Self::Lt),
336                "LTE" => Some(Self::Lte),
337                _ => None,
338            }
339        }
340    }
341    #[allow(clippy::derive_partial_eq_without_eq)]
342    #[derive(Clone, PartialEq, ::prost::Oneof)]
343    pub enum Value {
344        #[prost(string, tag = "2")]
345        String(::prost::alloc::string::String),
346        #[prost(int64, tag = "3")]
347        Int64(i64),
348        #[prost(uint64, tag = "4")]
349        Uint64(u64),
350        #[prost(message, tag = "5")]
351        Date(::prost_types::Timestamp),
352    }
353}
354#[allow(clippy::derive_partial_eq_without_eq)]
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct TraitFieldReferencePredicate {
357    #[prost(string, tag = "1")]
358    pub field: ::prost::alloc::string::String,
359    #[prost(message, optional, tag = "2")]
360    pub reference: ::core::option::Option<ReferencePredicate>,
361}
362#[allow(clippy::derive_partial_eq_without_eq)]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct ReferencePredicate {
365    /// Entity id the reference points to
366    #[prost(string, tag = "1")]
367    pub entity_id: ::prost::alloc::string::String,
368    /// Optional trait id the reference points to
369    #[prost(string, tag = "2")]
370    pub trait_id: ::prost::alloc::string::String,
371}
372#[allow(clippy::derive_partial_eq_without_eq)]
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct QueryStringPredicate {
375    #[prost(string, tag = "1")]
376    pub query: ::prost::alloc::string::String,
377}
378#[allow(clippy::derive_partial_eq_without_eq)]
379#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct Paging {
381    /// Returns results after this given ordering value.
382    #[prost(message, optional, tag = "1")]
383    pub after_ordering_value: ::core::option::Option<OrderingValue>,
384    /// Returns results before this given ordering value.
385    #[prost(message, optional, tag = "2")]
386    pub before_ordering_value: ::core::option::Option<OrderingValue>,
387    /// Desired results count. Default if 0.
388    #[prost(uint32, tag = "3")]
389    pub count: u32,
390    /// Mutation index use only, no effect on entity query.
391    #[prost(uint32, tag = "4")]
392    pub offset: u32,
393}
394#[allow(clippy::derive_partial_eq_without_eq)]
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct Ordering {
397    /// Direction of ordering.
398    #[prost(bool, tag = "4")]
399    pub ascending: bool,
400    /// If match score used, don't boost recent documents
401    #[prost(bool, tag = "5")]
402    pub no_recency_boost: bool,
403    /// If match score used, don't boost results that have references.
404    #[prost(bool, tag = "6")]
405    pub no_reference_boost: bool,
406    /// Value by which we want results to be ordered.
407    #[prost(oneof = "ordering::Value", tags = "1, 2, 3, 7, 8")]
408    pub value: ::core::option::Option<ordering::Value>,
409}
410/// Nested message and enum types in `Ordering`.
411pub mod ordering {
412    /// Value by which we want results to be ordered.
413    #[allow(clippy::derive_partial_eq_without_eq)]
414    #[derive(Clone, PartialEq, ::prost::Oneof)]
415    pub enum Value {
416        /// by match score + date boost
417        #[prost(bool, tag = "1")]
418        Score(bool),
419        /// by operation id
420        #[prost(bool, tag = "2")]
421        OperationId(bool),
422        /// by field value
423        #[prost(string, tag = "3")]
424        Field(::prost::alloc::string::String),
425        /// by creation date
426        #[prost(bool, tag = "7")]
427        CreatedAt(bool),
428        /// by update date
429        #[prost(bool, tag = "8")]
430        UpdatedAt(bool),
431    }
432}
433#[allow(clippy::derive_partial_eq_without_eq)]
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct OrderingValue {
436    /// Secondary comparison, in case values were equal. In this case,
437    /// the last operation id that mutated the entity is used.
438    #[prost(uint64, tag = "6")]
439    pub operation_id: u64,
440    /// Primary comparison
441    #[prost(oneof = "ordering_value::Value", tags = "1, 2, 3, 4, 5")]
442    pub value: ::core::option::Option<ordering_value::Value>,
443}
444/// Nested message and enum types in `OrderingValue`.
445pub mod ordering_value {
446    /// Primary comparison
447    #[allow(clippy::derive_partial_eq_without_eq)]
448    #[derive(Clone, PartialEq, ::prost::Oneof)]
449    pub enum Value {
450        #[prost(float, tag = "1")]
451        Float(f32),
452        #[prost(uint64, tag = "2")]
453        Uint64(u64),
454        #[prost(message, tag = "3")]
455        Date(::prost_types::Timestamp),
456        #[prost(bool, tag = "4")]
457        Min(bool),
458        #[prost(bool, tag = "5")]
459        Max(bool),
460    }
461}
462#[allow(clippy::derive_partial_eq_without_eq)]
463#[derive(Clone, PartialEq, ::prost::Message)]
464pub struct EntityResults {
465    /// Entities matching query.
466    #[prost(message, repeated, tag = "1")]
467    pub entities: ::prost::alloc::vec::Vec<EntityResult>,
468    /// If query specified a `result_hash`, this is set to `true` if the results
469    /// had the same hash has the specified and that `entities` were set to
470    /// empty.
471    #[prost(bool, tag = "2")]
472    pub skipped_hash: bool,
473    /// Estimated number of entities matching, based on number of matching
474    /// mutations.
475    #[prost(uint32, tag = "3")]
476    pub estimated_count: u32,
477    /// Paging token of the current results.
478    #[prost(message, optional, tag = "4")]
479    pub current_page: ::core::option::Option<Paging>,
480    /// Paging token of the next page of results.
481    #[prost(message, optional, tag = "5")]
482    pub next_page: ::core::option::Option<Paging>,
483    /// Hash of the results. Can be used to prevent receiving same results if
484    /// they haven't changed by using the `result_hash` field on the query.
485    #[prost(uint64, tag = "6")]
486    pub hash: u64,
487}
488#[allow(clippy::derive_partial_eq_without_eq)]
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct EntityResult {
491    /// The entity with its traits. Projection could have been done on the
492    /// entity, which will be indicated in its traits' details field.
493    #[prost(message, optional, tag = "1")]
494    pub entity: ::core::option::Option<Entity>,
495    /// Indicates where the entity was taken from in terms of storage. If all of
496    /// the entities' traits were coming from the chain (i.e. committed),
497    /// the source will be `CHAIN`. Otherwise, as soon as one entity
498    /// mutation is coming from pending store (i.e. not committed yet), this
499    /// field will be `PENDING`.
500    ///
501    /// This can be used to know if an entity can be considered stable once
502    /// mutations were executed on it. Once it's committed, a majority of
503    /// nodes agreed on it and will not result in further changes happening
504    /// before the latest consistent timestamp.
505    #[prost(enumeration = "EntityResultSource", tag = "2")]
506    pub source: i32,
507    /// Value to be used to order results. `EntityResults` already contains
508    /// ordered results, but it may be useful to compare ordering queries
509    /// (ex.: to merge different pages)
510    #[prost(message, optional, tag = "3")]
511    pub ordering_value: ::core::option::Option<OrderingValue>,
512    /// Hash of the entity result. Can be used to compare if the entity has
513    /// changed since last results.
514    #[prost(uint64, tag = "4")]
515    pub hash: u64,
516}
517#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
518#[repr(i32)]
519pub enum EntityResultSource {
520    Unknown = 0,
521    Pending = 1,
522    Chain = 2,
523}
524impl EntityResultSource {
525    /// String value of the enum field names used in the ProtoBuf definition.
526    ///
527    /// The values are not transformed in any way and thus are considered stable
528    /// (if the ProtoBuf definition does not change) and safe for programmatic
529    /// use.
530    pub fn as_str_name(&self) -> &'static str {
531        match self {
532            EntityResultSource::Unknown => "UNKNOWN",
533            EntityResultSource::Pending => "PENDING",
534            EntityResultSource::Chain => "CHAIN",
535        }
536    }
537    /// Creates an enum from field names used in the ProtoBuf definition.
538    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
539        match value {
540            "UNKNOWN" => Some(Self::Unknown),
541            "PENDING" => Some(Self::Pending),
542            "CHAIN" => Some(Self::Chain),
543            _ => None,
544        }
545    }
546}
547#[allow(clippy::derive_partial_eq_without_eq)]
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct MutationRequest {
550    /// Mutations to apply.
551    #[prost(message, repeated, tag = "1")]
552    pub mutations: ::prost::alloc::vec::Vec<EntityMutation>,
553    /// Waits for mutation to be indexed.
554    #[prost(bool, tag = "2")]
555    pub wait_indexed: bool,
556    /// Waits for mutation to be indexed and returns the mutated entities.
557    #[prost(bool, tag = "3")]
558    pub return_entities: bool,
559    /// If an entity ID is generated for the mutated entities, reuse the same ID
560    /// for all mutations.
561    #[prost(bool, tag = "4")]
562    pub common_entity_id: bool,
563}
564#[allow(clippy::derive_partial_eq_without_eq)]
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct MutationResult {
567    /// Unique operation ids for each mutations.
568    #[prost(uint64, repeated, tag = "1")]
569    pub operation_ids: ::prost::alloc::vec::Vec<u64>,
570    /// Mutated entities if requested.
571    #[prost(message, repeated, tag = "2")]
572    pub entities: ::prost::alloc::vec::Vec<Entity>,
573}
574#[allow(clippy::derive_partial_eq_without_eq)]
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct EntityMutation {
577    #[prost(string, tag = "1")]
578    pub entity_id: ::prost::alloc::string::String,
579    #[prost(oneof = "entity_mutation::Mutation", tags = "2, 3, 4, 7, 99")]
580    pub mutation: ::core::option::Option<entity_mutation::Mutation>,
581}
582/// Nested message and enum types in `EntityMutation`.
583pub mod entity_mutation {
584    #[allow(clippy::derive_partial_eq_without_eq)]
585    #[derive(Clone, PartialEq, ::prost::Oneof)]
586    pub enum Mutation {
587        #[prost(message, tag = "2")]
588        PutTrait(super::PutTraitMutation),
589        #[prost(message, tag = "3")]
590        DeleteTrait(super::DeleteTraitMutation),
591        #[prost(message, tag = "4")]
592        DeleteEntity(super::DeleteEntityMutation),
593        #[prost(message, tag = "7")]
594        DeleteOperations(super::DeleteOperationsMutation),
595        #[prost(message, tag = "99")]
596        Test(super::TestMutation),
597    }
598}
599/// Creates or overrides a trait of the entity.
600#[allow(clippy::derive_partial_eq_without_eq)]
601#[derive(Clone, PartialEq, ::prost::Message)]
602pub struct PutTraitMutation {
603    #[prost(message, optional, tag = "1")]
604    pub r#trait: ::core::option::Option<Trait>,
605}
606/// Deletes a trait of an entity.
607#[allow(clippy::derive_partial_eq_without_eq)]
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct DeleteTraitMutation {
610    #[prost(string, tag = "1")]
611    pub trait_id: ::prost::alloc::string::String,
612}
613/// Deletes all the traits of an entity, effectively deleting the entity itself.
614#[allow(clippy::derive_partial_eq_without_eq)]
615#[derive(Clone, PartialEq, ::prost::Message)]
616pub struct DeleteEntityMutation {}
617/// Deletes mutations of an entity that have an operation id specified in the
618/// given list. This mutation is used for index management purpose only since
619/// the mutations are not actually deleted from the chain. Since the chain
620/// indices are built in a semi-versioned way, this actually delete the
621/// mutations from the indices.
622#[allow(clippy::derive_partial_eq_without_eq)]
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct DeleteOperationsMutation {
625    #[prost(uint64, repeated, tag = "1")]
626    pub operation_ids: ::prost::alloc::vec::Vec<u64>,
627}
628/// Mutation used in tests.
629#[allow(clippy::derive_partial_eq_without_eq)]
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct TestMutation {
632    #[prost(bool, tag = "1")]
633    pub success: bool,
634}
635/// Internal message used by entity iterator for external sorting.
636#[allow(clippy::derive_partial_eq_without_eq)]
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct CommittedEntityMutation {
639    #[prost(uint64, tag = "1")]
640    pub block_offset: u64,
641    #[prost(uint64, tag = "2")]
642    pub operation_id: u64,
643    #[prost(message, optional, tag = "3")]
644    pub mutation: ::core::option::Option<EntityMutation>,
645}