1#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct Authentication {}
4pub mod authentication {
6 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
7 pub struct Token {}
8 pub mod token {
10 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
11 pub struct Create {}
12 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 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 #[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, PartialEq, ::prost::Message)]
44pub struct Concept {
45 #[prost(oneof = "concept::Concept", tags = "1, 2, 3, 4, 5, 6, 7")]
46 pub concept: ::core::option::Option<concept::Concept>,
47}
48pub mod concept {
50 #[derive(Clone, PartialEq, ::prost::Oneof)]
51 pub enum Concept {
52 #[prost(message, tag = "1")]
53 EntityType(super::EntityType),
54 #[prost(message, tag = "2")]
55 RelationType(super::RelationType),
56 #[prost(message, tag = "3")]
57 AttributeType(super::AttributeType),
58 #[prost(message, tag = "4")]
59 RoleType(super::RoleType),
60 #[prost(message, tag = "5")]
61 Entity(super::Entity),
62 #[prost(message, tag = "6")]
63 Relation(super::Relation),
64 #[prost(message, tag = "7")]
65 Attribute(super::Attribute),
66 }
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct Thing {
70 #[prost(oneof = "thing::Thing", tags = "1, 2, 3")]
71 pub thing: ::core::option::Option<thing::Thing>,
72}
73pub mod thing {
75 #[derive(Clone, PartialEq, ::prost::Oneof)]
76 pub enum Thing {
77 #[prost(message, tag = "1")]
78 Entity(super::Entity),
79 #[prost(message, tag = "2")]
80 Relation(super::Relation),
81 #[prost(message, tag = "3")]
82 Attribute(super::Attribute),
83 }
84}
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct Entity {
87 #[prost(bytes = "vec", tag = "1")]
88 pub iid: ::prost::alloc::vec::Vec<u8>,
89 #[prost(message, optional, tag = "2")]
90 pub entity_type: ::core::option::Option<EntityType>,
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct Relation {
94 #[prost(bytes = "vec", tag = "1")]
95 pub iid: ::prost::alloc::vec::Vec<u8>,
96 #[prost(message, optional, tag = "2")]
97 pub relation_type: ::core::option::Option<RelationType>,
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct Attribute {
101 #[prost(bytes = "vec", tag = "1")]
102 pub iid: ::prost::alloc::vec::Vec<u8>,
103 #[prost(message, optional, tag = "2")]
104 pub attribute_type: ::core::option::Option<AttributeType>,
105 #[prost(message, optional, tag = "3")]
106 pub value: ::core::option::Option<Value>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct Value {
110 #[prost(oneof = "value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
111 pub value: ::core::option::Option<value::Value>,
112}
113pub mod value {
115 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
116 pub struct Decimal {
117 #[prost(sint64, tag = "1")]
118 pub integer: i64,
119 #[prost(uint64, tag = "2")]
120 pub fractional: u64,
121 }
122 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
123 pub struct Date {
124 #[prost(sint32, tag = "1")]
126 pub num_days_since_ce: i32,
127 }
128 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
129 pub struct Datetime {
130 #[prost(sint64, tag = "1")]
132 pub seconds: i64,
133 #[prost(uint32, tag = "2")]
134 pub nanos: u32,
135 }
136 #[derive(Clone, PartialEq, ::prost::Message)]
137 pub struct DatetimeTz {
138 #[prost(message, optional, tag = "1")]
139 pub datetime: ::core::option::Option<Datetime>,
140 #[prost(oneof = "datetime_tz::Timezone", tags = "2, 3")]
141 pub timezone: ::core::option::Option<datetime_tz::Timezone>,
142 }
143 pub mod datetime_tz {
145 #[derive(Clone, PartialEq, ::prost::Oneof)]
146 pub enum Timezone {
147 #[prost(string, tag = "2")]
148 Named(::prost::alloc::string::String),
149 #[prost(sint32, tag = "3")]
151 Offset(i32),
152 }
153 }
154 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
155 pub struct Duration {
156 #[prost(uint32, tag = "1")]
157 pub months: u32,
158 #[prost(uint32, tag = "2")]
159 pub days: u32,
160 #[prost(uint64, tag = "3")]
161 pub nanos: u64,
162 }
163 #[derive(Clone, PartialEq, ::prost::Message)]
164 pub struct Struct {
165 #[prost(string, tag = "1")]
166 pub struct_type_name: ::prost::alloc::string::String,
167 }
168 #[derive(Clone, PartialEq, ::prost::Oneof)]
169 pub enum Value {
170 #[prost(bool, tag = "1")]
171 Boolean(bool),
172 #[prost(sint64, tag = "2")]
173 Integer(i64),
174 #[prost(double, tag = "3")]
175 Double(f64),
176 #[prost(message, tag = "4")]
177 Decimal(Decimal),
178 #[prost(string, tag = "5")]
179 String(::prost::alloc::string::String),
180 #[prost(message, tag = "6")]
181 Date(Date),
182 #[prost(message, tag = "7")]
183 Datetime(Datetime),
184 #[prost(message, tag = "8")]
185 DatetimeTz(DatetimeTz),
186 #[prost(message, tag = "9")]
187 Duration(Duration),
188 #[prost(message, tag = "10")]
189 Struct(Struct),
190 }
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct Type {
194 #[prost(oneof = "r#type::Type", tags = "1, 2, 3, 4")]
195 pub r#type: ::core::option::Option<r#type::Type>,
196}
197pub mod r#type {
199 #[derive(Clone, PartialEq, ::prost::Oneof)]
200 pub enum Type {
201 #[prost(message, tag = "1")]
202 EntityType(super::EntityType),
203 #[prost(message, tag = "2")]
204 RelationType(super::RelationType),
205 #[prost(message, tag = "3")]
206 AttributeType(super::AttributeType),
207 #[prost(message, tag = "4")]
208 RoleType(super::RoleType),
209 }
210}
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct RoleType {
213 #[prost(string, tag = "1")]
214 pub label: ::prost::alloc::string::String,
215}
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct EntityType {
218 #[prost(string, tag = "1")]
219 pub label: ::prost::alloc::string::String,
220}
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct RelationType {
223 #[prost(string, tag = "1")]
224 pub label: ::prost::alloc::string::String,
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct AttributeType {
228 #[prost(string, tag = "1")]
229 pub label: ::prost::alloc::string::String,
230 #[prost(message, optional, tag = "2")]
231 pub value_type: ::core::option::Option<ValueType>,
232}
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct ValueType {
235 #[prost(oneof = "value_type::ValueType", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
236 pub value_type: ::core::option::Option<value_type::ValueType>,
237}
238pub mod value_type {
240 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
241 pub struct Boolean {}
242 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
243 pub struct Integer {}
244 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
245 pub struct Double {}
246 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
247 pub struct Decimal {}
248 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
249 pub struct String {}
250 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
251 pub struct Date {}
252 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
253 pub struct DateTime {}
254 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
255 pub struct DateTimeTz {}
256 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
257 pub struct Duration {}
258 #[derive(Clone, PartialEq, ::prost::Message)]
259 pub struct Struct {
260 #[prost(string, tag = "1")]
261 pub name: ::prost::alloc::string::String,
262 }
263 #[derive(Clone, PartialEq, ::prost::Oneof)]
264 pub enum ValueType {
265 #[prost(message, tag = "1")]
266 Boolean(Boolean),
267 #[prost(message, tag = "2")]
268 Integer(Integer),
269 #[prost(message, tag = "3")]
270 Double(Double),
271 #[prost(message, tag = "4")]
272 Decimal(Decimal),
273 #[prost(message, tag = "5")]
274 String(String),
275 #[prost(message, tag = "6")]
276 Date(Date),
277 #[prost(message, tag = "7")]
278 Datetime(DateTime),
279 #[prost(message, tag = "8")]
280 DatetimeTz(DateTimeTz),
281 #[prost(message, tag = "9")]
282 Duration(Duration),
283 #[prost(message, tag = "10")]
284 Struct(Struct),
285 }
286}
287#[derive(Clone, Copy, PartialEq, ::prost::Message)]
288pub struct Migration {}
289pub mod migration {
291 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
292 pub struct Export {}
293 pub mod export {
295 #[derive(Clone, PartialEq, ::prost::Message)]
296 pub struct Req {
297 #[prost(string, tag = "1")]
298 pub name: ::prost::alloc::string::String,
299 }
300 #[derive(Clone, PartialEq, ::prost::Message)]
301 pub struct Server {
302 #[prost(oneof = "server::Server", tags = "1, 2, 3")]
303 pub server: ::core::option::Option<server::Server>,
304 }
305 pub mod server {
307 #[derive(Clone, PartialEq, ::prost::Oneof)]
308 pub enum Server {
309 #[prost(message, tag = "1")]
310 InitialRes(super::InitialRes),
311 #[prost(message, tag = "2")]
312 ResPart(super::ResPart),
313 #[prost(message, tag = "3")]
314 Done(super::Done),
315 }
316 }
317 #[derive(Clone, PartialEq, ::prost::Message)]
318 pub struct InitialRes {
319 #[prost(string, tag = "1")]
320 pub schema: ::prost::alloc::string::String,
321 }
322 #[derive(Clone, PartialEq, ::prost::Message)]
323 pub struct ResPart {
324 #[prost(message, repeated, tag = "1")]
325 pub items: ::prost::alloc::vec::Vec<super::Item>,
326 }
327 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
328 pub struct Done {}
329 }
330 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
331 pub struct Import {}
332 pub mod import {
334 #[derive(Clone, PartialEq, ::prost::Message)]
335 pub struct Client {
336 #[prost(oneof = "client::Client", tags = "1, 2, 3")]
337 pub client: ::core::option::Option<client::Client>,
338 }
339 pub mod client {
341 #[derive(Clone, PartialEq, ::prost::Message)]
342 pub struct InitialReq {
343 #[prost(string, tag = "1")]
344 pub name: ::prost::alloc::string::String,
345 #[prost(string, tag = "2")]
346 pub schema: ::prost::alloc::string::String,
347 }
348 #[derive(Clone, PartialEq, ::prost::Message)]
349 pub struct ReqPart {
350 #[prost(message, repeated, tag = "1")]
351 pub items: ::prost::alloc::vec::Vec<super::super::Item>,
352 }
353 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
354 pub struct Done {}
355 #[derive(Clone, PartialEq, ::prost::Oneof)]
356 pub enum Client {
357 #[prost(message, tag = "1")]
358 InitialReq(InitialReq),
359 #[prost(message, tag = "2")]
360 ReqPart(ReqPart),
361 #[prost(message, tag = "3")]
362 Done(Done),
363 }
364 }
365 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
366 pub struct Server {
367 #[prost(message, optional, tag = "1")]
368 pub done: ::core::option::Option<server::Done>,
369 }
370 pub mod server {
372 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
373 pub struct Done {}
374 }
375 }
376 #[derive(Clone, PartialEq, ::prost::Message)]
377 pub struct Item {
378 #[prost(oneof = "item::Item", tags = "1, 2, 3, 15, 16")]
379 pub item: ::core::option::Option<item::Item>,
380 }
381 pub mod item {
383 #[derive(Clone, PartialEq, ::prost::Message)]
384 pub struct Entity {
385 #[prost(string, tag = "1")]
386 pub id: ::prost::alloc::string::String,
387 #[prost(string, tag = "2")]
388 pub label: ::prost::alloc::string::String,
389 #[prost(message, repeated, tag = "3")]
390 pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
391 }
392 #[derive(Clone, PartialEq, ::prost::Message)]
393 pub struct Attribute {
394 #[prost(string, tag = "1")]
395 pub id: ::prost::alloc::string::String,
396 #[prost(string, tag = "2")]
397 pub label: ::prost::alloc::string::String,
398 #[prost(message, repeated, tag = "3")]
400 pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
401 #[prost(message, optional, tag = "4")]
402 pub value: ::core::option::Option<super::MigrationValue>,
403 }
404 #[derive(Clone, PartialEq, ::prost::Message)]
405 pub struct Relation {
406 #[prost(string, tag = "1")]
407 pub id: ::prost::alloc::string::String,
408 #[prost(string, tag = "2")]
409 pub label: ::prost::alloc::string::String,
410 #[prost(message, repeated, tag = "3")]
411 pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
412 #[prost(message, repeated, tag = "4")]
413 pub roles: ::prost::alloc::vec::Vec<relation::Role>,
414 }
415 pub mod relation {
417 #[derive(Clone, PartialEq, ::prost::Message)]
418 pub struct Role {
419 #[prost(string, tag = "1")]
420 pub label: ::prost::alloc::string::String,
421 #[prost(message, repeated, tag = "2")]
422 pub players: ::prost::alloc::vec::Vec<role::Player>,
423 }
424 pub mod role {
426 #[derive(Clone, PartialEq, ::prost::Message)]
427 pub struct Player {
428 #[prost(string, tag = "1")]
429 pub id: ::prost::alloc::string::String,
430 }
431 }
432 }
433 #[derive(Clone, PartialEq, ::prost::Message)]
434 pub struct OwnedAttribute {
435 #[prost(string, tag = "1")]
436 pub id: ::prost::alloc::string::String,
437 }
438 #[derive(Clone, PartialEq, ::prost::Message)]
439 pub struct Header {
440 #[prost(string, tag = "1")]
441 pub typedb_version: ::prost::alloc::string::String,
442 #[prost(string, tag = "2")]
443 pub original_database: ::prost::alloc::string::String,
444 }
445 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
446 pub struct Checksums {
447 #[prost(int64, tag = "1")]
448 pub entity_count: i64,
449 #[prost(int64, tag = "2")]
450 pub attribute_count: i64,
451 #[prost(int64, tag = "3")]
452 pub relation_count: i64,
453 #[prost(int64, tag = "4")]
454 pub role_count: i64,
455 #[prost(int64, tag = "5")]
456 pub ownership_count: i64,
457 }
458 #[derive(Clone, PartialEq, ::prost::Oneof)]
459 pub enum Item {
460 #[prost(message, tag = "1")]
461 Attribute(Attribute),
462 #[prost(message, tag = "2")]
463 Entity(Entity),
464 #[prost(message, tag = "3")]
465 Relation(Relation),
466 #[prost(message, tag = "15")]
467 Header(Header),
468 #[prost(message, tag = "16")]
469 Checksums(Checksums),
470 }
471 }
472 #[derive(Clone, PartialEq, ::prost::Message)]
473 pub struct MigrationValue {
474 #[prost(
475 oneof = "migration_value::Value",
476 tags = "1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12"
477 )]
478 pub value: ::core::option::Option<migration_value::Value>,
479 }
480 pub mod migration_value {
482 #[derive(Clone, PartialEq, ::prost::Oneof)]
483 pub enum Value {
484 #[prost(string, tag = "1")]
485 String(::prost::alloc::string::String),
486 #[prost(bool, tag = "2")]
487 Boolean(bool),
488 #[prost(int64, tag = "3")]
489 Integer(i64),
490 #[prost(double, tag = "4")]
491 Double(f64),
492 #[prost(int64, tag = "5")]
494 DatetimeMillis(i64),
495 #[prost(message, tag = "6")]
496 Decimal(super::super::value::Decimal),
497 #[prost(message, tag = "8")]
498 Date(super::super::value::Date),
499 #[prost(message, tag = "9")]
500 Datetime(super::super::value::Datetime),
501 #[prost(message, tag = "10")]
502 DatetimeTz(super::super::value::DatetimeTz),
503 #[prost(message, tag = "11")]
504 Duration(super::super::value::Duration),
505 #[prost(message, tag = "12")]
506 Struct(super::super::value::Struct),
507 }
508 }
509}
510#[derive(Clone, Copy, PartialEq, ::prost::Message)]
511pub struct DatabaseManager {}
512pub mod database_manager {
514 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
515 pub struct Get {}
516 pub mod get {
518 #[derive(Clone, PartialEq, ::prost::Message)]
519 pub struct Req {
520 #[prost(string, tag = "1")]
521 pub name: ::prost::alloc::string::String,
522 }
523 #[derive(Clone, PartialEq, ::prost::Message)]
524 pub struct Res {
525 #[prost(message, optional, tag = "1")]
526 pub database: ::core::option::Option<super::super::DatabaseReplicas>,
527 }
528 }
529 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
530 pub struct All {}
531 pub mod all {
533 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
534 pub struct Req {}
535 #[derive(Clone, PartialEq, ::prost::Message)]
536 pub struct Res {
537 #[prost(message, repeated, tag = "1")]
538 pub databases: ::prost::alloc::vec::Vec<super::super::DatabaseReplicas>,
539 }
540 }
541 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
542 pub struct Contains {}
543 pub mod contains {
545 #[derive(Clone, PartialEq, ::prost::Message)]
546 pub struct Req {
547 #[prost(string, tag = "1")]
548 pub name: ::prost::alloc::string::String,
549 }
550 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
551 pub struct Res {
552 #[prost(bool, tag = "1")]
553 pub contains: bool,
554 }
555 }
556 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
557 pub struct Create {}
558 pub mod create {
560 #[derive(Clone, PartialEq, ::prost::Message)]
561 pub struct Req {
562 #[prost(string, tag = "1")]
563 pub name: ::prost::alloc::string::String,
564 }
565 #[derive(Clone, PartialEq, ::prost::Message)]
566 pub struct Res {
567 #[prost(message, optional, tag = "1")]
568 pub database: ::core::option::Option<super::super::DatabaseReplicas>,
569 }
570 }
571 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
572 pub struct Import {}
573 pub mod import {
575 #[derive(Clone, PartialEq, ::prost::Message)]
576 pub struct Client {
577 #[prost(message, optional, tag = "1")]
578 pub client: ::core::option::Option<super::super::migration::import::Client>,
579 }
580 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
581 pub struct Server {
582 #[prost(message, optional, tag = "1")]
583 pub server: ::core::option::Option<super::super::migration::import::Server>,
584 }
585 }
586}
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct DatabaseReplicas {
589 #[prost(string, tag = "1")]
590 pub name: ::prost::alloc::string::String,
591 #[prost(message, repeated, tag = "2")]
592 pub replicas: ::prost::alloc::vec::Vec<database_replicas::Replica>,
593}
594pub mod database_replicas {
596 #[derive(Clone, PartialEq, ::prost::Message)]
597 pub struct Replica {
598 #[prost(string, tag = "1")]
599 pub address: ::prost::alloc::string::String,
600 #[prost(bool, tag = "2")]
601 pub primary: bool,
602 #[prost(bool, tag = "3")]
603 pub preferred: bool,
604 #[prost(int64, tag = "4")]
605 pub term: i64,
606 }
607}
608#[derive(Clone, Copy, PartialEq, ::prost::Message)]
609pub struct Database {}
610pub mod database {
612 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
613 pub struct Schema {}
614 pub mod schema {
616 #[derive(Clone, PartialEq, ::prost::Message)]
617 pub struct Req {
618 #[prost(string, tag = "1")]
619 pub name: ::prost::alloc::string::String,
620 }
621 #[derive(Clone, PartialEq, ::prost::Message)]
622 pub struct Res {
623 #[prost(string, tag = "1")]
624 pub schema: ::prost::alloc::string::String,
625 }
626 }
627 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
628 pub struct TypeSchema {}
629 pub mod type_schema {
631 #[derive(Clone, PartialEq, ::prost::Message)]
632 pub struct Req {
633 #[prost(string, tag = "1")]
634 pub name: ::prost::alloc::string::String,
635 }
636 #[derive(Clone, PartialEq, ::prost::Message)]
637 pub struct Res {
638 #[prost(string, tag = "1")]
639 pub schema: ::prost::alloc::string::String,
640 }
641 }
642 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
643 pub struct Export {}
644 pub mod export {
646 #[derive(Clone, PartialEq, ::prost::Message)]
647 pub struct Req {
648 #[prost(message, optional, tag = "1")]
649 pub req: ::core::option::Option<super::super::migration::export::Req>,
650 }
651 #[derive(Clone, PartialEq, ::prost::Message)]
652 pub struct Server {
653 #[prost(message, optional, tag = "1")]
654 pub server: ::core::option::Option<super::super::migration::export::Server>,
655 }
656 }
657 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
658 pub struct Delete {}
659 pub mod delete {
661 #[derive(Clone, PartialEq, ::prost::Message)]
662 pub struct Req {
663 #[prost(string, tag = "1")]
664 pub name: ::prost::alloc::string::String,
665 }
666 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
667 pub struct Res {}
668 }
669}
670#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
671#[repr(i32)]
672pub enum Version {
673 Unspecified = 0,
674 Version = 7,
675}
676impl Version {
677 pub fn as_str_name(&self) -> &'static str {
682 match self {
683 Self::Unspecified => "UNSPECIFIED",
684 Self::Version => "VERSION",
685 }
686 }
687 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
689 match value {
690 "UNSPECIFIED" => Some(Self::Unspecified),
691 "VERSION" => Some(Self::Version),
692 _ => None,
693 }
694 }
695}
696#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
697#[repr(i32)]
698pub enum ExtensionVersion {
699 UnspecifiedExtension = 0,
700 Extension = 1,
702}
703impl ExtensionVersion {
704 pub fn as_str_name(&self) -> &'static str {
709 match self {
710 Self::UnspecifiedExtension => "UNSPECIFIED_EXTENSION",
711 Self::Extension => "EXTENSION",
712 }
713 }
714 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
716 match value {
717 "UNSPECIFIED_EXTENSION" => Some(Self::UnspecifiedExtension),
718 "EXTENSION" => Some(Self::Extension),
719 _ => None,
720 }
721 }
722}
723#[derive(Clone, Copy, PartialEq, ::prost::Message)]
724pub struct Connection {}
725pub mod connection {
727 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
728 pub struct Open {}
729 pub mod open {
731 #[derive(Clone, PartialEq, ::prost::Message)]
732 pub struct Req {
733 #[prost(enumeration = "super::super::Version", tag = "1")]
734 pub version: i32,
735 #[prost(enumeration = "super::super::ExtensionVersion", tag = "5")]
736 pub extension_version: i32,
737 #[prost(string, tag = "2")]
738 pub driver_lang: ::prost::alloc::string::String,
739 #[prost(string, tag = "3")]
740 pub driver_version: ::prost::alloc::string::String,
741 #[prost(message, optional, tag = "4")]
742 pub authentication: ::core::option::Option<
743 super::super::authentication::token::create::Req,
744 >,
745 }
746 #[derive(Clone, PartialEq, ::prost::Message)]
747 pub struct Res {
748 #[prost(uint64, tag = "1")]
749 pub server_duration_millis: u64,
750 #[prost(message, optional, tag = "2")]
751 pub connection_id: ::core::option::Option<super::super::ConnectionId>,
752 #[prost(message, optional, tag = "3")]
754 pub databases_all: ::core::option::Option<
755 super::super::database_manager::all::Res,
756 >,
757 #[prost(message, optional, tag = "4")]
758 pub authentication: ::core::option::Option<
759 super::super::authentication::token::create::Res,
760 >,
761 }
762 }
763}
764#[derive(Clone, PartialEq, ::prost::Message)]
766pub struct ConnectionId {
767 #[prost(bytes = "vec", tag = "1")]
768 pub id: ::prost::alloc::vec::Vec<u8>,
769}
770#[derive(Clone, Copy, PartialEq, ::prost::Message)]
771pub struct ServerManager {}
772pub mod server_manager {
774 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
775 pub struct All {}
776 pub mod all {
778 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
779 pub struct Req {}
780 #[derive(Clone, PartialEq, ::prost::Message)]
781 pub struct Res {
782 #[prost(message, repeated, tag = "1")]
783 pub servers: ::prost::alloc::vec::Vec<super::super::Server>,
784 }
785 }
786}
787#[derive(Clone, PartialEq, ::prost::Message)]
788pub struct Server {
789 #[prost(string, tag = "1")]
790 pub address: ::prost::alloc::string::String,
791}
792#[derive(Clone, Copy, PartialEq, ::prost::Message)]
793pub struct UserManager {}
794pub mod user_manager {
796 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
797 pub struct All {}
798 pub mod all {
800 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
801 pub struct Req {}
802 #[derive(Clone, PartialEq, ::prost::Message)]
803 pub struct Res {
804 #[prost(message, repeated, tag = "1")]
805 pub users: ::prost::alloc::vec::Vec<super::super::User>,
806 }
807 }
808 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
809 pub struct Contains {}
810 pub mod contains {
812 #[derive(Clone, PartialEq, ::prost::Message)]
813 pub struct Req {
814 #[prost(string, tag = "1")]
815 pub name: ::prost::alloc::string::String,
816 }
817 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
818 pub struct Res {
819 #[prost(bool, tag = "1")]
820 pub contains: bool,
821 }
822 }
823 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
824 pub struct Get {}
825 pub mod get {
827 #[derive(Clone, PartialEq, ::prost::Message)]
828 pub struct Req {
829 #[prost(string, tag = "1")]
830 pub name: ::prost::alloc::string::String,
831 }
832 #[derive(Clone, PartialEq, ::prost::Message)]
833 pub struct Res {
834 #[prost(message, optional, tag = "1")]
835 pub user: ::core::option::Option<super::super::User>,
836 }
837 }
838 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
839 pub struct Create {}
840 pub mod create {
842 #[derive(Clone, PartialEq, ::prost::Message)]
843 pub struct Req {
844 #[prost(message, optional, tag = "1")]
845 pub user: ::core::option::Option<super::super::User>,
846 }
847 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
848 pub struct Res {}
849 }
850}
851#[derive(Clone, PartialEq, ::prost::Message)]
852pub struct User {
853 #[prost(string, tag = "1")]
854 pub name: ::prost::alloc::string::String,
855 #[prost(string, optional, tag = "2")]
856 pub password: ::core::option::Option<::prost::alloc::string::String>,
857}
858pub mod user {
860 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
861 pub struct Update {}
862 pub mod update {
864 #[derive(Clone, PartialEq, ::prost::Message)]
865 pub struct Req {
866 #[prost(string, tag = "1")]
867 pub name: ::prost::alloc::string::String,
868 #[prost(message, optional, tag = "2")]
869 pub user: ::core::option::Option<super::super::User>,
870 }
871 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
872 pub struct Res {}
873 }
874 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
875 pub struct Delete {}
876 pub mod delete {
878 #[derive(Clone, PartialEq, ::prost::Message)]
879 pub struct Req {
880 #[prost(string, tag = "1")]
881 pub name: ::prost::alloc::string::String,
882 }
883 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
884 pub struct Res {}
885 }
886}
887#[derive(Clone, PartialEq, ::prost::Message)]
888pub struct ConceptRow {
889 #[prost(message, repeated, tag = "1")]
890 pub row: ::prost::alloc::vec::Vec<RowEntry>,
891 #[prost(bytes = "vec", optional, tag = "2")]
892 pub involved_blocks: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
893}
894#[derive(Clone, PartialEq, ::prost::Message)]
895pub struct RowEntry {
896 #[prost(oneof = "row_entry::Entry", tags = "1, 2, 3, 4, 5")]
897 pub entry: ::core::option::Option<row_entry::Entry>,
898}
899pub mod row_entry {
901 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
902 pub struct Empty {}
903 #[derive(Clone, PartialEq, ::prost::Message)]
904 pub struct ConceptList {
905 #[prost(message, repeated, tag = "1")]
906 pub concepts: ::prost::alloc::vec::Vec<super::Concept>,
907 }
908 #[derive(Clone, PartialEq, ::prost::Message)]
909 pub struct ValueList {
910 #[prost(message, repeated, tag = "1")]
911 pub values: ::prost::alloc::vec::Vec<super::Value>,
912 }
913 #[derive(Clone, PartialEq, ::prost::Oneof)]
914 pub enum Entry {
915 #[prost(message, tag = "1")]
916 Empty(Empty),
917 #[prost(message, tag = "2")]
918 Concept(super::Concept),
919 #[prost(message, tag = "3")]
920 Value(super::Value),
921 #[prost(message, tag = "4")]
922 ConceptList(ConceptList),
923 #[prost(message, tag = "5")]
924 ValueList(ValueList),
925 }
926}
927#[derive(Clone, PartialEq, ::prost::Message)]
928pub struct ConceptDocument {
929 #[prost(message, optional, tag = "1")]
930 pub root: ::core::option::Option<concept_document::Node>,
931}
932pub mod concept_document {
934 #[derive(Clone, PartialEq, ::prost::Message)]
935 pub struct Node {
936 #[prost(oneof = "node::Node", tags = "1, 2, 3")]
937 pub node: ::core::option::Option<node::Node>,
938 }
939 pub mod node {
941 #[derive(Clone, PartialEq, ::prost::Message)]
942 pub struct Map {
943 #[prost(map = "string, message", tag = "1")]
944 pub map: ::std::collections::HashMap<
945 ::prost::alloc::string::String,
946 super::Node,
947 >,
948 }
949 #[derive(Clone, PartialEq, ::prost::Message)]
950 pub struct List {
951 #[prost(message, repeated, tag = "1")]
952 pub list: ::prost::alloc::vec::Vec<super::Node>,
953 }
954 #[derive(Clone, PartialEq, ::prost::Message)]
955 pub struct Leaf {
956 #[prost(oneof = "leaf::Leaf", tags = "1, 10, 11, 12, 13, 15, 20, 21, 30")]
957 pub leaf: ::core::option::Option<leaf::Leaf>,
958 }
959 pub mod leaf {
961 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
962 pub struct Empty {}
963 #[derive(
964 Clone,
965 Copy,
966 Debug,
967 PartialEq,
968 Eq,
969 Hash,
970 PartialOrd,
971 Ord,
972 ::prost::Enumeration
973 )]
974 #[repr(i32)]
975 pub enum Kind {
976 Entity = 0,
977 Relation = 1,
978 Attribute = 3,
979 Role = 4,
980 }
981 impl Kind {
982 pub fn as_str_name(&self) -> &'static str {
987 match self {
988 Self::Entity => "Entity",
989 Self::Relation => "Relation",
990 Self::Attribute => "Attribute",
991 Self::Role => "Role",
992 }
993 }
994 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
996 match value {
997 "Entity" => Some(Self::Entity),
998 "Relation" => Some(Self::Relation),
999 "Attribute" => Some(Self::Attribute),
1000 "Role" => Some(Self::Role),
1001 _ => None,
1002 }
1003 }
1004 }
1005 #[derive(Clone, PartialEq, ::prost::Oneof)]
1006 pub enum Leaf {
1007 #[prost(message, tag = "1")]
1008 Empty(Empty),
1009 #[prost(message, tag = "10")]
1010 EntityType(super::super::super::EntityType),
1011 #[prost(message, tag = "11")]
1012 RelationType(super::super::super::RelationType),
1013 #[prost(message, tag = "12")]
1014 AttributeType(super::super::super::AttributeType),
1015 #[prost(message, tag = "13")]
1016 RoleType(super::super::super::RoleType),
1017 #[prost(message, tag = "15")]
1018 ValueType(super::super::super::ValueType),
1019 #[prost(message, tag = "20")]
1020 Attribute(super::super::super::Attribute),
1021 #[prost(message, tag = "21")]
1022 Value(super::super::super::Value),
1023 #[prost(enumeration = "Kind", tag = "30")]
1024 Kind(i32),
1025 }
1026 }
1027 #[derive(Clone, PartialEq, ::prost::Oneof)]
1028 pub enum Node {
1029 #[prost(message, tag = "1")]
1030 Map(Map),
1031 #[prost(message, tag = "2")]
1032 List(List),
1033 #[prost(message, tag = "3")]
1034 Leaf(Leaf),
1035 }
1036 }
1037}
1038#[derive(Clone, PartialEq, ::prost::Message)]
1039pub struct AnalyzedConjunction {
1040 #[prost(message, repeated, tag = "1")]
1041 pub constraints: ::prost::alloc::vec::Vec<analyzed_conjunction::Constraint>,
1042 #[prost(map = "uint32, message", tag = "2")]
1043 pub variable_annotations: ::std::collections::HashMap<
1044 u32,
1045 analyzed_conjunction::VariableAnnotations,
1046 >,
1047}
1048pub mod analyzed_conjunction {
1050 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1051 pub struct Variable {
1052 #[prost(uint32, tag = "1")]
1053 pub id: u32,
1054 }
1055 #[derive(Clone, PartialEq, ::prost::Message)]
1056 pub struct ConstraintVertex {
1057 #[prost(oneof = "constraint_vertex::Vertex", tags = "1, 2, 3, 4")]
1058 pub vertex: ::core::option::Option<constraint_vertex::Vertex>,
1059 }
1060 pub mod constraint_vertex {
1062 #[derive(Clone, PartialEq, ::prost::Message)]
1063 pub struct NamedRole {
1064 #[prost(message, optional, tag = "1")]
1065 pub variable: ::core::option::Option<super::Variable>,
1066 #[prost(string, tag = "2")]
1067 pub name: ::prost::alloc::string::String,
1068 }
1069 #[derive(Clone, PartialEq, ::prost::Oneof)]
1070 pub enum Vertex {
1071 #[prost(message, tag = "1")]
1072 Variable(super::Variable),
1073 #[prost(message, tag = "2")]
1074 Label(super::super::Type),
1075 #[prost(message, tag = "3")]
1076 Value(super::super::Value),
1077 #[prost(message, tag = "4")]
1078 NamedRole(NamedRole),
1079 }
1080 }
1081 #[derive(Clone, PartialEq, ::prost::Message)]
1082 pub struct Constraint {
1083 #[prost(message, optional, tag = "1")]
1084 pub span: ::core::option::Option<constraint::ConstraintSpan>,
1085 #[prost(
1086 oneof = "constraint::Constraint",
1087 tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
1088 )]
1089 pub constraint: ::core::option::Option<constraint::Constraint>,
1090 }
1091 pub mod constraint {
1093 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1094 pub struct ConstraintSpan {
1095 #[prost(uint64, tag = "1")]
1096 pub begin: u64,
1097 #[prost(uint64, tag = "2")]
1098 pub end: u64,
1099 }
1100 #[derive(Clone, PartialEq, ::prost::Message)]
1102 pub struct Or {
1103 #[prost(uint32, repeated, tag = "1")]
1104 pub branches: ::prost::alloc::vec::Vec<u32>,
1105 }
1106 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1107 pub struct Not {
1108 #[prost(uint32, tag = "1")]
1109 pub conjunction: u32,
1110 }
1111 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1112 pub struct Try {
1113 #[prost(uint32, tag = "1")]
1114 pub conjunction: u32,
1115 }
1116 #[derive(Clone, PartialEq, ::prost::Message)]
1118 pub struct Isa {
1119 #[prost(message, optional, tag = "1")]
1120 pub instance: ::core::option::Option<super::ConstraintVertex>,
1121 #[prost(message, optional, tag = "2")]
1122 pub r#type: ::core::option::Option<super::ConstraintVertex>,
1123 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1124 pub exactness: i32,
1125 }
1126 #[derive(Clone, PartialEq, ::prost::Message)]
1127 pub struct Has {
1128 #[prost(message, optional, tag = "1")]
1129 pub owner: ::core::option::Option<super::ConstraintVertex>,
1130 #[prost(message, optional, tag = "2")]
1131 pub attribute: ::core::option::Option<super::ConstraintVertex>,
1132 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1133 pub exactness: i32,
1134 }
1135 #[derive(Clone, PartialEq, ::prost::Message)]
1136 pub struct Links {
1137 #[prost(message, optional, tag = "1")]
1138 pub relation: ::core::option::Option<super::ConstraintVertex>,
1139 #[prost(message, optional, tag = "2")]
1140 pub player: ::core::option::Option<super::ConstraintVertex>,
1141 #[prost(message, optional, tag = "3")]
1142 pub role: ::core::option::Option<super::ConstraintVertex>,
1143 #[prost(enumeration = "ConstraintExactness", tag = "4")]
1144 pub exactness: i32,
1145 }
1146 #[derive(Clone, PartialEq, ::prost::Message)]
1148 pub struct Kind {
1149 #[prost(
1150 enumeration = "super::super::concept_document::node::leaf::Kind",
1151 tag = "1"
1152 )]
1153 pub kind: i32,
1154 #[prost(message, optional, tag = "2")]
1155 pub r#type: ::core::option::Option<super::ConstraintVertex>,
1156 }
1157 #[derive(Clone, PartialEq, ::prost::Message)]
1158 pub struct Sub {
1159 #[prost(message, optional, tag = "1")]
1160 pub subtype: ::core::option::Option<super::ConstraintVertex>,
1161 #[prost(message, optional, tag = "2")]
1162 pub supertype: ::core::option::Option<super::ConstraintVertex>,
1163 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1164 pub exactness: i32,
1165 }
1166 #[derive(Clone, PartialEq, ::prost::Message)]
1167 pub struct Owns {
1168 #[prost(message, optional, tag = "1")]
1169 pub owner: ::core::option::Option<super::ConstraintVertex>,
1170 #[prost(message, optional, tag = "2")]
1171 pub attribute: ::core::option::Option<super::ConstraintVertex>,
1172 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1173 pub exactness: i32,
1174 }
1175 #[derive(Clone, PartialEq, ::prost::Message)]
1176 pub struct Relates {
1177 #[prost(message, optional, tag = "1")]
1178 pub relation: ::core::option::Option<super::ConstraintVertex>,
1179 #[prost(message, optional, tag = "2")]
1180 pub role: ::core::option::Option<super::ConstraintVertex>,
1181 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1182 pub exactness: i32,
1183 }
1184 #[derive(Clone, PartialEq, ::prost::Message)]
1185 pub struct Plays {
1186 #[prost(message, optional, tag = "1")]
1187 pub player: ::core::option::Option<super::ConstraintVertex>,
1188 #[prost(message, optional, tag = "2")]
1189 pub role: ::core::option::Option<super::ConstraintVertex>,
1190 #[prost(enumeration = "ConstraintExactness", tag = "3")]
1191 pub exactness: i32,
1192 }
1193 #[derive(Clone, PartialEq, ::prost::Message)]
1194 pub struct Label {
1195 #[prost(message, optional, tag = "1")]
1196 pub r#type: ::core::option::Option<super::ConstraintVertex>,
1197 #[prost(string, tag = "2")]
1198 pub label: ::prost::alloc::string::String,
1199 }
1200 #[derive(Clone, PartialEq, ::prost::Message)]
1201 pub struct Value {
1202 #[prost(message, optional, tag = "1")]
1203 pub attribute_type: ::core::option::Option<super::ConstraintVertex>,
1204 #[prost(message, optional, tag = "2")]
1205 pub value_type: ::core::option::Option<super::super::ValueType>,
1206 }
1207 #[derive(Clone, PartialEq, ::prost::Message)]
1209 pub struct Comparison {
1210 #[prost(message, optional, tag = "1")]
1211 pub lhs: ::core::option::Option<super::ConstraintVertex>,
1212 #[prost(message, optional, tag = "2")]
1213 pub rhs: ::core::option::Option<super::ConstraintVertex>,
1214 #[prost(enumeration = "comparison::Comparator", tag = "3")]
1215 pub comparator: i32,
1216 }
1217 pub mod comparison {
1219 #[derive(
1220 Clone,
1221 Copy,
1222 Debug,
1223 PartialEq,
1224 Eq,
1225 Hash,
1226 PartialOrd,
1227 Ord,
1228 ::prost::Enumeration
1229 )]
1230 #[repr(i32)]
1231 pub enum Comparator {
1232 Equal = 0,
1233 NotEqual = 1,
1234 Less = 2,
1235 Greater = 3,
1236 LessOrEqual = 4,
1237 GreaterOrEqual = 5,
1238 Like = 6,
1239 Contains = 7,
1240 }
1241 impl Comparator {
1242 pub fn as_str_name(&self) -> &'static str {
1247 match self {
1248 Self::Equal => "EQUAL",
1249 Self::NotEqual => "NOT_EQUAL",
1250 Self::Less => "LESS",
1251 Self::Greater => "GREATER",
1252 Self::LessOrEqual => "LESS_OR_EQUAL",
1253 Self::GreaterOrEqual => "GREATER_OR_EQUAL",
1254 Self::Like => "LIKE",
1255 Self::Contains => "CONTAINS",
1256 }
1257 }
1258 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1260 match value {
1261 "EQUAL" => Some(Self::Equal),
1262 "NOT_EQUAL" => Some(Self::NotEqual),
1263 "LESS" => Some(Self::Less),
1264 "GREATER" => Some(Self::Greater),
1265 "LESS_OR_EQUAL" => Some(Self::LessOrEqual),
1266 "GREATER_OR_EQUAL" => Some(Self::GreaterOrEqual),
1267 "LIKE" => Some(Self::Like),
1268 "CONTAINS" => Some(Self::Contains),
1269 _ => None,
1270 }
1271 }
1272 }
1273 }
1274 #[derive(Clone, PartialEq, ::prost::Message)]
1275 pub struct Expression {
1276 #[prost(string, tag = "1")]
1277 pub text: ::prost::alloc::string::String,
1278 #[prost(message, optional, tag = "2")]
1279 pub assigned: ::core::option::Option<super::ConstraintVertex>,
1280 #[prost(message, repeated, tag = "3")]
1282 pub arguments: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
1283 }
1284 #[derive(Clone, PartialEq, ::prost::Message)]
1285 pub struct FunctionCall {
1286 #[prost(string, tag = "1")]
1287 pub name: ::prost::alloc::string::String,
1288 #[prost(message, repeated, tag = "2")]
1289 pub assigned: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
1290 #[prost(message, repeated, tag = "3")]
1292 pub arguments: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
1293 }
1294 #[derive(Clone, PartialEq, ::prost::Message)]
1296 pub struct Is {
1297 #[prost(message, optional, tag = "1")]
1298 pub lhs: ::core::option::Option<super::ConstraintVertex>,
1299 #[prost(message, optional, tag = "2")]
1300 pub rhs: ::core::option::Option<super::ConstraintVertex>,
1301 }
1302 #[derive(Clone, PartialEq, ::prost::Message)]
1303 pub struct Iid {
1304 #[prost(message, optional, tag = "1")]
1305 pub concept: ::core::option::Option<super::ConstraintVertex>,
1306 #[prost(bytes = "vec", tag = "2")]
1307 pub iid: ::prost::alloc::vec::Vec<u8>,
1308 }
1309 #[derive(
1310 Clone,
1311 Copy,
1312 Debug,
1313 PartialEq,
1314 Eq,
1315 Hash,
1316 PartialOrd,
1317 Ord,
1318 ::prost::Enumeration
1319 )]
1320 #[repr(i32)]
1321 pub enum ConstraintExactness {
1322 Exact = 0,
1323 Subtypes = 1,
1324 }
1325 impl ConstraintExactness {
1326 pub fn as_str_name(&self) -> &'static str {
1331 match self {
1332 Self::Exact => "EXACT",
1333 Self::Subtypes => "SUBTYPES",
1334 }
1335 }
1336 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1338 match value {
1339 "EXACT" => Some(Self::Exact),
1340 "SUBTYPES" => Some(Self::Subtypes),
1341 _ => None,
1342 }
1343 }
1344 }
1345 #[derive(Clone, PartialEq, ::prost::Oneof)]
1346 pub enum Constraint {
1347 #[prost(message, tag = "2")]
1348 Or(Or),
1349 #[prost(message, tag = "3")]
1350 Not(Not),
1351 #[prost(message, tag = "4")]
1352 Try(Try),
1353 #[prost(message, tag = "5")]
1355 Isa(Isa),
1356 #[prost(message, tag = "6")]
1357 Has(Has),
1358 #[prost(message, tag = "7")]
1359 Links(Links),
1360 #[prost(message, tag = "8")]
1362 Kind(Kind),
1363 #[prost(message, tag = "9")]
1364 Sub(Sub),
1365 #[prost(message, tag = "10")]
1366 Owns(Owns),
1367 #[prost(message, tag = "11")]
1368 Relates(Relates),
1369 #[prost(message, tag = "12")]
1370 Plays(Plays),
1371 #[prost(message, tag = "13")]
1372 Value(Value),
1373 #[prost(message, tag = "14")]
1374 Label(Label),
1375 #[prost(message, tag = "15")]
1377 Comparison(Comparison),
1378 #[prost(message, tag = "16")]
1379 Expression(Expression),
1380 #[prost(message, tag = "17")]
1381 FunctionCall(FunctionCall),
1382 #[prost(message, tag = "18")]
1384 Is(Is),
1385 #[prost(message, tag = "19")]
1386 Iid(Iid),
1387 }
1388 }
1389 #[derive(Clone, PartialEq, ::prost::Message)]
1390 pub struct VariableAnnotations {
1391 #[prost(bool, tag = "4")]
1392 pub is_optional: bool,
1393 #[prost(oneof = "variable_annotations::Annotations", tags = "1, 2, 3")]
1394 pub annotations: ::core::option::Option<variable_annotations::Annotations>,
1395 }
1396 pub mod variable_annotations {
1398 #[derive(Clone, PartialEq, ::prost::Message)]
1399 pub struct ConceptVariableAnnotations {
1400 #[prost(message, repeated, tag = "1")]
1401 pub types: ::prost::alloc::vec::Vec<super::super::Type>,
1402 }
1403 #[derive(Clone, PartialEq, ::prost::Oneof)]
1404 pub enum Annotations {
1405 #[prost(message, tag = "1")]
1406 Instance(ConceptVariableAnnotations),
1407 #[prost(message, tag = "2")]
1408 Type(ConceptVariableAnnotations),
1409 #[prost(message, tag = "3")]
1410 ValueAnnotations(super::super::ValueType),
1411 }
1412 }
1413}
1414#[derive(Clone, PartialEq, ::prost::Message)]
1417pub struct Error {
1418 #[prost(string, tag = "1")]
1419 pub error_code: ::prost::alloc::string::String,
1420 #[prost(string, tag = "2")]
1421 pub domain: ::prost::alloc::string::String,
1422 #[prost(string, repeated, tag = "3")]
1423 pub stack_trace: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1424}
1425#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1426pub struct Options {}
1427pub mod options {
1429 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1430 pub struct Transaction {
1431 #[prost(bool, optional, tag = "1")]
1432 pub parallel: ::core::option::Option<bool>,
1433 #[prost(uint64, optional, tag = "2")]
1434 pub transaction_timeout_millis: ::core::option::Option<u64>,
1435 #[prost(uint64, optional, tag = "3")]
1436 pub schema_lock_acquire_timeout_millis: ::core::option::Option<u64>,
1437 }
1438 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1439 pub struct Query {
1440 #[prost(bool, optional, tag = "1")]
1441 pub include_instance_types: ::core::option::Option<bool>,
1442 #[prost(uint64, optional, tag = "2")]
1443 pub prefetch_size: ::core::option::Option<u64>,
1444 #[prost(bool, optional, tag = "3")]
1445 pub include_query_structure: ::core::option::Option<bool>,
1446 }
1447 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1448 pub struct Analyze {
1449 #[prost(bool, optional, tag = "1")]
1450 pub include_plan: ::core::option::Option<bool>,
1451 }
1452}
1453#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1454pub struct Analyze {}
1455pub mod analyze {
1457 #[derive(Clone, PartialEq, ::prost::Message)]
1458 pub struct Req {
1459 #[prost(message, optional, tag = "1")]
1460 pub options: ::core::option::Option<super::options::Analyze>,
1461 #[prost(string, tag = "2")]
1462 pub query: ::prost::alloc::string::String,
1463 }
1464 #[derive(Clone, PartialEq, ::prost::Message)]
1465 pub struct Res {
1466 #[prost(oneof = "res::Result", tags = "1, 2")]
1467 pub result: ::core::option::Option<res::Result>,
1468 }
1469 pub mod res {
1471 #[derive(Clone, PartialEq, ::prost::Message)]
1472 pub struct AnalyzedQuery {
1473 #[prost(string, tag = "1")]
1474 pub source: ::prost::alloc::string::String,
1475 #[prost(message, optional, tag = "2")]
1476 pub query: ::core::option::Option<analyzed_query::Pipeline>,
1477 #[prost(message, repeated, tag = "3")]
1478 pub preamble: ::prost::alloc::vec::Vec<analyzed_query::Function>,
1479 #[prost(message, optional, tag = "4")]
1480 pub fetch: ::core::option::Option<analyzed_query::Fetch>,
1481 }
1482 pub mod analyzed_query {
1484 #[derive(Clone, PartialEq, ::prost::Message)]
1485 pub struct Function {
1486 #[prost(message, optional, tag = "1")]
1487 pub body: ::core::option::Option<Pipeline>,
1488 #[prost(message, repeated, tag = "2")]
1489 pub arguments: ::prost::alloc::vec::Vec<
1490 super::super::super::analyzed_conjunction::Variable,
1491 >,
1492 #[prost(message, repeated, tag = "3")]
1493 pub arguments_annotations: ::prost::alloc::vec::Vec<
1494 super::super::super::analyzed_conjunction::VariableAnnotations,
1495 >,
1496 #[prost(message, repeated, tag = "4")]
1497 pub return_annotations: ::prost::alloc::vec::Vec<
1498 super::super::super::analyzed_conjunction::VariableAnnotations,
1499 >,
1500 #[prost(message, optional, tag = "5")]
1501 pub return_operation: ::core::option::Option<function::ReturnOperation>,
1502 }
1503 pub mod function {
1505 #[derive(Clone, PartialEq, ::prost::Message)]
1506 pub struct ReturnOperation {
1507 #[prost(
1508 oneof = "return_operation::ReturnOperation",
1509 tags = "1, 2, 3, 4"
1510 )]
1511 pub return_operation: ::core::option::Option<
1512 return_operation::ReturnOperation,
1513 >,
1514 }
1515 pub mod return_operation {
1517 #[derive(Clone, PartialEq, ::prost::Message)]
1518 pub struct ReturnOpStream {
1519 #[prost(message, repeated, tag = "1")]
1520 pub variables: ::prost::alloc::vec::Vec<
1521 super::super::super::super::super::analyzed_conjunction::Variable,
1522 >,
1523 }
1524 #[derive(Clone, PartialEq, ::prost::Message)]
1525 pub struct ReturnOpSingle {
1526 #[prost(string, tag = "1")]
1527 pub selector: ::prost::alloc::string::String,
1528 #[prost(message, repeated, tag = "2")]
1529 pub variables: ::prost::alloc::vec::Vec<
1530 super::super::super::super::super::analyzed_conjunction::Variable,
1531 >,
1532 }
1533 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1534 pub struct ReturnOpCheck {}
1535 #[derive(Clone, PartialEq, ::prost::Message)]
1536 pub struct ReturnOpReduce {
1537 #[prost(message, repeated, tag = "1")]
1538 pub reducers: ::prost::alloc::vec::Vec<super::super::Reducer>,
1539 }
1540 #[derive(Clone, PartialEq, ::prost::Oneof)]
1541 pub enum ReturnOperation {
1542 #[prost(message, tag = "1")]
1543 Stream(ReturnOpStream),
1544 #[prost(message, tag = "2")]
1545 Single(ReturnOpSingle),
1546 #[prost(message, tag = "3")]
1547 Check(ReturnOpCheck),
1548 #[prost(message, tag = "4")]
1549 Reduce(ReturnOpReduce),
1550 }
1551 }
1552 }
1553 #[derive(Clone, PartialEq, ::prost::Message)]
1554 pub struct Pipeline {
1555 #[prost(message, repeated, tag = "1")]
1556 pub conjunctions: ::prost::alloc::vec::Vec<
1557 super::super::super::AnalyzedConjunction,
1558 >,
1559 #[prost(message, repeated, tag = "2")]
1560 pub stages: ::prost::alloc::vec::Vec<pipeline::PipelineStage>,
1561 #[prost(map = "uint32, message", tag = "3")]
1562 pub variable_info: ::std::collections::HashMap<
1563 u32,
1564 pipeline::VariableInfo,
1565 >,
1566 #[prost(message, repeated, tag = "4")]
1567 pub outputs: ::prost::alloc::vec::Vec<
1568 super::super::super::analyzed_conjunction::Variable,
1569 >,
1570 }
1571 pub mod pipeline {
1573 #[derive(Clone, PartialEq, ::prost::Message)]
1574 pub struct VariableInfo {
1575 #[prost(string, tag = "1")]
1576 pub name: ::prost::alloc::string::String,
1577 }
1578 #[derive(Clone, PartialEq, ::prost::Message)]
1579 pub struct PipelineStage {
1580 #[prost(
1581 oneof = "pipeline_stage::Stage",
1582 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
1583 )]
1584 pub stage: ::core::option::Option<pipeline_stage::Stage>,
1585 }
1586 pub mod pipeline_stage {
1588 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1589 pub struct Match {
1590 #[prost(uint32, tag = "1")]
1591 pub block: u32,
1592 }
1593 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1594 pub struct Insert {
1595 #[prost(uint32, tag = "1")]
1596 pub block: u32,
1597 }
1598 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1599 pub struct Put {
1600 #[prost(uint32, tag = "1")]
1601 pub block: u32,
1602 }
1603 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1604 pub struct Update {
1605 #[prost(uint32, tag = "1")]
1606 pub block: u32,
1607 }
1608 #[derive(Clone, PartialEq, ::prost::Message)]
1609 pub struct Delete {
1610 #[prost(uint32, tag = "1")]
1611 pub block: u32,
1612 #[prost(message, repeated, tag = "2")]
1613 pub deleted_variables: ::prost::alloc::vec::Vec<
1614 super::super::super::super::super::analyzed_conjunction::Variable,
1615 >,
1616 }
1617 #[derive(Clone, PartialEq, ::prost::Message)]
1618 pub struct Select {
1619 #[prost(message, repeated, tag = "1")]
1620 pub variables: ::prost::alloc::vec::Vec<
1621 super::super::super::super::super::analyzed_conjunction::Variable,
1622 >,
1623 }
1624 #[derive(Clone, PartialEq, ::prost::Message)]
1625 pub struct Sort {
1626 #[prost(message, repeated, tag = "1")]
1627 pub sort_variables: ::prost::alloc::vec::Vec<sort::SortVariable>,
1628 }
1629 pub mod sort {
1631 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1632 pub struct SortVariable {
1633 #[prost(message, optional, tag = "1")]
1634 pub variable: ::core::option::Option<
1635 super::super::super::super::super::super::analyzed_conjunction::Variable,
1636 >,
1637 #[prost(
1638 enumeration = "sort_variable::SortDirection",
1639 tag = "2"
1640 )]
1641 pub direction: i32,
1642 }
1643 pub mod sort_variable {
1645 #[derive(
1646 Clone,
1647 Copy,
1648 Debug,
1649 PartialEq,
1650 Eq,
1651 Hash,
1652 PartialOrd,
1653 Ord,
1654 ::prost::Enumeration
1655 )]
1656 #[repr(i32)]
1657 pub enum SortDirection {
1658 Asc = 0,
1659 Desc = 1,
1660 }
1661 impl SortDirection {
1662 pub fn as_str_name(&self) -> &'static str {
1667 match self {
1668 Self::Asc => "ASC",
1669 Self::Desc => "DESC",
1670 }
1671 }
1672 pub fn from_str_name(
1674 value: &str,
1675 ) -> ::core::option::Option<Self> {
1676 match value {
1677 "ASC" => Some(Self::Asc),
1678 "DESC" => Some(Self::Desc),
1679 _ => None,
1680 }
1681 }
1682 }
1683 }
1684 }
1685 #[derive(Clone, PartialEq, ::prost::Message)]
1686 pub struct Require {
1687 #[prost(message, repeated, tag = "1")]
1688 pub variables: ::prost::alloc::vec::Vec<
1689 super::super::super::super::super::analyzed_conjunction::Variable,
1690 >,
1691 }
1692 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1693 pub struct Offset {
1694 #[prost(uint64, tag = "1")]
1695 pub offset: u64,
1696 }
1697 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1698 pub struct Limit {
1699 #[prost(uint64, tag = "1")]
1700 pub limit: u64,
1701 }
1702 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1703 pub struct Distinct {}
1704 #[derive(Clone, PartialEq, ::prost::Message)]
1705 pub struct Reduce {
1706 #[prost(message, repeated, tag = "1")]
1707 pub reducers: ::prost::alloc::vec::Vec<reduce::ReduceAssign>,
1708 #[prost(message, repeated, tag = "2")]
1709 pub groupby: ::prost::alloc::vec::Vec<
1710 super::super::super::super::super::analyzed_conjunction::Variable,
1711 >,
1712 }
1713 pub mod reduce {
1715 #[derive(Clone, PartialEq, ::prost::Message)]
1716 pub struct ReduceAssign {
1717 #[prost(message, optional, tag = "1")]
1718 pub assigned: ::core::option::Option<
1719 super::super::super::super::super::super::analyzed_conjunction::Variable,
1720 >,
1721 #[prost(message, optional, tag = "2")]
1722 pub reducer: ::core::option::Option<
1723 super::super::super::Reducer,
1724 >,
1725 }
1726 }
1727 #[derive(Clone, PartialEq, ::prost::Oneof)]
1728 pub enum Stage {
1729 #[prost(message, tag = "1")]
1730 Match(Match),
1731 #[prost(message, tag = "2")]
1732 Insert(Insert),
1733 #[prost(message, tag = "3")]
1734 Put(Put),
1735 #[prost(message, tag = "4")]
1736 Update(Update),
1737 #[prost(message, tag = "5")]
1738 Delete(Delete),
1739 #[prost(message, tag = "6")]
1740 Select(Select),
1741 #[prost(message, tag = "7")]
1742 Sort(Sort),
1743 #[prost(message, tag = "8")]
1744 Require(Require),
1745 #[prost(message, tag = "9")]
1746 Offset(Offset),
1747 #[prost(message, tag = "10")]
1748 Limit(Limit),
1749 #[prost(message, tag = "11")]
1750 Distinct(Distinct),
1751 #[prost(message, tag = "12")]
1752 Reduce(Reduce),
1753 }
1754 }
1755 }
1756 #[derive(Clone, PartialEq, ::prost::Message)]
1757 pub struct Reducer {
1758 #[prost(string, tag = "1")]
1759 pub reducer: ::prost::alloc::string::String,
1760 #[prost(message, repeated, tag = "2")]
1761 pub variables: ::prost::alloc::vec::Vec<
1762 super::super::super::analyzed_conjunction::Variable,
1763 >,
1764 }
1765 #[derive(Clone, PartialEq, ::prost::Message)]
1766 pub struct Fetch {
1767 #[prost(oneof = "fetch::Node", tags = "1, 2, 3")]
1768 pub node: ::core::option::Option<fetch::Node>,
1769 }
1770 pub mod fetch {
1772 #[derive(Clone, PartialEq, ::prost::Message)]
1773 pub struct Object {
1774 #[prost(map = "string, message", tag = "1")]
1775 pub fetch: ::std::collections::HashMap<
1776 ::prost::alloc::string::String,
1777 super::Fetch,
1778 >,
1779 }
1780 #[derive(Clone, PartialEq, ::prost::Message)]
1781 pub struct Leaf {
1782 #[prost(message, repeated, tag = "1")]
1783 pub annotations: ::prost::alloc::vec::Vec<
1784 super::super::super::super::ValueType,
1785 >,
1786 }
1787 #[derive(Clone, PartialEq, ::prost::Oneof)]
1788 pub enum Node {
1789 #[prost(message, tag = "1")]
1790 Object(Object),
1791 #[prost(message, tag = "2")]
1792 List(::prost::alloc::boxed::Box<super::Fetch>),
1793 #[prost(message, tag = "3")]
1794 Leaf(Leaf),
1795 }
1796 }
1797 }
1798 #[derive(Clone, PartialEq, ::prost::Oneof)]
1799 pub enum Result {
1800 #[prost(message, tag = "1")]
1801 Err(super::super::Error),
1802 #[prost(message, tag = "2")]
1803 Ok(AnalyzedQuery),
1804 }
1805 }
1806}
1807#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1808pub struct Query {}
1809pub mod query {
1811 #[derive(Clone, PartialEq, ::prost::Message)]
1812 pub struct Req {
1813 #[prost(message, optional, tag = "1")]
1814 pub options: ::core::option::Option<super::options::Query>,
1815 #[prost(string, tag = "2")]
1816 pub query: ::prost::alloc::string::String,
1817 }
1818 #[derive(Clone, PartialEq, ::prost::Message)]
1819 pub struct InitialRes {
1820 #[prost(oneof = "initial_res::Res", tags = "1, 2")]
1821 pub res: ::core::option::Option<initial_res::Res>,
1822 }
1823 pub mod initial_res {
1825 #[derive(Clone, PartialEq, ::prost::Message)]
1826 pub struct Ok {
1827 #[prost(oneof = "ok::Ok", tags = "1, 3, 4")]
1828 pub ok: ::core::option::Option<ok::Ok>,
1829 }
1830 pub mod ok {
1832 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1833 pub struct Done {
1834 #[prost(enumeration = "super::super::Type", tag = "1")]
1835 pub query_type: i32,
1836 }
1837 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1838 pub struct ConceptDocumentStream {
1839 #[prost(enumeration = "super::super::Type", tag = "2")]
1843 pub query_type: i32,
1844 }
1845 #[derive(Clone, PartialEq, ::prost::Message)]
1846 pub struct ConceptRowStream {
1847 #[prost(string, repeated, tag = "1")]
1849 pub column_variable_names: ::prost::alloc::vec::Vec<
1850 ::prost::alloc::string::String,
1851 >,
1852 #[prost(enumeration = "super::super::Type", tag = "2")]
1853 pub query_type: i32,
1854 #[prost(message, optional, tag = "3")]
1855 pub query_structure: ::core::option::Option<
1856 super::super::super::analyze::res::analyzed_query::Pipeline,
1857 >,
1858 }
1859 #[derive(Clone, PartialEq, ::prost::Oneof)]
1860 pub enum Ok {
1861 #[prost(message, tag = "1")]
1862 Done(Done),
1863 #[prost(message, tag = "3")]
1864 ConceptDocumentStream(ConceptDocumentStream),
1865 #[prost(message, tag = "4")]
1866 ConceptRowStream(ConceptRowStream),
1867 }
1868 }
1869 #[derive(Clone, PartialEq, ::prost::Oneof)]
1870 pub enum Res {
1871 #[prost(message, tag = "1")]
1872 Error(super::super::Error),
1873 #[prost(message, tag = "2")]
1874 Ok(Ok),
1875 }
1876 }
1877 #[derive(Clone, PartialEq, ::prost::Message)]
1878 pub struct ResPart {
1879 #[prost(oneof = "res_part::Res", tags = "1, 2")]
1880 pub res: ::core::option::Option<res_part::Res>,
1881 }
1882 pub mod res_part {
1884 #[derive(Clone, PartialEq, ::prost::Message)]
1885 pub struct ConceptDocumentsRes {
1886 #[prost(message, repeated, tag = "1")]
1887 pub documents: ::prost::alloc::vec::Vec<super::super::ConceptDocument>,
1888 }
1889 #[derive(Clone, PartialEq, ::prost::Message)]
1890 pub struct ConceptRowsRes {
1891 #[prost(message, repeated, tag = "1")]
1892 pub rows: ::prost::alloc::vec::Vec<super::super::ConceptRow>,
1893 }
1894 #[derive(Clone, PartialEq, ::prost::Oneof)]
1895 pub enum Res {
1896 #[prost(message, tag = "1")]
1897 DocumentsRes(ConceptDocumentsRes),
1898 #[prost(message, tag = "2")]
1899 RowsRes(ConceptRowsRes),
1900 }
1901 }
1902 #[derive(
1903 Clone,
1904 Copy,
1905 Debug,
1906 PartialEq,
1907 Eq,
1908 Hash,
1909 PartialOrd,
1910 Ord,
1911 ::prost::Enumeration
1912 )]
1913 #[repr(i32)]
1914 pub enum Type {
1915 Read = 0,
1916 Write = 1,
1917 Schema = 2,
1918 }
1919 impl Type {
1920 pub fn as_str_name(&self) -> &'static str {
1925 match self {
1926 Self::Read => "READ",
1927 Self::Write => "WRITE",
1928 Self::Schema => "SCHEMA",
1929 }
1930 }
1931 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1933 match value {
1934 "READ" => Some(Self::Read),
1935 "WRITE" => Some(Self::Write),
1936 "SCHEMA" => Some(Self::Schema),
1937 _ => None,
1938 }
1939 }
1940 }
1941}
1942#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1943pub struct Transaction {}
1944pub mod transaction {
1946 #[derive(Clone, PartialEq, ::prost::Message)]
1947 pub struct Client {
1948 #[prost(message, repeated, tag = "1")]
1949 pub reqs: ::prost::alloc::vec::Vec<Req>,
1950 }
1951 #[derive(Clone, PartialEq, ::prost::Message)]
1952 pub struct Server {
1953 #[prost(oneof = "server::Server", tags = "1, 2")]
1954 pub server: ::core::option::Option<server::Server>,
1955 }
1956 pub mod server {
1958 #[derive(Clone, PartialEq, ::prost::Oneof)]
1959 pub enum Server {
1960 #[prost(message, tag = "1")]
1961 Res(super::Res),
1962 #[prost(message, tag = "2")]
1963 ResPart(super::ResPart),
1964 }
1965 }
1966 #[derive(Clone, PartialEq, ::prost::Message)]
1967 pub struct Req {
1968 #[prost(bytes = "vec", tag = "1")]
1969 pub req_id: ::prost::alloc::vec::Vec<u8>,
1970 #[prost(map = "string, string", tag = "2")]
1971 pub metadata: ::std::collections::HashMap<
1972 ::prost::alloc::string::String,
1973 ::prost::alloc::string::String,
1974 >,
1975 #[prost(oneof = "req::Req", tags = "3, 4, 5, 6, 7, 8, 9")]
1976 pub req: ::core::option::Option<req::Req>,
1977 }
1978 pub mod req {
1980 #[derive(Clone, PartialEq, ::prost::Oneof)]
1981 pub enum Req {
1982 #[prost(message, tag = "3")]
1983 OpenReq(super::open::Req),
1984 #[prost(message, tag = "4")]
1985 QueryReq(super::super::query::Req),
1986 #[prost(message, tag = "5")]
1987 StreamReq(super::stream_signal::Req),
1988 #[prost(message, tag = "6")]
1989 CommitReq(super::commit::Req),
1990 #[prost(message, tag = "7")]
1991 RollbackReq(super::rollback::Req),
1992 #[prost(message, tag = "8")]
1993 CloseReq(super::close::Req),
1994 #[prost(message, tag = "9")]
1995 AnalyzeReq(super::super::analyze::Req),
1996 }
1997 }
1998 #[derive(Clone, PartialEq, ::prost::Message)]
1999 pub struct Res {
2000 #[prost(bytes = "vec", tag = "1")]
2001 pub req_id: ::prost::alloc::vec::Vec<u8>,
2002 #[prost(oneof = "res::Res", tags = "2, 3, 5, 6, 9")]
2003 pub res: ::core::option::Option<res::Res>,
2004 }
2005 pub mod res {
2007 #[derive(Clone, PartialEq, ::prost::Oneof)]
2008 pub enum Res {
2009 #[prost(message, tag = "2")]
2010 OpenRes(super::open::Res),
2011 #[prost(message, tag = "3")]
2012 QueryInitialRes(super::super::query::InitialRes),
2013 #[prost(message, tag = "5")]
2014 CommitRes(super::commit::Res),
2015 #[prost(message, tag = "6")]
2016 RollbackRes(super::rollback::Res),
2017 #[prost(message, tag = "9")]
2018 AnalyzeRes(super::super::analyze::Res),
2019 }
2020 }
2021 #[derive(Clone, PartialEq, ::prost::Message)]
2022 pub struct ResPart {
2023 #[prost(bytes = "vec", tag = "1")]
2024 pub req_id: ::prost::alloc::vec::Vec<u8>,
2025 #[prost(oneof = "res_part::ResPart", tags = "2, 3")]
2026 pub res_part: ::core::option::Option<res_part::ResPart>,
2027 }
2028 pub mod res_part {
2030 #[derive(Clone, PartialEq, ::prost::Oneof)]
2031 pub enum ResPart {
2032 #[prost(message, tag = "2")]
2033 QueryRes(super::super::query::ResPart),
2034 #[prost(message, tag = "3")]
2035 StreamRes(super::stream_signal::ResPart),
2036 }
2037 }
2038 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2039 pub struct Open {}
2040 pub mod open {
2042 #[derive(Clone, PartialEq, ::prost::Message)]
2043 pub struct Req {
2044 #[prost(string, tag = "1")]
2045 pub database: ::prost::alloc::string::String,
2046 #[prost(enumeration = "super::Type", tag = "2")]
2047 pub r#type: i32,
2048 #[prost(message, optional, tag = "3")]
2049 pub options: ::core::option::Option<super::super::options::Transaction>,
2050 #[prost(uint64, tag = "4")]
2051 pub network_latency_millis: u64,
2052 }
2053 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2054 pub struct Res {
2055 #[prost(uint64, tag = "2")]
2056 pub server_duration_millis: u64,
2057 }
2058 }
2059 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2060 pub struct Commit {}
2061 pub mod commit {
2063 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2064 pub struct Req {}
2065 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2066 pub struct Res {}
2067 }
2068 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2069 pub struct Rollback {}
2070 pub mod rollback {
2072 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2073 pub struct Req {}
2074 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2075 pub struct Res {}
2076 }
2077 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2078 pub struct Close {}
2079 pub mod close {
2081 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2082 pub struct Req {}
2083 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2084 pub struct Res {}
2085 }
2086 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2088 pub struct GetSchemaExceptions {}
2089 pub mod get_schema_exceptions {
2091 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2092 pub struct Req {}
2093 #[derive(Clone, PartialEq, ::prost::Message)]
2094 pub struct Res {
2095 #[prost(message, repeated, tag = "1")]
2096 pub exceptions: ::prost::alloc::vec::Vec<super::SchemaException>,
2097 }
2098 }
2099 #[derive(Clone, PartialEq, ::prost::Message)]
2100 pub struct SchemaException {
2101 #[prost(string, tag = "1")]
2102 pub code: ::prost::alloc::string::String,
2103 #[prost(string, tag = "2")]
2104 pub message: ::prost::alloc::string::String,
2105 }
2106 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2107 pub struct StreamSignal {}
2108 pub mod stream_signal {
2110 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2111 pub struct Req {}
2112 #[derive(Clone, PartialEq, ::prost::Message)]
2113 pub struct ResPart {
2114 #[prost(oneof = "res_part::State", tags = "1, 2, 3")]
2115 pub state: ::core::option::Option<res_part::State>,
2116 }
2117 pub mod res_part {
2119 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2120 pub struct Continue {}
2121 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2122 pub struct Done {}
2123 #[derive(Clone, PartialEq, ::prost::Oneof)]
2124 pub enum State {
2125 #[prost(message, tag = "1")]
2126 Continue(Continue),
2127 #[prost(message, tag = "2")]
2128 Done(Done),
2129 #[prost(message, tag = "3")]
2130 Error(super::super::super::Error),
2131 }
2132 }
2133 }
2134 #[derive(
2135 Clone,
2136 Copy,
2137 Debug,
2138 PartialEq,
2139 Eq,
2140 Hash,
2141 PartialOrd,
2142 Ord,
2143 ::prost::Enumeration
2144 )]
2145 #[repr(i32)]
2146 pub enum Type {
2147 Read = 0,
2148 Write = 1,
2149 Schema = 2,
2150 }
2151 impl Type {
2152 pub fn as_str_name(&self) -> &'static str {
2157 match self {
2158 Self::Read => "READ",
2159 Self::Write => "WRITE",
2160 Self::Schema => "SCHEMA",
2161 }
2162 }
2163 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2165 match value {
2166 "READ" => Some(Self::Read),
2167 "WRITE" => Some(Self::Write),
2168 "SCHEMA" => Some(Self::Schema),
2169 _ => None,
2170 }
2171 }
2172 }
2173}
2174#[allow(non_camel_case_types)]
2176pub mod type_db_client {
2177 #![allow(
2178 unused_variables,
2179 dead_code,
2180 missing_docs,
2181 clippy::wildcard_imports,
2182 clippy::let_unit_value,
2183 )]
2184 use tonic::codegen::*;
2185 use tonic::codegen::http::Uri;
2186 #[derive(Debug, Clone)]
2187 pub struct TypeDbClient<T> {
2188 inner: tonic::client::Grpc<T>,
2189 }
2190 impl TypeDbClient<tonic::transport::Channel> {
2191 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2193 where
2194 D: TryInto<tonic::transport::Endpoint>,
2195 D::Error: Into<StdError>,
2196 {
2197 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2198 Ok(Self::new(conn))
2199 }
2200 }
2201 impl<T> TypeDbClient<T>
2202 where
2203 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2204 T::Error: Into<StdError>,
2205 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2206 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2207 {
2208 pub fn new(inner: T) -> Self {
2209 let inner = tonic::client::Grpc::new(inner);
2210 Self { inner }
2211 }
2212 pub fn with_origin(inner: T, origin: Uri) -> Self {
2213 let inner = tonic::client::Grpc::with_origin(inner, origin);
2214 Self { inner }
2215 }
2216 pub fn with_interceptor<F>(
2217 inner: T,
2218 interceptor: F,
2219 ) -> TypeDbClient<InterceptedService<T, F>>
2220 where
2221 F: tonic::service::Interceptor,
2222 T::ResponseBody: Default,
2223 T: tonic::codegen::Service<
2224 http::Request<tonic::body::BoxBody>,
2225 Response = http::Response<
2226 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2227 >,
2228 >,
2229 <T as tonic::codegen::Service<
2230 http::Request<tonic::body::BoxBody>,
2231 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2232 {
2233 TypeDbClient::new(InterceptedService::new(inner, interceptor))
2234 }
2235 #[must_use]
2240 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2241 self.inner = self.inner.send_compressed(encoding);
2242 self
2243 }
2244 #[must_use]
2246 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2247 self.inner = self.inner.accept_compressed(encoding);
2248 self
2249 }
2250 #[must_use]
2254 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2255 self.inner = self.inner.max_decoding_message_size(limit);
2256 self
2257 }
2258 #[must_use]
2262 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2263 self.inner = self.inner.max_encoding_message_size(limit);
2264 self
2265 }
2266 pub async fn connection_open(
2268 &mut self,
2269 request: impl tonic::IntoRequest<super::connection::open::Req>,
2270 ) -> std::result::Result<
2271 tonic::Response<super::connection::open::Res>,
2272 tonic::Status,
2273 > {
2274 self.inner
2275 .ready()
2276 .await
2277 .map_err(|e| {
2278 tonic::Status::unknown(
2279 format!("Service was not ready: {}", e.into()),
2280 )
2281 })?;
2282 let codec = tonic::codec::ProstCodec::default();
2283 let path = http::uri::PathAndQuery::from_static(
2284 "/typedb.protocol.TypeDB/connection_open",
2285 );
2286 let mut req = request.into_request();
2287 req.extensions_mut()
2288 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "connection_open"));
2289 self.inner.unary(req, path, codec).await
2290 }
2291 pub async fn authentication_token_create(
2293 &mut self,
2294 request: impl tonic::IntoRequest<super::authentication::token::create::Req>,
2295 ) -> std::result::Result<
2296 tonic::Response<super::authentication::token::create::Res>,
2297 tonic::Status,
2298 > {
2299 self.inner
2300 .ready()
2301 .await
2302 .map_err(|e| {
2303 tonic::Status::unknown(
2304 format!("Service was not ready: {}", e.into()),
2305 )
2306 })?;
2307 let codec = tonic::codec::ProstCodec::default();
2308 let path = http::uri::PathAndQuery::from_static(
2309 "/typedb.protocol.TypeDB/authentication_token_create",
2310 );
2311 let mut req = request.into_request();
2312 req.extensions_mut()
2313 .insert(
2314 GrpcMethod::new(
2315 "typedb.protocol.TypeDB",
2316 "authentication_token_create",
2317 ),
2318 );
2319 self.inner.unary(req, path, codec).await
2320 }
2321 pub async fn servers_all(
2323 &mut self,
2324 request: impl tonic::IntoRequest<super::server_manager::all::Req>,
2325 ) -> std::result::Result<
2326 tonic::Response<super::server_manager::all::Res>,
2327 tonic::Status,
2328 > {
2329 self.inner
2330 .ready()
2331 .await
2332 .map_err(|e| {
2333 tonic::Status::unknown(
2334 format!("Service was not ready: {}", e.into()),
2335 )
2336 })?;
2337 let codec = tonic::codec::ProstCodec::default();
2338 let path = http::uri::PathAndQuery::from_static(
2339 "/typedb.protocol.TypeDB/servers_all",
2340 );
2341 let mut req = request.into_request();
2342 req.extensions_mut()
2343 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "servers_all"));
2344 self.inner.unary(req, path, codec).await
2345 }
2346 pub async fn users_get(
2348 &mut self,
2349 request: impl tonic::IntoRequest<super::user_manager::get::Req>,
2350 ) -> std::result::Result<
2351 tonic::Response<super::user_manager::get::Res>,
2352 tonic::Status,
2353 > {
2354 self.inner
2355 .ready()
2356 .await
2357 .map_err(|e| {
2358 tonic::Status::unknown(
2359 format!("Service was not ready: {}", e.into()),
2360 )
2361 })?;
2362 let codec = tonic::codec::ProstCodec::default();
2363 let path = http::uri::PathAndQuery::from_static(
2364 "/typedb.protocol.TypeDB/users_get",
2365 );
2366 let mut req = request.into_request();
2367 req.extensions_mut()
2368 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_get"));
2369 self.inner.unary(req, path, codec).await
2370 }
2371 pub async fn users_all(
2372 &mut self,
2373 request: impl tonic::IntoRequest<super::user_manager::all::Req>,
2374 ) -> std::result::Result<
2375 tonic::Response<super::user_manager::all::Res>,
2376 tonic::Status,
2377 > {
2378 self.inner
2379 .ready()
2380 .await
2381 .map_err(|e| {
2382 tonic::Status::unknown(
2383 format!("Service was not ready: {}", e.into()),
2384 )
2385 })?;
2386 let codec = tonic::codec::ProstCodec::default();
2387 let path = http::uri::PathAndQuery::from_static(
2388 "/typedb.protocol.TypeDB/users_all",
2389 );
2390 let mut req = request.into_request();
2391 req.extensions_mut()
2392 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_all"));
2393 self.inner.unary(req, path, codec).await
2394 }
2395 pub async fn users_contains(
2396 &mut self,
2397 request: impl tonic::IntoRequest<super::user_manager::contains::Req>,
2398 ) -> std::result::Result<
2399 tonic::Response<super::user_manager::contains::Res>,
2400 tonic::Status,
2401 > {
2402 self.inner
2403 .ready()
2404 .await
2405 .map_err(|e| {
2406 tonic::Status::unknown(
2407 format!("Service was not ready: {}", e.into()),
2408 )
2409 })?;
2410 let codec = tonic::codec::ProstCodec::default();
2411 let path = http::uri::PathAndQuery::from_static(
2412 "/typedb.protocol.TypeDB/users_contains",
2413 );
2414 let mut req = request.into_request();
2415 req.extensions_mut()
2416 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_contains"));
2417 self.inner.unary(req, path, codec).await
2418 }
2419 pub async fn users_create(
2420 &mut self,
2421 request: impl tonic::IntoRequest<super::user_manager::create::Req>,
2422 ) -> std::result::Result<
2423 tonic::Response<super::user_manager::create::Res>,
2424 tonic::Status,
2425 > {
2426 self.inner
2427 .ready()
2428 .await
2429 .map_err(|e| {
2430 tonic::Status::unknown(
2431 format!("Service was not ready: {}", e.into()),
2432 )
2433 })?;
2434 let codec = tonic::codec::ProstCodec::default();
2435 let path = http::uri::PathAndQuery::from_static(
2436 "/typedb.protocol.TypeDB/users_create",
2437 );
2438 let mut req = request.into_request();
2439 req.extensions_mut()
2440 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_create"));
2441 self.inner.unary(req, path, codec).await
2442 }
2443 pub async fn users_update(
2445 &mut self,
2446 request: impl tonic::IntoRequest<super::user::update::Req>,
2447 ) -> std::result::Result<
2448 tonic::Response<super::user::update::Res>,
2449 tonic::Status,
2450 > {
2451 self.inner
2452 .ready()
2453 .await
2454 .map_err(|e| {
2455 tonic::Status::unknown(
2456 format!("Service was not ready: {}", e.into()),
2457 )
2458 })?;
2459 let codec = tonic::codec::ProstCodec::default();
2460 let path = http::uri::PathAndQuery::from_static(
2461 "/typedb.protocol.TypeDB/users_update",
2462 );
2463 let mut req = request.into_request();
2464 req.extensions_mut()
2465 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_update"));
2466 self.inner.unary(req, path, codec).await
2467 }
2468 pub async fn users_delete(
2469 &mut self,
2470 request: impl tonic::IntoRequest<super::user::delete::Req>,
2471 ) -> std::result::Result<
2472 tonic::Response<super::user::delete::Res>,
2473 tonic::Status,
2474 > {
2475 self.inner
2476 .ready()
2477 .await
2478 .map_err(|e| {
2479 tonic::Status::unknown(
2480 format!("Service was not ready: {}", e.into()),
2481 )
2482 })?;
2483 let codec = tonic::codec::ProstCodec::default();
2484 let path = http::uri::PathAndQuery::from_static(
2485 "/typedb.protocol.TypeDB/users_delete",
2486 );
2487 let mut req = request.into_request();
2488 req.extensions_mut()
2489 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_delete"));
2490 self.inner.unary(req, path, codec).await
2491 }
2492 pub async fn databases_get(
2494 &mut self,
2495 request: impl tonic::IntoRequest<super::database_manager::get::Req>,
2496 ) -> std::result::Result<
2497 tonic::Response<super::database_manager::get::Res>,
2498 tonic::Status,
2499 > {
2500 self.inner
2501 .ready()
2502 .await
2503 .map_err(|e| {
2504 tonic::Status::unknown(
2505 format!("Service was not ready: {}", e.into()),
2506 )
2507 })?;
2508 let codec = tonic::codec::ProstCodec::default();
2509 let path = http::uri::PathAndQuery::from_static(
2510 "/typedb.protocol.TypeDB/databases_get",
2511 );
2512 let mut req = request.into_request();
2513 req.extensions_mut()
2514 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_get"));
2515 self.inner.unary(req, path, codec).await
2516 }
2517 pub async fn databases_all(
2518 &mut self,
2519 request: impl tonic::IntoRequest<super::database_manager::all::Req>,
2520 ) -> std::result::Result<
2521 tonic::Response<super::database_manager::all::Res>,
2522 tonic::Status,
2523 > {
2524 self.inner
2525 .ready()
2526 .await
2527 .map_err(|e| {
2528 tonic::Status::unknown(
2529 format!("Service was not ready: {}", e.into()),
2530 )
2531 })?;
2532 let codec = tonic::codec::ProstCodec::default();
2533 let path = http::uri::PathAndQuery::from_static(
2534 "/typedb.protocol.TypeDB/databases_all",
2535 );
2536 let mut req = request.into_request();
2537 req.extensions_mut()
2538 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_all"));
2539 self.inner.unary(req, path, codec).await
2540 }
2541 pub async fn databases_contains(
2542 &mut self,
2543 request: impl tonic::IntoRequest<super::database_manager::contains::Req>,
2544 ) -> std::result::Result<
2545 tonic::Response<super::database_manager::contains::Res>,
2546 tonic::Status,
2547 > {
2548 self.inner
2549 .ready()
2550 .await
2551 .map_err(|e| {
2552 tonic::Status::unknown(
2553 format!("Service was not ready: {}", e.into()),
2554 )
2555 })?;
2556 let codec = tonic::codec::ProstCodec::default();
2557 let path = http::uri::PathAndQuery::from_static(
2558 "/typedb.protocol.TypeDB/databases_contains",
2559 );
2560 let mut req = request.into_request();
2561 req.extensions_mut()
2562 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_contains"));
2563 self.inner.unary(req, path, codec).await
2564 }
2565 pub async fn databases_create(
2566 &mut self,
2567 request: impl tonic::IntoRequest<super::database_manager::create::Req>,
2568 ) -> std::result::Result<
2569 tonic::Response<super::database_manager::create::Res>,
2570 tonic::Status,
2571 > {
2572 self.inner
2573 .ready()
2574 .await
2575 .map_err(|e| {
2576 tonic::Status::unknown(
2577 format!("Service was not ready: {}", e.into()),
2578 )
2579 })?;
2580 let codec = tonic::codec::ProstCodec::default();
2581 let path = http::uri::PathAndQuery::from_static(
2582 "/typedb.protocol.TypeDB/databases_create",
2583 );
2584 let mut req = request.into_request();
2585 req.extensions_mut()
2586 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_create"));
2587 self.inner.unary(req, path, codec).await
2588 }
2589 pub async fn databases_import(
2590 &mut self,
2591 request: impl tonic::IntoStreamingRequest<
2592 Message = super::database_manager::import::Client,
2593 >,
2594 ) -> std::result::Result<
2595 tonic::Response<
2596 tonic::codec::Streaming<super::database_manager::import::Server>,
2597 >,
2598 tonic::Status,
2599 > {
2600 self.inner
2601 .ready()
2602 .await
2603 .map_err(|e| {
2604 tonic::Status::unknown(
2605 format!("Service was not ready: {}", e.into()),
2606 )
2607 })?;
2608 let codec = tonic::codec::ProstCodec::default();
2609 let path = http::uri::PathAndQuery::from_static(
2610 "/typedb.protocol.TypeDB/databases_import",
2611 );
2612 let mut req = request.into_streaming_request();
2613 req.extensions_mut()
2614 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_import"));
2615 self.inner.streaming(req, path, codec).await
2616 }
2617 pub async fn database_schema(
2619 &mut self,
2620 request: impl tonic::IntoRequest<super::database::schema::Req>,
2621 ) -> std::result::Result<
2622 tonic::Response<super::database::schema::Res>,
2623 tonic::Status,
2624 > {
2625 self.inner
2626 .ready()
2627 .await
2628 .map_err(|e| {
2629 tonic::Status::unknown(
2630 format!("Service was not ready: {}", e.into()),
2631 )
2632 })?;
2633 let codec = tonic::codec::ProstCodec::default();
2634 let path = http::uri::PathAndQuery::from_static(
2635 "/typedb.protocol.TypeDB/database_schema",
2636 );
2637 let mut req = request.into_request();
2638 req.extensions_mut()
2639 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_schema"));
2640 self.inner.unary(req, path, codec).await
2641 }
2642 pub async fn database_type_schema(
2643 &mut self,
2644 request: impl tonic::IntoRequest<super::database::type_schema::Req>,
2645 ) -> std::result::Result<
2646 tonic::Response<super::database::type_schema::Res>,
2647 tonic::Status,
2648 > {
2649 self.inner
2650 .ready()
2651 .await
2652 .map_err(|e| {
2653 tonic::Status::unknown(
2654 format!("Service was not ready: {}", e.into()),
2655 )
2656 })?;
2657 let codec = tonic::codec::ProstCodec::default();
2658 let path = http::uri::PathAndQuery::from_static(
2659 "/typedb.protocol.TypeDB/database_type_schema",
2660 );
2661 let mut req = request.into_request();
2662 req.extensions_mut()
2663 .insert(
2664 GrpcMethod::new("typedb.protocol.TypeDB", "database_type_schema"),
2665 );
2666 self.inner.unary(req, path, codec).await
2667 }
2668 pub async fn database_delete(
2669 &mut self,
2670 request: impl tonic::IntoRequest<super::database::delete::Req>,
2671 ) -> std::result::Result<
2672 tonic::Response<super::database::delete::Res>,
2673 tonic::Status,
2674 > {
2675 self.inner
2676 .ready()
2677 .await
2678 .map_err(|e| {
2679 tonic::Status::unknown(
2680 format!("Service was not ready: {}", e.into()),
2681 )
2682 })?;
2683 let codec = tonic::codec::ProstCodec::default();
2684 let path = http::uri::PathAndQuery::from_static(
2685 "/typedb.protocol.TypeDB/database_delete",
2686 );
2687 let mut req = request.into_request();
2688 req.extensions_mut()
2689 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_delete"));
2690 self.inner.unary(req, path, codec).await
2691 }
2692 pub async fn database_export(
2693 &mut self,
2694 request: impl tonic::IntoRequest<super::database::export::Req>,
2695 ) -> std::result::Result<
2696 tonic::Response<tonic::codec::Streaming<super::database::export::Server>>,
2697 tonic::Status,
2698 > {
2699 self.inner
2700 .ready()
2701 .await
2702 .map_err(|e| {
2703 tonic::Status::unknown(
2704 format!("Service was not ready: {}", e.into()),
2705 )
2706 })?;
2707 let codec = tonic::codec::ProstCodec::default();
2708 let path = http::uri::PathAndQuery::from_static(
2709 "/typedb.protocol.TypeDB/database_export",
2710 );
2711 let mut req = request.into_request();
2712 req.extensions_mut()
2713 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_export"));
2714 self.inner.server_streaming(req, path, codec).await
2715 }
2716 pub async fn transaction(
2721 &mut self,
2722 request: impl tonic::IntoStreamingRequest<
2723 Message = super::transaction::Client,
2724 >,
2725 ) -> std::result::Result<
2726 tonic::Response<tonic::codec::Streaming<super::transaction::Server>>,
2727 tonic::Status,
2728 > {
2729 self.inner
2730 .ready()
2731 .await
2732 .map_err(|e| {
2733 tonic::Status::unknown(
2734 format!("Service was not ready: {}", e.into()),
2735 )
2736 })?;
2737 let codec = tonic::codec::ProstCodec::default();
2738 let path = http::uri::PathAndQuery::from_static(
2739 "/typedb.protocol.TypeDB/transaction",
2740 );
2741 let mut req = request.into_streaming_request();
2742 req.extensions_mut()
2743 .insert(GrpcMethod::new("typedb.protocol.TypeDB", "transaction"));
2744 self.inner.streaming(req, path, codec).await
2745 }
2746 }
2747}
2748#[allow(non_camel_case_types)]
2750pub mod type_db_server {
2751 #![allow(
2752 unused_variables,
2753 dead_code,
2754 missing_docs,
2755 clippy::wildcard_imports,
2756 clippy::let_unit_value,
2757 )]
2758 use tonic::codegen::*;
2759 #[async_trait]
2761 pub trait TypeDb: std::marker::Send + std::marker::Sync + 'static {
2762 async fn connection_open(
2764 &self,
2765 request: tonic::Request<super::connection::open::Req>,
2766 ) -> std::result::Result<
2767 tonic::Response<super::connection::open::Res>,
2768 tonic::Status,
2769 >;
2770 async fn authentication_token_create(
2772 &self,
2773 request: tonic::Request<super::authentication::token::create::Req>,
2774 ) -> std::result::Result<
2775 tonic::Response<super::authentication::token::create::Res>,
2776 tonic::Status,
2777 >;
2778 async fn servers_all(
2780 &self,
2781 request: tonic::Request<super::server_manager::all::Req>,
2782 ) -> std::result::Result<
2783 tonic::Response<super::server_manager::all::Res>,
2784 tonic::Status,
2785 >;
2786 async fn users_get(
2788 &self,
2789 request: tonic::Request<super::user_manager::get::Req>,
2790 ) -> std::result::Result<
2791 tonic::Response<super::user_manager::get::Res>,
2792 tonic::Status,
2793 >;
2794 async fn users_all(
2795 &self,
2796 request: tonic::Request<super::user_manager::all::Req>,
2797 ) -> std::result::Result<
2798 tonic::Response<super::user_manager::all::Res>,
2799 tonic::Status,
2800 >;
2801 async fn users_contains(
2802 &self,
2803 request: tonic::Request<super::user_manager::contains::Req>,
2804 ) -> std::result::Result<
2805 tonic::Response<super::user_manager::contains::Res>,
2806 tonic::Status,
2807 >;
2808 async fn users_create(
2809 &self,
2810 request: tonic::Request<super::user_manager::create::Req>,
2811 ) -> std::result::Result<
2812 tonic::Response<super::user_manager::create::Res>,
2813 tonic::Status,
2814 >;
2815 async fn users_update(
2817 &self,
2818 request: tonic::Request<super::user::update::Req>,
2819 ) -> std::result::Result<
2820 tonic::Response<super::user::update::Res>,
2821 tonic::Status,
2822 >;
2823 async fn users_delete(
2824 &self,
2825 request: tonic::Request<super::user::delete::Req>,
2826 ) -> std::result::Result<
2827 tonic::Response<super::user::delete::Res>,
2828 tonic::Status,
2829 >;
2830 async fn databases_get(
2832 &self,
2833 request: tonic::Request<super::database_manager::get::Req>,
2834 ) -> std::result::Result<
2835 tonic::Response<super::database_manager::get::Res>,
2836 tonic::Status,
2837 >;
2838 async fn databases_all(
2839 &self,
2840 request: tonic::Request<super::database_manager::all::Req>,
2841 ) -> std::result::Result<
2842 tonic::Response<super::database_manager::all::Res>,
2843 tonic::Status,
2844 >;
2845 async fn databases_contains(
2846 &self,
2847 request: tonic::Request<super::database_manager::contains::Req>,
2848 ) -> std::result::Result<
2849 tonic::Response<super::database_manager::contains::Res>,
2850 tonic::Status,
2851 >;
2852 async fn databases_create(
2853 &self,
2854 request: tonic::Request<super::database_manager::create::Req>,
2855 ) -> std::result::Result<
2856 tonic::Response<super::database_manager::create::Res>,
2857 tonic::Status,
2858 >;
2859 type databases_importStream: tonic::codegen::tokio_stream::Stream<
2861 Item = std::result::Result<
2862 super::database_manager::import::Server,
2863 tonic::Status,
2864 >,
2865 >
2866 + std::marker::Send
2867 + 'static;
2868 async fn databases_import(
2869 &self,
2870 request: tonic::Request<
2871 tonic::Streaming<super::database_manager::import::Client>,
2872 >,
2873 ) -> std::result::Result<
2874 tonic::Response<Self::databases_importStream>,
2875 tonic::Status,
2876 >;
2877 async fn database_schema(
2879 &self,
2880 request: tonic::Request<super::database::schema::Req>,
2881 ) -> std::result::Result<
2882 tonic::Response<super::database::schema::Res>,
2883 tonic::Status,
2884 >;
2885 async fn database_type_schema(
2886 &self,
2887 request: tonic::Request<super::database::type_schema::Req>,
2888 ) -> std::result::Result<
2889 tonic::Response<super::database::type_schema::Res>,
2890 tonic::Status,
2891 >;
2892 async fn database_delete(
2893 &self,
2894 request: tonic::Request<super::database::delete::Req>,
2895 ) -> std::result::Result<
2896 tonic::Response<super::database::delete::Res>,
2897 tonic::Status,
2898 >;
2899 type database_exportStream: tonic::codegen::tokio_stream::Stream<
2901 Item = std::result::Result<
2902 super::database::export::Server,
2903 tonic::Status,
2904 >,
2905 >
2906 + std::marker::Send
2907 + 'static;
2908 async fn database_export(
2909 &self,
2910 request: tonic::Request<super::database::export::Req>,
2911 ) -> std::result::Result<
2912 tonic::Response<Self::database_exportStream>,
2913 tonic::Status,
2914 >;
2915 type transactionStream: tonic::codegen::tokio_stream::Stream<
2917 Item = std::result::Result<super::transaction::Server, tonic::Status>,
2918 >
2919 + std::marker::Send
2920 + 'static;
2921 async fn transaction(
2926 &self,
2927 request: tonic::Request<tonic::Streaming<super::transaction::Client>>,
2928 ) -> std::result::Result<
2929 tonic::Response<Self::transactionStream>,
2930 tonic::Status,
2931 >;
2932 }
2933 #[derive(Debug)]
2934 pub struct TypeDbServer<T> {
2935 inner: Arc<T>,
2936 accept_compression_encodings: EnabledCompressionEncodings,
2937 send_compression_encodings: EnabledCompressionEncodings,
2938 max_decoding_message_size: Option<usize>,
2939 max_encoding_message_size: Option<usize>,
2940 }
2941 impl<T> TypeDbServer<T> {
2942 pub fn new(inner: T) -> Self {
2943 Self::from_arc(Arc::new(inner))
2944 }
2945 pub fn from_arc(inner: Arc<T>) -> Self {
2946 Self {
2947 inner,
2948 accept_compression_encodings: Default::default(),
2949 send_compression_encodings: Default::default(),
2950 max_decoding_message_size: None,
2951 max_encoding_message_size: None,
2952 }
2953 }
2954 pub fn with_interceptor<F>(
2955 inner: T,
2956 interceptor: F,
2957 ) -> InterceptedService<Self, F>
2958 where
2959 F: tonic::service::Interceptor,
2960 {
2961 InterceptedService::new(Self::new(inner), interceptor)
2962 }
2963 #[must_use]
2965 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2966 self.accept_compression_encodings.enable(encoding);
2967 self
2968 }
2969 #[must_use]
2971 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2972 self.send_compression_encodings.enable(encoding);
2973 self
2974 }
2975 #[must_use]
2979 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2980 self.max_decoding_message_size = Some(limit);
2981 self
2982 }
2983 #[must_use]
2987 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2988 self.max_encoding_message_size = Some(limit);
2989 self
2990 }
2991 }
2992 impl<T, B> tonic::codegen::Service<http::Request<B>> for TypeDbServer<T>
2993 where
2994 T: TypeDb,
2995 B: Body + std::marker::Send + 'static,
2996 B::Error: Into<StdError> + std::marker::Send + 'static,
2997 {
2998 type Response = http::Response<tonic::body::BoxBody>;
2999 type Error = std::convert::Infallible;
3000 type Future = BoxFuture<Self::Response, Self::Error>;
3001 fn poll_ready(
3002 &mut self,
3003 _cx: &mut Context<'_>,
3004 ) -> Poll<std::result::Result<(), Self::Error>> {
3005 Poll::Ready(Ok(()))
3006 }
3007 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3008 match req.uri().path() {
3009 "/typedb.protocol.TypeDB/connection_open" => {
3010 #[allow(non_camel_case_types)]
3011 struct connection_openSvc<T: TypeDb>(pub Arc<T>);
3012 impl<
3013 T: TypeDb,
3014 > tonic::server::UnaryService<super::connection::open::Req>
3015 for connection_openSvc<T> {
3016 type Response = super::connection::open::Res;
3017 type Future = BoxFuture<
3018 tonic::Response<Self::Response>,
3019 tonic::Status,
3020 >;
3021 fn call(
3022 &mut self,
3023 request: tonic::Request<super::connection::open::Req>,
3024 ) -> Self::Future {
3025 let inner = Arc::clone(&self.0);
3026 let fut = async move {
3027 <T as TypeDb>::connection_open(&inner, request).await
3028 };
3029 Box::pin(fut)
3030 }
3031 }
3032 let accept_compression_encodings = self.accept_compression_encodings;
3033 let send_compression_encodings = self.send_compression_encodings;
3034 let max_decoding_message_size = self.max_decoding_message_size;
3035 let max_encoding_message_size = self.max_encoding_message_size;
3036 let inner = self.inner.clone();
3037 let fut = async move {
3038 let method = connection_openSvc(inner);
3039 let codec = tonic::codec::ProstCodec::default();
3040 let mut grpc = tonic::server::Grpc::new(codec)
3041 .apply_compression_config(
3042 accept_compression_encodings,
3043 send_compression_encodings,
3044 )
3045 .apply_max_message_size_config(
3046 max_decoding_message_size,
3047 max_encoding_message_size,
3048 );
3049 let res = grpc.unary(method, req).await;
3050 Ok(res)
3051 };
3052 Box::pin(fut)
3053 }
3054 "/typedb.protocol.TypeDB/authentication_token_create" => {
3055 #[allow(non_camel_case_types)]
3056 struct authentication_token_createSvc<T: TypeDb>(pub Arc<T>);
3057 impl<
3058 T: TypeDb,
3059 > tonic::server::UnaryService<
3060 super::authentication::token::create::Req,
3061 > for authentication_token_createSvc<T> {
3062 type Response = super::authentication::token::create::Res;
3063 type Future = BoxFuture<
3064 tonic::Response<Self::Response>,
3065 tonic::Status,
3066 >;
3067 fn call(
3068 &mut self,
3069 request: tonic::Request<
3070 super::authentication::token::create::Req,
3071 >,
3072 ) -> Self::Future {
3073 let inner = Arc::clone(&self.0);
3074 let fut = async move {
3075 <T as TypeDb>::authentication_token_create(&inner, request)
3076 .await
3077 };
3078 Box::pin(fut)
3079 }
3080 }
3081 let accept_compression_encodings = self.accept_compression_encodings;
3082 let send_compression_encodings = self.send_compression_encodings;
3083 let max_decoding_message_size = self.max_decoding_message_size;
3084 let max_encoding_message_size = self.max_encoding_message_size;
3085 let inner = self.inner.clone();
3086 let fut = async move {
3087 let method = authentication_token_createSvc(inner);
3088 let codec = tonic::codec::ProstCodec::default();
3089 let mut grpc = tonic::server::Grpc::new(codec)
3090 .apply_compression_config(
3091 accept_compression_encodings,
3092 send_compression_encodings,
3093 )
3094 .apply_max_message_size_config(
3095 max_decoding_message_size,
3096 max_encoding_message_size,
3097 );
3098 let res = grpc.unary(method, req).await;
3099 Ok(res)
3100 };
3101 Box::pin(fut)
3102 }
3103 "/typedb.protocol.TypeDB/servers_all" => {
3104 #[allow(non_camel_case_types)]
3105 struct servers_allSvc<T: TypeDb>(pub Arc<T>);
3106 impl<
3107 T: TypeDb,
3108 > tonic::server::UnaryService<super::server_manager::all::Req>
3109 for servers_allSvc<T> {
3110 type Response = super::server_manager::all::Res;
3111 type Future = BoxFuture<
3112 tonic::Response<Self::Response>,
3113 tonic::Status,
3114 >;
3115 fn call(
3116 &mut self,
3117 request: tonic::Request<super::server_manager::all::Req>,
3118 ) -> Self::Future {
3119 let inner = Arc::clone(&self.0);
3120 let fut = async move {
3121 <T as TypeDb>::servers_all(&inner, request).await
3122 };
3123 Box::pin(fut)
3124 }
3125 }
3126 let accept_compression_encodings = self.accept_compression_encodings;
3127 let send_compression_encodings = self.send_compression_encodings;
3128 let max_decoding_message_size = self.max_decoding_message_size;
3129 let max_encoding_message_size = self.max_encoding_message_size;
3130 let inner = self.inner.clone();
3131 let fut = async move {
3132 let method = servers_allSvc(inner);
3133 let codec = tonic::codec::ProstCodec::default();
3134 let mut grpc = tonic::server::Grpc::new(codec)
3135 .apply_compression_config(
3136 accept_compression_encodings,
3137 send_compression_encodings,
3138 )
3139 .apply_max_message_size_config(
3140 max_decoding_message_size,
3141 max_encoding_message_size,
3142 );
3143 let res = grpc.unary(method, req).await;
3144 Ok(res)
3145 };
3146 Box::pin(fut)
3147 }
3148 "/typedb.protocol.TypeDB/users_get" => {
3149 #[allow(non_camel_case_types)]
3150 struct users_getSvc<T: TypeDb>(pub Arc<T>);
3151 impl<
3152 T: TypeDb,
3153 > tonic::server::UnaryService<super::user_manager::get::Req>
3154 for users_getSvc<T> {
3155 type Response = super::user_manager::get::Res;
3156 type Future = BoxFuture<
3157 tonic::Response<Self::Response>,
3158 tonic::Status,
3159 >;
3160 fn call(
3161 &mut self,
3162 request: tonic::Request<super::user_manager::get::Req>,
3163 ) -> Self::Future {
3164 let inner = Arc::clone(&self.0);
3165 let fut = async move {
3166 <T as TypeDb>::users_get(&inner, request).await
3167 };
3168 Box::pin(fut)
3169 }
3170 }
3171 let accept_compression_encodings = self.accept_compression_encodings;
3172 let send_compression_encodings = self.send_compression_encodings;
3173 let max_decoding_message_size = self.max_decoding_message_size;
3174 let max_encoding_message_size = self.max_encoding_message_size;
3175 let inner = self.inner.clone();
3176 let fut = async move {
3177 let method = users_getSvc(inner);
3178 let codec = tonic::codec::ProstCodec::default();
3179 let mut grpc = tonic::server::Grpc::new(codec)
3180 .apply_compression_config(
3181 accept_compression_encodings,
3182 send_compression_encodings,
3183 )
3184 .apply_max_message_size_config(
3185 max_decoding_message_size,
3186 max_encoding_message_size,
3187 );
3188 let res = grpc.unary(method, req).await;
3189 Ok(res)
3190 };
3191 Box::pin(fut)
3192 }
3193 "/typedb.protocol.TypeDB/users_all" => {
3194 #[allow(non_camel_case_types)]
3195 struct users_allSvc<T: TypeDb>(pub Arc<T>);
3196 impl<
3197 T: TypeDb,
3198 > tonic::server::UnaryService<super::user_manager::all::Req>
3199 for users_allSvc<T> {
3200 type Response = super::user_manager::all::Res;
3201 type Future = BoxFuture<
3202 tonic::Response<Self::Response>,
3203 tonic::Status,
3204 >;
3205 fn call(
3206 &mut self,
3207 request: tonic::Request<super::user_manager::all::Req>,
3208 ) -> Self::Future {
3209 let inner = Arc::clone(&self.0);
3210 let fut = async move {
3211 <T as TypeDb>::users_all(&inner, request).await
3212 };
3213 Box::pin(fut)
3214 }
3215 }
3216 let accept_compression_encodings = self.accept_compression_encodings;
3217 let send_compression_encodings = self.send_compression_encodings;
3218 let max_decoding_message_size = self.max_decoding_message_size;
3219 let max_encoding_message_size = self.max_encoding_message_size;
3220 let inner = self.inner.clone();
3221 let fut = async move {
3222 let method = users_allSvc(inner);
3223 let codec = tonic::codec::ProstCodec::default();
3224 let mut grpc = tonic::server::Grpc::new(codec)
3225 .apply_compression_config(
3226 accept_compression_encodings,
3227 send_compression_encodings,
3228 )
3229 .apply_max_message_size_config(
3230 max_decoding_message_size,
3231 max_encoding_message_size,
3232 );
3233 let res = grpc.unary(method, req).await;
3234 Ok(res)
3235 };
3236 Box::pin(fut)
3237 }
3238 "/typedb.protocol.TypeDB/users_contains" => {
3239 #[allow(non_camel_case_types)]
3240 struct users_containsSvc<T: TypeDb>(pub Arc<T>);
3241 impl<
3242 T: TypeDb,
3243 > tonic::server::UnaryService<super::user_manager::contains::Req>
3244 for users_containsSvc<T> {
3245 type Response = super::user_manager::contains::Res;
3246 type Future = BoxFuture<
3247 tonic::Response<Self::Response>,
3248 tonic::Status,
3249 >;
3250 fn call(
3251 &mut self,
3252 request: tonic::Request<super::user_manager::contains::Req>,
3253 ) -> Self::Future {
3254 let inner = Arc::clone(&self.0);
3255 let fut = async move {
3256 <T as TypeDb>::users_contains(&inner, request).await
3257 };
3258 Box::pin(fut)
3259 }
3260 }
3261 let accept_compression_encodings = self.accept_compression_encodings;
3262 let send_compression_encodings = self.send_compression_encodings;
3263 let max_decoding_message_size = self.max_decoding_message_size;
3264 let max_encoding_message_size = self.max_encoding_message_size;
3265 let inner = self.inner.clone();
3266 let fut = async move {
3267 let method = users_containsSvc(inner);
3268 let codec = tonic::codec::ProstCodec::default();
3269 let mut grpc = tonic::server::Grpc::new(codec)
3270 .apply_compression_config(
3271 accept_compression_encodings,
3272 send_compression_encodings,
3273 )
3274 .apply_max_message_size_config(
3275 max_decoding_message_size,
3276 max_encoding_message_size,
3277 );
3278 let res = grpc.unary(method, req).await;
3279 Ok(res)
3280 };
3281 Box::pin(fut)
3282 }
3283 "/typedb.protocol.TypeDB/users_create" => {
3284 #[allow(non_camel_case_types)]
3285 struct users_createSvc<T: TypeDb>(pub Arc<T>);
3286 impl<
3287 T: TypeDb,
3288 > tonic::server::UnaryService<super::user_manager::create::Req>
3289 for users_createSvc<T> {
3290 type Response = super::user_manager::create::Res;
3291 type Future = BoxFuture<
3292 tonic::Response<Self::Response>,
3293 tonic::Status,
3294 >;
3295 fn call(
3296 &mut self,
3297 request: tonic::Request<super::user_manager::create::Req>,
3298 ) -> Self::Future {
3299 let inner = Arc::clone(&self.0);
3300 let fut = async move {
3301 <T as TypeDb>::users_create(&inner, request).await
3302 };
3303 Box::pin(fut)
3304 }
3305 }
3306 let accept_compression_encodings = self.accept_compression_encodings;
3307 let send_compression_encodings = self.send_compression_encodings;
3308 let max_decoding_message_size = self.max_decoding_message_size;
3309 let max_encoding_message_size = self.max_encoding_message_size;
3310 let inner = self.inner.clone();
3311 let fut = async move {
3312 let method = users_createSvc(inner);
3313 let codec = tonic::codec::ProstCodec::default();
3314 let mut grpc = tonic::server::Grpc::new(codec)
3315 .apply_compression_config(
3316 accept_compression_encodings,
3317 send_compression_encodings,
3318 )
3319 .apply_max_message_size_config(
3320 max_decoding_message_size,
3321 max_encoding_message_size,
3322 );
3323 let res = grpc.unary(method, req).await;
3324 Ok(res)
3325 };
3326 Box::pin(fut)
3327 }
3328 "/typedb.protocol.TypeDB/users_update" => {
3329 #[allow(non_camel_case_types)]
3330 struct users_updateSvc<T: TypeDb>(pub Arc<T>);
3331 impl<T: TypeDb> tonic::server::UnaryService<super::user::update::Req>
3332 for users_updateSvc<T> {
3333 type Response = super::user::update::Res;
3334 type Future = BoxFuture<
3335 tonic::Response<Self::Response>,
3336 tonic::Status,
3337 >;
3338 fn call(
3339 &mut self,
3340 request: tonic::Request<super::user::update::Req>,
3341 ) -> Self::Future {
3342 let inner = Arc::clone(&self.0);
3343 let fut = async move {
3344 <T as TypeDb>::users_update(&inner, request).await
3345 };
3346 Box::pin(fut)
3347 }
3348 }
3349 let accept_compression_encodings = self.accept_compression_encodings;
3350 let send_compression_encodings = self.send_compression_encodings;
3351 let max_decoding_message_size = self.max_decoding_message_size;
3352 let max_encoding_message_size = self.max_encoding_message_size;
3353 let inner = self.inner.clone();
3354 let fut = async move {
3355 let method = users_updateSvc(inner);
3356 let codec = tonic::codec::ProstCodec::default();
3357 let mut grpc = tonic::server::Grpc::new(codec)
3358 .apply_compression_config(
3359 accept_compression_encodings,
3360 send_compression_encodings,
3361 )
3362 .apply_max_message_size_config(
3363 max_decoding_message_size,
3364 max_encoding_message_size,
3365 );
3366 let res = grpc.unary(method, req).await;
3367 Ok(res)
3368 };
3369 Box::pin(fut)
3370 }
3371 "/typedb.protocol.TypeDB/users_delete" => {
3372 #[allow(non_camel_case_types)]
3373 struct users_deleteSvc<T: TypeDb>(pub Arc<T>);
3374 impl<T: TypeDb> tonic::server::UnaryService<super::user::delete::Req>
3375 for users_deleteSvc<T> {
3376 type Response = super::user::delete::Res;
3377 type Future = BoxFuture<
3378 tonic::Response<Self::Response>,
3379 tonic::Status,
3380 >;
3381 fn call(
3382 &mut self,
3383 request: tonic::Request<super::user::delete::Req>,
3384 ) -> Self::Future {
3385 let inner = Arc::clone(&self.0);
3386 let fut = async move {
3387 <T as TypeDb>::users_delete(&inner, request).await
3388 };
3389 Box::pin(fut)
3390 }
3391 }
3392 let accept_compression_encodings = self.accept_compression_encodings;
3393 let send_compression_encodings = self.send_compression_encodings;
3394 let max_decoding_message_size = self.max_decoding_message_size;
3395 let max_encoding_message_size = self.max_encoding_message_size;
3396 let inner = self.inner.clone();
3397 let fut = async move {
3398 let method = users_deleteSvc(inner);
3399 let codec = tonic::codec::ProstCodec::default();
3400 let mut grpc = tonic::server::Grpc::new(codec)
3401 .apply_compression_config(
3402 accept_compression_encodings,
3403 send_compression_encodings,
3404 )
3405 .apply_max_message_size_config(
3406 max_decoding_message_size,
3407 max_encoding_message_size,
3408 );
3409 let res = grpc.unary(method, req).await;
3410 Ok(res)
3411 };
3412 Box::pin(fut)
3413 }
3414 "/typedb.protocol.TypeDB/databases_get" => {
3415 #[allow(non_camel_case_types)]
3416 struct databases_getSvc<T: TypeDb>(pub Arc<T>);
3417 impl<
3418 T: TypeDb,
3419 > tonic::server::UnaryService<super::database_manager::get::Req>
3420 for databases_getSvc<T> {
3421 type Response = super::database_manager::get::Res;
3422 type Future = BoxFuture<
3423 tonic::Response<Self::Response>,
3424 tonic::Status,
3425 >;
3426 fn call(
3427 &mut self,
3428 request: tonic::Request<super::database_manager::get::Req>,
3429 ) -> Self::Future {
3430 let inner = Arc::clone(&self.0);
3431 let fut = async move {
3432 <T as TypeDb>::databases_get(&inner, request).await
3433 };
3434 Box::pin(fut)
3435 }
3436 }
3437 let accept_compression_encodings = self.accept_compression_encodings;
3438 let send_compression_encodings = self.send_compression_encodings;
3439 let max_decoding_message_size = self.max_decoding_message_size;
3440 let max_encoding_message_size = self.max_encoding_message_size;
3441 let inner = self.inner.clone();
3442 let fut = async move {
3443 let method = databases_getSvc(inner);
3444 let codec = tonic::codec::ProstCodec::default();
3445 let mut grpc = tonic::server::Grpc::new(codec)
3446 .apply_compression_config(
3447 accept_compression_encodings,
3448 send_compression_encodings,
3449 )
3450 .apply_max_message_size_config(
3451 max_decoding_message_size,
3452 max_encoding_message_size,
3453 );
3454 let res = grpc.unary(method, req).await;
3455 Ok(res)
3456 };
3457 Box::pin(fut)
3458 }
3459 "/typedb.protocol.TypeDB/databases_all" => {
3460 #[allow(non_camel_case_types)]
3461 struct databases_allSvc<T: TypeDb>(pub Arc<T>);
3462 impl<
3463 T: TypeDb,
3464 > tonic::server::UnaryService<super::database_manager::all::Req>
3465 for databases_allSvc<T> {
3466 type Response = super::database_manager::all::Res;
3467 type Future = BoxFuture<
3468 tonic::Response<Self::Response>,
3469 tonic::Status,
3470 >;
3471 fn call(
3472 &mut self,
3473 request: tonic::Request<super::database_manager::all::Req>,
3474 ) -> Self::Future {
3475 let inner = Arc::clone(&self.0);
3476 let fut = async move {
3477 <T as TypeDb>::databases_all(&inner, request).await
3478 };
3479 Box::pin(fut)
3480 }
3481 }
3482 let accept_compression_encodings = self.accept_compression_encodings;
3483 let send_compression_encodings = self.send_compression_encodings;
3484 let max_decoding_message_size = self.max_decoding_message_size;
3485 let max_encoding_message_size = self.max_encoding_message_size;
3486 let inner = self.inner.clone();
3487 let fut = async move {
3488 let method = databases_allSvc(inner);
3489 let codec = tonic::codec::ProstCodec::default();
3490 let mut grpc = tonic::server::Grpc::new(codec)
3491 .apply_compression_config(
3492 accept_compression_encodings,
3493 send_compression_encodings,
3494 )
3495 .apply_max_message_size_config(
3496 max_decoding_message_size,
3497 max_encoding_message_size,
3498 );
3499 let res = grpc.unary(method, req).await;
3500 Ok(res)
3501 };
3502 Box::pin(fut)
3503 }
3504 "/typedb.protocol.TypeDB/databases_contains" => {
3505 #[allow(non_camel_case_types)]
3506 struct databases_containsSvc<T: TypeDb>(pub Arc<T>);
3507 impl<
3508 T: TypeDb,
3509 > tonic::server::UnaryService<super::database_manager::contains::Req>
3510 for databases_containsSvc<T> {
3511 type Response = super::database_manager::contains::Res;
3512 type Future = BoxFuture<
3513 tonic::Response<Self::Response>,
3514 tonic::Status,
3515 >;
3516 fn call(
3517 &mut self,
3518 request: tonic::Request<
3519 super::database_manager::contains::Req,
3520 >,
3521 ) -> Self::Future {
3522 let inner = Arc::clone(&self.0);
3523 let fut = async move {
3524 <T as TypeDb>::databases_contains(&inner, request).await
3525 };
3526 Box::pin(fut)
3527 }
3528 }
3529 let accept_compression_encodings = self.accept_compression_encodings;
3530 let send_compression_encodings = self.send_compression_encodings;
3531 let max_decoding_message_size = self.max_decoding_message_size;
3532 let max_encoding_message_size = self.max_encoding_message_size;
3533 let inner = self.inner.clone();
3534 let fut = async move {
3535 let method = databases_containsSvc(inner);
3536 let codec = tonic::codec::ProstCodec::default();
3537 let mut grpc = tonic::server::Grpc::new(codec)
3538 .apply_compression_config(
3539 accept_compression_encodings,
3540 send_compression_encodings,
3541 )
3542 .apply_max_message_size_config(
3543 max_decoding_message_size,
3544 max_encoding_message_size,
3545 );
3546 let res = grpc.unary(method, req).await;
3547 Ok(res)
3548 };
3549 Box::pin(fut)
3550 }
3551 "/typedb.protocol.TypeDB/databases_create" => {
3552 #[allow(non_camel_case_types)]
3553 struct databases_createSvc<T: TypeDb>(pub Arc<T>);
3554 impl<
3555 T: TypeDb,
3556 > tonic::server::UnaryService<super::database_manager::create::Req>
3557 for databases_createSvc<T> {
3558 type Response = super::database_manager::create::Res;
3559 type Future = BoxFuture<
3560 tonic::Response<Self::Response>,
3561 tonic::Status,
3562 >;
3563 fn call(
3564 &mut self,
3565 request: tonic::Request<super::database_manager::create::Req>,
3566 ) -> Self::Future {
3567 let inner = Arc::clone(&self.0);
3568 let fut = async move {
3569 <T as TypeDb>::databases_create(&inner, request).await
3570 };
3571 Box::pin(fut)
3572 }
3573 }
3574 let accept_compression_encodings = self.accept_compression_encodings;
3575 let send_compression_encodings = self.send_compression_encodings;
3576 let max_decoding_message_size = self.max_decoding_message_size;
3577 let max_encoding_message_size = self.max_encoding_message_size;
3578 let inner = self.inner.clone();
3579 let fut = async move {
3580 let method = databases_createSvc(inner);
3581 let codec = tonic::codec::ProstCodec::default();
3582 let mut grpc = tonic::server::Grpc::new(codec)
3583 .apply_compression_config(
3584 accept_compression_encodings,
3585 send_compression_encodings,
3586 )
3587 .apply_max_message_size_config(
3588 max_decoding_message_size,
3589 max_encoding_message_size,
3590 );
3591 let res = grpc.unary(method, req).await;
3592 Ok(res)
3593 };
3594 Box::pin(fut)
3595 }
3596 "/typedb.protocol.TypeDB/databases_import" => {
3597 #[allow(non_camel_case_types)]
3598 struct databases_importSvc<T: TypeDb>(pub Arc<T>);
3599 impl<
3600 T: TypeDb,
3601 > tonic::server::StreamingService<
3602 super::database_manager::import::Client,
3603 > for databases_importSvc<T> {
3604 type Response = super::database_manager::import::Server;
3605 type ResponseStream = T::databases_importStream;
3606 type Future = BoxFuture<
3607 tonic::Response<Self::ResponseStream>,
3608 tonic::Status,
3609 >;
3610 fn call(
3611 &mut self,
3612 request: tonic::Request<
3613 tonic::Streaming<super::database_manager::import::Client>,
3614 >,
3615 ) -> Self::Future {
3616 let inner = Arc::clone(&self.0);
3617 let fut = async move {
3618 <T as TypeDb>::databases_import(&inner, request).await
3619 };
3620 Box::pin(fut)
3621 }
3622 }
3623 let accept_compression_encodings = self.accept_compression_encodings;
3624 let send_compression_encodings = self.send_compression_encodings;
3625 let max_decoding_message_size = self.max_decoding_message_size;
3626 let max_encoding_message_size = self.max_encoding_message_size;
3627 let inner = self.inner.clone();
3628 let fut = async move {
3629 let method = databases_importSvc(inner);
3630 let codec = tonic::codec::ProstCodec::default();
3631 let mut grpc = tonic::server::Grpc::new(codec)
3632 .apply_compression_config(
3633 accept_compression_encodings,
3634 send_compression_encodings,
3635 )
3636 .apply_max_message_size_config(
3637 max_decoding_message_size,
3638 max_encoding_message_size,
3639 );
3640 let res = grpc.streaming(method, req).await;
3641 Ok(res)
3642 };
3643 Box::pin(fut)
3644 }
3645 "/typedb.protocol.TypeDB/database_schema" => {
3646 #[allow(non_camel_case_types)]
3647 struct database_schemaSvc<T: TypeDb>(pub Arc<T>);
3648 impl<
3649 T: TypeDb,
3650 > tonic::server::UnaryService<super::database::schema::Req>
3651 for database_schemaSvc<T> {
3652 type Response = super::database::schema::Res;
3653 type Future = BoxFuture<
3654 tonic::Response<Self::Response>,
3655 tonic::Status,
3656 >;
3657 fn call(
3658 &mut self,
3659 request: tonic::Request<super::database::schema::Req>,
3660 ) -> Self::Future {
3661 let inner = Arc::clone(&self.0);
3662 let fut = async move {
3663 <T as TypeDb>::database_schema(&inner, request).await
3664 };
3665 Box::pin(fut)
3666 }
3667 }
3668 let accept_compression_encodings = self.accept_compression_encodings;
3669 let send_compression_encodings = self.send_compression_encodings;
3670 let max_decoding_message_size = self.max_decoding_message_size;
3671 let max_encoding_message_size = self.max_encoding_message_size;
3672 let inner = self.inner.clone();
3673 let fut = async move {
3674 let method = database_schemaSvc(inner);
3675 let codec = tonic::codec::ProstCodec::default();
3676 let mut grpc = tonic::server::Grpc::new(codec)
3677 .apply_compression_config(
3678 accept_compression_encodings,
3679 send_compression_encodings,
3680 )
3681 .apply_max_message_size_config(
3682 max_decoding_message_size,
3683 max_encoding_message_size,
3684 );
3685 let res = grpc.unary(method, req).await;
3686 Ok(res)
3687 };
3688 Box::pin(fut)
3689 }
3690 "/typedb.protocol.TypeDB/database_type_schema" => {
3691 #[allow(non_camel_case_types)]
3692 struct database_type_schemaSvc<T: TypeDb>(pub Arc<T>);
3693 impl<
3694 T: TypeDb,
3695 > tonic::server::UnaryService<super::database::type_schema::Req>
3696 for database_type_schemaSvc<T> {
3697 type Response = super::database::type_schema::Res;
3698 type Future = BoxFuture<
3699 tonic::Response<Self::Response>,
3700 tonic::Status,
3701 >;
3702 fn call(
3703 &mut self,
3704 request: tonic::Request<super::database::type_schema::Req>,
3705 ) -> Self::Future {
3706 let inner = Arc::clone(&self.0);
3707 let fut = async move {
3708 <T as TypeDb>::database_type_schema(&inner, request).await
3709 };
3710 Box::pin(fut)
3711 }
3712 }
3713 let accept_compression_encodings = self.accept_compression_encodings;
3714 let send_compression_encodings = self.send_compression_encodings;
3715 let max_decoding_message_size = self.max_decoding_message_size;
3716 let max_encoding_message_size = self.max_encoding_message_size;
3717 let inner = self.inner.clone();
3718 let fut = async move {
3719 let method = database_type_schemaSvc(inner);
3720 let codec = tonic::codec::ProstCodec::default();
3721 let mut grpc = tonic::server::Grpc::new(codec)
3722 .apply_compression_config(
3723 accept_compression_encodings,
3724 send_compression_encodings,
3725 )
3726 .apply_max_message_size_config(
3727 max_decoding_message_size,
3728 max_encoding_message_size,
3729 );
3730 let res = grpc.unary(method, req).await;
3731 Ok(res)
3732 };
3733 Box::pin(fut)
3734 }
3735 "/typedb.protocol.TypeDB/database_delete" => {
3736 #[allow(non_camel_case_types)]
3737 struct database_deleteSvc<T: TypeDb>(pub Arc<T>);
3738 impl<
3739 T: TypeDb,
3740 > tonic::server::UnaryService<super::database::delete::Req>
3741 for database_deleteSvc<T> {
3742 type Response = super::database::delete::Res;
3743 type Future = BoxFuture<
3744 tonic::Response<Self::Response>,
3745 tonic::Status,
3746 >;
3747 fn call(
3748 &mut self,
3749 request: tonic::Request<super::database::delete::Req>,
3750 ) -> Self::Future {
3751 let inner = Arc::clone(&self.0);
3752 let fut = async move {
3753 <T as TypeDb>::database_delete(&inner, request).await
3754 };
3755 Box::pin(fut)
3756 }
3757 }
3758 let accept_compression_encodings = self.accept_compression_encodings;
3759 let send_compression_encodings = self.send_compression_encodings;
3760 let max_decoding_message_size = self.max_decoding_message_size;
3761 let max_encoding_message_size = self.max_encoding_message_size;
3762 let inner = self.inner.clone();
3763 let fut = async move {
3764 let method = database_deleteSvc(inner);
3765 let codec = tonic::codec::ProstCodec::default();
3766 let mut grpc = tonic::server::Grpc::new(codec)
3767 .apply_compression_config(
3768 accept_compression_encodings,
3769 send_compression_encodings,
3770 )
3771 .apply_max_message_size_config(
3772 max_decoding_message_size,
3773 max_encoding_message_size,
3774 );
3775 let res = grpc.unary(method, req).await;
3776 Ok(res)
3777 };
3778 Box::pin(fut)
3779 }
3780 "/typedb.protocol.TypeDB/database_export" => {
3781 #[allow(non_camel_case_types)]
3782 struct database_exportSvc<T: TypeDb>(pub Arc<T>);
3783 impl<
3784 T: TypeDb,
3785 > tonic::server::ServerStreamingService<super::database::export::Req>
3786 for database_exportSvc<T> {
3787 type Response = super::database::export::Server;
3788 type ResponseStream = T::database_exportStream;
3789 type Future = BoxFuture<
3790 tonic::Response<Self::ResponseStream>,
3791 tonic::Status,
3792 >;
3793 fn call(
3794 &mut self,
3795 request: tonic::Request<super::database::export::Req>,
3796 ) -> Self::Future {
3797 let inner = Arc::clone(&self.0);
3798 let fut = async move {
3799 <T as TypeDb>::database_export(&inner, request).await
3800 };
3801 Box::pin(fut)
3802 }
3803 }
3804 let accept_compression_encodings = self.accept_compression_encodings;
3805 let send_compression_encodings = self.send_compression_encodings;
3806 let max_decoding_message_size = self.max_decoding_message_size;
3807 let max_encoding_message_size = self.max_encoding_message_size;
3808 let inner = self.inner.clone();
3809 let fut = async move {
3810 let method = database_exportSvc(inner);
3811 let codec = tonic::codec::ProstCodec::default();
3812 let mut grpc = tonic::server::Grpc::new(codec)
3813 .apply_compression_config(
3814 accept_compression_encodings,
3815 send_compression_encodings,
3816 )
3817 .apply_max_message_size_config(
3818 max_decoding_message_size,
3819 max_encoding_message_size,
3820 );
3821 let res = grpc.server_streaming(method, req).await;
3822 Ok(res)
3823 };
3824 Box::pin(fut)
3825 }
3826 "/typedb.protocol.TypeDB/transaction" => {
3827 #[allow(non_camel_case_types)]
3828 struct transactionSvc<T: TypeDb>(pub Arc<T>);
3829 impl<
3830 T: TypeDb,
3831 > tonic::server::StreamingService<super::transaction::Client>
3832 for transactionSvc<T> {
3833 type Response = super::transaction::Server;
3834 type ResponseStream = T::transactionStream;
3835 type Future = BoxFuture<
3836 tonic::Response<Self::ResponseStream>,
3837 tonic::Status,
3838 >;
3839 fn call(
3840 &mut self,
3841 request: tonic::Request<
3842 tonic::Streaming<super::transaction::Client>,
3843 >,
3844 ) -> Self::Future {
3845 let inner = Arc::clone(&self.0);
3846 let fut = async move {
3847 <T as TypeDb>::transaction(&inner, request).await
3848 };
3849 Box::pin(fut)
3850 }
3851 }
3852 let accept_compression_encodings = self.accept_compression_encodings;
3853 let send_compression_encodings = self.send_compression_encodings;
3854 let max_decoding_message_size = self.max_decoding_message_size;
3855 let max_encoding_message_size = self.max_encoding_message_size;
3856 let inner = self.inner.clone();
3857 let fut = async move {
3858 let method = transactionSvc(inner);
3859 let codec = tonic::codec::ProstCodec::default();
3860 let mut grpc = tonic::server::Grpc::new(codec)
3861 .apply_compression_config(
3862 accept_compression_encodings,
3863 send_compression_encodings,
3864 )
3865 .apply_max_message_size_config(
3866 max_decoding_message_size,
3867 max_encoding_message_size,
3868 );
3869 let res = grpc.streaming(method, req).await;
3870 Ok(res)
3871 };
3872 Box::pin(fut)
3873 }
3874 _ => {
3875 Box::pin(async move {
3876 let mut response = http::Response::new(empty_body());
3877 let headers = response.headers_mut();
3878 headers
3879 .insert(
3880 tonic::Status::GRPC_STATUS,
3881 (tonic::Code::Unimplemented as i32).into(),
3882 );
3883 headers
3884 .insert(
3885 http::header::CONTENT_TYPE,
3886 tonic::metadata::GRPC_CONTENT_TYPE,
3887 );
3888 Ok(response)
3889 })
3890 }
3891 }
3892 }
3893 }
3894 impl<T> Clone for TypeDbServer<T> {
3895 fn clone(&self) -> Self {
3896 let inner = self.inner.clone();
3897 Self {
3898 inner,
3899 accept_compression_encodings: self.accept_compression_encodings,
3900 send_compression_encodings: self.send_compression_encodings,
3901 max_decoding_message_size: self.max_decoding_message_size,
3902 max_encoding_message_size: self.max_encoding_message_size,
3903 }
3904 }
3905 }
3906 pub const SERVICE_NAME: &str = "typedb.protocol.TypeDB";
3908 impl<T> tonic::server::NamedService for TypeDbServer<T> {
3909 const NAME: &'static str = SERVICE_NAME;
3910 }
3911}