#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Authentication {}
pub mod authentication {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Token {}
pub mod token {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Create {}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof = "req::Credentials", tags = "1")]
pub credentials: ::core::option::Option<req::Credentials>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Password {
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Credentials {
#[prost(message, tag = "1")]
Password(Password),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Concept {
#[prost(oneof = "concept::Concept", tags = "1, 2, 3, 4, 5, 6, 7")]
pub concept: ::core::option::Option<concept::Concept>,
}
pub mod concept {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Concept {
#[prost(message, tag = "1")]
EntityType(super::EntityType),
#[prost(message, tag = "2")]
RelationType(super::RelationType),
#[prost(message, tag = "3")]
AttributeType(super::AttributeType),
#[prost(message, tag = "4")]
RoleType(super::RoleType),
#[prost(message, tag = "5")]
Entity(super::Entity),
#[prost(message, tag = "6")]
Relation(super::Relation),
#[prost(message, tag = "7")]
Attribute(super::Attribute),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thing {
#[prost(oneof = "thing::Thing", tags = "1, 2, 3")]
pub thing: ::core::option::Option<thing::Thing>,
}
pub mod thing {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Thing {
#[prost(message, tag = "1")]
Entity(super::Entity),
#[prost(message, tag = "2")]
Relation(super::Relation),
#[prost(message, tag = "3")]
Attribute(super::Attribute),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entity {
#[prost(bytes = "vec", tag = "1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub entity_type: ::core::option::Option<EntityType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relation {
#[prost(bytes = "vec", tag = "1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub relation_type: ::core::option::Option<RelationType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attribute {
#[prost(bytes = "vec", tag = "1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub attribute_type: ::core::option::Option<AttributeType>,
#[prost(message, optional, tag = "3")]
pub value: ::core::option::Option<Value>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(oneof = "value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
pub value: ::core::option::Option<value::Value>,
}
pub mod value {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Decimal {
#[prost(sint64, tag = "1")]
pub integer: i64,
#[prost(uint64, tag = "2")]
pub fractional: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Date {
#[prost(sint32, tag = "1")]
pub num_days_since_ce: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Datetime {
#[prost(sint64, tag = "1")]
pub seconds: i64,
#[prost(uint32, tag = "2")]
pub nanos: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatetimeTz {
#[prost(message, optional, tag = "1")]
pub datetime: ::core::option::Option<Datetime>,
#[prost(oneof = "datetime_tz::Timezone", tags = "2, 3")]
pub timezone: ::core::option::Option<datetime_tz::Timezone>,
}
pub mod datetime_tz {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Timezone {
#[prost(string, tag = "2")]
Named(::prost::alloc::string::String),
#[prost(sint32, tag = "3")]
Offset(i32),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Duration {
#[prost(uint32, tag = "1")]
pub months: u32,
#[prost(uint32, tag = "2")]
pub days: u32,
#[prost(uint64, tag = "3")]
pub nanos: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Struct {
#[prost(string, tag = "1")]
pub struct_type_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(bool, tag = "1")]
Boolean(bool),
#[prost(sint64, tag = "2")]
Integer(i64),
#[prost(double, tag = "3")]
Double(f64),
#[prost(message, tag = "4")]
Decimal(Decimal),
#[prost(string, tag = "5")]
String(::prost::alloc::string::String),
#[prost(message, tag = "6")]
Date(Date),
#[prost(message, tag = "7")]
Datetime(Datetime),
#[prost(message, tag = "8")]
DatetimeTz(DatetimeTz),
#[prost(message, tag = "9")]
Duration(Duration),
#[prost(message, tag = "10")]
Struct(Struct),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Type {
#[prost(oneof = "r#type::Type", tags = "1, 2, 3, 4")]
pub r#type: ::core::option::Option<r#type::Type>,
}
pub mod r#type {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(message, tag = "1")]
EntityType(super::EntityType),
#[prost(message, tag = "2")]
RelationType(super::RelationType),
#[prost(message, tag = "3")]
AttributeType(super::AttributeType),
#[prost(message, tag = "4")]
RoleType(super::RoleType),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleType {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityType {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationType {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeType {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub value_type: ::core::option::Option<ValueType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueType {
#[prost(oneof = "value_type::ValueType", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
pub value_type: ::core::option::Option<value_type::ValueType>,
}
pub mod value_type {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Boolean {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Integer {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Double {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Decimal {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct String {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Date {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DateTime {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DateTimeTz {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Duration {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Struct {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ValueType {
#[prost(message, tag = "1")]
Boolean(Boolean),
#[prost(message, tag = "2")]
Integer(Integer),
#[prost(message, tag = "3")]
Double(Double),
#[prost(message, tag = "4")]
Decimal(Decimal),
#[prost(message, tag = "5")]
String(String),
#[prost(message, tag = "6")]
Date(Date),
#[prost(message, tag = "7")]
Datetime(DateTime),
#[prost(message, tag = "8")]
DatetimeTz(DateTimeTz),
#[prost(message, tag = "9")]
Duration(Duration),
#[prost(message, tag = "10")]
Struct(Struct),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Migration {}
pub mod migration {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Export {}
pub mod export {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(oneof = "server::Server", tags = "1, 2, 3")]
pub server: ::core::option::Option<server::Server>,
}
pub mod server {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Server {
#[prost(message, tag = "1")]
InitialRes(super::InitialRes),
#[prost(message, tag = "2")]
ResPart(super::ResPart),
#[prost(message, tag = "3")]
Done(super::Done),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitialRes {
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<super::Item>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Done {}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Import {}
pub mod import {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Client {
#[prost(oneof = "client::Client", tags = "1, 2, 3")]
pub client: ::core::option::Option<client::Client>,
}
pub mod client {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitialReq {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub schema: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReqPart {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<super::super::Item>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Done {}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Client {
#[prost(message, tag = "1")]
InitialReq(InitialReq),
#[prost(message, tag = "2")]
ReqPart(ReqPart),
#[prost(message, tag = "3")]
Done(Done),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(message, optional, tag = "1")]
pub done: ::core::option::Option<server::Done>,
}
pub mod server {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Done {}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Item {
#[prost(oneof = "item::Item", tags = "1, 2, 3, 15, 16")]
pub item: ::core::option::Option<item::Item>,
}
pub mod item {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entity {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attribute {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
#[prost(message, optional, tag = "4")]
pub value: ::core::option::Option<super::MigrationValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relation {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub attributes: ::prost::alloc::vec::Vec<OwnedAttribute>,
#[prost(message, repeated, tag = "4")]
pub roles: ::prost::alloc::vec::Vec<relation::Role>,
}
pub mod relation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Role {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub players: ::prost::alloc::vec::Vec<role::Player>,
}
pub mod role {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Player {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnedAttribute {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Header {
#[prost(string, tag = "1")]
pub typedb_version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub original_database: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Checksums {
#[prost(int64, tag = "1")]
pub entity_count: i64,
#[prost(int64, tag = "2")]
pub attribute_count: i64,
#[prost(int64, tag = "3")]
pub relation_count: i64,
#[prost(int64, tag = "4")]
pub role_count: i64,
#[prost(int64, tag = "5")]
pub ownership_count: i64,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Item {
#[prost(message, tag = "1")]
Attribute(Attribute),
#[prost(message, tag = "2")]
Entity(Entity),
#[prost(message, tag = "3")]
Relation(Relation),
#[prost(message, tag = "15")]
Header(Header),
#[prost(message, tag = "16")]
Checksums(Checksums),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationValue {
#[prost(
oneof = "migration_value::Value",
tags = "1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12"
)]
pub value: ::core::option::Option<migration_value::Value>,
}
pub mod migration_value {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(string, tag = "1")]
String(::prost::alloc::string::String),
#[prost(bool, tag = "2")]
Boolean(bool),
#[prost(int64, tag = "3")]
Integer(i64),
#[prost(double, tag = "4")]
Double(f64),
#[prost(int64, tag = "5")]
DatetimeMillis(i64),
#[prost(message, tag = "6")]
Decimal(super::super::value::Decimal),
#[prost(message, tag = "8")]
Date(super::super::value::Date),
#[prost(message, tag = "9")]
Datetime(super::super::value::Datetime),
#[prost(message, tag = "10")]
DatetimeTz(super::super::value::DatetimeTz),
#[prost(message, tag = "11")]
Duration(super::super::value::Duration),
#[prost(message, tag = "12")]
Struct(super::super::value::Struct),
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DatabaseManager {}
pub mod database_manager {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Get {}
pub mod get {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag = "1")]
pub database: ::core::option::Option<super::super::DatabaseReplicas>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct All {}
pub mod all {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<super::super::DatabaseReplicas>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Contains {}
pub mod contains {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bool, tag = "1")]
pub contains: bool,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Create {}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag = "1")]
pub database: ::core::option::Option<super::super::DatabaseReplicas>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Import {}
pub mod import {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Client {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<super::super::migration::import::Client>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(message, optional, tag = "1")]
pub server: ::core::option::Option<super::super::migration::import::Server>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseReplicas {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub replicas: ::prost::alloc::vec::Vec<database_replicas::Replica>,
}
pub mod database_replicas {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Replica {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub primary: bool,
#[prost(bool, tag = "3")]
pub preferred: bool,
#[prost(int64, tag = "4")]
pub term: i64,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Database {}
pub mod database {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Schema {}
pub mod schema {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TypeSchema {}
pub mod type_schema {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Export {}
pub mod export {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag = "1")]
pub req: ::core::option::Option<super::super::migration::export::Req>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(message, optional, tag = "1")]
pub server: ::core::option::Option<super::super::migration::export::Server>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Delete {}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Version {
Unspecified = 0,
Version = 7,
}
impl Version {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "UNSPECIFIED",
Self::Version => "VERSION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"VERSION" => Some(Self::Version),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExtensionVersion {
UnspecifiedExtension = 0,
Extension = 1,
}
impl ExtensionVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::UnspecifiedExtension => "UNSPECIFIED_EXTENSION",
Self::Extension => "EXTENSION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED_EXTENSION" => Some(Self::UnspecifiedExtension),
"EXTENSION" => Some(Self::Extension),
_ => None,
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Connection {}
pub mod connection {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Open {}
pub mod open {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(enumeration = "super::super::Version", tag = "1")]
pub version: i32,
#[prost(enumeration = "super::super::ExtensionVersion", tag = "5")]
pub extension_version: i32,
#[prost(string, tag = "2")]
pub driver_lang: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub driver_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub authentication: ::core::option::Option<
super::super::authentication::token::create::Req,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(uint64, tag = "1")]
pub server_duration_millis: u64,
#[prost(message, optional, tag = "2")]
pub connection_id: ::core::option::Option<super::super::ConnectionId>,
#[prost(message, optional, tag = "3")]
pub databases_all: ::core::option::Option<
super::super::database_manager::all::Res,
>,
#[prost(message, optional, tag = "4")]
pub authentication: ::core::option::Option<
super::super::authentication::token::create::Res,
>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionId {
#[prost(bytes = "vec", tag = "1")]
pub id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ServerManager {}
pub mod server_manager {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct All {}
pub mod all {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, repeated, tag = "1")]
pub servers: ::prost::alloc::vec::Vec<super::super::Server>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserManager {}
pub mod user_manager {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct All {}
pub mod all {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<super::super::User>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Contains {}
pub mod contains {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bool, tag = "1")]
pub contains: bool,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Get {}
pub mod get {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<super::super::User>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Create {}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<super::super::User>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub password: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod user {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Update {}
pub mod update {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub user: ::core::option::Option<super::super::User>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Delete {}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptRow {
#[prost(message, repeated, tag = "1")]
pub row: ::prost::alloc::vec::Vec<RowEntry>,
#[prost(bytes = "vec", optional, tag = "2")]
pub involved_blocks: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RowEntry {
#[prost(oneof = "row_entry::Entry", tags = "1, 2, 3, 4, 5")]
pub entry: ::core::option::Option<row_entry::Entry>,
}
pub mod row_entry {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptList {
#[prost(message, repeated, tag = "1")]
pub concepts: ::prost::alloc::vec::Vec<super::Concept>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueList {
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<super::Value>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Entry {
#[prost(message, tag = "1")]
Empty(Empty),
#[prost(message, tag = "2")]
Concept(super::Concept),
#[prost(message, tag = "3")]
Value(super::Value),
#[prost(message, tag = "4")]
ConceptList(ConceptList),
#[prost(message, tag = "5")]
ValueList(ValueList),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptDocument {
#[prost(message, optional, tag = "1")]
pub root: ::core::option::Option<concept_document::Node>,
}
pub mod concept_document {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Node {
#[prost(oneof = "node::Node", tags = "1, 2, 3")]
pub node: ::core::option::Option<node::Node>,
}
pub mod node {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Map {
#[prost(map = "string, message", tag = "1")]
pub map: ::std::collections::HashMap<
::prost::alloc::string::String,
super::Node,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct List {
#[prost(message, repeated, tag = "1")]
pub list: ::prost::alloc::vec::Vec<super::Node>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Leaf {
#[prost(oneof = "leaf::Leaf", tags = "1, 10, 11, 12, 13, 15, 20, 21, 30")]
pub leaf: ::core::option::Option<leaf::Leaf>,
}
pub mod leaf {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
Entity = 0,
Relation = 1,
Attribute = 3,
Role = 4,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Entity => "Entity",
Self::Relation => "Relation",
Self::Attribute => "Attribute",
Self::Role => "Role",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Entity" => Some(Self::Entity),
"Relation" => Some(Self::Relation),
"Attribute" => Some(Self::Attribute),
"Role" => Some(Self::Role),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Leaf {
#[prost(message, tag = "1")]
Empty(Empty),
#[prost(message, tag = "10")]
EntityType(super::super::super::EntityType),
#[prost(message, tag = "11")]
RelationType(super::super::super::RelationType),
#[prost(message, tag = "12")]
AttributeType(super::super::super::AttributeType),
#[prost(message, tag = "13")]
RoleType(super::super::super::RoleType),
#[prost(message, tag = "15")]
ValueType(super::super::super::ValueType),
#[prost(message, tag = "20")]
Attribute(super::super::super::Attribute),
#[prost(message, tag = "21")]
Value(super::super::super::Value),
#[prost(enumeration = "Kind", tag = "30")]
Kind(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Node {
#[prost(message, tag = "1")]
Map(Map),
#[prost(message, tag = "2")]
List(List),
#[prost(message, tag = "3")]
Leaf(Leaf),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyzedConjunction {
#[prost(message, repeated, tag = "1")]
pub constraints: ::prost::alloc::vec::Vec<analyzed_conjunction::Constraint>,
#[prost(map = "uint32, message", tag = "2")]
pub variable_annotations: ::std::collections::HashMap<
u32,
analyzed_conjunction::VariableAnnotations,
>,
}
pub mod analyzed_conjunction {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Variable {
#[prost(uint32, tag = "1")]
pub id: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConstraintVertex {
#[prost(oneof = "constraint_vertex::Vertex", tags = "1, 2, 3, 4")]
pub vertex: ::core::option::Option<constraint_vertex::Vertex>,
}
pub mod constraint_vertex {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NamedRole {
#[prost(message, optional, tag = "1")]
pub variable: ::core::option::Option<super::Variable>,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Vertex {
#[prost(message, tag = "1")]
Variable(super::Variable),
#[prost(message, tag = "2")]
Label(super::super::Type),
#[prost(message, tag = "3")]
Value(super::super::Value),
#[prost(message, tag = "4")]
NamedRole(NamedRole),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Constraint {
#[prost(message, optional, tag = "1")]
pub span: ::core::option::Option<constraint::ConstraintSpan>,
#[prost(
oneof = "constraint::Constraint",
tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
)]
pub constraint: ::core::option::Option<constraint::Constraint>,
}
pub mod constraint {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConstraintSpan {
#[prost(uint64, tag = "1")]
pub begin: u64,
#[prost(uint64, tag = "2")]
pub end: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Or {
#[prost(uint32, repeated, tag = "1")]
pub branches: ::prost::alloc::vec::Vec<u32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Not {
#[prost(uint32, tag = "1")]
pub conjunction: u32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Try {
#[prost(uint32, tag = "1")]
pub conjunction: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Isa {
#[prost(message, optional, tag = "1")]
pub instance: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Has {
#[prost(message, optional, tag = "1")]
pub owner: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub attribute: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Links {
#[prost(message, optional, tag = "1")]
pub relation: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub player: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "3")]
pub role: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "4")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Kind {
#[prost(
enumeration = "super::super::concept_document::node::leaf::Kind",
tag = "1"
)]
pub kind: i32,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::ConstraintVertex>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Sub {
#[prost(message, optional, tag = "1")]
pub subtype: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub supertype: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Owns {
#[prost(message, optional, tag = "1")]
pub owner: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub attribute: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relates {
#[prost(message, optional, tag = "1")]
pub relation: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub role: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Plays {
#[prost(message, optional, tag = "1")]
pub player: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub role: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "ConstraintExactness", tag = "3")]
pub exactness: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Label {
#[prost(message, optional, tag = "1")]
pub r#type: ::core::option::Option<super::ConstraintVertex>,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(message, optional, tag = "1")]
pub attribute_type: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub value_type: ::core::option::Option<super::super::ValueType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Comparison {
#[prost(message, optional, tag = "1")]
pub lhs: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub rhs: ::core::option::Option<super::ConstraintVertex>,
#[prost(enumeration = "comparison::Comparator", tag = "3")]
pub comparator: i32,
}
pub mod comparison {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Comparator {
Equal = 0,
NotEqual = 1,
Less = 2,
Greater = 3,
LessOrEqual = 4,
GreaterOrEqual = 5,
Like = 6,
Contains = 7,
}
impl Comparator {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Equal => "EQUAL",
Self::NotEqual => "NOT_EQUAL",
Self::Less => "LESS",
Self::Greater => "GREATER",
Self::LessOrEqual => "LESS_OR_EQUAL",
Self::GreaterOrEqual => "GREATER_OR_EQUAL",
Self::Like => "LIKE",
Self::Contains => "CONTAINS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EQUAL" => Some(Self::Equal),
"NOT_EQUAL" => Some(Self::NotEqual),
"LESS" => Some(Self::Less),
"GREATER" => Some(Self::Greater),
"LESS_OR_EQUAL" => Some(Self::LessOrEqual),
"GREATER_OR_EQUAL" => Some(Self::GreaterOrEqual),
"LIKE" => Some(Self::Like),
"CONTAINS" => Some(Self::Contains),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expression {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub assigned: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, repeated, tag = "3")]
pub arguments: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionCall {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub assigned: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
#[prost(message, repeated, tag = "3")]
pub arguments: ::prost::alloc::vec::Vec<super::ConstraintVertex>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Is {
#[prost(message, optional, tag = "1")]
pub lhs: ::core::option::Option<super::ConstraintVertex>,
#[prost(message, optional, tag = "2")]
pub rhs: ::core::option::Option<super::ConstraintVertex>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Iid {
#[prost(message, optional, tag = "1")]
pub concept: ::core::option::Option<super::ConstraintVertex>,
#[prost(bytes = "vec", tag = "2")]
pub iid: ::prost::alloc::vec::Vec<u8>,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ConstraintExactness {
Exact = 0,
Subtypes = 1,
}
impl ConstraintExactness {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Exact => "EXACT",
Self::Subtypes => "SUBTYPES",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EXACT" => Some(Self::Exact),
"SUBTYPES" => Some(Self::Subtypes),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(message, tag = "2")]
Or(Or),
#[prost(message, tag = "3")]
Not(Not),
#[prost(message, tag = "4")]
Try(Try),
#[prost(message, tag = "5")]
Isa(Isa),
#[prost(message, tag = "6")]
Has(Has),
#[prost(message, tag = "7")]
Links(Links),
#[prost(message, tag = "8")]
Kind(Kind),
#[prost(message, tag = "9")]
Sub(Sub),
#[prost(message, tag = "10")]
Owns(Owns),
#[prost(message, tag = "11")]
Relates(Relates),
#[prost(message, tag = "12")]
Plays(Plays),
#[prost(message, tag = "13")]
Value(Value),
#[prost(message, tag = "14")]
Label(Label),
#[prost(message, tag = "15")]
Comparison(Comparison),
#[prost(message, tag = "16")]
Expression(Expression),
#[prost(message, tag = "17")]
FunctionCall(FunctionCall),
#[prost(message, tag = "18")]
Is(Is),
#[prost(message, tag = "19")]
Iid(Iid),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariableAnnotations {
#[prost(bool, tag = "4")]
pub is_optional: bool,
#[prost(oneof = "variable_annotations::Annotations", tags = "1, 2, 3")]
pub annotations: ::core::option::Option<variable_annotations::Annotations>,
}
pub mod variable_annotations {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptVariableAnnotations {
#[prost(message, repeated, tag = "1")]
pub types: ::prost::alloc::vec::Vec<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Annotations {
#[prost(message, tag = "1")]
Instance(ConceptVariableAnnotations),
#[prost(message, tag = "2")]
Type(ConceptVariableAnnotations),
#[prost(message, tag = "3")]
ValueAnnotations(super::super::ValueType),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(string, tag = "1")]
pub error_code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub domain: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub stack_trace: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Options {}
pub mod options {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Transaction {
#[prost(bool, optional, tag = "1")]
pub parallel: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "2")]
pub transaction_timeout_millis: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "3")]
pub schema_lock_acquire_timeout_millis: ::core::option::Option<u64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Query {
#[prost(bool, optional, tag = "1")]
pub include_instance_types: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "2")]
pub prefetch_size: ::core::option::Option<u64>,
#[prost(bool, optional, tag = "3")]
pub include_query_structure: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Analyze {
#[prost(bool, optional, tag = "1")]
pub include_plan: ::core::option::Option<bool>,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Analyze {}
pub mod analyze {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag = "1")]
pub options: ::core::option::Option<super::options::Analyze>,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof = "res::Result", tags = "1, 2")]
pub result: ::core::option::Option<res::Result>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyzedQuery {
#[prost(string, tag = "1")]
pub source: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub query: ::core::option::Option<analyzed_query::Pipeline>,
#[prost(message, repeated, tag = "3")]
pub preamble: ::prost::alloc::vec::Vec<analyzed_query::Function>,
#[prost(message, optional, tag = "4")]
pub fetch: ::core::option::Option<analyzed_query::Fetch>,
}
pub mod analyzed_query {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Function {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<Pipeline>,
#[prost(message, repeated, tag = "2")]
pub arguments: ::prost::alloc::vec::Vec<
super::super::super::analyzed_conjunction::Variable,
>,
#[prost(message, repeated, tag = "3")]
pub arguments_annotations: ::prost::alloc::vec::Vec<
super::super::super::analyzed_conjunction::VariableAnnotations,
>,
#[prost(message, repeated, tag = "4")]
pub return_annotations: ::prost::alloc::vec::Vec<
super::super::super::analyzed_conjunction::VariableAnnotations,
>,
#[prost(message, optional, tag = "5")]
pub return_operation: ::core::option::Option<function::ReturnOperation>,
}
pub mod function {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnOperation {
#[prost(
oneof = "return_operation::ReturnOperation",
tags = "1, 2, 3, 4"
)]
pub return_operation: ::core::option::Option<
return_operation::ReturnOperation,
>,
}
pub mod return_operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnOpStream {
#[prost(message, repeated, tag = "1")]
pub variables: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnOpSingle {
#[prost(string, tag = "1")]
pub selector: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub variables: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReturnOpCheck {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnOpReduce {
#[prost(message, repeated, tag = "1")]
pub reducers: ::prost::alloc::vec::Vec<super::super::Reducer>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReturnOperation {
#[prost(message, tag = "1")]
Stream(ReturnOpStream),
#[prost(message, tag = "2")]
Single(ReturnOpSingle),
#[prost(message, tag = "3")]
Check(ReturnOpCheck),
#[prost(message, tag = "4")]
Reduce(ReturnOpReduce),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pipeline {
#[prost(message, repeated, tag = "1")]
pub conjunctions: ::prost::alloc::vec::Vec<
super::super::super::AnalyzedConjunction,
>,
#[prost(message, repeated, tag = "2")]
pub stages: ::prost::alloc::vec::Vec<pipeline::PipelineStage>,
#[prost(map = "uint32, message", tag = "3")]
pub variable_info: ::std::collections::HashMap<
u32,
pipeline::VariableInfo,
>,
#[prost(message, repeated, tag = "4")]
pub outputs: ::prost::alloc::vec::Vec<
super::super::super::analyzed_conjunction::Variable,
>,
}
pub mod pipeline {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariableInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PipelineStage {
#[prost(
oneof = "pipeline_stage::Stage",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
)]
pub stage: ::core::option::Option<pipeline_stage::Stage>,
}
pub mod pipeline_stage {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Match {
#[prost(uint32, tag = "1")]
pub block: u32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Insert {
#[prost(uint32, tag = "1")]
pub block: u32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Put {
#[prost(uint32, tag = "1")]
pub block: u32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Update {
#[prost(uint32, tag = "1")]
pub block: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
#[prost(uint32, tag = "1")]
pub block: u32,
#[prost(message, repeated, tag = "2")]
pub deleted_variables: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Select {
#[prost(message, repeated, tag = "1")]
pub variables: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Sort {
#[prost(message, repeated, tag = "1")]
pub sort_variables: ::prost::alloc::vec::Vec<sort::SortVariable>,
}
pub mod sort {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SortVariable {
#[prost(message, optional, tag = "1")]
pub variable: ::core::option::Option<
super::super::super::super::super::super::analyzed_conjunction::Variable,
>,
#[prost(
enumeration = "sort_variable::SortDirection",
tag = "2"
)]
pub direction: i32,
}
pub mod sort_variable {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SortDirection {
Asc = 0,
Desc = 1,
}
impl SortDirection {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Asc => "ASC",
Self::Desc => "DESC",
}
}
pub fn from_str_name(
value: &str,
) -> ::core::option::Option<Self> {
match value {
"ASC" => Some(Self::Asc),
"DESC" => Some(Self::Desc),
_ => None,
}
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Require {
#[prost(message, repeated, tag = "1")]
pub variables: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Offset {
#[prost(uint64, tag = "1")]
pub offset: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Limit {
#[prost(uint64, tag = "1")]
pub limit: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Distinct {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reduce {
#[prost(message, repeated, tag = "1")]
pub reducers: ::prost::alloc::vec::Vec<reduce::ReduceAssign>,
#[prost(message, repeated, tag = "2")]
pub groupby: ::prost::alloc::vec::Vec<
super::super::super::super::super::analyzed_conjunction::Variable,
>,
}
pub mod reduce {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReduceAssign {
#[prost(message, optional, tag = "1")]
pub assigned: ::core::option::Option<
super::super::super::super::super::super::analyzed_conjunction::Variable,
>,
#[prost(message, optional, tag = "2")]
pub reducer: ::core::option::Option<
super::super::super::Reducer,
>,
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Stage {
#[prost(message, tag = "1")]
Match(Match),
#[prost(message, tag = "2")]
Insert(Insert),
#[prost(message, tag = "3")]
Put(Put),
#[prost(message, tag = "4")]
Update(Update),
#[prost(message, tag = "5")]
Delete(Delete),
#[prost(message, tag = "6")]
Select(Select),
#[prost(message, tag = "7")]
Sort(Sort),
#[prost(message, tag = "8")]
Require(Require),
#[prost(message, tag = "9")]
Offset(Offset),
#[prost(message, tag = "10")]
Limit(Limit),
#[prost(message, tag = "11")]
Distinct(Distinct),
#[prost(message, tag = "12")]
Reduce(Reduce),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reducer {
#[prost(string, tag = "1")]
pub reducer: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub variables: ::prost::alloc::vec::Vec<
super::super::super::analyzed_conjunction::Variable,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fetch {
#[prost(oneof = "fetch::Node", tags = "1, 2, 3")]
pub node: ::core::option::Option<fetch::Node>,
}
pub mod fetch {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Object {
#[prost(map = "string, message", tag = "1")]
pub fetch: ::std::collections::HashMap<
::prost::alloc::string::String,
super::Fetch,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Leaf {
#[prost(message, repeated, tag = "1")]
pub annotations: ::prost::alloc::vec::Vec<
super::super::super::super::ValueType,
>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Node {
#[prost(message, tag = "1")]
Object(Object),
#[prost(message, tag = "2")]
List(::prost::alloc::boxed::Box<super::Fetch>),
#[prost(message, tag = "3")]
Leaf(Leaf),
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
Err(super::super::Error),
#[prost(message, tag = "2")]
Ok(AnalyzedQuery),
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Query {}
pub mod query {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag = "1")]
pub options: ::core::option::Option<super::options::Query>,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitialRes {
#[prost(oneof = "initial_res::Res", tags = "1, 2")]
pub res: ::core::option::Option<initial_res::Res>,
}
pub mod initial_res {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ok {
#[prost(oneof = "ok::Ok", tags = "1, 3, 4")]
pub ok: ::core::option::Option<ok::Ok>,
}
pub mod ok {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Done {
#[prost(enumeration = "super::super::Type", tag = "1")]
pub query_type: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConceptDocumentStream {
#[prost(enumeration = "super::super::Type", tag = "2")]
pub query_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptRowStream {
#[prost(string, repeated, tag = "1")]
pub column_variable_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(enumeration = "super::super::Type", tag = "2")]
pub query_type: i32,
#[prost(message, optional, tag = "3")]
pub query_structure: ::core::option::Option<
super::super::super::analyze::res::analyzed_query::Pipeline,
>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Ok {
#[prost(message, tag = "1")]
Done(Done),
#[prost(message, tag = "3")]
ConceptDocumentStream(ConceptDocumentStream),
#[prost(message, tag = "4")]
ConceptRowStream(ConceptRowStream),
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag = "1")]
Error(super::super::Error),
#[prost(message, tag = "2")]
Ok(Ok),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(oneof = "res_part::Res", tags = "1, 2")]
pub res: ::core::option::Option<res_part::Res>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptDocumentsRes {
#[prost(message, repeated, tag = "1")]
pub documents: ::prost::alloc::vec::Vec<super::super::ConceptDocument>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptRowsRes {
#[prost(message, repeated, tag = "1")]
pub rows: ::prost::alloc::vec::Vec<super::super::ConceptRow>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag = "1")]
DocumentsRes(ConceptDocumentsRes),
#[prost(message, tag = "2")]
RowsRes(ConceptRowsRes),
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Read = 0,
Write = 1,
Schema = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Read => "READ",
Self::Write => "WRITE",
Self::Schema => "SCHEMA",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"READ" => Some(Self::Read),
"WRITE" => Some(Self::Write),
"SCHEMA" => Some(Self::Schema),
_ => None,
}
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Transaction {}
pub mod transaction {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Client {
#[prost(message, repeated, tag = "1")]
pub reqs: ::prost::alloc::vec::Vec<Req>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Server {
#[prost(oneof = "server::Server", tags = "1, 2")]
pub server: ::core::option::Option<server::Server>,
}
pub mod server {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Server {
#[prost(message, tag = "1")]
Res(super::Res),
#[prost(message, tag = "2")]
ResPart(super::ResPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes = "vec", tag = "1")]
pub req_id: ::prost::alloc::vec::Vec<u8>,
#[prost(map = "string, string", tag = "2")]
pub metadata: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "req::Req", tags = "3, 4, 5, 6, 7, 8, 9")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag = "3")]
OpenReq(super::open::Req),
#[prost(message, tag = "4")]
QueryReq(super::super::query::Req),
#[prost(message, tag = "5")]
StreamReq(super::stream_signal::Req),
#[prost(message, tag = "6")]
CommitReq(super::commit::Req),
#[prost(message, tag = "7")]
RollbackReq(super::rollback::Req),
#[prost(message, tag = "8")]
CloseReq(super::close::Req),
#[prost(message, tag = "9")]
AnalyzeReq(super::super::analyze::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bytes = "vec", tag = "1")]
pub req_id: ::prost::alloc::vec::Vec<u8>,
#[prost(oneof = "res::Res", tags = "2, 3, 5, 6, 9")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag = "2")]
OpenRes(super::open::Res),
#[prost(message, tag = "3")]
QueryInitialRes(super::super::query::InitialRes),
#[prost(message, tag = "5")]
CommitRes(super::commit::Res),
#[prost(message, tag = "6")]
RollbackRes(super::rollback::Res),
#[prost(message, tag = "9")]
AnalyzeRes(super::super::analyze::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(bytes = "vec", tag = "1")]
pub req_id: ::prost::alloc::vec::Vec<u8>,
#[prost(oneof = "res_part::ResPart", tags = "2, 3")]
pub res_part: ::core::option::Option<res_part::ResPart>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResPart {
#[prost(message, tag = "2")]
QueryRes(super::super::query::ResPart),
#[prost(message, tag = "3")]
StreamRes(super::stream_signal::ResPart),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Open {}
pub mod open {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(enumeration = "super::Type", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub options: ::core::option::Option<super::super::options::Transaction>,
#[prost(uint64, tag = "4")]
pub network_latency_millis: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(uint64, tag = "2")]
pub server_duration_millis: u64,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Commit {}
pub mod commit {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Rollback {}
pub mod rollback {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Close {}
pub mod close {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Res {}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetSchemaExceptions {}
pub mod get_schema_exceptions {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, repeated, tag = "1")]
pub exceptions: ::prost::alloc::vec::Vec<super::SchemaException>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SchemaException {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamSignal {}
pub mod stream_signal {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Req {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(oneof = "res_part::State", tags = "1, 2, 3")]
pub state: ::core::option::Option<res_part::State>,
}
pub mod res_part {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Continue {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Done {}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum State {
#[prost(message, tag = "1")]
Continue(Continue),
#[prost(message, tag = "2")]
Done(Done),
#[prost(message, tag = "3")]
Error(super::super::super::Error),
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Read = 0,
Write = 1,
Schema = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Read => "READ",
Self::Write => "WRITE",
Self::Schema => "SCHEMA",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"READ" => Some(Self::Read),
"WRITE" => Some(Self::Write),
"SCHEMA" => Some(Self::Schema),
_ => None,
}
}
}
}
#[allow(non_camel_case_types)]
pub mod type_db_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct TypeDbClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TypeDbClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> TypeDbClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TypeDbClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
TypeDbClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn connection_open(
&mut self,
request: impl tonic::IntoRequest<super::connection::open::Req>,
) -> std::result::Result<
tonic::Response<super::connection::open::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/connection_open",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "connection_open"));
self.inner.unary(req, path, codec).await
}
pub async fn authentication_token_create(
&mut self,
request: impl tonic::IntoRequest<super::authentication::token::create::Req>,
) -> std::result::Result<
tonic::Response<super::authentication::token::create::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/authentication_token_create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"typedb.protocol.TypeDB",
"authentication_token_create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn servers_all(
&mut self,
request: impl tonic::IntoRequest<super::server_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::server_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/servers_all",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "servers_all"));
self.inner.unary(req, path, codec).await
}
pub async fn users_get(
&mut self,
request: impl tonic::IntoRequest<super::user_manager::get::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::get::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_get"));
self.inner.unary(req, path, codec).await
}
pub async fn users_all(
&mut self,
request: impl tonic::IntoRequest<super::user_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_all",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_all"));
self.inner.unary(req, path, codec).await
}
pub async fn users_contains(
&mut self,
request: impl tonic::IntoRequest<super::user_manager::contains::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::contains::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_contains",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_contains"));
self.inner.unary(req, path, codec).await
}
pub async fn users_create(
&mut self,
request: impl tonic::IntoRequest<super::user_manager::create::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::create::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_create"));
self.inner.unary(req, path, codec).await
}
pub async fn users_update(
&mut self,
request: impl tonic::IntoRequest<super::user::update::Req>,
) -> std::result::Result<
tonic::Response<super::user::update::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_update"));
self.inner.unary(req, path, codec).await
}
pub async fn users_delete(
&mut self,
request: impl tonic::IntoRequest<super::user::delete::Req>,
) -> std::result::Result<
tonic::Response<super::user::delete::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/users_delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "users_delete"));
self.inner.unary(req, path, codec).await
}
pub async fn databases_get(
&mut self,
request: impl tonic::IntoRequest<super::database_manager::get::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::get::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/databases_get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_get"));
self.inner.unary(req, path, codec).await
}
pub async fn databases_all(
&mut self,
request: impl tonic::IntoRequest<super::database_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/databases_all",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_all"));
self.inner.unary(req, path, codec).await
}
pub async fn databases_contains(
&mut self,
request: impl tonic::IntoRequest<super::database_manager::contains::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::contains::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/databases_contains",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_contains"));
self.inner.unary(req, path, codec).await
}
pub async fn databases_create(
&mut self,
request: impl tonic::IntoRequest<super::database_manager::create::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::create::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/databases_create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_create"));
self.inner.unary(req, path, codec).await
}
pub async fn databases_import(
&mut self,
request: impl tonic::IntoStreamingRequest<
Message = super::database_manager::import::Client,
>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<super::database_manager::import::Server>,
>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/databases_import",
);
let mut req = request.into_streaming_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "databases_import"));
self.inner.streaming(req, path, codec).await
}
pub async fn database_schema(
&mut self,
request: impl tonic::IntoRequest<super::database::schema::Req>,
) -> std::result::Result<
tonic::Response<super::database::schema::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/database_schema",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_schema"));
self.inner.unary(req, path, codec).await
}
pub async fn database_type_schema(
&mut self,
request: impl tonic::IntoRequest<super::database::type_schema::Req>,
) -> std::result::Result<
tonic::Response<super::database::type_schema::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/database_type_schema",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("typedb.protocol.TypeDB", "database_type_schema"),
);
self.inner.unary(req, path, codec).await
}
pub async fn database_delete(
&mut self,
request: impl tonic::IntoRequest<super::database::delete::Req>,
) -> std::result::Result<
tonic::Response<super::database::delete::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/database_delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_delete"));
self.inner.unary(req, path, codec).await
}
pub async fn database_export(
&mut self,
request: impl tonic::IntoRequest<super::database::export::Req>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::database::export::Server>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/database_export",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "database_export"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn transaction(
&mut self,
request: impl tonic::IntoStreamingRequest<
Message = super::transaction::Client,
>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::transaction::Server>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/transaction",
);
let mut req = request.into_streaming_request();
req.extensions_mut()
.insert(GrpcMethod::new("typedb.protocol.TypeDB", "transaction"));
self.inner.streaming(req, path, codec).await
}
}
}
#[allow(non_camel_case_types)]
pub mod type_db_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait TypeDb: std::marker::Send + std::marker::Sync + 'static {
async fn connection_open(
&self,
request: tonic::Request<super::connection::open::Req>,
) -> std::result::Result<
tonic::Response<super::connection::open::Res>,
tonic::Status,
>;
async fn authentication_token_create(
&self,
request: tonic::Request<super::authentication::token::create::Req>,
) -> std::result::Result<
tonic::Response<super::authentication::token::create::Res>,
tonic::Status,
>;
async fn servers_all(
&self,
request: tonic::Request<super::server_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::server_manager::all::Res>,
tonic::Status,
>;
async fn users_get(
&self,
request: tonic::Request<super::user_manager::get::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::get::Res>,
tonic::Status,
>;
async fn users_all(
&self,
request: tonic::Request<super::user_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::all::Res>,
tonic::Status,
>;
async fn users_contains(
&self,
request: tonic::Request<super::user_manager::contains::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::contains::Res>,
tonic::Status,
>;
async fn users_create(
&self,
request: tonic::Request<super::user_manager::create::Req>,
) -> std::result::Result<
tonic::Response<super::user_manager::create::Res>,
tonic::Status,
>;
async fn users_update(
&self,
request: tonic::Request<super::user::update::Req>,
) -> std::result::Result<
tonic::Response<super::user::update::Res>,
tonic::Status,
>;
async fn users_delete(
&self,
request: tonic::Request<super::user::delete::Req>,
) -> std::result::Result<
tonic::Response<super::user::delete::Res>,
tonic::Status,
>;
async fn databases_get(
&self,
request: tonic::Request<super::database_manager::get::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::get::Res>,
tonic::Status,
>;
async fn databases_all(
&self,
request: tonic::Request<super::database_manager::all::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::all::Res>,
tonic::Status,
>;
async fn databases_contains(
&self,
request: tonic::Request<super::database_manager::contains::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::contains::Res>,
tonic::Status,
>;
async fn databases_create(
&self,
request: tonic::Request<super::database_manager::create::Req>,
) -> std::result::Result<
tonic::Response<super::database_manager::create::Res>,
tonic::Status,
>;
type databases_importStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::database_manager::import::Server,
tonic::Status,
>,
>
+ std::marker::Send
+ 'static;
async fn databases_import(
&self,
request: tonic::Request<
tonic::Streaming<super::database_manager::import::Client>,
>,
) -> std::result::Result<
tonic::Response<Self::databases_importStream>,
tonic::Status,
>;
async fn database_schema(
&self,
request: tonic::Request<super::database::schema::Req>,
) -> std::result::Result<
tonic::Response<super::database::schema::Res>,
tonic::Status,
>;
async fn database_type_schema(
&self,
request: tonic::Request<super::database::type_schema::Req>,
) -> std::result::Result<
tonic::Response<super::database::type_schema::Res>,
tonic::Status,
>;
async fn database_delete(
&self,
request: tonic::Request<super::database::delete::Req>,
) -> std::result::Result<
tonic::Response<super::database::delete::Res>,
tonic::Status,
>;
type database_exportStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<
super::database::export::Server,
tonic::Status,
>,
>
+ std::marker::Send
+ 'static;
async fn database_export(
&self,
request: tonic::Request<super::database::export::Req>,
) -> std::result::Result<
tonic::Response<Self::database_exportStream>,
tonic::Status,
>;
type transactionStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::transaction::Server, tonic::Status>,
>
+ std::marker::Send
+ 'static;
async fn transaction(
&self,
request: tonic::Request<tonic::Streaming<super::transaction::Client>>,
) -> std::result::Result<
tonic::Response<Self::transactionStream>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct TypeDbServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> TypeDbServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for TypeDbServer<T>
where
T: TypeDb,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/typedb.protocol.TypeDB/connection_open" => {
#[allow(non_camel_case_types)]
struct connection_openSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::connection::open::Req>
for connection_openSvc<T> {
type Response = super::connection::open::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::connection::open::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::connection_open(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = connection_openSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/authentication_token_create" => {
#[allow(non_camel_case_types)]
struct authentication_token_createSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<
super::authentication::token::create::Req,
> for authentication_token_createSvc<T> {
type Response = super::authentication::token::create::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::authentication::token::create::Req,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::authentication_token_create(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = authentication_token_createSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/servers_all" => {
#[allow(non_camel_case_types)]
struct servers_allSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::server_manager::all::Req>
for servers_allSvc<T> {
type Response = super::server_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::server_manager::all::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::servers_all(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = servers_allSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_get" => {
#[allow(non_camel_case_types)]
struct users_getSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::user_manager::get::Req>
for users_getSvc<T> {
type Response = super::user_manager::get::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user_manager::get::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_get(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_getSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_all" => {
#[allow(non_camel_case_types)]
struct users_allSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::user_manager::all::Req>
for users_allSvc<T> {
type Response = super::user_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user_manager::all::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_all(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_allSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_contains" => {
#[allow(non_camel_case_types)]
struct users_containsSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::user_manager::contains::Req>
for users_containsSvc<T> {
type Response = super::user_manager::contains::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user_manager::contains::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_contains(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_containsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_create" => {
#[allow(non_camel_case_types)]
struct users_createSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::user_manager::create::Req>
for users_createSvc<T> {
type Response = super::user_manager::create::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user_manager::create::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_create(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_createSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_update" => {
#[allow(non_camel_case_types)]
struct users_updateSvc<T: TypeDb>(pub Arc<T>);
impl<T: TypeDb> tonic::server::UnaryService<super::user::update::Req>
for users_updateSvc<T> {
type Response = super::user::update::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user::update::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_update(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_updateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/users_delete" => {
#[allow(non_camel_case_types)]
struct users_deleteSvc<T: TypeDb>(pub Arc<T>);
impl<T: TypeDb> tonic::server::UnaryService<super::user::delete::Req>
for users_deleteSvc<T> {
type Response = super::user::delete::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::user::delete::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::users_delete(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = users_deleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/databases_get" => {
#[allow(non_camel_case_types)]
struct databases_getSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database_manager::get::Req>
for databases_getSvc<T> {
type Response = super::database_manager::get::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database_manager::get::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::databases_get(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = databases_getSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/databases_all" => {
#[allow(non_camel_case_types)]
struct databases_allSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database_manager::all::Req>
for databases_allSvc<T> {
type Response = super::database_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database_manager::all::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::databases_all(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = databases_allSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/databases_contains" => {
#[allow(non_camel_case_types)]
struct databases_containsSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database_manager::contains::Req>
for databases_containsSvc<T> {
type Response = super::database_manager::contains::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::database_manager::contains::Req,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::databases_contains(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = databases_containsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/databases_create" => {
#[allow(non_camel_case_types)]
struct databases_createSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database_manager::create::Req>
for databases_createSvc<T> {
type Response = super::database_manager::create::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database_manager::create::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::databases_create(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = databases_createSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/databases_import" => {
#[allow(non_camel_case_types)]
struct databases_importSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::StreamingService<
super::database_manager::import::Client,
> for databases_importSvc<T> {
type Response = super::database_manager::import::Server;
type ResponseStream = T::databases_importStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
tonic::Streaming<super::database_manager::import::Client>,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::databases_import(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = databases_importSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/database_schema" => {
#[allow(non_camel_case_types)]
struct database_schemaSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database::schema::Req>
for database_schemaSvc<T> {
type Response = super::database::schema::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database::schema::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::database_schema(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = database_schemaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/database_type_schema" => {
#[allow(non_camel_case_types)]
struct database_type_schemaSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database::type_schema::Req>
for database_type_schemaSvc<T> {
type Response = super::database::type_schema::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database::type_schema::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::database_type_schema(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = database_type_schemaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/database_delete" => {
#[allow(non_camel_case_types)]
struct database_deleteSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::database::delete::Req>
for database_deleteSvc<T> {
type Response = super::database::delete::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database::delete::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::database_delete(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = database_deleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/database_export" => {
#[allow(non_camel_case_types)]
struct database_exportSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::ServerStreamingService<super::database::export::Req>
for database_exportSvc<T> {
type Response = super::database::export::Server;
type ResponseStream = T::database_exportStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::database::export::Req>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::database_export(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = database_exportSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/transaction" => {
#[allow(non_camel_case_types)]
struct transactionSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::StreamingService<super::transaction::Client>
for transactionSvc<T> {
type Response = super::transaction::Server;
type ResponseStream = T::transactionStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
tonic::Streaming<super::transaction::Client>,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TypeDb>::transaction(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = transactionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(empty_body());
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for TypeDbServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "typedb.protocol.TypeDB";
impl<T> tonic::server::NamedService for TypeDbServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}