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