#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerManager {
}
pub mod server_manager {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {
}
pub mod all {
#[derive(Clone, 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, PartialEq, ::prost::Message)]
pub struct ClusterUserManager {
}
pub mod cluster_user_manager {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contains {
}
pub mod contains {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub username: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bool, tag="1")]
pub contains: bool,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Create {
}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {
}
pub mod all {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, repeated, tag="1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterUser {
}
pub mod cluster_user {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Password {
}
pub mod password {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Token {
}
pub mod token {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub username: ::prost::alloc::string::String,
}
#[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 Delete {
}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub username: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterDatabaseManager {
}
pub mod cluster_database_manager {
#[derive(Clone, 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::ClusterDatabase>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {
}
pub mod all {
#[derive(Clone, 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::ClusterDatabase>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterDatabase {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub replicas: ::prost::alloc::vec::Vec<cluster_database::Replica>,
}
pub mod cluster_database {
#[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,
}
}
pub mod type_db_cluster_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct TypeDbClusterClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TypeDbClusterClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> TypeDbClusterClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> TypeDbClusterClient<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> + Send + Sync,
{
TypeDbClusterClient::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
}
pub async fn servers_all(
&mut self,
request: impl tonic::IntoRequest<super::server_manager::all::Req>,
) -> Result<tonic::Response<super::server_manager::all::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/servers_all",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn users_contains(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user_manager::contains::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::contains::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/users_contains",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn users_create(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user_manager::create::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::create::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/users_create",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn users_all(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user_manager::all::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/users_all",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn user_password(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user::password::Req>,
) -> Result<tonic::Response<super::cluster_user::password::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/user_password",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn user_token(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user::token::Req>,
) -> Result<tonic::Response<super::cluster_user::token::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/user_token",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn user_delete(
&mut self,
request: impl tonic::IntoRequest<super::cluster_user::delete::Req>,
) -> Result<tonic::Response<super::cluster_user::delete::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/user_delete",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn databases_get(
&mut self,
request: impl tonic::IntoRequest<super::cluster_database_manager::get::Req>,
) -> Result<
tonic::Response<super::cluster_database_manager::get::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/databases_get",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn databases_all(
&mut self,
request: impl tonic::IntoRequest<super::cluster_database_manager::all::Req>,
) -> Result<
tonic::Response<super::cluster_database_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDBCluster/databases_all",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
pub mod type_db_cluster_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait TypeDbCluster: Send + Sync + 'static {
async fn servers_all(
&self,
request: tonic::Request<super::server_manager::all::Req>,
) -> Result<tonic::Response<super::server_manager::all::Res>, tonic::Status>;
async fn users_contains(
&self,
request: tonic::Request<super::cluster_user_manager::contains::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::contains::Res>,
tonic::Status,
>;
async fn users_create(
&self,
request: tonic::Request<super::cluster_user_manager::create::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::create::Res>,
tonic::Status,
>;
async fn users_all(
&self,
request: tonic::Request<super::cluster_user_manager::all::Req>,
) -> Result<
tonic::Response<super::cluster_user_manager::all::Res>,
tonic::Status,
>;
async fn user_password(
&self,
request: tonic::Request<super::cluster_user::password::Req>,
) -> Result<tonic::Response<super::cluster_user::password::Res>, tonic::Status>;
async fn user_token(
&self,
request: tonic::Request<super::cluster_user::token::Req>,
) -> Result<tonic::Response<super::cluster_user::token::Res>, tonic::Status>;
async fn user_delete(
&self,
request: tonic::Request<super::cluster_user::delete::Req>,
) -> Result<tonic::Response<super::cluster_user::delete::Res>, tonic::Status>;
async fn databases_get(
&self,
request: tonic::Request<super::cluster_database_manager::get::Req>,
) -> Result<
tonic::Response<super::cluster_database_manager::get::Res>,
tonic::Status,
>;
async fn databases_all(
&self,
request: tonic::Request<super::cluster_database_manager::all::Req>,
) -> Result<
tonic::Response<super::cluster_database_manager::all::Res>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct TypeDbClusterServer<T: TypeDbCluster> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: TypeDbCluster> TypeDbClusterServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
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
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for TypeDbClusterServer<T>
where
T: TypeDbCluster,
B: Body + Send + 'static,
B::Error: Into<StdError> + 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<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/typedb.protocol.TypeDBCluster/servers_all" => {
#[allow(non_camel_case_types)]
struct servers_allSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> 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 = self.0.clone();
let fut = async move { (*inner).servers_all(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/users_contains" => {
#[allow(non_camel_case_types)]
struct users_containsSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<
super::cluster_user_manager::contains::Req,
> for users_containsSvc<T> {
type Response = super::cluster_user_manager::contains::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::cluster_user_manager::contains::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).users_contains(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/users_create" => {
#[allow(non_camel_case_types)]
struct users_createSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<
super::cluster_user_manager::create::Req,
> for users_createSvc<T> {
type Response = super::cluster_user_manager::create::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::cluster_user_manager::create::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).users_create(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/users_all" => {
#[allow(non_camel_case_types)]
struct users_allSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<super::cluster_user_manager::all::Req>
for users_allSvc<T> {
type Response = super::cluster_user_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::cluster_user_manager::all::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).users_all(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/user_password" => {
#[allow(non_camel_case_types)]
struct user_passwordSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<super::cluster_user::password::Req>
for user_passwordSvc<T> {
type Response = super::cluster_user::password::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::cluster_user::password::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).user_password(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = user_passwordSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/user_token" => {
#[allow(non_camel_case_types)]
struct user_tokenSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<super::cluster_user::token::Req>
for user_tokenSvc<T> {
type Response = super::cluster_user::token::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::cluster_user::token::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).user_token(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = user_tokenSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/user_delete" => {
#[allow(non_camel_case_types)]
struct user_deleteSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<super::cluster_user::delete::Req>
for user_deleteSvc<T> {
type Response = super::cluster_user::delete::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::cluster_user::delete::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).user_delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = user_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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/databases_get" => {
#[allow(non_camel_case_types)]
struct databases_getSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<
super::cluster_database_manager::get::Req,
> for databases_getSvc<T> {
type Response = super::cluster_database_manager::get::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::cluster_database_manager::get::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).databases_get(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDBCluster/databases_all" => {
#[allow(non_camel_case_types)]
struct databases_allSvc<T: TypeDbCluster>(pub Arc<T>);
impl<
T: TypeDbCluster,
> tonic::server::UnaryService<
super::cluster_database_manager::all::Req,
> for databases_allSvc<T> {
type Response = super::cluster_database_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::cluster_database_manager::all::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).databases_all(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: TypeDbCluster> Clone for TypeDbClusterServer<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,
}
}
}
impl<T: TypeDbCluster> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: TypeDbCluster> tonic::server::NamedService for TypeDbClusterServer<T> {
const NAME: &'static str = "typedb.protocol.TypeDBCluster";
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptManager {
}
pub mod concept_manager {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof="req::Req", tags="1, 2, 3, 4, 5, 6")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="1")]
GetThingTypeReq(super::get_thing_type::Req),
#[prost(message, tag="2")]
GetThingReq(super::get_thing::Req),
#[prost(message, tag="3")]
PutEntityTypeReq(super::put_entity_type::Req),
#[prost(message, tag="4")]
PutAttributeTypeReq(super::put_attribute_type::Req),
#[prost(message, tag="5")]
PutRelationTypeReq(super::put_relation_type::Req),
#[prost(message, tag="6")]
GetSchemaExceptionsReq(super::get_schema_exceptions::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1, 2, 3, 4, 5, 6")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
GetThingTypeRes(super::get_thing_type::Res),
#[prost(message, tag="2")]
GetThingRes(super::get_thing::Res),
#[prost(message, tag="3")]
PutEntityTypeRes(super::put_entity_type::Res),
#[prost(message, tag="4")]
PutAttributeTypeRes(super::put_attribute_type::Res),
#[prost(message, tag="5")]
PutRelationTypeRes(super::put_relation_type::Res),
#[prost(message, tag="6")]
GetSchemaExceptionsRes(super::get_schema_exceptions::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetThingType {
}
pub mod get_thing_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
ThingType(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetThing {
}
pub mod get_thing {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes="vec", tag="1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
Thing(super::super::super::Thing),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutEntityType {
}
pub mod put_entity_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub entity_type: ::core::option::Option<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutAttributeType {
}
pub mod put_attribute_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(enumeration="super::super::attribute_type::ValueType", tag="2")]
pub value_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub attribute_type: ::core::option::Option<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutRelationType {
}
pub mod put_relation_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub relation_type: ::core::option::Option<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSchemaExceptions {
}
pub mod get_schema_exceptions {
#[derive(Clone, 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::super::Exceptions>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Exceptions {
#[prost(string, tag="1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Concept {
#[prost(oneof="concept::Concept", tags="1, 2")]
pub concept: ::core::option::Option<concept::Concept>,
}
pub mod concept {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Concept {
#[prost(message, tag="1")]
Thing(super::Thing),
#[prost(message, tag="2")]
Type(super::Type),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thing {
#[prost(bytes="vec", tag="1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="2")]
pub r#type: ::core::option::Option<Type>,
#[prost(message, optional, tag="3")]
pub value: ::core::option::Option<attribute::Value>,
#[prost(bool, tag="4")]
pub inferred: bool,
}
pub mod thing {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes="vec", tag="1")]
pub iid: ::prost::alloc::vec::Vec<u8>,
#[prost(oneof="req::Req", tags="100, 101, 102, 103, 104, 105, 106, 200, 201, 202, 203, 204, 300")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="100")]
ThingDeleteReq(super::delete::Req),
#[prost(message, tag="101")]
ThingGetTypeReq(super::get_type::Req),
#[prost(message, tag="102")]
ThingGetHasReq(super::get_has::Req),
#[prost(message, tag="103")]
ThingSetHasReq(super::set_has::Req),
#[prost(message, tag="104")]
ThingUnsetHasReq(super::unset_has::Req),
#[prost(message, tag="105")]
ThingGetRelationsReq(super::get_relations::Req),
#[prost(message, tag="106")]
ThingGetPlayingReq(super::get_playing::Req),
#[prost(message, tag="200")]
RelationAddPlayerReq(super::super::relation::add_player::Req),
#[prost(message, tag="201")]
RelationRemovePlayerReq(super::super::relation::remove_player::Req),
#[prost(message, tag="202")]
RelationGetPlayersReq(super::super::relation::get_players::Req),
#[prost(message, tag="203")]
RelationGetPlayersByRoleTypeReq(super::super::relation::get_players_by_role_type::Req),
#[prost(message, tag="204")]
RelationGetRelatingReq(super::super::relation::get_relating::Req),
#[prost(message, tag="300")]
AttributeGetOwnersReq(super::super::attribute::get_owners::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="100, 101, 102, 103, 200, 201")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
ThingDeleteRes(super::delete::Res),
#[prost(message, tag="101")]
ThingGetTypeRes(super::get_type::Res),
#[prost(message, tag="102")]
ThingSetHasRes(super::set_has::Res),
#[prost(message, tag="103")]
ThingUnsetHasRes(super::unset_has::Res),
#[prost(message, tag="200")]
RelationAddPlayerRes(super::super::relation::add_player::Res),
#[prost(message, tag="201")]
RelationRemovePlayerRes(super::super::relation::remove_player::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(oneof="res_part::Res", tags="100, 101, 102, 200, 201, 202, 300")]
pub res: ::core::option::Option<res_part::Res>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
ThingGetHasResPart(super::get_has::ResPart),
#[prost(message, tag="101")]
ThingGetRelationsResPart(super::get_relations::ResPart),
#[prost(message, tag="102")]
ThingGetPlayingResPart(super::get_playing::ResPart),
#[prost(message, tag="200")]
RelationGetPlayersResPart(super::super::relation::get_players::ResPart),
#[prost(message, tag="201")]
RelationGetPlayersByRoleTypeResPart(super::super::relation::get_players_by_role_type::ResPart),
#[prost(message, tag="202")]
RelationGetRelatingResPart(super::super::relation::get_relating::ResPart),
#[prost(message, tag="300")]
AttributeGetOwnersResPart(super::super::attribute::get_owners::ResPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetType {
}
pub mod get_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub thing_type: ::core::option::Option<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetHas {
}
pub mod set_has {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub attribute: ::core::option::Option<super::super::Thing>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsetHas {
}
pub mod unset_has {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub attribute: ::core::option::Option<super::super::Thing>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHas {
}
pub mod get_has {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, repeated, tag="1")]
pub attribute_types: ::prost::alloc::vec::Vec<super::super::Type>,
#[prost(bool, tag="2")]
pub keys_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub attributes: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaying {
}
pub mod get_playing {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelations {
}
pub mod get_relations {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub relations: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relation {
}
pub mod relation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddPlayer {
}
pub mod add_player {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
#[prost(message, optional, tag="2")]
pub player: ::core::option::Option<super::super::Thing>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemovePlayer {
}
pub mod remove_player {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
#[prost(message, optional, tag="2")]
pub player: ::core::option::Option<super::super::Thing>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayers {
}
pub mod get_players {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayersByRoleType {
}
pub mod get_players_by_role_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleTypeWithPlayer {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
#[prost(message, optional, tag="2")]
pub player: ::core::option::Option<super::super::Thing>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types_with_players: ::prost::alloc::vec::Vec<RoleTypeWithPlayer>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelating {
}
pub mod get_relating {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attribute {
}
pub mod attribute {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(oneof="value::Value", tags="1, 2, 3, 4, 5")]
pub value: ::core::option::Option<value::Value>,
}
pub mod 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")]
Long(i64),
#[prost(double, tag="4")]
Double(f64),
#[prost(int64, tag="5")]
DateTime(i64),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwners {
}
pub mod get_owners {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof="req::Filter", tags="1")]
pub filter: ::core::option::Option<req::Filter>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(message, tag="1")]
ThingType(super::super::super::Type),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Type {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub scope: ::prost::alloc::string::String,
#[prost(enumeration="r#type::Encoding", tag="3")]
pub encoding: i32,
#[prost(enumeration="attribute_type::ValueType", tag="4")]
pub value_type: i32,
#[prost(bool, tag="5")]
pub is_root: bool,
#[prost(bool, tag="6")]
pub is_abstract: bool,
}
pub mod r#type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub scope: ::prost::alloc::string::String,
#[prost(oneof="req::Req", tags="100, 101, 103, 104, 105, 106, 107, 200, 201, 206, 202, 203, 204, 205, 300, 309, 301, 302, 303, 310, 311, 304, 305, 306, 312, 313, 307, 308, 314, 400, 500, 502, 505, 501, 506, 503, 504, 600, 601, 602, 603, 604, 605")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="100")]
TypeDeleteReq(super::delete::Req),
#[prost(message, tag="101")]
TypeSetLabelReq(super::set_label::Req),
#[prost(message, tag="103")]
TypeGetSupertypeReq(super::get_supertype::Req),
#[prost(message, tag="104")]
TypeSetSupertypeReq(super::set_supertype::Req),
#[prost(message, tag="105")]
TypeGetSupertypesReq(super::get_supertypes::Req),
#[prost(message, tag="106")]
TypeGetSubtypesReq(super::get_subtypes::Req),
#[prost(message, tag="107")]
TypeGetSubtypesExplicitReq(super::get_subtypes_explicit::Req),
#[prost(message, tag="200")]
RoleTypeGetRelationTypesReq(super::super::role_type::get_relation_types::Req),
#[prost(message, tag="201")]
RoleTypeGetPlayerTypesReq(super::super::role_type::get_player_types::Req),
#[prost(message, tag="206")]
RoleTypeGetPlayerTypesExplicitReq(super::super::role_type::get_player_types_explicit::Req),
#[prost(message, tag="202")]
RoleTypeGetRelationInstancesReq(super::super::role_type::get_relation_instances::Req),
#[prost(message, tag="203")]
RoleTypeGetRelationInstancesExplicitReq(super::super::role_type::get_relation_instances_explicit::Req),
#[prost(message, tag="204")]
RoleTypeGetPlayerInstancesReq(super::super::role_type::get_player_instances::Req),
#[prost(message, tag="205")]
RoleTypeGetPlayerInstancesExplicitReq(super::super::role_type::get_player_instances_explicit::Req),
#[prost(message, tag="300")]
ThingTypeGetInstancesReq(super::super::thing_type::get_instances::Req),
#[prost(message, tag="309")]
ThingTypeGetInstancesExplicitReq(super::super::thing_type::get_instances_explicit::Req),
#[prost(message, tag="301")]
ThingTypeSetAbstractReq(super::super::thing_type::set_abstract::Req),
#[prost(message, tag="302")]
ThingTypeUnsetAbstractReq(super::super::thing_type::unset_abstract::Req),
#[prost(message, tag="303")]
ThingTypeGetOwnsReq(super::super::thing_type::get_owns::Req),
#[prost(message, tag="310")]
ThingTypeGetOwnsExplicitReq(super::super::thing_type::get_owns_explicit::Req),
#[prost(message, tag="311")]
ThingTypeGetOwnsOverriddenReq(super::super::thing_type::get_owns_overridden::Req),
#[prost(message, tag="304")]
ThingTypeSetOwnsReq(super::super::thing_type::set_owns::Req),
#[prost(message, tag="305")]
ThingTypeUnsetOwnsReq(super::super::thing_type::unset_owns::Req),
#[prost(message, tag="306")]
ThingTypeGetPlaysReq(super::super::thing_type::get_plays::Req),
#[prost(message, tag="312")]
ThingTypeGetPlaysExplicitReq(super::super::thing_type::get_plays_explicit::Req),
#[prost(message, tag="313")]
ThingTypeGetPlaysOverriddenReq(super::super::thing_type::get_plays_overridden::Req),
#[prost(message, tag="307")]
ThingTypeSetPlaysReq(super::super::thing_type::set_plays::Req),
#[prost(message, tag="308")]
ThingTypeUnsetPlaysReq(super::super::thing_type::unset_plays::Req),
#[prost(message, tag="314")]
ThingTypeGetSyntaxReq(super::super::thing_type::get_syntax::Req),
#[prost(message, tag="400")]
EntityTypeCreateReq(super::super::entity_type::create::Req),
#[prost(message, tag="500")]
RelationTypeCreateReq(super::super::relation_type::create::Req),
#[prost(message, tag="502")]
RelationTypeGetRelatesReq(super::super::relation_type::get_relates::Req),
#[prost(message, tag="505")]
RelationTypeGetRelatesExplicitReq(super::super::relation_type::get_relates_explicit::Req),
#[prost(message, tag="501")]
RelationTypeGetRelatesForRoleLabelReq(super::super::relation_type::get_relates_for_role_label::Req),
#[prost(message, tag="506")]
RelationTypeGetRelatesOverriddenReq(super::super::relation_type::get_relates_overridden::Req),
#[prost(message, tag="503")]
RelationTypeSetRelatesReq(super::super::relation_type::set_relates::Req),
#[prost(message, tag="504")]
RelationTypeUnsetRelatesReq(super::super::relation_type::unset_relates::Req),
#[prost(message, tag="600")]
AttributeTypePutReq(super::super::attribute_type::put::Req),
#[prost(message, tag="601")]
AttributeTypeGetReq(super::super::attribute_type::get::Req),
#[prost(message, tag="602")]
AttributeTypeGetRegexReq(super::super::attribute_type::get_regex::Req),
#[prost(message, tag="603")]
AttributeTypeSetRegexReq(super::super::attribute_type::set_regex::Req),
#[prost(message, tag="604")]
AttributeTypeGetOwnersReq(super::super::attribute_type::get_owners::Req),
#[prost(message, tag="605")]
AttributeTypeGetOwnersExplicitReq(super::super::attribute_type::get_owners_explicit::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="100, 101, 103, 104, 300, 301, 306, 302, 303, 307, 304, 305, 308, 400, 500, 501, 504, 502, 503, 600, 601, 602, 603")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
TypeDeleteRes(super::delete::Res),
#[prost(message, tag="101")]
TypeSetLabelRes(super::set_label::Res),
#[prost(message, tag="103")]
TypeGetSupertypeRes(super::get_supertype::Res),
#[prost(message, tag="104")]
TypeSetSupertypeRes(super::set_supertype::Res),
#[prost(message, tag="300")]
ThingTypeSetAbstractRes(super::super::thing_type::set_abstract::Res),
#[prost(message, tag="301")]
ThingTypeUnsetAbstractRes(super::super::thing_type::unset_abstract::Res),
#[prost(message, tag="306")]
ThingTypeGetOwnsOverriddenRes(super::super::thing_type::get_owns_overridden::Res),
#[prost(message, tag="302")]
ThingTypeSetOwnsRes(super::super::thing_type::set_owns::Res),
#[prost(message, tag="303")]
ThingTypeUnsetOwnsRes(super::super::thing_type::unset_owns::Res),
#[prost(message, tag="307")]
ThingTypeGetPlaysOverriddenRes(super::super::thing_type::get_plays_overridden::Res),
#[prost(message, tag="304")]
ThingTypeSetPlaysRes(super::super::thing_type::set_plays::Res),
#[prost(message, tag="305")]
ThingTypeUnsetPlaysRes(super::super::thing_type::unset_plays::Res),
#[prost(message, tag="308")]
ThingTypeGetSyntaxRes(super::super::thing_type::get_syntax::Res),
#[prost(message, tag="400")]
EntityTypeCreateRes(super::super::entity_type::create::Res),
#[prost(message, tag="500")]
RelationTypeCreateRes(super::super::relation_type::create::Res),
#[prost(message, tag="501")]
RelationTypeGetRelatesForRoleLabelRes(super::super::relation_type::get_relates_for_role_label::Res),
#[prost(message, tag="504")]
RelationTypeGetRelatesOverriddenRes(super::super::relation_type::get_relates_overridden::Res),
#[prost(message, tag="502")]
RelationTypeSetRelatesRes(super::super::relation_type::set_relates::Res),
#[prost(message, tag="503")]
RelationTypeUnsetRelatesRes(super::super::relation_type::unset_relates::Res),
#[prost(message, tag="600")]
AttributeTypePutRes(super::super::attribute_type::put::Res),
#[prost(message, tag="601")]
AttributeTypeGetRes(super::super::attribute_type::get::Res),
#[prost(message, tag="602")]
AttributeTypeGetRegexRes(super::super::attribute_type::get_regex::Res),
#[prost(message, tag="603")]
AttributeTypeSetRegexRes(super::super::attribute_type::set_regex::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(oneof="res_part::Res", tags="100, 101, 102, 200, 201, 206, 202, 203, 204, 205, 300, 303, 301, 304, 302, 305, 500, 501, 600, 601")]
pub res: ::core::option::Option<res_part::Res>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
TypeGetSupertypesResPart(super::get_supertypes::ResPart),
#[prost(message, tag="101")]
TypeGetSubtypesResPart(super::get_subtypes::ResPart),
#[prost(message, tag="102")]
TypeGetSubtypesExplicitResPart(super::get_subtypes_explicit::ResPart),
#[prost(message, tag="200")]
RoleTypeGetRelationTypesResPart(super::super::role_type::get_relation_types::ResPart),
#[prost(message, tag="201")]
RoleTypeGetPlayerTypesResPart(super::super::role_type::get_player_types::ResPart),
#[prost(message, tag="206")]
RoleTypeGetPlayerTypesExplicitResPart(super::super::role_type::get_player_types_explicit::ResPart),
#[prost(message, tag="202")]
RoleTypeGetRelationInstancesResPart(super::super::role_type::get_relation_instances::ResPart),
#[prost(message, tag="203")]
RoleTypeGetRelationInstancesExplicitResPart(super::super::role_type::get_relation_instances_explicit::ResPart),
#[prost(message, tag="204")]
RoleTypeGetPlayerInstancesResPart(super::super::role_type::get_player_instances::ResPart),
#[prost(message, tag="205")]
RoleTypeGetPlayerInstancesExplicitResPart(super::super::role_type::get_player_instances_explicit::ResPart),
#[prost(message, tag="300")]
ThingTypeGetInstancesResPart(super::super::thing_type::get_instances::ResPart),
#[prost(message, tag="303")]
ThingTypeGetInstancesExplicitResPart(super::super::thing_type::get_instances_explicit::ResPart),
#[prost(message, tag="301")]
ThingTypeGetOwnsResPart(super::super::thing_type::get_owns::ResPart),
#[prost(message, tag="304")]
ThingTypeGetOwnsExplicitResPart(super::super::thing_type::get_owns_explicit::ResPart),
#[prost(message, tag="302")]
ThingTypeGetPlaysResPart(super::super::thing_type::get_plays::ResPart),
#[prost(message, tag="305")]
ThingTypeGetPlaysExplicitResPart(super::super::thing_type::get_plays_explicit::ResPart),
#[prost(message, tag="500")]
RelationTypeGetRelatesResPart(super::super::relation_type::get_relates::ResPart),
#[prost(message, tag="501")]
RelationTypeGetRelatesExplicitResPart(super::super::relation_type::get_relates_explicit::ResPart),
#[prost(message, tag="600")]
AttributeTypeGetOwnersResPart(super::super::attribute_type::get_owners::ResPart),
#[prost(message, tag="601")]
AttributeTypeGetOwnersExplicitResPart(super::super::attribute_type::get_owners_explicit::ResPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetLabel {
}
pub mod set_label {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSupertype {
}
pub mod get_supertype {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
Type(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetSupertype {
}
pub mod set_supertype {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub r#type: ::core::option::Option<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSupertypes {
}
pub mod get_supertypes {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSubtypes {
}
pub mod get_subtypes {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSubtypesExplicit {
}
pub mod get_subtypes_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Encoding {
ThingType = 0,
EntityType = 1,
RelationType = 2,
AttributeType = 3,
RoleType = 4,
}
impl Encoding {
pub fn as_str_name(&self) -> &'static str {
match self {
Encoding::ThingType => "THING_TYPE",
Encoding::EntityType => "ENTITY_TYPE",
Encoding::RelationType => "RELATION_TYPE",
Encoding::AttributeType => "ATTRIBUTE_TYPE",
Encoding::RoleType => "ROLE_TYPE",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleType {
}
pub mod role_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelationTypes {
}
pub mod get_relation_types {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub relation_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayerTypes {
}
pub mod get_player_types {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub thing_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayerTypesExplicit {
}
pub mod get_player_types_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub thing_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelationInstances {
}
pub mod get_relation_instances {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub relations: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelationInstancesExplicit {
}
pub mod get_relation_instances_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub relations: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayerInstances {
}
pub mod get_player_instances {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlayerInstancesExplicit {
}
pub mod get_player_instances_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ThingType {
}
pub mod thing_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAbstract {
}
pub mod set_abstract {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsetAbstract {
}
pub mod unset_abstract {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstances {
}
pub mod get_instances {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstancesExplicit {
}
pub mod get_instances_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub things: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwns {
}
pub mod get_owns {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bool, tag="3")]
pub keys_only: bool,
#[prost(oneof="req::Filter", tags="1")]
pub filter: ::core::option::Option<req::Filter>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(enumeration="super::super::super::attribute_type::ValueType", tag="1")]
ValueType(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub attribute_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwnsExplicit {
}
pub mod get_owns_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bool, tag="3")]
pub keys_only: bool,
#[prost(oneof="req::Filter", tags="1")]
pub filter: ::core::option::Option<req::Filter>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(enumeration="super::super::super::attribute_type::ValueType", tag="1")]
ValueType(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub attribute_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwnsOverridden {
}
pub mod get_owns_overridden {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub attribute_type: ::core::option::Option<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
AttributeType(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetOwns {
}
pub mod set_owns {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub attribute_type: ::core::option::Option<super::super::Type>,
#[prost(bool, tag="3")]
pub is_key: bool,
#[prost(oneof="req::Overridden", tags="2")]
pub overridden: ::core::option::Option<req::Overridden>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Overridden {
#[prost(message, tag="2")]
OverriddenType(super::super::super::Type),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsetOwns {
}
pub mod unset_owns {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub attribute_type: ::core::option::Option<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlays {
}
pub mod get_plays {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaysExplicit {
}
pub mod get_plays_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaysOverridden {
}
pub mod get_plays_overridden {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
RoleType(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPlays {
}
pub mod set_plays {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
#[prost(oneof="req::Overridden", tags="2")]
pub overridden: ::core::option::Option<req::Overridden>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Overridden {
#[prost(message, tag="2")]
OverriddenType(super::super::super::Type),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsetPlays {
}
pub mod unset_plays {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub role_type: ::core::option::Option<super::super::Type>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSyntax {
}
pub mod get_syntax {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, tag="1")]
pub syntax: ::prost::alloc::string::String,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityType {
}
pub mod entity_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Create {
}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub entity: ::core::option::Option<super::super::Thing>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationType {
}
pub mod relation_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Create {
}
pub mod create {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub relation: ::core::option::Option<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelates {
}
pub mod get_relates {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelatesExplicit {
}
pub mod get_relates_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub role_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelatesForRoleLabel {
}
pub mod get_relates_for_role_label {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Role", tags="1")]
pub role: ::core::option::Option<res::Role>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Role {
#[prost(message, tag="1")]
RoleType(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRelatesOverridden {
}
pub mod get_relates_overridden {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
RoleType(super::super::super::Type),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetRelates {
}
pub mod set_relates {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(oneof="req::Overridden", tags="2")]
pub overridden: ::core::option::Option<req::Overridden>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Overridden {
#[prost(string, tag="2")]
OverriddenLabel(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsetRelates {
}
pub mod unset_relates {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttributeType {
}
pub mod attribute_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Put {
}
pub mod put {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub value: ::core::option::Option<super::super::attribute::Value>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub attribute: ::core::option::Option<super::super::Thing>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Get {
}
pub mod get {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub value: ::core::option::Option<super::super::attribute::Value>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
Attribute(super::super::super::Thing),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwners {
}
pub mod get_owners {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bool, tag="1")]
pub only_key: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub thing_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOwnersExplicit {
}
pub mod get_owners_explicit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bool, tag="1")]
pub only_key: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub thing_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRegex {
}
pub mod get_regex {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, tag="1")]
pub regex: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetRegex {
}
pub mod set_regex {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub regex: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSubtypes {
}
pub mod get_subtypes {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof="req::Req", tags="1")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(enumeration="super::super::ValueType", tag="1")]
ValueType(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub attribute_types: ::prost::alloc::vec::Vec<super::super::Type>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstances {
}
pub mod get_instances {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof="req::Req", tags="1")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(enumeration="super::super::ValueType", tag="1")]
ValueType(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub attributes: ::prost::alloc::vec::Vec<super::super::Thing>,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ValueType {
Object = 0,
Boolean = 1,
Long = 2,
Double = 3,
String = 4,
Datetime = 5,
}
impl ValueType {
pub fn as_str_name(&self) -> &'static str {
match self {
ValueType::Object => "OBJECT",
ValueType::Boolean => "BOOLEAN",
ValueType::Long => "LONG",
ValueType::Double => "DOUBLE",
ValueType::String => "STRING",
ValueType::Datetime => "DATETIME",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptMap {
#[prost(map="string, message", tag="1")]
pub map: ::std::collections::HashMap<::prost::alloc::string::String, Concept>,
#[prost(message, optional, tag="2")]
pub explainables: ::core::option::Option<Explainables>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Explainables {
#[prost(map="string, message", tag="1")]
pub relations: ::std::collections::HashMap<::prost::alloc::string::String, Explainable>,
#[prost(map="string, message", tag="2")]
pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, Explainable>,
#[prost(map="string, message", tag="3")]
pub ownerships: ::std::collections::HashMap<::prost::alloc::string::String, explainables::Owned>,
}
pub mod explainables {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Owned {
#[prost(map="string, message", tag="1")]
pub owned: ::std::collections::HashMap<::prost::alloc::string::String, super::Explainable>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Explainable {
#[prost(string, tag="1")]
pub conjunction: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConceptMapGroup {
#[prost(message, optional, tag="1")]
pub owner: ::core::option::Option<Concept>,
#[prost(message, repeated, tag="2")]
pub concept_maps: ::prost::alloc::vec::Vec<ConceptMap>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Numeric {
#[prost(oneof="numeric::Value", tags="1, 2, 3")]
pub value: ::core::option::Option<numeric::Value>,
}
pub mod numeric {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(int64, tag="1")]
LongValue(i64),
#[prost(double, tag="2")]
DoubleValue(f64),
#[prost(bool, tag="3")]
Nan(bool),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NumericGroup {
#[prost(message, optional, tag="1")]
pub owner: ::core::option::Option<Concept>,
#[prost(message, optional, tag="2")]
pub number: ::core::option::Option<Numeric>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogicManager {
}
pub mod logic_manager {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(oneof="req::Req", tags="1, 2, 3")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="1")]
GetRuleReq(super::get_rule::Req),
#[prost(message, tag="2")]
PutRuleReq(super::put_rule::Req),
#[prost(message, tag="3")]
GetRulesReq(super::get_rules::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1, 2")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
GetRuleRes(super::get_rule::Res),
#[prost(message, tag="2")]
PutRuleRes(super::put_rule::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, optional, tag="1")]
pub get_rules_res_part: ::core::option::Option<get_rules::ResPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRule {
}
pub mod get_rule {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="1")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="1")]
Rule(super::super::super::Rule),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutRule {
}
pub mod put_rule {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub when: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub then: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub rule: ::core::option::Option<super::super::Rule>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRules {
}
pub mod get_rules {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub rules: ::prost::alloc::vec::Vec<super::super::Rule>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rule {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub when: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub then: ::prost::alloc::string::String,
}
pub mod rule {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
#[prost(oneof="req::Req", tags="100, 101")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="100")]
RuleDeleteReq(super::delete::Req),
#[prost(message, tag="101")]
RuleSetLabelReq(super::set_label::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="100, 101")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
RuleDeleteRes(super::delete::Res),
#[prost(message, tag="101")]
RuleSetLabelRes(super::set_label::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetLabel {
}
pub mod set_label {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub label: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Explanation {
#[prost(message, optional, tag="1")]
pub rule: ::core::option::Option<Rule>,
#[prost(map="string, message", tag="2")]
pub var_mapping: ::std::collections::HashMap<::prost::alloc::string::String, explanation::VarList>,
#[prost(message, optional, tag="3")]
pub condition: ::core::option::Option<ConceptMap>,
#[prost(message, optional, tag="4")]
pub conclusion: ::core::option::Option<ConceptMap>,
}
pub mod explanation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VarList {
#[prost(string, repeated, tag="1")]
pub vars: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Options {
#[prost(oneof="options::InferOpt", tags="1")]
pub infer_opt: ::core::option::Option<options::InferOpt>,
#[prost(oneof="options::TraceInferenceOpt", tags="2")]
pub trace_inference_opt: ::core::option::Option<options::TraceInferenceOpt>,
#[prost(oneof="options::ExplainOpt", tags="3")]
pub explain_opt: ::core::option::Option<options::ExplainOpt>,
#[prost(oneof="options::ParallelOpt", tags="4")]
pub parallel_opt: ::core::option::Option<options::ParallelOpt>,
#[prost(oneof="options::PrefetchSizeOpt", tags="5")]
pub prefetch_size_opt: ::core::option::Option<options::PrefetchSizeOpt>,
#[prost(oneof="options::PrefetchOpt", tags="6")]
pub prefetch_opt: ::core::option::Option<options::PrefetchOpt>,
#[prost(oneof="options::SessionIdleTimeoutOpt", tags="7")]
pub session_idle_timeout_opt: ::core::option::Option<options::SessionIdleTimeoutOpt>,
#[prost(oneof="options::TransactionTimeoutOpt", tags="8")]
pub transaction_timeout_opt: ::core::option::Option<options::TransactionTimeoutOpt>,
#[prost(oneof="options::SchemaLockAcquireTimeoutOpt", tags="9")]
pub schema_lock_acquire_timeout_opt: ::core::option::Option<options::SchemaLockAcquireTimeoutOpt>,
#[prost(oneof="options::ReadAnyReplicaOpt", tags="10")]
pub read_any_replica_opt: ::core::option::Option<options::ReadAnyReplicaOpt>,
}
pub mod options {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum InferOpt {
#[prost(bool, tag="1")]
Infer(bool),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TraceInferenceOpt {
#[prost(bool, tag="2")]
TraceInference(bool),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ExplainOpt {
#[prost(bool, tag="3")]
Explain(bool),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParallelOpt {
#[prost(bool, tag="4")]
Parallel(bool),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PrefetchSizeOpt {
#[prost(int32, tag="5")]
PrefetchSize(i32),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PrefetchOpt {
#[prost(bool, tag="6")]
Prefetch(bool),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SessionIdleTimeoutOpt {
#[prost(int32, tag="7")]
SessionIdleTimeoutMillis(i32),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TransactionTimeoutOpt {
#[prost(int32, tag="8")]
TransactionTimeoutMillis(i32),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SchemaLockAcquireTimeoutOpt {
#[prost(int32, tag="9")]
SchemaLockAcquireTimeoutMillis(i32),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReadAnyReplicaOpt {
#[prost(bool, tag="10")]
ReadAnyReplica(bool),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryManager {
}
pub mod query_manager {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(message, optional, tag="1")]
pub options: ::core::option::Option<super::Options>,
#[prost(oneof="req::Req", tags="100, 101, 102, 103, 104, 105, 106, 107, 108, 109")]
pub req: ::core::option::Option<req::Req>,
}
pub mod req {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Req {
#[prost(message, tag="100")]
DefineReq(super::define::Req),
#[prost(message, tag="101")]
UndefineReq(super::undefine::Req),
#[prost(message, tag="102")]
MatchReq(super::r#match::Req),
#[prost(message, tag="103")]
MatchAggregateReq(super::match_aggregate::Req),
#[prost(message, tag="104")]
MatchGroupReq(super::match_group::Req),
#[prost(message, tag="105")]
MatchGroupAggregateReq(super::match_group_aggregate::Req),
#[prost(message, tag="106")]
InsertReq(super::insert::Req),
#[prost(message, tag="107")]
DeleteReq(super::delete::Req),
#[prost(message, tag="108")]
UpdateReq(super::update::Req),
#[prost(message, tag="109")]
ExplainReq(super::explain::Req),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(oneof="res::Res", tags="100, 101, 102, 104")]
pub res: ::core::option::Option<res::Res>,
}
pub mod res {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
DefineRes(super::define::Res),
#[prost(message, tag="101")]
UndefineRes(super::undefine::Res),
#[prost(message, tag="102")]
MatchAggregateRes(super::match_aggregate::Res),
#[prost(message, tag="104")]
DeleteRes(super::delete::Res),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(oneof="res_part::Res", tags="100, 101, 102, 103, 104, 105")]
pub res: ::core::option::Option<res_part::Res>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="100")]
MatchResPart(super::r#match::ResPart),
#[prost(message, tag="101")]
MatchGroupResPart(super::match_group::ResPart),
#[prost(message, tag="102")]
MatchGroupAggregateResPart(super::match_group_aggregate::ResPart),
#[prost(message, tag="103")]
InsertResPart(super::insert::ResPart),
#[prost(message, tag="104")]
UpdateResPart(super::update::ResPart),
#[prost(message, tag="105")]
ExplainResPart(super::explain::ResPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Match {
}
pub mod r#match {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub answers: ::prost::alloc::vec::Vec<super::super::ConceptMap>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatchAggregate {
}
pub mod match_aggregate {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(message, optional, tag="1")]
pub answer: ::core::option::Option<super::super::Numeric>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatchGroup {
}
pub mod match_group {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub answers: ::prost::alloc::vec::Vec<super::super::ConceptMapGroup>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MatchGroupAggregate {
}
pub mod match_group_aggregate {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub answers: ::prost::alloc::vec::Vec<super::super::NumericGroup>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Explain {
}
pub mod explain {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(int64, tag="1")]
pub explainable_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub explanations: ::prost::alloc::vec::Vec<super::super::Explanation>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Insert {
}
pub mod insert {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub answers: ::prost::alloc::vec::Vec<super::super::ConceptMap>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
}
pub mod delete {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Update {
}
pub mod update {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(message, repeated, tag="1")]
pub answers: ::prost::alloc::vec::Vec<super::super::ConceptMap>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Define {
}
pub mod define {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Undefine {
}
pub mod undefine {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(string, tag="1")]
pub query: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Session {
}
pub mod session {
#[derive(Clone, 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>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bytes="vec", tag="1")]
pub session_id: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, tag="2")]
pub server_duration_millis: i32,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Close {
}
pub mod close {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes="vec", tag="1")]
pub session_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pulse {
}
pub mod pulse {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes="vec", tag="1")]
pub session_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bool, tag="1")]
pub alive: bool,
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
Data = 0,
Schema = 1,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Data => "DATA",
Type::Schema => "SCHEMA",
}
}
}
}
#[derive(Clone, 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="2, 3")]
pub server: ::core::option::Option<server::Server>,
}
pub mod server {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Server {
#[prost(message, tag="2")]
Res(super::Res),
#[prost(message, tag="3")]
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, 10, 11, 12")]
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")]
StreamReq(super::stream::Req),
#[prost(message, tag="5")]
CommitReq(super::commit::Req),
#[prost(message, tag="6")]
RollbackReq(super::rollback::Req),
#[prost(message, tag="7")]
QueryManagerReq(super::super::query_manager::Req),
#[prost(message, tag="8")]
ConceptManagerReq(super::super::concept_manager::Req),
#[prost(message, tag="9")]
LogicManagerReq(super::super::logic_manager::Req),
#[prost(message, tag="10")]
RuleReq(super::super::rule::Req),
#[prost(message, tag="11")]
TypeReq(super::super::r#type::Req),
#[prost(message, tag="12")]
ThingReq(super::super::thing::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, 4, 5, 6, 7, 8, 9, 10")]
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")]
CommitRes(super::commit::Res),
#[prost(message, tag="4")]
RollbackRes(super::rollback::Res),
#[prost(message, tag="5")]
QueryManagerRes(super::super::query_manager::Res),
#[prost(message, tag="6")]
ConceptManagerRes(super::super::concept_manager::Res),
#[prost(message, tag="7")]
LogicManagerRes(super::super::logic_manager::Res),
#[prost(message, tag="8")]
RuleRes(super::super::rule::Res),
#[prost(message, tag="9")]
TypeRes(super::super::r#type::Res),
#[prost(message, tag="10")]
ThingRes(super::super::thing::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::Res", tags="2, 3, 4, 5, 6")]
pub res: ::core::option::Option<res_part::Res>,
}
pub mod res_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Res {
#[prost(message, tag="2")]
StreamResPart(super::stream::ResPart),
#[prost(message, tag="3")]
QueryManagerResPart(super::super::query_manager::ResPart),
#[prost(message, tag="4")]
LogicManagerResPart(super::super::logic_manager::ResPart),
#[prost(message, tag="5")]
TypeResPart(super::super::r#type::ResPart),
#[prost(message, tag="6")]
ThingResPart(super::super::thing::ResPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Open {
}
pub mod open {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
#[prost(bytes="vec", tag="1")]
pub session_id: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration="super::Type", tag="2")]
pub r#type: i32,
#[prost(message, optional, tag="3")]
pub options: ::core::option::Option<super::super::Options>,
#[prost(int32, tag="4")]
pub network_latency_millis: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Stream {
}
pub mod stream {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResPart {
#[prost(enumeration="State", tag="1")]
pub state: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
Continue = 0,
Done = 1,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Continue => "CONTINUE",
State::Done => "DONE",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Commit {
}
pub mod commit {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rollback {
}
pub mod rollback {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
Read = 0,
Write = 1,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Read => "READ",
Type::Write => "WRITE",
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoreDatabaseManager {
}
pub mod core_database_manager {
#[derive(Clone, 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, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(bool, tag="1")]
pub contains: bool,
}
}
#[derive(Clone, 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 {
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {
}
pub mod all {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Req {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Res {
#[prost(string, repeated, tag="1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoreDatabase {
}
pub mod core_database {
#[derive(Clone, 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, 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, PartialEq, ::prost::Message)]
pub struct RuleSchema {
}
pub mod rule_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, 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, PartialEq, ::prost::Message)]
pub struct Res {
}
}
}
pub mod type_db_client {
#![allow(unused_variables, dead_code, missing_docs, 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: std::convert::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> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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> + Send + 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
}
pub async fn databases_contains(
&mut self,
request: impl tonic::IntoRequest<super::core_database_manager::contains::Req>,
) -> Result<
tonic::Response<super::core_database_manager::contains::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn databases_create(
&mut self,
request: impl tonic::IntoRequest<super::core_database_manager::create::Req>,
) -> Result<
tonic::Response<super::core_database_manager::create::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn databases_all(
&mut self,
request: impl tonic::IntoRequest<super::core_database_manager::all::Req>,
) -> Result<
tonic::Response<super::core_database_manager::all::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn database_schema(
&mut self,
request: impl tonic::IntoRequest<super::core_database::schema::Req>,
) -> Result<tonic::Response<super::core_database::schema::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn database_type_schema(
&mut self,
request: impl tonic::IntoRequest<super::core_database::type_schema::Req>,
) -> Result<
tonic::Response<super::core_database::type_schema::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn database_rule_schema(
&mut self,
request: impl tonic::IntoRequest<super::core_database::rule_schema::Req>,
) -> Result<
tonic::Response<super::core_database::rule_schema::Res>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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_rule_schema",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn database_delete(
&mut self,
request: impl tonic::IntoRequest<super::core_database::delete::Req>,
) -> Result<tonic::Response<super::core_database::delete::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn session_open(
&mut self,
request: impl tonic::IntoRequest<super::session::open::Req>,
) -> Result<tonic::Response<super::session::open::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/session_open",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn session_close(
&mut self,
request: impl tonic::IntoRequest<super::session::close::Req>,
) -> Result<tonic::Response<super::session::close::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/session_close",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn session_pulse(
&mut self,
request: impl tonic::IntoRequest<super::session::pulse::Req>,
) -> Result<tonic::Response<super::session::pulse::Res>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/typedb.protocol.TypeDB/session_pulse",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn transaction(
&mut self,
request: impl tonic::IntoStreamingRequest<
Message = super::transaction::Client,
>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::transaction::Server>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::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",
);
self.inner.streaming(request.into_streaming_request(), path, codec).await
}
}
}
pub mod type_db_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait TypeDb: Send + Sync + 'static {
async fn databases_contains(
&self,
request: tonic::Request<super::core_database_manager::contains::Req>,
) -> Result<
tonic::Response<super::core_database_manager::contains::Res>,
tonic::Status,
>;
async fn databases_create(
&self,
request: tonic::Request<super::core_database_manager::create::Req>,
) -> Result<
tonic::Response<super::core_database_manager::create::Res>,
tonic::Status,
>;
async fn databases_all(
&self,
request: tonic::Request<super::core_database_manager::all::Req>,
) -> Result<
tonic::Response<super::core_database_manager::all::Res>,
tonic::Status,
>;
async fn database_schema(
&self,
request: tonic::Request<super::core_database::schema::Req>,
) -> Result<tonic::Response<super::core_database::schema::Res>, tonic::Status>;
async fn database_type_schema(
&self,
request: tonic::Request<super::core_database::type_schema::Req>,
) -> Result<
tonic::Response<super::core_database::type_schema::Res>,
tonic::Status,
>;
async fn database_rule_schema(
&self,
request: tonic::Request<super::core_database::rule_schema::Req>,
) -> Result<
tonic::Response<super::core_database::rule_schema::Res>,
tonic::Status,
>;
async fn database_delete(
&self,
request: tonic::Request<super::core_database::delete::Req>,
) -> Result<tonic::Response<super::core_database::delete::Res>, tonic::Status>;
async fn session_open(
&self,
request: tonic::Request<super::session::open::Req>,
) -> Result<tonic::Response<super::session::open::Res>, tonic::Status>;
async fn session_close(
&self,
request: tonic::Request<super::session::close::Req>,
) -> Result<tonic::Response<super::session::close::Res>, tonic::Status>;
async fn session_pulse(
&self,
request: tonic::Request<super::session::pulse::Req>,
) -> Result<tonic::Response<super::session::pulse::Res>, tonic::Status>;
type transactionStream: futures_core::Stream<
Item = Result<super::transaction::Server, tonic::Status>,
>
+ Send
+ 'static;
async fn transaction(
&self,
request: tonic::Request<tonic::Streaming<super::transaction::Client>>,
) -> Result<tonic::Response<Self::transactionStream>, tonic::Status>;
}
#[derive(Debug)]
pub struct TypeDbServer<T: TypeDb> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: TypeDb> TypeDbServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
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
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for TypeDbServer<T>
where
T: TypeDb,
B: Body + Send + 'static,
B::Error: Into<StdError> + 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<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/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::core_database_manager::contains::Req,
> for databases_containsSvc<T> {
type Response = super::core_database_manager::contains::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::core_database_manager::contains::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).databases_contains(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
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::core_database_manager::create::Req,
> for databases_createSvc<T> {
type Response = super::core_database_manager::create::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::core_database_manager::create::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).databases_create(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
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::core_database_manager::all::Req>
for databases_allSvc<T> {
type Response = super::core_database_manager::all::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::core_database_manager::all::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).databases_all(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(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::core_database::schema::Req>
for database_schemaSvc<T> {
type Response = super::core_database::schema::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::core_database::schema::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).database_schema(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
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::core_database::type_schema::Req>
for database_type_schemaSvc<T> {
type Response = super::core_database::type_schema::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::core_database::type_schema::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).database_type_schema(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/database_rule_schema" => {
#[allow(non_camel_case_types)]
struct database_rule_schemaSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::core_database::rule_schema::Req>
for database_rule_schemaSvc<T> {
type Response = super::core_database::rule_schema::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::core_database::rule_schema::Req,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).database_rule_schema(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = database_rule_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,
);
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::core_database::delete::Req>
for database_deleteSvc<T> {
type Response = super::core_database::delete::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::core_database::delete::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).database_delete(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/session_open" => {
#[allow(non_camel_case_types)]
struct session_openSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::session::open::Req>
for session_openSvc<T> {
type Response = super::session::open::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::session::open::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).session_open(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = session_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,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/session_close" => {
#[allow(non_camel_case_types)]
struct session_closeSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::session::close::Req>
for session_closeSvc<T> {
type Response = super::session::close::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::session::close::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).session_close(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = session_closeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/typedb.protocol.TypeDB/session_pulse" => {
#[allow(non_camel_case_types)]
struct session_pulseSvc<T: TypeDb>(pub Arc<T>);
impl<
T: TypeDb,
> tonic::server::UnaryService<super::session::pulse::Req>
for session_pulseSvc<T> {
type Response = super::session::pulse::Res;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::session::pulse::Req>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).session_pulse(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = session_pulseSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(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 = self.0.clone();
let fut = async move { (*inner).transaction(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
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,
);
let res = grpc.streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: TypeDb> 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,
}
}
}
impl<T: TypeDb> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: TypeDb> tonic::server::NamedService for TypeDbServer<T> {
const NAME: &'static str = "typedb.protocol.TypeDB";
}
}