diff --git a/libs/rpc/admin/generated/admin.rs b/libs/rpc/admin/generated/admin.rs index 753748d..2162811 100644 --- a/libs/rpc/admin/generated/admin.rs +++ b/libs/rpc/admin/generated/admin.rs @@ -152,6 +152,113 @@ pub struct ExportMetricsCsvResponse { #[prost(string, tag = "1")] pub csv: ::prost::alloc::string::String, } +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SyncModelsRequest {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct SyncModelsResponse { + /// Serialized SyncModelsResponse JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CheckAlertsRequest {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CheckAlertsResponse { + /// Serialized CheckAlertsResponse JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateProviderRequest { + /// Serialized AdminCreateProvider JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UpdateProviderRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// Serialized AdminUpdateProvider JSON + #[prost(string, tag = "2")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteProviderRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ProviderResponse { + /// Serialized response JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateModelRequest { + /// Serialized AdminCreateModel JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UpdateModelRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// Serialized AdminUpdateModel JSON + #[prost(string, tag = "2")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteModelRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ModelResponse { + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateVersionRequest { + /// Serialized AdminCreateVersion JSON + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UpdateVersionRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// Serialized AdminUpdateVersion JSON + #[prost(string, tag = "2")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteVersionRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct VersionResponse { + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UpdatePricingRequest { + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// Serialized AdminUpdatePricing JSON + #[prost(string, tag = "2")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PricingResponse { + #[prost(string, tag = "1")] + pub body_json: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteResponse { + #[prost(bool, tag = "1")] + pub deleted: bool, +} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OnlineStatus { @@ -517,6 +624,284 @@ pub mod session_admin_client { .insert(GrpcMethod::new("admin.SessionAdmin", "ExportMetricsCsv")); self.inner.unary(req, path, codec).await } + /// AI + pub async fn sync_models( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/SyncModels", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "SyncModels")); + self.inner.unary(req, path, codec).await + } + pub async fn check_alerts( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/CheckAlerts", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "CheckAlerts")); + self.inner.unary(req, path, codec).await + } + /// AI Provider + pub async fn create_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/CreateProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "CreateProvider")); + self.inner.unary(req, path, codec).await + } + pub async fn update_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/UpdateProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "UpdateProvider")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/DeleteProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "DeleteProvider")); + self.inner.unary(req, path, codec).await + } + /// AI Model + pub async fn create_model( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/CreateModel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "CreateModel")); + self.inner.unary(req, path, codec).await + } + pub async fn update_model( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/UpdateModel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "UpdateModel")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_model( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/DeleteModel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "DeleteModel")); + self.inner.unary(req, path, codec).await + } + /// AI Version + pub async fn create_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/CreateVersion", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "CreateVersion")); + self.inner.unary(req, path, codec).await + } + pub async fn update_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/UpdateVersion", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "UpdateVersion")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_version( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/DeleteVersion", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "DeleteVersion")); + self.inner.unary(req, path, codec).await + } + /// AI Pricing + pub async fn update_pricing( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/admin.SessionAdmin/UpdatePricing", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("admin.SessionAdmin", "UpdatePricing")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -602,6 +987,71 @@ pub mod session_admin_server { tonic::Response, tonic::Status, >; + /// AI + async fn sync_models( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn check_alerts( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// AI Provider + async fn create_provider( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn update_provider( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn delete_provider( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// AI Model + async fn create_model( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn update_model( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn delete_model( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// AI Version + async fn create_version( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn update_version( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + async fn delete_version( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// AI Pricing + async fn update_pricing( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] pub struct SessionAdminServer { @@ -1145,6 +1595,546 @@ pub mod session_admin_server { }; Box::pin(fut) } + "/admin.SessionAdmin/SyncModels" => { + #[allow(non_camel_case_types)] + struct SyncModelsSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for SyncModelsSvc { + type Response = super::SyncModelsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::sync_models(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = SyncModelsSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/CheckAlerts" => { + #[allow(non_camel_case_types)] + struct CheckAlertsSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for CheckAlertsSvc { + type Response = super::CheckAlertsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::check_alerts(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = CheckAlertsSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/CreateProvider" => { + #[allow(non_camel_case_types)] + struct CreateProviderSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for CreateProviderSvc { + type Response = super::ProviderResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::create_provider(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = CreateProviderSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/UpdateProvider" => { + #[allow(non_camel_case_types)] + struct UpdateProviderSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for UpdateProviderSvc { + type Response = super::ProviderResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_provider(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = UpdateProviderSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/DeleteProvider" => { + #[allow(non_camel_case_types)] + struct DeleteProviderSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for DeleteProviderSvc { + type Response = super::DeleteResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::delete_provider(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = DeleteProviderSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/CreateModel" => { + #[allow(non_camel_case_types)] + struct CreateModelSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for CreateModelSvc { + type Response = super::ModelResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::create_model(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = CreateModelSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/UpdateModel" => { + #[allow(non_camel_case_types)] + struct UpdateModelSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for UpdateModelSvc { + type Response = super::ModelResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_model(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = UpdateModelSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/DeleteModel" => { + #[allow(non_camel_case_types)] + struct DeleteModelSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for DeleteModelSvc { + type Response = super::DeleteResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::delete_model(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = DeleteModelSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/CreateVersion" => { + #[allow(non_camel_case_types)] + struct CreateVersionSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for CreateVersionSvc { + type Response = super::VersionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::create_version(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = CreateVersionSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/UpdateVersion" => { + #[allow(non_camel_case_types)] + struct UpdateVersionSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for UpdateVersionSvc { + type Response = super::VersionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_version(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = UpdateVersionSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/DeleteVersion" => { + #[allow(non_camel_case_types)] + struct DeleteVersionSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for DeleteVersionSvc { + type Response = super::DeleteResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::delete_version(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = DeleteVersionSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/admin.SessionAdmin/UpdatePricing" => { + #[allow(non_camel_case_types)] + struct UpdatePricingSvc(pub Arc); + impl< + T: SessionAdmin, + > tonic::server::UnaryService + for UpdatePricingSvc { + type Response = super::PricingResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_pricing(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = UpdatePricingSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { let mut response = http::Response::new(