typedb_protocol/
typedb.protocol.rs

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