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