typedb_protocol/
typedb.protocol.rs

1// This file is @generated by prost-build.
2#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3#[repr(i32)]
4pub enum Version {
5    Unspecified = 0,
6    Version = 4,
7}
8impl Version {
9    /// String value of the enum field names used in the ProtoBuf definition.
10    ///
11    /// The values are not transformed in any way and thus are considered stable
12    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
13    pub fn as_str_name(&self) -> &'static str {
14        match self {
15            Self::Unspecified => "UNSPECIFIED",
16            Self::Version => "VERSION",
17        }
18    }
19    /// Creates an enum from field names used in the ProtoBuf definition.
20    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
21        match value {
22            "UNSPECIFIED" => Some(Self::Unspecified),
23            "VERSION" => Some(Self::Version),
24            _ => None,
25        }
26    }
27}
28#[derive(Clone, Copy, PartialEq, ::prost::Message)]
29pub struct DatabaseManager {}
30/// Nested message and enum types in `DatabaseManager`.
31pub mod database_manager {
32    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
33    pub struct Get {}
34    /// Nested message and enum types in `Get`.
35    pub mod get {
36        #[derive(Clone, PartialEq, ::prost::Message)]
37        pub struct Req {
38            #[prost(string, tag = "1")]
39            pub name: ::prost::alloc::string::String,
40        }
41        #[derive(Clone, PartialEq, ::prost::Message)]
42        pub struct Res {
43            #[prost(message, optional, tag = "1")]
44            pub database: ::core::option::Option<super::super::DatabaseReplicas>,
45        }
46    }
47    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
48    pub struct All {}
49    /// Nested message and enum types in `All`.
50    pub mod all {
51        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
52        pub struct Req {}
53        #[derive(Clone, PartialEq, ::prost::Message)]
54        pub struct Res {
55            #[prost(message, repeated, tag = "1")]
56            pub databases: ::prost::alloc::vec::Vec<super::super::DatabaseReplicas>,
57        }
58    }
59    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
60    pub struct Contains {}
61    /// Nested message and enum types in `Contains`.
62    pub mod contains {
63        #[derive(Clone, PartialEq, ::prost::Message)]
64        pub struct Req {
65            #[prost(string, tag = "1")]
66            pub name: ::prost::alloc::string::String,
67        }
68        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
69        pub struct Res {
70            #[prost(bool, tag = "1")]
71            pub contains: bool,
72        }
73    }
74    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
75    pub struct Create {}
76    /// Nested message and enum types in `Create`.
77    pub mod create {
78        #[derive(Clone, PartialEq, ::prost::Message)]
79        pub struct Req {
80            #[prost(string, tag = "1")]
81            pub name: ::prost::alloc::string::String,
82        }
83        #[derive(Clone, PartialEq, ::prost::Message)]
84        pub struct Res {
85            #[prost(message, optional, tag = "1")]
86            pub database: ::core::option::Option<super::super::DatabaseReplicas>,
87        }
88    }
89}
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct DatabaseReplicas {
92    #[prost(string, tag = "1")]
93    pub name: ::prost::alloc::string::String,
94    #[prost(message, repeated, tag = "2")]
95    pub replicas: ::prost::alloc::vec::Vec<database_replicas::Replica>,
96}
97/// Nested message and enum types in `DatabaseReplicas`.
98pub mod database_replicas {
99    #[derive(Clone, PartialEq, ::prost::Message)]
100    pub struct Replica {
101        #[prost(string, tag = "1")]
102        pub address: ::prost::alloc::string::String,
103        #[prost(bool, tag = "2")]
104        pub primary: bool,
105        #[prost(bool, tag = "3")]
106        pub preferred: bool,
107        #[prost(int64, tag = "4")]
108        pub term: i64,
109    }
110}
111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
112pub struct Database {}
113/// Nested message and enum types in `Database`.
114pub mod database {
115    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
116    pub struct Schema {}
117    /// Nested message and enum types in `Schema`.
118    pub mod schema {
119        #[derive(Clone, PartialEq, ::prost::Message)]
120        pub struct Req {
121            #[prost(string, tag = "1")]
122            pub name: ::prost::alloc::string::String,
123        }
124        #[derive(Clone, PartialEq, ::prost::Message)]
125        pub struct Res {
126            #[prost(string, tag = "1")]
127            pub schema: ::prost::alloc::string::String,
128        }
129    }
130    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
131    pub struct TypeSchema {}
132    /// Nested message and enum types in `TypeSchema`.
133    pub mod type_schema {
134        #[derive(Clone, PartialEq, ::prost::Message)]
135        pub struct Req {
136            #[prost(string, tag = "1")]
137            pub name: ::prost::alloc::string::String,
138        }
139        #[derive(Clone, PartialEq, ::prost::Message)]
140        pub struct Res {
141            #[prost(string, tag = "1")]
142            pub schema: ::prost::alloc::string::String,
143        }
144    }
145    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
146    pub struct Delete {}
147    /// Nested message and enum types in `Delete`.
148    pub mod delete {
149        #[derive(Clone, PartialEq, ::prost::Message)]
150        pub struct Req {
151            #[prost(string, tag = "1")]
152            pub name: ::prost::alloc::string::String,
153        }
154        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
155        pub struct Res {}
156    }
157}
158#[derive(Clone, Copy, PartialEq, ::prost::Message)]
159pub struct Connection {}
160/// Nested message and enum types in `Connection`.
161pub mod connection {
162    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
163    pub struct Open {}
164    /// Nested message and enum types in `Open`.
165    pub mod open {
166        #[derive(Clone, PartialEq, ::prost::Message)]
167        pub struct Req {
168            #[prost(enumeration = "super::super::Version", tag = "1")]
169            pub version: i32,
170            #[prost(string, tag = "2")]
171            pub driver_lang: ::prost::alloc::string::String,
172            #[prost(string, tag = "3")]
173            pub driver_version: ::prost::alloc::string::String,
174        }
175        #[derive(Clone, PartialEq, ::prost::Message)]
176        pub struct Res {
177            #[prost(uint64, tag = "1")]
178            pub server_duration_millis: u64,
179            #[prost(message, optional, tag = "2")]
180            pub connection_id: ::core::option::Option<super::super::ConnectionId>,
181            /// pre-send all databases and replica info
182            #[prost(message, optional, tag = "3")]
183            pub databases_all: ::core::option::Option<
184                super::super::database_manager::all::Res,
185            >,
186        }
187    }
188}
189/// Connection ID and Token are expected in all message metadata
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct ConnectionId {
192    #[prost(bytes = "vec", tag = "1")]
193    pub id: ::prost::alloc::vec::Vec<u8>,
194}
195#[derive(Clone, Copy, PartialEq, ::prost::Message)]
196pub struct ServerManager {}
197/// Nested message and enum types in `ServerManager`.
198pub mod server_manager {
199    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
200    pub struct All {}
201    /// Nested message and enum types in `All`.
202    pub mod all {
203        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
204        pub struct Req {}
205        #[derive(Clone, PartialEq, ::prost::Message)]
206        pub struct Res {
207            #[prost(message, repeated, tag = "1")]
208            pub servers: ::prost::alloc::vec::Vec<super::super::Server>,
209        }
210    }
211}
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct Server {
214    #[prost(string, tag = "1")]
215    pub address: ::prost::alloc::string::String,
216}
217#[derive(Clone, Copy, PartialEq, ::prost::Message)]
218pub struct UserManager {}
219/// Nested message and enum types in `UserManager`.
220pub mod user_manager {
221    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
222    pub struct All {}
223    /// Nested message and enum types in `All`.
224    pub mod all {
225        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
226        pub struct Req {}
227        #[derive(Clone, PartialEq, ::prost::Message)]
228        pub struct Res {
229            #[prost(message, repeated, tag = "1")]
230            pub users: ::prost::alloc::vec::Vec<super::super::User>,
231        }
232    }
233    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
234    pub struct Contains {}
235    /// Nested message and enum types in `Contains`.
236    pub mod contains {
237        #[derive(Clone, PartialEq, ::prost::Message)]
238        pub struct Req {
239            #[prost(string, tag = "1")]
240            pub name: ::prost::alloc::string::String,
241        }
242        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
243        pub struct Res {
244            #[prost(bool, tag = "1")]
245            pub contains: bool,
246        }
247    }
248    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
249    pub struct Get {}
250    /// Nested message and enum types in `Get`.
251    pub mod get {
252        #[derive(Clone, PartialEq, ::prost::Message)]
253        pub struct Req {
254            #[prost(string, tag = "1")]
255            pub name: ::prost::alloc::string::String,
256        }
257        #[derive(Clone, PartialEq, ::prost::Message)]
258        pub struct Res {
259            #[prost(message, optional, tag = "1")]
260            pub user: ::core::option::Option<super::super::User>,
261        }
262    }
263    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
264    pub struct Create {}
265    /// Nested message and enum types in `Create`.
266    pub mod create {
267        #[derive(Clone, PartialEq, ::prost::Message)]
268        pub struct Req {
269            #[prost(message, optional, tag = "1")]
270            pub user: ::core::option::Option<super::super::User>,
271        }
272        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
273        pub struct Res {}
274    }
275}
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct User {
278    #[prost(string, tag = "1")]
279    pub name: ::prost::alloc::string::String,
280    #[prost(string, optional, tag = "2")]
281    pub password: ::core::option::Option<::prost::alloc::string::String>,
282}
283/// Nested message and enum types in `User`.
284pub mod user {
285    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
286    pub struct Update {}
287    /// Nested message and enum types in `Update`.
288    pub mod update {
289        #[derive(Clone, PartialEq, ::prost::Message)]
290        pub struct Req {
291            #[prost(string, tag = "1")]
292            pub name: ::prost::alloc::string::String,
293            #[prost(message, optional, tag = "2")]
294            pub user: ::core::option::Option<super::super::User>,
295        }
296        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
297        pub struct Res {}
298    }
299    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
300    pub struct Delete {}
301    /// Nested message and enum types in `Delete`.
302    pub mod delete {
303        #[derive(Clone, PartialEq, ::prost::Message)]
304        pub struct Req {
305            #[prost(string, tag = "1")]
306            pub name: ::prost::alloc::string::String,
307        }
308        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
309        pub struct Res {}
310    }
311}
312#[derive(Clone, Copy, PartialEq, ::prost::Message)]
313pub struct Options {
314    ///     optional bool infer = 1;
315    ///     optional bool trace_inference = 2;
316    ///     optional bool explain = 3;
317    #[prost(bool, optional, tag = "4")]
318    pub parallel: ::core::option::Option<bool>,
319    #[prost(uint64, optional, tag = "5")]
320    pub prefetch_size: ::core::option::Option<u64>,
321    #[prost(bool, optional, tag = "6")]
322    pub prefetch: ::core::option::Option<bool>,
323    ///     optional int32 session_idle_timeout_millis = 7;
324    #[prost(uint64, optional, tag = "8")]
325    pub transaction_timeout_millis: ::core::option::Option<u64>,
326    #[prost(uint64, optional, tag = "9")]
327    pub schema_lock_acquire_timeout_millis: ::core::option::Option<u64>,
328    #[prost(bool, optional, tag = "10")]
329    pub read_any_replica: ::core::option::Option<bool>,
330}
331#[derive(Clone, PartialEq, ::prost::Message)]
332pub struct Concept {
333    #[prost(oneof = "concept::Concept", tags = "1, 2, 3, 4, 5, 6, 7")]
334    pub concept: ::core::option::Option<concept::Concept>,
335}
336/// Nested message and enum types in `Concept`.
337pub mod concept {
338    #[derive(Clone, PartialEq, ::prost::Oneof)]
339    pub enum Concept {
340        #[prost(message, tag = "1")]
341        EntityType(super::EntityType),
342        #[prost(message, tag = "2")]
343        RelationType(super::RelationType),
344        #[prost(message, tag = "3")]
345        AttributeType(super::AttributeType),
346        #[prost(message, tag = "4")]
347        RoleType(super::RoleType),
348        #[prost(message, tag = "5")]
349        Entity(super::Entity),
350        #[prost(message, tag = "6")]
351        Relation(super::Relation),
352        #[prost(message, tag = "7")]
353        Attribute(super::Attribute),
354    }
355}
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct Thing {
358    #[prost(oneof = "thing::Thing", tags = "1, 2, 3")]
359    pub thing: ::core::option::Option<thing::Thing>,
360}
361/// Nested message and enum types in `Thing`.
362pub mod thing {
363    #[derive(Clone, PartialEq, ::prost::Oneof)]
364    pub enum Thing {
365        #[prost(message, tag = "1")]
366        Entity(super::Entity),
367        #[prost(message, tag = "2")]
368        Relation(super::Relation),
369        #[prost(message, tag = "3")]
370        Attribute(super::Attribute),
371    }
372}
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct Entity {
375    #[prost(bytes = "vec", tag = "1")]
376    pub iid: ::prost::alloc::vec::Vec<u8>,
377    /// TODO: not sure we should include types by default, since now they can get quite large with annotations included in every single response!
378    ///        perhaps it's a query option?
379    #[prost(message, optional, tag = "2")]
380    pub entity_type: ::core::option::Option<EntityType>,
381}
382#[derive(Clone, PartialEq, ::prost::Message)]
383pub struct Relation {
384    #[prost(bytes = "vec", tag = "1")]
385    pub iid: ::prost::alloc::vec::Vec<u8>,
386    /// TODO: not sure we should include types by default, since now they can get quite large with annotations included in every single response!
387    ///        perhaps it's a query option?
388    #[prost(message, optional, tag = "2")]
389    pub relation_type: ::core::option::Option<RelationType>,
390}
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct Attribute {
393    #[prost(bytes = "vec", tag = "1")]
394    pub iid: ::prost::alloc::vec::Vec<u8>,
395    /// TODO: not sure we should include types by default, since now they can get quite large with annotations included in every single response!
396    ///        perhaps it's a query option?
397    #[prost(message, optional, tag = "2")]
398    pub attribute_type: ::core::option::Option<AttributeType>,
399    #[prost(message, optional, tag = "3")]
400    pub value: ::core::option::Option<Value>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct Value {
404    #[prost(oneof = "value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
405    pub value: ::core::option::Option<value::Value>,
406}
407/// Nested message and enum types in `Value`.
408pub mod value {
409    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
410    pub struct Decimal {
411        #[prost(sint64, tag = "1")]
412        pub integer: i64,
413        #[prost(uint64, tag = "2")]
414        pub fractional: u64,
415    }
416    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
417    pub struct Date {
418        /// days since January 1, 0001 as day 1 in the Gregorian Calendar (following Rust conventions)
419        #[prost(sint32, tag = "1")]
420        pub num_days_since_ce: i32,
421    }
422    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
423    pub struct Datetime {
424        /// seconds since epoch
425        #[prost(sint64, tag = "1")]
426        pub seconds: i64,
427        #[prost(uint32, tag = "2")]
428        pub nanos: u32,
429    }
430    #[derive(Clone, PartialEq, ::prost::Message)]
431    pub struct DatetimeTz {
432        #[prost(message, optional, tag = "1")]
433        pub datetime: ::core::option::Option<Datetime>,
434        #[prost(oneof = "datetime_tz::Timezone", tags = "2, 3")]
435        pub timezone: ::core::option::Option<datetime_tz::Timezone>,
436    }
437    /// Nested message and enum types in `Datetime_TZ`.
438    pub mod datetime_tz {
439        #[derive(Clone, PartialEq, ::prost::Oneof)]
440        pub enum Timezone {
441            #[prost(string, tag = "2")]
442            Named(::prost::alloc::string::String),
443            /// offset in seconds
444            #[prost(sint32, tag = "3")]
445            Offset(i32),
446        }
447    }
448    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
449    pub struct Duration {
450        #[prost(uint32, tag = "1")]
451        pub months: u32,
452        #[prost(uint32, tag = "2")]
453        pub days: u32,
454        #[prost(uint64, tag = "3")]
455        pub nanos: u64,
456    }
457    #[derive(Clone, PartialEq, ::prost::Message)]
458    pub struct Struct {
459        #[prost(string, tag = "1")]
460        pub struct_type_name: ::prost::alloc::string::String,
461    }
462    #[derive(Clone, PartialEq, ::prost::Oneof)]
463    pub enum Value {
464        #[prost(bool, tag = "1")]
465        Boolean(bool),
466        #[prost(sint64, tag = "2")]
467        Integer(i64),
468        #[prost(double, tag = "3")]
469        Double(f64),
470        #[prost(message, tag = "4")]
471        Decimal(Decimal),
472        #[prost(string, tag = "5")]
473        String(::prost::alloc::string::String),
474        #[prost(message, tag = "6")]
475        Date(Date),
476        /// time since epoch in milliseconds
477        #[prost(message, tag = "7")]
478        Datetime(Datetime),
479        #[prost(message, tag = "8")]
480        DatetimeTz(DatetimeTz),
481        #[prost(message, tag = "9")]
482        Duration(Duration),
483        #[prost(message, tag = "10")]
484        Struct(Struct),
485    }
486}
487#[derive(Clone, PartialEq, ::prost::Message)]
488pub struct Type {
489    #[prost(oneof = "r#type::Type", tags = "1, 2, 3, 4")]
490    pub r#type: ::core::option::Option<r#type::Type>,
491}
492/// Nested message and enum types in `Type`.
493pub mod r#type {
494    #[derive(Clone, PartialEq, ::prost::Oneof)]
495    pub enum Type {
496        #[prost(message, tag = "1")]
497        EntityType(super::EntityType),
498        #[prost(message, tag = "2")]
499        RelationType(super::RelationType),
500        #[prost(message, tag = "3")]
501        AttributeType(super::AttributeType),
502        #[prost(message, tag = "4")]
503        RoleType(super::RoleType),
504    }
505}
506#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct RoleType {
508    #[prost(string, tag = "1")]
509    pub label: ::prost::alloc::string::String,
510}
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct EntityType {
513    #[prost(string, tag = "1")]
514    pub label: ::prost::alloc::string::String,
515}
516#[derive(Clone, PartialEq, ::prost::Message)]
517pub struct RelationType {
518    #[prost(string, tag = "1")]
519    pub label: ::prost::alloc::string::String,
520}
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct AttributeType {
523    #[prost(string, tag = "1")]
524    pub label: ::prost::alloc::string::String,
525    #[prost(message, optional, tag = "2")]
526    pub value_type: ::core::option::Option<ValueType>,
527}
528#[derive(Clone, PartialEq, ::prost::Message)]
529pub struct ValueType {
530    #[prost(oneof = "value_type::ValueType", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
531    pub value_type: ::core::option::Option<value_type::ValueType>,
532}
533/// Nested message and enum types in `ValueType`.
534pub mod value_type {
535    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
536    pub struct Boolean {}
537    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
538    pub struct Integer {}
539    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
540    pub struct Double {}
541    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
542    pub struct Decimal {}
543    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
544    pub struct String {}
545    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
546    pub struct Date {}
547    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
548    pub struct DateTime {}
549    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
550    pub struct DateTimeTz {}
551    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
552    pub struct Duration {}
553    #[derive(Clone, PartialEq, ::prost::Message)]
554    pub struct Struct {
555        #[prost(string, tag = "1")]
556        pub name: ::prost::alloc::string::String,
557    }
558    #[derive(Clone, PartialEq, ::prost::Oneof)]
559    pub enum ValueType {
560        #[prost(message, tag = "1")]
561        Boolean(Boolean),
562        #[prost(message, tag = "2")]
563        Integer(Integer),
564        #[prost(message, tag = "3")]
565        Double(Double),
566        #[prost(message, tag = "4")]
567        Decimal(Decimal),
568        #[prost(message, tag = "5")]
569        String(String),
570        #[prost(message, tag = "6")]
571        Date(Date),
572        #[prost(message, tag = "7")]
573        Datetime(DateTime),
574        #[prost(message, tag = "8")]
575        DatetimeTz(DateTimeTz),
576        #[prost(message, tag = "9")]
577        Duration(Duration),
578        #[prost(message, tag = "10")]
579        Struct(Struct),
580    }
581}
582#[derive(Clone, Copy, PartialEq, ::prost::Message)]
583pub struct Annotation {
584    #[prost(oneof = "annotation::Annotation", tags = "1, 2")]
585    pub annotation: ::core::option::Option<annotation::Annotation>,
586}
587/// Nested message and enum types in `Annotation`.
588pub mod annotation {
589    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
590    pub struct Key {}
591    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
592    pub struct Unique {}
593    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
594    pub enum Annotation {
595        #[prost(message, tag = "1")]
596        Key(Key),
597        /// TODO
598        #[prost(message, tag = "2")]
599        Unique(Unique),
600    }
601}
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct ConceptRow {
604    ///     Explainables explainables = 2;
605    #[prost(message, repeated, tag = "1")]
606    pub row: ::prost::alloc::vec::Vec<RowEntry>,
607}
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct RowEntry {
610    #[prost(oneof = "row_entry::Entry", tags = "1, 2, 3, 4, 5")]
611    pub entry: ::core::option::Option<row_entry::Entry>,
612}
613/// Nested message and enum types in `RowEntry`.
614pub mod row_entry {
615    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
616    pub struct Empty {}
617    #[derive(Clone, PartialEq, ::prost::Message)]
618    pub struct ConceptList {
619        #[prost(message, repeated, tag = "1")]
620        pub concepts: ::prost::alloc::vec::Vec<super::Concept>,
621    }
622    #[derive(Clone, PartialEq, ::prost::Message)]
623    pub struct ValueList {
624        #[prost(message, repeated, tag = "1")]
625        pub values: ::prost::alloc::vec::Vec<super::Value>,
626    }
627    #[derive(Clone, PartialEq, ::prost::Oneof)]
628    pub enum Entry {
629        #[prost(message, tag = "1")]
630        Empty(Empty),
631        #[prost(message, tag = "2")]
632        Concept(super::Concept),
633        #[prost(message, tag = "3")]
634        Value(super::Value),
635        #[prost(message, tag = "4")]
636        ConceptList(ConceptList),
637        #[prost(message, tag = "5")]
638        ValueList(ValueList),
639    }
640}
641#[derive(Clone, PartialEq, ::prost::Message)]
642pub struct ConceptDocument {
643    #[prost(message, optional, tag = "1")]
644    pub root: ::core::option::Option<concept_document::Node>,
645}
646/// Nested message and enum types in `ConceptDocument`.
647pub mod concept_document {
648    #[derive(Clone, PartialEq, ::prost::Message)]
649    pub struct Node {
650        #[prost(oneof = "node::Node", tags = "1, 2, 3")]
651        pub node: ::core::option::Option<node::Node>,
652    }
653    /// Nested message and enum types in `Node`.
654    pub mod node {
655        #[derive(Clone, PartialEq, ::prost::Message)]
656        pub struct Map {
657            #[prost(map = "string, message", tag = "1")]
658            pub map: ::std::collections::HashMap<
659                ::prost::alloc::string::String,
660                super::Node,
661            >,
662        }
663        #[derive(Clone, PartialEq, ::prost::Message)]
664        pub struct List {
665            #[prost(message, repeated, tag = "1")]
666            pub list: ::prost::alloc::vec::Vec<super::Node>,
667        }
668        #[derive(Clone, PartialEq, ::prost::Message)]
669        pub struct Leaf {
670            #[prost(oneof = "leaf::Leaf", tags = "1, 10, 11, 12, 13, 15, 20, 21, 30")]
671            pub leaf: ::core::option::Option<leaf::Leaf>,
672        }
673        /// Nested message and enum types in `Leaf`.
674        pub mod leaf {
675            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
676            pub struct Empty {}
677            #[derive(
678                Clone,
679                Copy,
680                Debug,
681                PartialEq,
682                Eq,
683                Hash,
684                PartialOrd,
685                Ord,
686                ::prost::Enumeration
687            )]
688            #[repr(i32)]
689            pub enum Kind {
690                Entity = 0,
691                Relation = 1,
692                Attribute = 3,
693                Role = 4,
694            }
695            impl Kind {
696                /// String value of the enum field names used in the ProtoBuf definition.
697                ///
698                /// The values are not transformed in any way and thus are considered stable
699                /// (if the ProtoBuf definition does not change) and safe for programmatic use.
700                pub fn as_str_name(&self) -> &'static str {
701                    match self {
702                        Self::Entity => "Entity",
703                        Self::Relation => "Relation",
704                        Self::Attribute => "Attribute",
705                        Self::Role => "Role",
706                    }
707                }
708                /// Creates an enum from field names used in the ProtoBuf definition.
709                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
710                    match value {
711                        "Entity" => Some(Self::Entity),
712                        "Relation" => Some(Self::Relation),
713                        "Attribute" => Some(Self::Attribute),
714                        "Role" => Some(Self::Role),
715                        _ => None,
716                    }
717                }
718            }
719            #[derive(Clone, PartialEq, ::prost::Oneof)]
720            pub enum Leaf {
721                #[prost(message, tag = "1")]
722                Empty(Empty),
723                #[prost(message, tag = "10")]
724                EntityType(super::super::super::EntityType),
725                #[prost(message, tag = "11")]
726                RelationType(super::super::super::RelationType),
727                #[prost(message, tag = "12")]
728                AttributeType(super::super::super::AttributeType),
729                #[prost(message, tag = "13")]
730                RoleType(super::super::super::RoleType),
731                #[prost(message, tag = "15")]
732                ValueType(super::super::super::ValueType),
733                #[prost(message, tag = "20")]
734                Attribute(super::super::super::Attribute),
735                #[prost(message, tag = "21")]
736                Value(super::super::super::Value),
737                #[prost(enumeration = "Kind", tag = "30")]
738                Kind(i32),
739            }
740        }
741        #[derive(Clone, PartialEq, ::prost::Oneof)]
742        pub enum Node {
743            #[prost(message, tag = "1")]
744            Map(Map),
745            #[prost(message, tag = "2")]
746            List(List),
747            #[prost(message, tag = "3")]
748            Leaf(Leaf),
749        }
750    }
751}
752#[derive(Clone, Copy, PartialEq, ::prost::Message)]
753pub struct Query {}
754/// Nested message and enum types in `Query`.
755pub mod query {
756    #[derive(Clone, PartialEq, ::prost::Message)]
757    pub struct Req {
758        #[prost(message, optional, tag = "1")]
759        pub options: ::core::option::Option<super::Options>,
760        #[prost(string, tag = "2")]
761        pub query: ::prost::alloc::string::String,
762    }
763    #[derive(Clone, PartialEq, ::prost::Message)]
764    pub struct InitialRes {
765        #[prost(oneof = "initial_res::Res", tags = "1, 2")]
766        pub res: ::core::option::Option<initial_res::Res>,
767    }
768    /// Nested message and enum types in `InitialRes`.
769    pub mod initial_res {
770        #[derive(Clone, PartialEq, ::prost::Message)]
771        pub struct Ok {
772            #[prost(oneof = "ok::Ok", tags = "1, 3, 4")]
773            pub ok: ::core::option::Option<ok::Ok>,
774        }
775        /// Nested message and enum types in `Ok`.
776        pub mod ok {
777            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
778            pub struct Done {
779                #[prost(enumeration = "super::super::Type", tag = "1")]
780                pub query_type: i32,
781            }
782            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
783            pub struct ConceptDocumentStream {
784                /// note: we could use this first response to record debug info, type annotations, warnings, etc
785                /// TODO: network optimisation: replace keys with IDs, sending keys in the header to rebuild the document on the client side
786                /// TODO: network optimisation: replace types (== mostly constant strings) with a IDs, sending types in the header to rebuild on the client side
787                #[prost(enumeration = "super::super::Type", tag = "2")]
788                pub query_type: i32,
789            }
790            #[derive(Clone, PartialEq, ::prost::Message)]
791            pub struct ConceptRowStream {
792                /// TODO: network optimisation: replace types (== mostly constant strings) with a IDs, sending types in the header to rebuild on the client side
793                #[prost(string, repeated, tag = "1")]
794                pub column_variable_names: ::prost::alloc::vec::Vec<
795                    ::prost::alloc::string::String,
796                >,
797                #[prost(enumeration = "super::super::Type", tag = "2")]
798                pub query_type: i32,
799            }
800            #[derive(Clone, PartialEq, ::prost::Oneof)]
801            pub enum Ok {
802                #[prost(message, tag = "1")]
803                Done(Done),
804                #[prost(message, tag = "3")]
805                ConceptDocumentStream(ConceptDocumentStream),
806                #[prost(message, tag = "4")]
807                ConceptRowStream(ConceptRowStream),
808            }
809        }
810        #[derive(Clone, PartialEq, ::prost::Oneof)]
811        pub enum Res {
812            #[prost(message, tag = "1")]
813            Error(super::super::Error),
814            #[prost(message, tag = "2")]
815            Ok(Ok),
816        }
817    }
818    #[derive(Clone, PartialEq, ::prost::Message)]
819    pub struct ResPart {
820        #[prost(oneof = "res_part::Res", tags = "1, 2")]
821        pub res: ::core::option::Option<res_part::Res>,
822    }
823    /// Nested message and enum types in `ResPart`.
824    pub mod res_part {
825        #[derive(Clone, PartialEq, ::prost::Message)]
826        pub struct ConceptDocumentsRes {
827            #[prost(message, repeated, tag = "1")]
828            pub documents: ::prost::alloc::vec::Vec<super::super::ConceptDocument>,
829        }
830        #[derive(Clone, PartialEq, ::prost::Message)]
831        pub struct ConceptRowsRes {
832            #[prost(message, repeated, tag = "1")]
833            pub rows: ::prost::alloc::vec::Vec<super::super::ConceptRow>,
834        }
835        #[derive(Clone, PartialEq, ::prost::Oneof)]
836        pub enum Res {
837            #[prost(message, tag = "1")]
838            DocumentsRes(ConceptDocumentsRes),
839            #[prost(message, tag = "2")]
840            RowsRes(ConceptRowsRes),
841        }
842    }
843    #[derive(
844        Clone,
845        Copy,
846        Debug,
847        PartialEq,
848        Eq,
849        Hash,
850        PartialOrd,
851        Ord,
852        ::prost::Enumeration
853    )]
854    #[repr(i32)]
855    pub enum Type {
856        Read = 0,
857        Write = 1,
858        Schema = 2,
859    }
860    impl Type {
861        /// String value of the enum field names used in the ProtoBuf definition.
862        ///
863        /// The values are not transformed in any way and thus are considered stable
864        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
865        pub fn as_str_name(&self) -> &'static str {
866            match self {
867                Self::Read => "READ",
868                Self::Write => "WRITE",
869                Self::Schema => "SCHEMA",
870            }
871        }
872        /// Creates an enum from field names used in the ProtoBuf definition.
873        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
874            match value {
875                "READ" => Some(Self::Read),
876                "WRITE" => Some(Self::Write),
877                "SCHEMA" => Some(Self::Schema),
878                _ => None,
879            }
880        }
881    }
882}
883/// This is an emulation of the google ErrorDetails message. Sometimes we submit ErrorDetails via the GRPC error mechanism
884/// and sometimes (in streams) we have to manually send errors
885#[derive(Clone, PartialEq, ::prost::Message)]
886pub struct Error {
887    #[prost(string, tag = "1")]
888    pub error_code: ::prost::alloc::string::String,
889    #[prost(string, tag = "2")]
890    pub domain: ::prost::alloc::string::String,
891    #[prost(string, repeated, tag = "3")]
892    pub stack_trace: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
893}
894#[derive(Clone, Copy, PartialEq, ::prost::Message)]
895pub struct Transaction {}
896/// Nested message and enum types in `Transaction`.
897pub mod transaction {
898    #[derive(Clone, PartialEq, ::prost::Message)]
899    pub struct Client {
900        #[prost(message, repeated, tag = "1")]
901        pub reqs: ::prost::alloc::vec::Vec<Req>,
902    }
903    #[derive(Clone, PartialEq, ::prost::Message)]
904    pub struct Server {
905        #[prost(oneof = "server::Server", tags = "1, 2")]
906        pub server: ::core::option::Option<server::Server>,
907    }
908    /// Nested message and enum types in `Server`.
909    pub mod server {
910        #[derive(Clone, PartialEq, ::prost::Oneof)]
911        pub enum Server {
912            #[prost(message, tag = "1")]
913            Res(super::Res),
914            #[prost(message, tag = "2")]
915            ResPart(super::ResPart),
916        }
917    }
918    #[derive(Clone, PartialEq, ::prost::Message)]
919    pub struct Req {
920        #[prost(bytes = "vec", tag = "1")]
921        pub req_id: ::prost::alloc::vec::Vec<u8>,
922        #[prost(map = "string, string", tag = "2")]
923        pub metadata: ::std::collections::HashMap<
924            ::prost::alloc::string::String,
925            ::prost::alloc::string::String,
926        >,
927        #[prost(oneof = "req::Req", tags = "3, 4, 5, 6, 7, 8")]
928        pub req: ::core::option::Option<req::Req>,
929    }
930    /// Nested message and enum types in `Req`.
931    pub mod req {
932        #[derive(Clone, PartialEq, ::prost::Oneof)]
933        pub enum Req {
934            #[prost(message, tag = "3")]
935            OpenReq(super::open::Req),
936            #[prost(message, tag = "4")]
937            QueryReq(super::super::query::Req),
938            #[prost(message, tag = "5")]
939            StreamReq(super::stream_signal::Req),
940            #[prost(message, tag = "6")]
941            CommitReq(super::commit::Req),
942            #[prost(message, tag = "7")]
943            RollbackReq(super::rollback::Req),
944            #[prost(message, tag = "8")]
945            CloseReq(super::close::Req),
946        }
947    }
948    #[derive(Clone, PartialEq, ::prost::Message)]
949    pub struct Res {
950        #[prost(bytes = "vec", tag = "1")]
951        pub req_id: ::prost::alloc::vec::Vec<u8>,
952        #[prost(oneof = "res::Res", tags = "2, 3, 5, 6")]
953        pub res: ::core::option::Option<res::Res>,
954    }
955    /// Nested message and enum types in `Res`.
956    pub mod res {
957        #[derive(Clone, PartialEq, ::prost::Oneof)]
958        pub enum Res {
959            #[prost(message, tag = "2")]
960            OpenRes(super::open::Res),
961            #[prost(message, tag = "3")]
962            QueryInitialRes(super::super::query::InitialRes),
963            #[prost(message, tag = "5")]
964            CommitRes(super::commit::Res),
965            #[prost(message, tag = "6")]
966            RollbackRes(super::rollback::Res),
967        }
968    }
969    #[derive(Clone, PartialEq, ::prost::Message)]
970    pub struct ResPart {
971        #[prost(bytes = "vec", tag = "1")]
972        pub req_id: ::prost::alloc::vec::Vec<u8>,
973        #[prost(oneof = "res_part::ResPart", tags = "2, 3")]
974        pub res_part: ::core::option::Option<res_part::ResPart>,
975    }
976    /// Nested message and enum types in `ResPart`.
977    pub mod res_part {
978        #[derive(Clone, PartialEq, ::prost::Oneof)]
979        pub enum ResPart {
980            #[prost(message, tag = "2")]
981            QueryRes(super::super::query::ResPart),
982            #[prost(message, tag = "3")]
983            StreamRes(super::stream_signal::ResPart),
984        }
985    }
986    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
987    pub struct Open {}
988    /// Nested message and enum types in `Open`.
989    pub mod open {
990        #[derive(Clone, PartialEq, ::prost::Message)]
991        pub struct Req {
992            #[prost(string, tag = "1")]
993            pub database: ::prost::alloc::string::String,
994            #[prost(enumeration = "super::Type", tag = "2")]
995            pub r#type: i32,
996            #[prost(message, optional, tag = "3")]
997            pub options: ::core::option::Option<super::super::Options>,
998            #[prost(uint64, tag = "4")]
999            pub network_latency_millis: u64,
1000        }
1001        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1002        pub struct Res {
1003            #[prost(uint64, tag = "2")]
1004            pub server_duration_millis: u64,
1005        }
1006    }
1007    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1008    pub struct Commit {}
1009    /// Nested message and enum types in `Commit`.
1010    pub mod commit {
1011        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1012        pub struct Req {}
1013        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1014        pub struct Res {}
1015    }
1016    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1017    pub struct Rollback {}
1018    /// Nested message and enum types in `Rollback`.
1019    pub mod rollback {
1020        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1021        pub struct Req {}
1022        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1023        pub struct Res {}
1024    }
1025    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1026    pub struct Close {}
1027    /// Nested message and enum types in `Close`.
1028    pub mod close {
1029        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1030        pub struct Req {}
1031        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1032        pub struct Res {}
1033    }
1034    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1035    pub struct GetSchemaExceptions {}
1036    /// Nested message and enum types in `GetSchemaExceptions`.
1037    pub mod get_schema_exceptions {
1038        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1039        pub struct Req {}
1040        #[derive(Clone, PartialEq, ::prost::Message)]
1041        pub struct Res {
1042            #[prost(message, repeated, tag = "1")]
1043            pub exceptions: ::prost::alloc::vec::Vec<super::SchemaException>,
1044        }
1045    }
1046    #[derive(Clone, PartialEq, ::prost::Message)]
1047    pub struct SchemaException {
1048        #[prost(string, tag = "1")]
1049        pub code: ::prost::alloc::string::String,
1050        #[prost(string, tag = "2")]
1051        pub message: ::prost::alloc::string::String,
1052    }
1053    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1054    pub struct StreamSignal {}
1055    /// Nested message and enum types in `StreamSignal`.
1056    pub mod stream_signal {
1057        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1058        pub struct Req {}
1059        #[derive(Clone, PartialEq, ::prost::Message)]
1060        pub struct ResPart {
1061            #[prost(oneof = "res_part::State", tags = "1, 2, 3")]
1062            pub state: ::core::option::Option<res_part::State>,
1063        }
1064        /// Nested message and enum types in `ResPart`.
1065        pub mod res_part {
1066            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1067            pub struct Continue {}
1068            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1069            pub struct Done {}
1070            #[derive(Clone, PartialEq, ::prost::Oneof)]
1071            pub enum State {
1072                #[prost(message, tag = "1")]
1073                Continue(Continue),
1074                #[prost(message, tag = "2")]
1075                Done(Done),
1076                #[prost(message, tag = "3")]
1077                Error(super::super::super::Error),
1078            }
1079        }
1080    }
1081    #[derive(
1082        Clone,
1083        Copy,
1084        Debug,
1085        PartialEq,
1086        Eq,
1087        Hash,
1088        PartialOrd,
1089        Ord,
1090        ::prost::Enumeration
1091    )]
1092    #[repr(i32)]
1093    pub enum Type {
1094        Read = 0,
1095        Write = 1,
1096        Schema = 2,
1097    }
1098    impl Type {
1099        /// String value of the enum field names used in the ProtoBuf definition.
1100        ///
1101        /// The values are not transformed in any way and thus are considered stable
1102        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1103        pub fn as_str_name(&self) -> &'static str {
1104            match self {
1105                Self::Read => "READ",
1106                Self::Write => "WRITE",
1107                Self::Schema => "SCHEMA",
1108            }
1109        }
1110        /// Creates an enum from field names used in the ProtoBuf definition.
1111        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1112            match value {
1113                "READ" => Some(Self::Read),
1114                "WRITE" => Some(Self::Write),
1115                "SCHEMA" => Some(Self::Schema),
1116                _ => None,
1117            }
1118        }
1119    }
1120}
1121/// Generated client implementations.
1122#[allow(non_camel_case_types)]
1123pub mod type_db_client {
1124    #![allow(
1125        unused_variables,
1126        dead_code,
1127        missing_docs,
1128        clippy::wildcard_imports,
1129        clippy::let_unit_value,
1130    )]
1131    use tonic::codegen::*;
1132    use tonic::codegen::http::Uri;
1133    #[derive(Debug, Clone)]
1134    pub struct TypeDbClient<T> {
1135        inner: tonic::client::Grpc<T>,
1136    }
1137    impl TypeDbClient<tonic::transport::Channel> {
1138        /// Attempt to create a new client by connecting to a given endpoint.
1139        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1140        where
1141            D: TryInto<tonic::transport::Endpoint>,
1142            D::Error: Into<StdError>,
1143        {
1144            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1145            Ok(Self::new(conn))
1146        }
1147    }
1148    impl<T> TypeDbClient<T>
1149    where
1150        T: tonic::client::GrpcService<tonic::body::BoxBody>,
1151        T::Error: Into<StdError>,
1152        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1153        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1154    {
1155        pub fn new(inner: T) -> Self {
1156            let inner = tonic::client::Grpc::new(inner);
1157            Self { inner }
1158        }
1159        pub fn with_origin(inner: T, origin: Uri) -> Self {
1160            let inner = tonic::client::Grpc::with_origin(inner, origin);
1161            Self { inner }
1162        }
1163        pub fn with_interceptor<F>(
1164            inner: T,
1165            interceptor: F,
1166        ) -> TypeDbClient<InterceptedService<T, F>>
1167        where
1168            F: tonic::service::Interceptor,
1169            T::ResponseBody: Default,
1170            T: tonic::codegen::Service<
1171                http::Request<tonic::body::BoxBody>,
1172                Response = http::Response<
1173                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1174                >,
1175            >,
1176            <T as tonic::codegen::Service<
1177                http::Request<tonic::body::BoxBody>,
1178            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1179        {
1180            TypeDbClient::new(InterceptedService::new(inner, interceptor))
1181        }
1182        /// Compress requests with the given encoding.
1183        ///
1184        /// This requires the server to support it otherwise it might respond with an
1185        /// error.
1186        #[must_use]
1187        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1188            self.inner = self.inner.send_compressed(encoding);
1189            self
1190        }
1191        /// Enable decompressing responses.
1192        #[must_use]
1193        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1194            self.inner = self.inner.accept_compressed(encoding);
1195            self
1196        }
1197        /// Limits the maximum size of a decoded message.
1198        ///
1199        /// Default: `4MB`
1200        #[must_use]
1201        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1202            self.inner = self.inner.max_decoding_message_size(limit);
1203            self
1204        }
1205        /// Limits the maximum size of an encoded message.
1206        ///
1207        /// Default: `usize::MAX`
1208        #[must_use]
1209        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1210            self.inner = self.inner.max_encoding_message_size(limit);
1211            self
1212        }
1213        /// Connection API
1214        pub async fn connection_open(
1215            &mut self,
1216            request: impl tonic::IntoRequest<super::connection::open::Req>,
1217        ) -> std::result::Result<
1218            tonic::Response<super::connection::open::Res>,
1219            tonic::Status,
1220        > {
1221            self.inner
1222                .ready()
1223                .await
1224                .map_err(|e| {
1225                    tonic::Status::unknown(
1226                        format!("Service was not ready: {}", e.into()),
1227                    )
1228                })?;
1229            let codec = tonic::codec::ProstCodec::default();
1230            let path = http::uri::PathAndQuery::from_static(
1231                "/typedb.protocol.TypeDB/connection_open",
1232            );
1233            let mut req = request.into_request();
1234            req.extensions_mut()
1235                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "connection_open"));
1236            self.inner.unary(req, path, codec).await
1237        }
1238        /// Server Manager API
1239        pub async fn servers_all(
1240            &mut self,
1241            request: impl tonic::IntoRequest<super::server_manager::all::Req>,
1242        ) -> std::result::Result<
1243            tonic::Response<super::server_manager::all::Res>,
1244            tonic::Status,
1245        > {
1246            self.inner
1247                .ready()
1248                .await
1249                .map_err(|e| {
1250                    tonic::Status::unknown(
1251                        format!("Service was not ready: {}", e.into()),
1252                    )
1253                })?;
1254            let codec = tonic::codec::ProstCodec::default();
1255            let path = http::uri::PathAndQuery::from_static(
1256                "/typedb.protocol.TypeDB/servers_all",
1257            );
1258            let mut req = request.into_request();
1259            req.extensions_mut()
1260                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "servers_all"));
1261            self.inner.unary(req, path, codec).await
1262        }
1263        /// User Manager API
1264        pub async fn users_get(
1265            &mut self,
1266            request: impl tonic::IntoRequest<super::user_manager::get::Req>,
1267        ) -> std::result::Result<
1268            tonic::Response<super::user_manager::get::Res>,
1269            tonic::Status,
1270        > {
1271            self.inner
1272                .ready()
1273                .await
1274                .map_err(|e| {
1275                    tonic::Status::unknown(
1276                        format!("Service was not ready: {}", e.into()),
1277                    )
1278                })?;
1279            let codec = tonic::codec::ProstCodec::default();
1280            let path = http::uri::PathAndQuery::from_static(
1281                "/typedb.protocol.TypeDB/users_get",
1282            );
1283            let mut req = request.into_request();
1284            req.extensions_mut()
1285                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_get"));
1286            self.inner.unary(req, path, codec).await
1287        }
1288        pub async fn users_all(
1289            &mut self,
1290            request: impl tonic::IntoRequest<super::user_manager::all::Req>,
1291        ) -> std::result::Result<
1292            tonic::Response<super::user_manager::all::Res>,
1293            tonic::Status,
1294        > {
1295            self.inner
1296                .ready()
1297                .await
1298                .map_err(|e| {
1299                    tonic::Status::unknown(
1300                        format!("Service was not ready: {}", e.into()),
1301                    )
1302                })?;
1303            let codec = tonic::codec::ProstCodec::default();
1304            let path = http::uri::PathAndQuery::from_static(
1305                "/typedb.protocol.TypeDB/users_all",
1306            );
1307            let mut req = request.into_request();
1308            req.extensions_mut()
1309                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_all"));
1310            self.inner.unary(req, path, codec).await
1311        }
1312        pub async fn users_contains(
1313            &mut self,
1314            request: impl tonic::IntoRequest<super::user_manager::contains::Req>,
1315        ) -> std::result::Result<
1316            tonic::Response<super::user_manager::contains::Res>,
1317            tonic::Status,
1318        > {
1319            self.inner
1320                .ready()
1321                .await
1322                .map_err(|e| {
1323                    tonic::Status::unknown(
1324                        format!("Service was not ready: {}", e.into()),
1325                    )
1326                })?;
1327            let codec = tonic::codec::ProstCodec::default();
1328            let path = http::uri::PathAndQuery::from_static(
1329                "/typedb.protocol.TypeDB/users_contains",
1330            );
1331            let mut req = request.into_request();
1332            req.extensions_mut()
1333                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_contains"));
1334            self.inner.unary(req, path, codec).await
1335        }
1336        pub async fn users_create(
1337            &mut self,
1338            request: impl tonic::IntoRequest<super::user_manager::create::Req>,
1339        ) -> std::result::Result<
1340            tonic::Response<super::user_manager::create::Res>,
1341            tonic::Status,
1342        > {
1343            self.inner
1344                .ready()
1345                .await
1346                .map_err(|e| {
1347                    tonic::Status::unknown(
1348                        format!("Service was not ready: {}", e.into()),
1349                    )
1350                })?;
1351            let codec = tonic::codec::ProstCodec::default();
1352            let path = http::uri::PathAndQuery::from_static(
1353                "/typedb.protocol.TypeDB/users_create",
1354            );
1355            let mut req = request.into_request();
1356            req.extensions_mut()
1357                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_create"));
1358            self.inner.unary(req, path, codec).await
1359        }
1360        /// User API
1361        pub async fn users_update(
1362            &mut self,
1363            request: impl tonic::IntoRequest<super::user::update::Req>,
1364        ) -> std::result::Result<
1365            tonic::Response<super::user::update::Res>,
1366            tonic::Status,
1367        > {
1368            self.inner
1369                .ready()
1370                .await
1371                .map_err(|e| {
1372                    tonic::Status::unknown(
1373                        format!("Service was not ready: {}", e.into()),
1374                    )
1375                })?;
1376            let codec = tonic::codec::ProstCodec::default();
1377            let path = http::uri::PathAndQuery::from_static(
1378                "/typedb.protocol.TypeDB/users_update",
1379            );
1380            let mut req = request.into_request();
1381            req.extensions_mut()
1382                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_update"));
1383            self.inner.unary(req, path, codec).await
1384        }
1385        pub async fn users_delete(
1386            &mut self,
1387            request: impl tonic::IntoRequest<super::user::delete::Req>,
1388        ) -> std::result::Result<
1389            tonic::Response<super::user::delete::Res>,
1390            tonic::Status,
1391        > {
1392            self.inner
1393                .ready()
1394                .await
1395                .map_err(|e| {
1396                    tonic::Status::unknown(
1397                        format!("Service was not ready: {}", e.into()),
1398                    )
1399                })?;
1400            let codec = tonic::codec::ProstCodec::default();
1401            let path = http::uri::PathAndQuery::from_static(
1402                "/typedb.protocol.TypeDB/users_delete",
1403            );
1404            let mut req = request.into_request();
1405            req.extensions_mut()
1406                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_delete"));
1407            self.inner.unary(req, path, codec).await
1408        }
1409        /// Database Manager API
1410        pub async fn databases_get(
1411            &mut self,
1412            request: impl tonic::IntoRequest<super::database_manager::get::Req>,
1413        ) -> std::result::Result<
1414            tonic::Response<super::database_manager::get::Res>,
1415            tonic::Status,
1416        > {
1417            self.inner
1418                .ready()
1419                .await
1420                .map_err(|e| {
1421                    tonic::Status::unknown(
1422                        format!("Service was not ready: {}", e.into()),
1423                    )
1424                })?;
1425            let codec = tonic::codec::ProstCodec::default();
1426            let path = http::uri::PathAndQuery::from_static(
1427                "/typedb.protocol.TypeDB/databases_get",
1428            );
1429            let mut req = request.into_request();
1430            req.extensions_mut()
1431                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_get"));
1432            self.inner.unary(req, path, codec).await
1433        }
1434        pub async fn databases_all(
1435            &mut self,
1436            request: impl tonic::IntoRequest<super::database_manager::all::Req>,
1437        ) -> std::result::Result<
1438            tonic::Response<super::database_manager::all::Res>,
1439            tonic::Status,
1440        > {
1441            self.inner
1442                .ready()
1443                .await
1444                .map_err(|e| {
1445                    tonic::Status::unknown(
1446                        format!("Service was not ready: {}", e.into()),
1447                    )
1448                })?;
1449            let codec = tonic::codec::ProstCodec::default();
1450            let path = http::uri::PathAndQuery::from_static(
1451                "/typedb.protocol.TypeDB/databases_all",
1452            );
1453            let mut req = request.into_request();
1454            req.extensions_mut()
1455                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_all"));
1456            self.inner.unary(req, path, codec).await
1457        }
1458        pub async fn databases_contains(
1459            &mut self,
1460            request: impl tonic::IntoRequest<super::database_manager::contains::Req>,
1461        ) -> std::result::Result<
1462            tonic::Response<super::database_manager::contains::Res>,
1463            tonic::Status,
1464        > {
1465            self.inner
1466                .ready()
1467                .await
1468                .map_err(|e| {
1469                    tonic::Status::unknown(
1470                        format!("Service was not ready: {}", e.into()),
1471                    )
1472                })?;
1473            let codec = tonic::codec::ProstCodec::default();
1474            let path = http::uri::PathAndQuery::from_static(
1475                "/typedb.protocol.TypeDB/databases_contains",
1476            );
1477            let mut req = request.into_request();
1478            req.extensions_mut()
1479                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_contains"));
1480            self.inner.unary(req, path, codec).await
1481        }
1482        pub async fn databases_create(
1483            &mut self,
1484            request: impl tonic::IntoRequest<super::database_manager::create::Req>,
1485        ) -> std::result::Result<
1486            tonic::Response<super::database_manager::create::Res>,
1487            tonic::Status,
1488        > {
1489            self.inner
1490                .ready()
1491                .await
1492                .map_err(|e| {
1493                    tonic::Status::unknown(
1494                        format!("Service was not ready: {}", e.into()),
1495                    )
1496                })?;
1497            let codec = tonic::codec::ProstCodec::default();
1498            let path = http::uri::PathAndQuery::from_static(
1499                "/typedb.protocol.TypeDB/databases_create",
1500            );
1501            let mut req = request.into_request();
1502            req.extensions_mut()
1503                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_create"));
1504            self.inner.unary(req, path, codec).await
1505        }
1506        /// Database API
1507        pub async fn database_schema(
1508            &mut self,
1509            request: impl tonic::IntoRequest<super::database::schema::Req>,
1510        ) -> std::result::Result<
1511            tonic::Response<super::database::schema::Res>,
1512            tonic::Status,
1513        > {
1514            self.inner
1515                .ready()
1516                .await
1517                .map_err(|e| {
1518                    tonic::Status::unknown(
1519                        format!("Service was not ready: {}", e.into()),
1520                    )
1521                })?;
1522            let codec = tonic::codec::ProstCodec::default();
1523            let path = http::uri::PathAndQuery::from_static(
1524                "/typedb.protocol.TypeDB/database_schema",
1525            );
1526            let mut req = request.into_request();
1527            req.extensions_mut()
1528                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_schema"));
1529            self.inner.unary(req, path, codec).await
1530        }
1531        pub async fn database_type_schema(
1532            &mut self,
1533            request: impl tonic::IntoRequest<super::database::type_schema::Req>,
1534        ) -> std::result::Result<
1535            tonic::Response<super::database::type_schema::Res>,
1536            tonic::Status,
1537        > {
1538            self.inner
1539                .ready()
1540                .await
1541                .map_err(|e| {
1542                    tonic::Status::unknown(
1543                        format!("Service was not ready: {}", e.into()),
1544                    )
1545                })?;
1546            let codec = tonic::codec::ProstCodec::default();
1547            let path = http::uri::PathAndQuery::from_static(
1548                "/typedb.protocol.TypeDB/database_type_schema",
1549            );
1550            let mut req = request.into_request();
1551            req.extensions_mut()
1552                .insert(
1553                    GrpcMethod::new("typedb.protocol.TypeDB", "database_type_schema"),
1554                );
1555            self.inner.unary(req, path, codec).await
1556        }
1557        pub async fn database_delete(
1558            &mut self,
1559            request: impl tonic::IntoRequest<super::database::delete::Req>,
1560        ) -> std::result::Result<
1561            tonic::Response<super::database::delete::Res>,
1562            tonic::Status,
1563        > {
1564            self.inner
1565                .ready()
1566                .await
1567                .map_err(|e| {
1568                    tonic::Status::unknown(
1569                        format!("Service was not ready: {}", e.into()),
1570                    )
1571                })?;
1572            let codec = tonic::codec::ProstCodec::default();
1573            let path = http::uri::PathAndQuery::from_static(
1574                "/typedb.protocol.TypeDB/database_delete",
1575            );
1576            let mut req = request.into_request();
1577            req.extensions_mut()
1578                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_delete"));
1579            self.inner.unary(req, path, codec).await
1580        }
1581        /// Transaction Streaming API
1582        /// Opens a bi-directional stream representing a stateful transaction, streaming
1583        /// requests and responses back-and-forth. The first transaction client message must
1584        /// be {Transaction.Open.Req}. Closing the stream closes the transaction.
1585        pub async fn transaction(
1586            &mut self,
1587            request: impl tonic::IntoStreamingRequest<
1588                Message = super::transaction::Client,
1589            >,
1590        ) -> std::result::Result<
1591            tonic::Response<tonic::codec::Streaming<super::transaction::Server>>,
1592            tonic::Status,
1593        > {
1594            self.inner
1595                .ready()
1596                .await
1597                .map_err(|e| {
1598                    tonic::Status::unknown(
1599                        format!("Service was not ready: {}", e.into()),
1600                    )
1601                })?;
1602            let codec = tonic::codec::ProstCodec::default();
1603            let path = http::uri::PathAndQuery::from_static(
1604                "/typedb.protocol.TypeDB/transaction",
1605            );
1606            let mut req = request.into_streaming_request();
1607            req.extensions_mut()
1608                .insert(GrpcMethod::new("typedb.protocol.TypeDB", "transaction"));
1609            self.inner.streaming(req, path, codec).await
1610        }
1611    }
1612}
1613/// Generated server implementations.
1614#[allow(non_camel_case_types)]
1615pub mod type_db_server {
1616    #![allow(
1617        unused_variables,
1618        dead_code,
1619        missing_docs,
1620        clippy::wildcard_imports,
1621        clippy::let_unit_value,
1622    )]
1623    use tonic::codegen::*;
1624    /// Generated trait containing gRPC methods that should be implemented for use with TypeDbServer.
1625    #[async_trait]
1626    pub trait TypeDb: std::marker::Send + std::marker::Sync + 'static {
1627        /// Connection API
1628        async fn connection_open(
1629            &self,
1630            request: tonic::Request<super::connection::open::Req>,
1631        ) -> std::result::Result<
1632            tonic::Response<super::connection::open::Res>,
1633            tonic::Status,
1634        >;
1635        /// Server Manager API
1636        async fn servers_all(
1637            &self,
1638            request: tonic::Request<super::server_manager::all::Req>,
1639        ) -> std::result::Result<
1640            tonic::Response<super::server_manager::all::Res>,
1641            tonic::Status,
1642        >;
1643        /// User Manager API
1644        async fn users_get(
1645            &self,
1646            request: tonic::Request<super::user_manager::get::Req>,
1647        ) -> std::result::Result<
1648            tonic::Response<super::user_manager::get::Res>,
1649            tonic::Status,
1650        >;
1651        async fn users_all(
1652            &self,
1653            request: tonic::Request<super::user_manager::all::Req>,
1654        ) -> std::result::Result<
1655            tonic::Response<super::user_manager::all::Res>,
1656            tonic::Status,
1657        >;
1658        async fn users_contains(
1659            &self,
1660            request: tonic::Request<super::user_manager::contains::Req>,
1661        ) -> std::result::Result<
1662            tonic::Response<super::user_manager::contains::Res>,
1663            tonic::Status,
1664        >;
1665        async fn users_create(
1666            &self,
1667            request: tonic::Request<super::user_manager::create::Req>,
1668        ) -> std::result::Result<
1669            tonic::Response<super::user_manager::create::Res>,
1670            tonic::Status,
1671        >;
1672        /// User API
1673        async fn users_update(
1674            &self,
1675            request: tonic::Request<super::user::update::Req>,
1676        ) -> std::result::Result<
1677            tonic::Response<super::user::update::Res>,
1678            tonic::Status,
1679        >;
1680        async fn users_delete(
1681            &self,
1682            request: tonic::Request<super::user::delete::Req>,
1683        ) -> std::result::Result<
1684            tonic::Response<super::user::delete::Res>,
1685            tonic::Status,
1686        >;
1687        /// Database Manager API
1688        async fn databases_get(
1689            &self,
1690            request: tonic::Request<super::database_manager::get::Req>,
1691        ) -> std::result::Result<
1692            tonic::Response<super::database_manager::get::Res>,
1693            tonic::Status,
1694        >;
1695        async fn databases_all(
1696            &self,
1697            request: tonic::Request<super::database_manager::all::Req>,
1698        ) -> std::result::Result<
1699            tonic::Response<super::database_manager::all::Res>,
1700            tonic::Status,
1701        >;
1702        async fn databases_contains(
1703            &self,
1704            request: tonic::Request<super::database_manager::contains::Req>,
1705        ) -> std::result::Result<
1706            tonic::Response<super::database_manager::contains::Res>,
1707            tonic::Status,
1708        >;
1709        async fn databases_create(
1710            &self,
1711            request: tonic::Request<super::database_manager::create::Req>,
1712        ) -> std::result::Result<
1713            tonic::Response<super::database_manager::create::Res>,
1714            tonic::Status,
1715        >;
1716        /// Database API
1717        async fn database_schema(
1718            &self,
1719            request: tonic::Request<super::database::schema::Req>,
1720        ) -> std::result::Result<
1721            tonic::Response<super::database::schema::Res>,
1722            tonic::Status,
1723        >;
1724        async fn database_type_schema(
1725            &self,
1726            request: tonic::Request<super::database::type_schema::Req>,
1727        ) -> std::result::Result<
1728            tonic::Response<super::database::type_schema::Res>,
1729            tonic::Status,
1730        >;
1731        async fn database_delete(
1732            &self,
1733            request: tonic::Request<super::database::delete::Req>,
1734        ) -> std::result::Result<
1735            tonic::Response<super::database::delete::Res>,
1736            tonic::Status,
1737        >;
1738        /// Server streaming response type for the transaction method.
1739        type transactionStream: tonic::codegen::tokio_stream::Stream<
1740                Item = std::result::Result<super::transaction::Server, tonic::Status>,
1741            >
1742            + std::marker::Send
1743            + 'static;
1744        /// Transaction Streaming API
1745        /// Opens a bi-directional stream representing a stateful transaction, streaming
1746        /// requests and responses back-and-forth. The first transaction client message must
1747        /// be {Transaction.Open.Req}. Closing the stream closes the transaction.
1748        async fn transaction(
1749            &self,
1750            request: tonic::Request<tonic::Streaming<super::transaction::Client>>,
1751        ) -> std::result::Result<
1752            tonic::Response<Self::transactionStream>,
1753            tonic::Status,
1754        >;
1755    }
1756    #[derive(Debug)]
1757    pub struct TypeDbServer<T> {
1758        inner: Arc<T>,
1759        accept_compression_encodings: EnabledCompressionEncodings,
1760        send_compression_encodings: EnabledCompressionEncodings,
1761        max_decoding_message_size: Option<usize>,
1762        max_encoding_message_size: Option<usize>,
1763    }
1764    impl<T> TypeDbServer<T> {
1765        pub fn new(inner: T) -> Self {
1766            Self::from_arc(Arc::new(inner))
1767        }
1768        pub fn from_arc(inner: Arc<T>) -> Self {
1769            Self {
1770                inner,
1771                accept_compression_encodings: Default::default(),
1772                send_compression_encodings: Default::default(),
1773                max_decoding_message_size: None,
1774                max_encoding_message_size: None,
1775            }
1776        }
1777        pub fn with_interceptor<F>(
1778            inner: T,
1779            interceptor: F,
1780        ) -> InterceptedService<Self, F>
1781        where
1782            F: tonic::service::Interceptor,
1783        {
1784            InterceptedService::new(Self::new(inner), interceptor)
1785        }
1786        /// Enable decompressing requests with the given encoding.
1787        #[must_use]
1788        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1789            self.accept_compression_encodings.enable(encoding);
1790            self
1791        }
1792        /// Compress responses with the given encoding, if the client supports it.
1793        #[must_use]
1794        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1795            self.send_compression_encodings.enable(encoding);
1796            self
1797        }
1798        /// Limits the maximum size of a decoded message.
1799        ///
1800        /// Default: `4MB`
1801        #[must_use]
1802        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1803            self.max_decoding_message_size = Some(limit);
1804            self
1805        }
1806        /// Limits the maximum size of an encoded message.
1807        ///
1808        /// Default: `usize::MAX`
1809        #[must_use]
1810        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1811            self.max_encoding_message_size = Some(limit);
1812            self
1813        }
1814    }
1815    impl<T, B> tonic::codegen::Service<http::Request<B>> for TypeDbServer<T>
1816    where
1817        T: TypeDb,
1818        B: Body + std::marker::Send + 'static,
1819        B::Error: Into<StdError> + std::marker::Send + 'static,
1820    {
1821        type Response = http::Response<tonic::body::BoxBody>;
1822        type Error = std::convert::Infallible;
1823        type Future = BoxFuture<Self::Response, Self::Error>;
1824        fn poll_ready(
1825            &mut self,
1826            _cx: &mut Context<'_>,
1827        ) -> Poll<std::result::Result<(), Self::Error>> {
1828            Poll::Ready(Ok(()))
1829        }
1830        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1831            match req.uri().path() {
1832                "/typedb.protocol.TypeDB/connection_open" => {
1833                    #[allow(non_camel_case_types)]
1834                    struct connection_openSvc<T: TypeDb>(pub Arc<T>);
1835                    impl<
1836                        T: TypeDb,
1837                    > tonic::server::UnaryService<super::connection::open::Req>
1838                    for connection_openSvc<T> {
1839                        type Response = super::connection::open::Res;
1840                        type Future = BoxFuture<
1841                            tonic::Response<Self::Response>,
1842                            tonic::Status,
1843                        >;
1844                        fn call(
1845                            &mut self,
1846                            request: tonic::Request<super::connection::open::Req>,
1847                        ) -> Self::Future {
1848                            let inner = Arc::clone(&self.0);
1849                            let fut = async move {
1850                                <T as TypeDb>::connection_open(&inner, request).await
1851                            };
1852                            Box::pin(fut)
1853                        }
1854                    }
1855                    let accept_compression_encodings = self.accept_compression_encodings;
1856                    let send_compression_encodings = self.send_compression_encodings;
1857                    let max_decoding_message_size = self.max_decoding_message_size;
1858                    let max_encoding_message_size = self.max_encoding_message_size;
1859                    let inner = self.inner.clone();
1860                    let fut = async move {
1861                        let method = connection_openSvc(inner);
1862                        let codec = tonic::codec::ProstCodec::default();
1863                        let mut grpc = tonic::server::Grpc::new(codec)
1864                            .apply_compression_config(
1865                                accept_compression_encodings,
1866                                send_compression_encodings,
1867                            )
1868                            .apply_max_message_size_config(
1869                                max_decoding_message_size,
1870                                max_encoding_message_size,
1871                            );
1872                        let res = grpc.unary(method, req).await;
1873                        Ok(res)
1874                    };
1875                    Box::pin(fut)
1876                }
1877                "/typedb.protocol.TypeDB/servers_all" => {
1878                    #[allow(non_camel_case_types)]
1879                    struct servers_allSvc<T: TypeDb>(pub Arc<T>);
1880                    impl<
1881                        T: TypeDb,
1882                    > tonic::server::UnaryService<super::server_manager::all::Req>
1883                    for servers_allSvc<T> {
1884                        type Response = super::server_manager::all::Res;
1885                        type Future = BoxFuture<
1886                            tonic::Response<Self::Response>,
1887                            tonic::Status,
1888                        >;
1889                        fn call(
1890                            &mut self,
1891                            request: tonic::Request<super::server_manager::all::Req>,
1892                        ) -> Self::Future {
1893                            let inner = Arc::clone(&self.0);
1894                            let fut = async move {
1895                                <T as TypeDb>::servers_all(&inner, request).await
1896                            };
1897                            Box::pin(fut)
1898                        }
1899                    }
1900                    let accept_compression_encodings = self.accept_compression_encodings;
1901                    let send_compression_encodings = self.send_compression_encodings;
1902                    let max_decoding_message_size = self.max_decoding_message_size;
1903                    let max_encoding_message_size = self.max_encoding_message_size;
1904                    let inner = self.inner.clone();
1905                    let fut = async move {
1906                        let method = servers_allSvc(inner);
1907                        let codec = tonic::codec::ProstCodec::default();
1908                        let mut grpc = tonic::server::Grpc::new(codec)
1909                            .apply_compression_config(
1910                                accept_compression_encodings,
1911                                send_compression_encodings,
1912                            )
1913                            .apply_max_message_size_config(
1914                                max_decoding_message_size,
1915                                max_encoding_message_size,
1916                            );
1917                        let res = grpc.unary(method, req).await;
1918                        Ok(res)
1919                    };
1920                    Box::pin(fut)
1921                }
1922                "/typedb.protocol.TypeDB/users_get" => {
1923                    #[allow(non_camel_case_types)]
1924                    struct users_getSvc<T: TypeDb>(pub Arc<T>);
1925                    impl<
1926                        T: TypeDb,
1927                    > tonic::server::UnaryService<super::user_manager::get::Req>
1928                    for users_getSvc<T> {
1929                        type Response = super::user_manager::get::Res;
1930                        type Future = BoxFuture<
1931                            tonic::Response<Self::Response>,
1932                            tonic::Status,
1933                        >;
1934                        fn call(
1935                            &mut self,
1936                            request: tonic::Request<super::user_manager::get::Req>,
1937                        ) -> Self::Future {
1938                            let inner = Arc::clone(&self.0);
1939                            let fut = async move {
1940                                <T as TypeDb>::users_get(&inner, request).await
1941                            };
1942                            Box::pin(fut)
1943                        }
1944                    }
1945                    let accept_compression_encodings = self.accept_compression_encodings;
1946                    let send_compression_encodings = self.send_compression_encodings;
1947                    let max_decoding_message_size = self.max_decoding_message_size;
1948                    let max_encoding_message_size = self.max_encoding_message_size;
1949                    let inner = self.inner.clone();
1950                    let fut = async move {
1951                        let method = users_getSvc(inner);
1952                        let codec = tonic::codec::ProstCodec::default();
1953                        let mut grpc = tonic::server::Grpc::new(codec)
1954                            .apply_compression_config(
1955                                accept_compression_encodings,
1956                                send_compression_encodings,
1957                            )
1958                            .apply_max_message_size_config(
1959                                max_decoding_message_size,
1960                                max_encoding_message_size,
1961                            );
1962                        let res = grpc.unary(method, req).await;
1963                        Ok(res)
1964                    };
1965                    Box::pin(fut)
1966                }
1967                "/typedb.protocol.TypeDB/users_all" => {
1968                    #[allow(non_camel_case_types)]
1969                    struct users_allSvc<T: TypeDb>(pub Arc<T>);
1970                    impl<
1971                        T: TypeDb,
1972                    > tonic::server::UnaryService<super::user_manager::all::Req>
1973                    for users_allSvc<T> {
1974                        type Response = super::user_manager::all::Res;
1975                        type Future = BoxFuture<
1976                            tonic::Response<Self::Response>,
1977                            tonic::Status,
1978                        >;
1979                        fn call(
1980                            &mut self,
1981                            request: tonic::Request<super::user_manager::all::Req>,
1982                        ) -> Self::Future {
1983                            let inner = Arc::clone(&self.0);
1984                            let fut = async move {
1985                                <T as TypeDb>::users_all(&inner, request).await
1986                            };
1987                            Box::pin(fut)
1988                        }
1989                    }
1990                    let accept_compression_encodings = self.accept_compression_encodings;
1991                    let send_compression_encodings = self.send_compression_encodings;
1992                    let max_decoding_message_size = self.max_decoding_message_size;
1993                    let max_encoding_message_size = self.max_encoding_message_size;
1994                    let inner = self.inner.clone();
1995                    let fut = async move {
1996                        let method = users_allSvc(inner);
1997                        let codec = tonic::codec::ProstCodec::default();
1998                        let mut grpc = tonic::server::Grpc::new(codec)
1999                            .apply_compression_config(
2000                                accept_compression_encodings,
2001                                send_compression_encodings,
2002                            )
2003                            .apply_max_message_size_config(
2004                                max_decoding_message_size,
2005                                max_encoding_message_size,
2006                            );
2007                        let res = grpc.unary(method, req).await;
2008                        Ok(res)
2009                    };
2010                    Box::pin(fut)
2011                }
2012                "/typedb.protocol.TypeDB/users_contains" => {
2013                    #[allow(non_camel_case_types)]
2014                    struct users_containsSvc<T: TypeDb>(pub Arc<T>);
2015                    impl<
2016                        T: TypeDb,
2017                    > tonic::server::UnaryService<super::user_manager::contains::Req>
2018                    for users_containsSvc<T> {
2019                        type Response = super::user_manager::contains::Res;
2020                        type Future = BoxFuture<
2021                            tonic::Response<Self::Response>,
2022                            tonic::Status,
2023                        >;
2024                        fn call(
2025                            &mut self,
2026                            request: tonic::Request<super::user_manager::contains::Req>,
2027                        ) -> Self::Future {
2028                            let inner = Arc::clone(&self.0);
2029                            let fut = async move {
2030                                <T as TypeDb>::users_contains(&inner, request).await
2031                            };
2032                            Box::pin(fut)
2033                        }
2034                    }
2035                    let accept_compression_encodings = self.accept_compression_encodings;
2036                    let send_compression_encodings = self.send_compression_encodings;
2037                    let max_decoding_message_size = self.max_decoding_message_size;
2038                    let max_encoding_message_size = self.max_encoding_message_size;
2039                    let inner = self.inner.clone();
2040                    let fut = async move {
2041                        let method = users_containsSvc(inner);
2042                        let codec = tonic::codec::ProstCodec::default();
2043                        let mut grpc = tonic::server::Grpc::new(codec)
2044                            .apply_compression_config(
2045                                accept_compression_encodings,
2046                                send_compression_encodings,
2047                            )
2048                            .apply_max_message_size_config(
2049                                max_decoding_message_size,
2050                                max_encoding_message_size,
2051                            );
2052                        let res = grpc.unary(method, req).await;
2053                        Ok(res)
2054                    };
2055                    Box::pin(fut)
2056                }
2057                "/typedb.protocol.TypeDB/users_create" => {
2058                    #[allow(non_camel_case_types)]
2059                    struct users_createSvc<T: TypeDb>(pub Arc<T>);
2060                    impl<
2061                        T: TypeDb,
2062                    > tonic::server::UnaryService<super::user_manager::create::Req>
2063                    for users_createSvc<T> {
2064                        type Response = super::user_manager::create::Res;
2065                        type Future = BoxFuture<
2066                            tonic::Response<Self::Response>,
2067                            tonic::Status,
2068                        >;
2069                        fn call(
2070                            &mut self,
2071                            request: tonic::Request<super::user_manager::create::Req>,
2072                        ) -> Self::Future {
2073                            let inner = Arc::clone(&self.0);
2074                            let fut = async move {
2075                                <T as TypeDb>::users_create(&inner, request).await
2076                            };
2077                            Box::pin(fut)
2078                        }
2079                    }
2080                    let accept_compression_encodings = self.accept_compression_encodings;
2081                    let send_compression_encodings = self.send_compression_encodings;
2082                    let max_decoding_message_size = self.max_decoding_message_size;
2083                    let max_encoding_message_size = self.max_encoding_message_size;
2084                    let inner = self.inner.clone();
2085                    let fut = async move {
2086                        let method = users_createSvc(inner);
2087                        let codec = tonic::codec::ProstCodec::default();
2088                        let mut grpc = tonic::server::Grpc::new(codec)
2089                            .apply_compression_config(
2090                                accept_compression_encodings,
2091                                send_compression_encodings,
2092                            )
2093                            .apply_max_message_size_config(
2094                                max_decoding_message_size,
2095                                max_encoding_message_size,
2096                            );
2097                        let res = grpc.unary(method, req).await;
2098                        Ok(res)
2099                    };
2100                    Box::pin(fut)
2101                }
2102                "/typedb.protocol.TypeDB/users_update" => {
2103                    #[allow(non_camel_case_types)]
2104                    struct users_updateSvc<T: TypeDb>(pub Arc<T>);
2105                    impl<T: TypeDb> tonic::server::UnaryService<super::user::update::Req>
2106                    for users_updateSvc<T> {
2107                        type Response = super::user::update::Res;
2108                        type Future = BoxFuture<
2109                            tonic::Response<Self::Response>,
2110                            tonic::Status,
2111                        >;
2112                        fn call(
2113                            &mut self,
2114                            request: tonic::Request<super::user::update::Req>,
2115                        ) -> Self::Future {
2116                            let inner = Arc::clone(&self.0);
2117                            let fut = async move {
2118                                <T as TypeDb>::users_update(&inner, request).await
2119                            };
2120                            Box::pin(fut)
2121                        }
2122                    }
2123                    let accept_compression_encodings = self.accept_compression_encodings;
2124                    let send_compression_encodings = self.send_compression_encodings;
2125                    let max_decoding_message_size = self.max_decoding_message_size;
2126                    let max_encoding_message_size = self.max_encoding_message_size;
2127                    let inner = self.inner.clone();
2128                    let fut = async move {
2129                        let method = users_updateSvc(inner);
2130                        let codec = tonic::codec::ProstCodec::default();
2131                        let mut grpc = tonic::server::Grpc::new(codec)
2132                            .apply_compression_config(
2133                                accept_compression_encodings,
2134                                send_compression_encodings,
2135                            )
2136                            .apply_max_message_size_config(
2137                                max_decoding_message_size,
2138                                max_encoding_message_size,
2139                            );
2140                        let res = grpc.unary(method, req).await;
2141                        Ok(res)
2142                    };
2143                    Box::pin(fut)
2144                }
2145                "/typedb.protocol.TypeDB/users_delete" => {
2146                    #[allow(non_camel_case_types)]
2147                    struct users_deleteSvc<T: TypeDb>(pub Arc<T>);
2148                    impl<T: TypeDb> tonic::server::UnaryService<super::user::delete::Req>
2149                    for users_deleteSvc<T> {
2150                        type Response = super::user::delete::Res;
2151                        type Future = BoxFuture<
2152                            tonic::Response<Self::Response>,
2153                            tonic::Status,
2154                        >;
2155                        fn call(
2156                            &mut self,
2157                            request: tonic::Request<super::user::delete::Req>,
2158                        ) -> Self::Future {
2159                            let inner = Arc::clone(&self.0);
2160                            let fut = async move {
2161                                <T as TypeDb>::users_delete(&inner, request).await
2162                            };
2163                            Box::pin(fut)
2164                        }
2165                    }
2166                    let accept_compression_encodings = self.accept_compression_encodings;
2167                    let send_compression_encodings = self.send_compression_encodings;
2168                    let max_decoding_message_size = self.max_decoding_message_size;
2169                    let max_encoding_message_size = self.max_encoding_message_size;
2170                    let inner = self.inner.clone();
2171                    let fut = async move {
2172                        let method = users_deleteSvc(inner);
2173                        let codec = tonic::codec::ProstCodec::default();
2174                        let mut grpc = tonic::server::Grpc::new(codec)
2175                            .apply_compression_config(
2176                                accept_compression_encodings,
2177                                send_compression_encodings,
2178                            )
2179                            .apply_max_message_size_config(
2180                                max_decoding_message_size,
2181                                max_encoding_message_size,
2182                            );
2183                        let res = grpc.unary(method, req).await;
2184                        Ok(res)
2185                    };
2186                    Box::pin(fut)
2187                }
2188                "/typedb.protocol.TypeDB/databases_get" => {
2189                    #[allow(non_camel_case_types)]
2190                    struct databases_getSvc<T: TypeDb>(pub Arc<T>);
2191                    impl<
2192                        T: TypeDb,
2193                    > tonic::server::UnaryService<super::database_manager::get::Req>
2194                    for databases_getSvc<T> {
2195                        type Response = super::database_manager::get::Res;
2196                        type Future = BoxFuture<
2197                            tonic::Response<Self::Response>,
2198                            tonic::Status,
2199                        >;
2200                        fn call(
2201                            &mut self,
2202                            request: tonic::Request<super::database_manager::get::Req>,
2203                        ) -> Self::Future {
2204                            let inner = Arc::clone(&self.0);
2205                            let fut = async move {
2206                                <T as TypeDb>::databases_get(&inner, request).await
2207                            };
2208                            Box::pin(fut)
2209                        }
2210                    }
2211                    let accept_compression_encodings = self.accept_compression_encodings;
2212                    let send_compression_encodings = self.send_compression_encodings;
2213                    let max_decoding_message_size = self.max_decoding_message_size;
2214                    let max_encoding_message_size = self.max_encoding_message_size;
2215                    let inner = self.inner.clone();
2216                    let fut = async move {
2217                        let method = databases_getSvc(inner);
2218                        let codec = tonic::codec::ProstCodec::default();
2219                        let mut grpc = tonic::server::Grpc::new(codec)
2220                            .apply_compression_config(
2221                                accept_compression_encodings,
2222                                send_compression_encodings,
2223                            )
2224                            .apply_max_message_size_config(
2225                                max_decoding_message_size,
2226                                max_encoding_message_size,
2227                            );
2228                        let res = grpc.unary(method, req).await;
2229                        Ok(res)
2230                    };
2231                    Box::pin(fut)
2232                }
2233                "/typedb.protocol.TypeDB/databases_all" => {
2234                    #[allow(non_camel_case_types)]
2235                    struct databases_allSvc<T: TypeDb>(pub Arc<T>);
2236                    impl<
2237                        T: TypeDb,
2238                    > tonic::server::UnaryService<super::database_manager::all::Req>
2239                    for databases_allSvc<T> {
2240                        type Response = super::database_manager::all::Res;
2241                        type Future = BoxFuture<
2242                            tonic::Response<Self::Response>,
2243                            tonic::Status,
2244                        >;
2245                        fn call(
2246                            &mut self,
2247                            request: tonic::Request<super::database_manager::all::Req>,
2248                        ) -> Self::Future {
2249                            let inner = Arc::clone(&self.0);
2250                            let fut = async move {
2251                                <T as TypeDb>::databases_all(&inner, request).await
2252                            };
2253                            Box::pin(fut)
2254                        }
2255                    }
2256                    let accept_compression_encodings = self.accept_compression_encodings;
2257                    let send_compression_encodings = self.send_compression_encodings;
2258                    let max_decoding_message_size = self.max_decoding_message_size;
2259                    let max_encoding_message_size = self.max_encoding_message_size;
2260                    let inner = self.inner.clone();
2261                    let fut = async move {
2262                        let method = databases_allSvc(inner);
2263                        let codec = tonic::codec::ProstCodec::default();
2264                        let mut grpc = tonic::server::Grpc::new(codec)
2265                            .apply_compression_config(
2266                                accept_compression_encodings,
2267                                send_compression_encodings,
2268                            )
2269                            .apply_max_message_size_config(
2270                                max_decoding_message_size,
2271                                max_encoding_message_size,
2272                            );
2273                        let res = grpc.unary(method, req).await;
2274                        Ok(res)
2275                    };
2276                    Box::pin(fut)
2277                }
2278                "/typedb.protocol.TypeDB/databases_contains" => {
2279                    #[allow(non_camel_case_types)]
2280                    struct databases_containsSvc<T: TypeDb>(pub Arc<T>);
2281                    impl<
2282                        T: TypeDb,
2283                    > tonic::server::UnaryService<super::database_manager::contains::Req>
2284                    for databases_containsSvc<T> {
2285                        type Response = super::database_manager::contains::Res;
2286                        type Future = BoxFuture<
2287                            tonic::Response<Self::Response>,
2288                            tonic::Status,
2289                        >;
2290                        fn call(
2291                            &mut self,
2292                            request: tonic::Request<
2293                                super::database_manager::contains::Req,
2294                            >,
2295                        ) -> Self::Future {
2296                            let inner = Arc::clone(&self.0);
2297                            let fut = async move {
2298                                <T as TypeDb>::databases_contains(&inner, request).await
2299                            };
2300                            Box::pin(fut)
2301                        }
2302                    }
2303                    let accept_compression_encodings = self.accept_compression_encodings;
2304                    let send_compression_encodings = self.send_compression_encodings;
2305                    let max_decoding_message_size = self.max_decoding_message_size;
2306                    let max_encoding_message_size = self.max_encoding_message_size;
2307                    let inner = self.inner.clone();
2308                    let fut = async move {
2309                        let method = databases_containsSvc(inner);
2310                        let codec = tonic::codec::ProstCodec::default();
2311                        let mut grpc = tonic::server::Grpc::new(codec)
2312                            .apply_compression_config(
2313                                accept_compression_encodings,
2314                                send_compression_encodings,
2315                            )
2316                            .apply_max_message_size_config(
2317                                max_decoding_message_size,
2318                                max_encoding_message_size,
2319                            );
2320                        let res = grpc.unary(method, req).await;
2321                        Ok(res)
2322                    };
2323                    Box::pin(fut)
2324                }
2325                "/typedb.protocol.TypeDB/databases_create" => {
2326                    #[allow(non_camel_case_types)]
2327                    struct databases_createSvc<T: TypeDb>(pub Arc<T>);
2328                    impl<
2329                        T: TypeDb,
2330                    > tonic::server::UnaryService<super::database_manager::create::Req>
2331                    for databases_createSvc<T> {
2332                        type Response = super::database_manager::create::Res;
2333                        type Future = BoxFuture<
2334                            tonic::Response<Self::Response>,
2335                            tonic::Status,
2336                        >;
2337                        fn call(
2338                            &mut self,
2339                            request: tonic::Request<super::database_manager::create::Req>,
2340                        ) -> Self::Future {
2341                            let inner = Arc::clone(&self.0);
2342                            let fut = async move {
2343                                <T as TypeDb>::databases_create(&inner, request).await
2344                            };
2345                            Box::pin(fut)
2346                        }
2347                    }
2348                    let accept_compression_encodings = self.accept_compression_encodings;
2349                    let send_compression_encodings = self.send_compression_encodings;
2350                    let max_decoding_message_size = self.max_decoding_message_size;
2351                    let max_encoding_message_size = self.max_encoding_message_size;
2352                    let inner = self.inner.clone();
2353                    let fut = async move {
2354                        let method = databases_createSvc(inner);
2355                        let codec = tonic::codec::ProstCodec::default();
2356                        let mut grpc = tonic::server::Grpc::new(codec)
2357                            .apply_compression_config(
2358                                accept_compression_encodings,
2359                                send_compression_encodings,
2360                            )
2361                            .apply_max_message_size_config(
2362                                max_decoding_message_size,
2363                                max_encoding_message_size,
2364                            );
2365                        let res = grpc.unary(method, req).await;
2366                        Ok(res)
2367                    };
2368                    Box::pin(fut)
2369                }
2370                "/typedb.protocol.TypeDB/database_schema" => {
2371                    #[allow(non_camel_case_types)]
2372                    struct database_schemaSvc<T: TypeDb>(pub Arc<T>);
2373                    impl<
2374                        T: TypeDb,
2375                    > tonic::server::UnaryService<super::database::schema::Req>
2376                    for database_schemaSvc<T> {
2377                        type Response = super::database::schema::Res;
2378                        type Future = BoxFuture<
2379                            tonic::Response<Self::Response>,
2380                            tonic::Status,
2381                        >;
2382                        fn call(
2383                            &mut self,
2384                            request: tonic::Request<super::database::schema::Req>,
2385                        ) -> Self::Future {
2386                            let inner = Arc::clone(&self.0);
2387                            let fut = async move {
2388                                <T as TypeDb>::database_schema(&inner, request).await
2389                            };
2390                            Box::pin(fut)
2391                        }
2392                    }
2393                    let accept_compression_encodings = self.accept_compression_encodings;
2394                    let send_compression_encodings = self.send_compression_encodings;
2395                    let max_decoding_message_size = self.max_decoding_message_size;
2396                    let max_encoding_message_size = self.max_encoding_message_size;
2397                    let inner = self.inner.clone();
2398                    let fut = async move {
2399                        let method = database_schemaSvc(inner);
2400                        let codec = tonic::codec::ProstCodec::default();
2401                        let mut grpc = tonic::server::Grpc::new(codec)
2402                            .apply_compression_config(
2403                                accept_compression_encodings,
2404                                send_compression_encodings,
2405                            )
2406                            .apply_max_message_size_config(
2407                                max_decoding_message_size,
2408                                max_encoding_message_size,
2409                            );
2410                        let res = grpc.unary(method, req).await;
2411                        Ok(res)
2412                    };
2413                    Box::pin(fut)
2414                }
2415                "/typedb.protocol.TypeDB/database_type_schema" => {
2416                    #[allow(non_camel_case_types)]
2417                    struct database_type_schemaSvc<T: TypeDb>(pub Arc<T>);
2418                    impl<
2419                        T: TypeDb,
2420                    > tonic::server::UnaryService<super::database::type_schema::Req>
2421                    for database_type_schemaSvc<T> {
2422                        type Response = super::database::type_schema::Res;
2423                        type Future = BoxFuture<
2424                            tonic::Response<Self::Response>,
2425                            tonic::Status,
2426                        >;
2427                        fn call(
2428                            &mut self,
2429                            request: tonic::Request<super::database::type_schema::Req>,
2430                        ) -> Self::Future {
2431                            let inner = Arc::clone(&self.0);
2432                            let fut = async move {
2433                                <T as TypeDb>::database_type_schema(&inner, request).await
2434                            };
2435                            Box::pin(fut)
2436                        }
2437                    }
2438                    let accept_compression_encodings = self.accept_compression_encodings;
2439                    let send_compression_encodings = self.send_compression_encodings;
2440                    let max_decoding_message_size = self.max_decoding_message_size;
2441                    let max_encoding_message_size = self.max_encoding_message_size;
2442                    let inner = self.inner.clone();
2443                    let fut = async move {
2444                        let method = database_type_schemaSvc(inner);
2445                        let codec = tonic::codec::ProstCodec::default();
2446                        let mut grpc = tonic::server::Grpc::new(codec)
2447                            .apply_compression_config(
2448                                accept_compression_encodings,
2449                                send_compression_encodings,
2450                            )
2451                            .apply_max_message_size_config(
2452                                max_decoding_message_size,
2453                                max_encoding_message_size,
2454                            );
2455                        let res = grpc.unary(method, req).await;
2456                        Ok(res)
2457                    };
2458                    Box::pin(fut)
2459                }
2460                "/typedb.protocol.TypeDB/database_delete" => {
2461                    #[allow(non_camel_case_types)]
2462                    struct database_deleteSvc<T: TypeDb>(pub Arc<T>);
2463                    impl<
2464                        T: TypeDb,
2465                    > tonic::server::UnaryService<super::database::delete::Req>
2466                    for database_deleteSvc<T> {
2467                        type Response = super::database::delete::Res;
2468                        type Future = BoxFuture<
2469                            tonic::Response<Self::Response>,
2470                            tonic::Status,
2471                        >;
2472                        fn call(
2473                            &mut self,
2474                            request: tonic::Request<super::database::delete::Req>,
2475                        ) -> Self::Future {
2476                            let inner = Arc::clone(&self.0);
2477                            let fut = async move {
2478                                <T as TypeDb>::database_delete(&inner, request).await
2479                            };
2480                            Box::pin(fut)
2481                        }
2482                    }
2483                    let accept_compression_encodings = self.accept_compression_encodings;
2484                    let send_compression_encodings = self.send_compression_encodings;
2485                    let max_decoding_message_size = self.max_decoding_message_size;
2486                    let max_encoding_message_size = self.max_encoding_message_size;
2487                    let inner = self.inner.clone();
2488                    let fut = async move {
2489                        let method = database_deleteSvc(inner);
2490                        let codec = tonic::codec::ProstCodec::default();
2491                        let mut grpc = tonic::server::Grpc::new(codec)
2492                            .apply_compression_config(
2493                                accept_compression_encodings,
2494                                send_compression_encodings,
2495                            )
2496                            .apply_max_message_size_config(
2497                                max_decoding_message_size,
2498                                max_encoding_message_size,
2499                            );
2500                        let res = grpc.unary(method, req).await;
2501                        Ok(res)
2502                    };
2503                    Box::pin(fut)
2504                }
2505                "/typedb.protocol.TypeDB/transaction" => {
2506                    #[allow(non_camel_case_types)]
2507                    struct transactionSvc<T: TypeDb>(pub Arc<T>);
2508                    impl<
2509                        T: TypeDb,
2510                    > tonic::server::StreamingService<super::transaction::Client>
2511                    for transactionSvc<T> {
2512                        type Response = super::transaction::Server;
2513                        type ResponseStream = T::transactionStream;
2514                        type Future = BoxFuture<
2515                            tonic::Response<Self::ResponseStream>,
2516                            tonic::Status,
2517                        >;
2518                        fn call(
2519                            &mut self,
2520                            request: tonic::Request<
2521                                tonic::Streaming<super::transaction::Client>,
2522                            >,
2523                        ) -> Self::Future {
2524                            let inner = Arc::clone(&self.0);
2525                            let fut = async move {
2526                                <T as TypeDb>::transaction(&inner, request).await
2527                            };
2528                            Box::pin(fut)
2529                        }
2530                    }
2531                    let accept_compression_encodings = self.accept_compression_encodings;
2532                    let send_compression_encodings = self.send_compression_encodings;
2533                    let max_decoding_message_size = self.max_decoding_message_size;
2534                    let max_encoding_message_size = self.max_encoding_message_size;
2535                    let inner = self.inner.clone();
2536                    let fut = async move {
2537                        let method = transactionSvc(inner);
2538                        let codec = tonic::codec::ProstCodec::default();
2539                        let mut grpc = tonic::server::Grpc::new(codec)
2540                            .apply_compression_config(
2541                                accept_compression_encodings,
2542                                send_compression_encodings,
2543                            )
2544                            .apply_max_message_size_config(
2545                                max_decoding_message_size,
2546                                max_encoding_message_size,
2547                            );
2548                        let res = grpc.streaming(method, req).await;
2549                        Ok(res)
2550                    };
2551                    Box::pin(fut)
2552                }
2553                _ => {
2554                    Box::pin(async move {
2555                        let mut response = http::Response::new(empty_body());
2556                        let headers = response.headers_mut();
2557                        headers
2558                            .insert(
2559                                tonic::Status::GRPC_STATUS,
2560                                (tonic::Code::Unimplemented as i32).into(),
2561                            );
2562                        headers
2563                            .insert(
2564                                http::header::CONTENT_TYPE,
2565                                tonic::metadata::GRPC_CONTENT_TYPE,
2566                            );
2567                        Ok(response)
2568                    })
2569                }
2570            }
2571        }
2572    }
2573    impl<T> Clone for TypeDbServer<T> {
2574        fn clone(&self) -> Self {
2575            let inner = self.inner.clone();
2576            Self {
2577                inner,
2578                accept_compression_encodings: self.accept_compression_encodings,
2579                send_compression_encodings: self.send_compression_encodings,
2580                max_decoding_message_size: self.max_decoding_message_size,
2581                max_encoding_message_size: self.max_encoding_message_size,
2582            }
2583        }
2584    }
2585    /// Generated gRPC service name
2586    pub const SERVICE_NAME: &str = "typedb.protocol.TypeDB";
2587    impl<T> tonic::server::NamedService for TypeDbServer<T> {
2588        const NAME: &'static str = SERVICE_NAME;
2589    }
2590}
2591#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2592pub struct LogicManager {}
2593/// Nested message and enum types in `LogicManager`.
2594pub mod logic_manager {
2595    #[derive(Clone, PartialEq, ::prost::Message)]
2596    pub struct Req {
2597        #[prost(oneof = "req::Req", tags = "1, 2, 3")]
2598        pub req: ::core::option::Option<req::Req>,
2599    }
2600    /// Nested message and enum types in `Req`.
2601    pub mod req {
2602        #[derive(Clone, PartialEq, ::prost::Oneof)]
2603        pub enum Req {
2604            #[prost(message, tag = "1")]
2605            GetRuleReq(super::get_rule::Req),
2606            #[prost(message, tag = "2")]
2607            PutRuleReq(super::put_rule::Req),
2608            #[prost(message, tag = "3")]
2609            GetRulesReq(super::get_rules::Req),
2610        }
2611    }
2612    #[derive(Clone, PartialEq, ::prost::Message)]
2613    pub struct Res {
2614        #[prost(oneof = "res::Res", tags = "1, 2")]
2615        pub res: ::core::option::Option<res::Res>,
2616    }
2617    /// Nested message and enum types in `Res`.
2618    pub mod res {
2619        #[derive(Clone, PartialEq, ::prost::Oneof)]
2620        pub enum Res {
2621            #[prost(message, tag = "1")]
2622            GetRuleRes(super::get_rule::Res),
2623            #[prost(message, tag = "2")]
2624            PutRuleRes(super::put_rule::Res),
2625        }
2626    }
2627    #[derive(Clone, PartialEq, ::prost::Message)]
2628    pub struct ResPart {
2629        #[prost(message, optional, tag = "1")]
2630        pub get_rules_res_part: ::core::option::Option<get_rules::ResPart>,
2631    }
2632    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2633    pub struct GetRule {}
2634    /// Nested message and enum types in `GetRule`.
2635    pub mod get_rule {
2636        #[derive(Clone, PartialEq, ::prost::Message)]
2637        pub struct Req {
2638            #[prost(string, tag = "1")]
2639            pub label: ::prost::alloc::string::String,
2640        }
2641        #[derive(Clone, PartialEq, ::prost::Message)]
2642        pub struct Res {
2643            #[prost(message, optional, tag = "1")]
2644            pub rule: ::core::option::Option<super::super::Rule>,
2645        }
2646    }
2647    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2648    pub struct PutRule {}
2649    /// Nested message and enum types in `PutRule`.
2650    pub mod put_rule {
2651        #[derive(Clone, PartialEq, ::prost::Message)]
2652        pub struct Req {
2653            #[prost(string, tag = "1")]
2654            pub label: ::prost::alloc::string::String,
2655            #[prost(string, tag = "2")]
2656            pub when: ::prost::alloc::string::String,
2657            #[prost(string, tag = "3")]
2658            pub then: ::prost::alloc::string::String,
2659        }
2660        #[derive(Clone, PartialEq, ::prost::Message)]
2661        pub struct Res {
2662            #[prost(message, optional, tag = "1")]
2663            pub rule: ::core::option::Option<super::super::Rule>,
2664        }
2665    }
2666    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2667    pub struct GetRules {}
2668    /// Nested message and enum types in `GetRules`.
2669    pub mod get_rules {
2670        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2671        pub struct Req {}
2672        #[derive(Clone, PartialEq, ::prost::Message)]
2673        pub struct ResPart {
2674            #[prost(message, repeated, tag = "1")]
2675            pub rules: ::prost::alloc::vec::Vec<super::super::Rule>,
2676        }
2677    }
2678}
2679#[derive(Clone, PartialEq, ::prost::Message)]
2680pub struct Rule {
2681    #[prost(string, tag = "1")]
2682    pub label: ::prost::alloc::string::String,
2683    #[prost(string, tag = "2")]
2684    pub when: ::prost::alloc::string::String,
2685    #[prost(string, tag = "3")]
2686    pub then: ::prost::alloc::string::String,
2687}
2688/// Nested message and enum types in `Rule`.
2689pub mod rule {
2690    #[derive(Clone, PartialEq, ::prost::Message)]
2691    pub struct Req {
2692        #[prost(string, tag = "1")]
2693        pub label: ::prost::alloc::string::String,
2694        #[prost(oneof = "req::Req", tags = "100, 101")]
2695        pub req: ::core::option::Option<req::Req>,
2696    }
2697    /// Nested message and enum types in `Req`.
2698    pub mod req {
2699        #[derive(Clone, PartialEq, ::prost::Oneof)]
2700        pub enum Req {
2701            #[prost(message, tag = "100")]
2702            RuleDeleteReq(super::delete::Req),
2703            #[prost(message, tag = "101")]
2704            RuleSetLabelReq(super::set_label::Req),
2705        }
2706    }
2707    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2708    pub struct Res {
2709        #[prost(oneof = "res::Res", tags = "100, 101")]
2710        pub res: ::core::option::Option<res::Res>,
2711    }
2712    /// Nested message and enum types in `Res`.
2713    pub mod res {
2714        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2715        pub enum Res {
2716            #[prost(message, tag = "100")]
2717            RuleDeleteRes(super::delete::Res),
2718            #[prost(message, tag = "101")]
2719            RuleSetLabelRes(super::set_label::Res),
2720        }
2721    }
2722    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2723    pub struct Delete {}
2724    /// Nested message and enum types in `Delete`.
2725    pub mod delete {
2726        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2727        pub struct Req {}
2728        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2729        pub struct Res {}
2730    }
2731    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2732    pub struct SetLabel {}
2733    /// Nested message and enum types in `SetLabel`.
2734    pub mod set_label {
2735        #[derive(Clone, PartialEq, ::prost::Message)]
2736        pub struct Req {
2737            #[prost(string, tag = "1")]
2738            pub label: ::prost::alloc::string::String,
2739        }
2740        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2741        pub struct Res {}
2742    }
2743}
2744#[derive(Clone, PartialEq, ::prost::Message)]
2745pub struct Explanation {
2746    #[prost(message, optional, tag = "1")]
2747    pub rule: ::core::option::Option<Rule>,
2748    #[prost(map = "string, message", tag = "2")]
2749    pub var_mapping: ::std::collections::HashMap<
2750        ::prost::alloc::string::String,
2751        explanation::VarList,
2752    >,
2753    #[prost(message, optional, tag = "3")]
2754    pub condition: ::core::option::Option<ConceptRow>,
2755    #[prost(message, optional, tag = "4")]
2756    pub conclusion: ::core::option::Option<ConceptRow>,
2757}
2758/// Nested message and enum types in `Explanation`.
2759pub mod explanation {
2760    #[derive(Clone, PartialEq, ::prost::Message)]
2761    pub struct VarList {
2762        #[prost(string, repeated, tag = "1")]
2763        pub vars: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2764    }
2765}