// @generated /// Generated client implementations. pub mod admin_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** The following defines an RPC service that is also served over HTTP via grpc-gateway. Standard response codes for both are defined here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go */ #[derive(Debug, Clone)] pub struct AdminServiceClient { inner: tonic::client::Grpc, } impl AdminServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl AdminServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> AdminServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { AdminServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** Create and upload a :ref:`ref_flyteidl.admin.Task` definition */ pub async fn create_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateTask", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "CreateTask")); self.inner.unary(req, path, codec).await } /** Fetch a :ref:`ref_flyteidl.admin.Task` definition. */ pub async fn get_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetTask", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "GetTask")); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of task objects. */ pub async fn list_task_ids( &mut self, request: impl tonic::IntoRequest< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListTaskIds", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "ListTaskIds")); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.Task` definitions. */ pub async fn list_tasks( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListTasks", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "ListTasks")); self.inner.unary(req, path, codec).await } /** Create and upload a :ref:`ref_flyteidl.admin.Workflow` definition */ pub async fn create_workflow( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateWorkflow", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "CreateWorkflow"), ); self.inner.unary(req, path, codec).await } /** Fetch a :ref:`ref_flyteidl.admin.Workflow` definition. */ pub async fn get_workflow( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetWorkflow", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "GetWorkflow")); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of workflow objects. */ pub async fn list_workflow_ids( &mut self, request: impl tonic::IntoRequest< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListWorkflowIds", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListWorkflowIds"), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.Workflow` definitions. */ pub async fn list_workflows( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListWorkflows", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListWorkflows"), ); self.inner.unary(req, path, codec).await } /** Create and upload a :ref:`ref_flyteidl.admin.LaunchPlan` definition */ pub async fn create_launch_plan( &mut self, request: impl tonic::IntoRequest< super::super::admin::LaunchPlanCreateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateLaunchPlan", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "CreateLaunchPlan"), ); self.inner.unary(req, path, codec).await } /** Fetch a :ref:`ref_flyteidl.admin.LaunchPlan` definition. */ pub async fn get_launch_plan( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetLaunchPlan", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetLaunchPlan"), ); self.inner.unary(req, path, codec).await } /** Fetch the active version of a :ref:`ref_flyteidl.admin.LaunchPlan`. */ pub async fn get_active_launch_plan( &mut self, request: impl tonic::IntoRequest< super::super::admin::ActiveLaunchPlanRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetActiveLaunchPlan", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetActiveLaunchPlan", ), ); self.inner.unary(req, path, codec).await } /** List active versions of :ref:`ref_flyteidl.admin.LaunchPlan`. */ pub async fn list_active_launch_plans( &mut self, request: impl tonic::IntoRequest< super::super::admin::ActiveLaunchPlanListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListActiveLaunchPlans", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListActiveLaunchPlans", ), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of launch plan objects. */ pub async fn list_launch_plan_ids( &mut self, request: impl tonic::IntoRequest< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListLaunchPlanIds", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListLaunchPlanIds"), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.LaunchPlan` definitions. */ pub async fn list_launch_plans( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListLaunchPlans", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListLaunchPlans"), ); self.inner.unary(req, path, codec).await } /** Updates the status of a registered :ref:`ref_flyteidl.admin.LaunchPlan`. */ pub async fn update_launch_plan( &mut self, request: impl tonic::IntoRequest< super::super::admin::LaunchPlanUpdateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateLaunchPlan", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "UpdateLaunchPlan"), ); self.inner.unary(req, path, codec).await } /** Triggers the creation of a :ref:`ref_flyteidl.admin.Execution` */ pub async fn create_execution( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "CreateExecution"), ); self.inner.unary(req, path, codec).await } /** Triggers the creation of an identical :ref:`ref_flyteidl.admin.Execution` */ pub async fn relaunch_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::ExecutionRelaunchRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/RelaunchExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "RelaunchExecution"), ); self.inner.unary(req, path, codec).await } /** Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again. See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. */ pub async fn recover_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::ExecutionRecoverRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/RecoverExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "RecoverExecution"), ); self.inner.unary(req, path, codec).await } /** Fetches a :ref:`ref_flyteidl.admin.Execution`. */ pub async fn get_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowExecutionGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetExecution"), ); self.inner.unary(req, path, codec).await } /** Update execution belonging to project domain :ref:`ref_flyteidl.admin.Execution`. */ pub async fn update_execution( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "UpdateExecution"), ); self.inner.unary(req, path, codec).await } /** Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`. */ pub async fn get_execution_data( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowExecutionGetDataRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetExecutionData", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetExecutionData"), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.Execution`. */ pub async fn list_executions( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListExecutions", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListExecutions"), ); self.inner.unary(req, path, codec).await } /** Terminates an in-progress :ref:`ref_flyteidl.admin.Execution`. */ pub async fn terminate_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::ExecutionTerminateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/TerminateExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "TerminateExecution", ), ); self.inner.unary(req, path, codec).await } /** Fetches a :ref:`ref_flyteidl.admin.NodeExecution`. */ pub async fn get_node_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::NodeExecutionGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetNodeExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetNodeExecution"), ); self.inner.unary(req, path, codec).await } /** Fetches a :ref:`ref_flyteidl.admin.DynamicNodeWorkflowResponse`. */ pub async fn get_dynamic_node_workflow( &mut self, request: impl tonic::IntoRequest< super::super::admin::GetDynamicNodeWorkflowRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetDynamicNodeWorkflow", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetDynamicNodeWorkflow", ), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.NodeExecution`. */ pub async fn list_node_executions( &mut self, request: impl tonic::IntoRequest< super::super::admin::NodeExecutionListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListNodeExecutions", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListNodeExecutions", ), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.NodeExecution` launched by the reference :ref:`ref_flyteidl.admin.TaskExecution`. */ pub async fn list_node_executions_for_task( &mut self, request: impl tonic::IntoRequest< super::super::admin::NodeExecutionForTaskListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListNodeExecutionsForTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListNodeExecutionsForTask", ), ); self.inner.unary(req, path, codec).await } /** Fetches input and output data for a :ref:`ref_flyteidl.admin.NodeExecution`. */ pub async fn get_node_execution_data( &mut self, request: impl tonic::IntoRequest< super::super::admin::NodeExecutionGetDataRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetNodeExecutionData", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetNodeExecutionData", ), ); self.inner.unary(req, path, codec).await } /** Registers a :ref:`ref_flyteidl.admin.Project` with the Flyte deployment. */ pub async fn register_project( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/RegisterProject", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "RegisterProject"), ); self.inner.unary(req, path, codec).await } /** Updates an existing :ref:`ref_flyteidl.admin.Project` flyteidl.admin.Project should be passed but the domains property should be empty; it will be ignored in the handler as domains cannot be updated via this API. */ pub async fn update_project( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateProject", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "UpdateProject"), ); self.inner.unary(req, path, codec).await } /** Fetches a :ref:`ref_flyteidl.admin.Project` */ pub async fn get_project( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetProject", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "GetProject")); self.inner.unary(req, path, codec).await } /** Fetches a list of :ref:`ref_flyteidl.admin.Project` */ pub async fn list_projects( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListProjects", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListProjects"), ); self.inner.unary(req, path, codec).await } /** Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. */ pub async fn create_workflow_event( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowExecutionEventRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateWorkflowEvent", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "CreateWorkflowEvent", ), ); self.inner.unary(req, path, codec).await } /** Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred. */ pub async fn create_node_event( &mut self, request: impl tonic::IntoRequest< super::super::admin::NodeExecutionEventRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateNodeEvent", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "CreateNodeEvent"), ); self.inner.unary(req, path, codec).await } /** Indicates a :ref:`ref_flyteidl.event.TaskExecutionEvent` has occurred. */ pub async fn create_task_event( &mut self, request: impl tonic::IntoRequest< super::super::admin::TaskExecutionEventRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/CreateTaskEvent", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "CreateTaskEvent"), ); self.inner.unary(req, path, codec).await } /** Fetches a :ref:`ref_flyteidl.admin.TaskExecution`. */ pub async fn get_task_execution( &mut self, request: impl tonic::IntoRequest< super::super::admin::TaskExecutionGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetTaskExecution", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetTaskExecution"), ); self.inner.unary(req, path, codec).await } /** Fetches a list of :ref:`ref_flyteidl.admin.TaskExecution`. */ pub async fn list_task_executions( &mut self, request: impl tonic::IntoRequest< super::super::admin::TaskExecutionListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListTaskExecutions", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListTaskExecutions", ), ); self.inner.unary(req, path, codec).await } /** Fetches input and output data for a :ref:`ref_flyteidl.admin.TaskExecution`. */ pub async fn get_task_execution_data( &mut self, request: impl tonic::IntoRequest< super::super::admin::TaskExecutionGetDataRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetTaskExecutionData", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetTaskExecutionData", ), ); self.inner.unary(req, path, codec).await } /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ pub async fn update_project_domain_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectDomainAttributesUpdateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateProjectDomainAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "UpdateProjectDomainAttributes", ), ); self.inner.unary(req, path, codec).await } /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ pub async fn get_project_domain_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectDomainAttributesGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetProjectDomainAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetProjectDomainAttributes", ), ); self.inner.unary(req, path, codec).await } /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ pub async fn delete_project_domain_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectDomainAttributesDeleteRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/DeleteProjectDomainAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "DeleteProjectDomainAttributes", ), ); self.inner.unary(req, path, codec).await } /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` at the project level */ pub async fn update_project_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectAttributesUpdateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateProjectAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "UpdateProjectAttributes", ), ); self.inner.unary(req, path, codec).await } /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ pub async fn get_project_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectAttributesGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetProjectAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetProjectAttributes", ), ); self.inner.unary(req, path, codec).await } /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ pub async fn delete_project_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ProjectAttributesDeleteRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/DeleteProjectAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "DeleteProjectAttributes", ), ); self.inner.unary(req, path, codec).await } /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ pub async fn update_workflow_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowAttributesUpdateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateWorkflowAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "UpdateWorkflowAttributes", ), ); self.inner.unary(req, path, codec).await } /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ pub async fn get_workflow_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowAttributesGetRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetWorkflowAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetWorkflowAttributes", ), ); self.inner.unary(req, path, codec).await } /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ pub async fn delete_workflow_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowAttributesDeleteRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/DeleteWorkflowAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "DeleteWorkflowAttributes", ), ); self.inner.unary(req, path, codec).await } /** Lists custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a specific resource type. */ pub async fn list_matchable_attributes( &mut self, request: impl tonic::IntoRequest< super::super::admin::ListMatchableAttributesRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListMatchableAttributes", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListMatchableAttributes", ), ); self.inner.unary(req, path, codec).await } /** Returns a list of :ref:`ref_flyteidl.admin.NamedEntity` objects. */ pub async fn list_named_entities( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListNamedEntities", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "ListNamedEntities"), ); self.inner.unary(req, path, codec).await } /** Returns a :ref:`ref_flyteidl.admin.NamedEntity` object. */ pub async fn get_named_entity( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetNamedEntity", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "GetNamedEntity"), ); self.inner.unary(req, path, codec).await } /** Updates a :ref:`ref_flyteidl.admin.NamedEntity` object. */ pub async fn update_named_entity( &mut self, request: impl tonic::IntoRequest< super::super::admin::NamedEntityUpdateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/UpdateNamedEntity", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AdminService", "UpdateNamedEntity"), ); self.inner.unary(req, path, codec).await } /// pub async fn get_version( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetVersion", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.AdminService", "GetVersion")); self.inner.unary(req, path, codec).await } /** Fetch a :ref:`ref_flyteidl.admin.DescriptionEntity` object. */ pub async fn get_description_entity( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetDescriptionEntity", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetDescriptionEntity", ), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.DescriptionEntity` definitions. */ pub async fn list_description_entities( &mut self, request: impl tonic::IntoRequest< super::super::admin::DescriptionEntityListRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/ListDescriptionEntities", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "ListDescriptionEntities", ), ); self.inner.unary(req, path, codec).await } /** Fetches runtime metrics for a :ref:`ref_flyteidl.admin.Execution`. */ pub async fn get_execution_metrics( &mut self, request: impl tonic::IntoRequest< super::super::admin::WorkflowExecutionGetMetricsRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AdminService/GetExecutionMetrics", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AdminService", "GetExecutionMetrics", ), ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod admin_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with AdminServiceServer. #[async_trait] pub trait AdminService: Send + Sync + 'static { /** Create and upload a :ref:`ref_flyteidl.admin.Task` definition */ async fn create_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a :ref:`ref_flyteidl.admin.Task` definition. */ async fn get_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of task objects. */ async fn list_task_ids( &self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.Task` definitions. */ async fn list_tasks( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Create and upload a :ref:`ref_flyteidl.admin.Workflow` definition */ async fn create_workflow( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a :ref:`ref_flyteidl.admin.Workflow` definition. */ async fn get_workflow( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of workflow objects. */ async fn list_workflow_ids( &self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.Workflow` definitions. */ async fn list_workflows( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Create and upload a :ref:`ref_flyteidl.admin.LaunchPlan` definition */ async fn create_launch_plan( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a :ref:`ref_flyteidl.admin.LaunchPlan` definition. */ async fn get_launch_plan( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch the active version of a :ref:`ref_flyteidl.admin.LaunchPlan`. */ async fn get_active_launch_plan( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** List active versions of :ref:`ref_flyteidl.admin.LaunchPlan`. */ async fn list_active_launch_plans( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.NamedEntityIdentifier` of launch plan objects. */ async fn list_launch_plan_ids( &self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.LaunchPlan` definitions. */ async fn list_launch_plans( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Updates the status of a registered :ref:`ref_flyteidl.admin.LaunchPlan`. */ async fn update_launch_plan( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Triggers the creation of a :ref:`ref_flyteidl.admin.Execution` */ async fn create_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Triggers the creation of an identical :ref:`ref_flyteidl.admin.Execution` */ async fn relaunch_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Recreates a previously-run workflow execution that will only start executing from the last known failure point. In Recover mode, users cannot change any input parameters or update the version of the execution. This is extremely useful to recover from system errors and byzantine faults like - Loss of K8s cluster, bugs in platform or instability, machine failures, downstream system failures (downstream services), or simply to recover executions that failed because of retry exhaustion and should complete if tried again. See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. */ async fn recover_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a :ref:`ref_flyteidl.admin.Execution`. */ async fn get_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Update execution belonging to project domain :ref:`ref_flyteidl.admin.Execution`. */ async fn update_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches input and output data for a :ref:`ref_flyteidl.admin.Execution`. */ async fn get_execution_data( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.Execution`. */ async fn list_executions( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Terminates an in-progress :ref:`ref_flyteidl.admin.Execution`. */ async fn terminate_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a :ref:`ref_flyteidl.admin.NodeExecution`. */ async fn get_node_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a :ref:`ref_flyteidl.admin.DynamicNodeWorkflowResponse`. */ async fn get_dynamic_node_workflow( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.NodeExecution`. */ async fn list_node_executions( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.NodeExecution` launched by the reference :ref:`ref_flyteidl.admin.TaskExecution`. */ async fn list_node_executions_for_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches input and output data for a :ref:`ref_flyteidl.admin.NodeExecution`. */ async fn get_node_execution_data( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Registers a :ref:`ref_flyteidl.admin.Project` with the Flyte deployment. */ async fn register_project( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Updates an existing :ref:`ref_flyteidl.admin.Project` flyteidl.admin.Project should be passed but the domains property should be empty; it will be ignored in the handler as domains cannot be updated via this API. */ async fn update_project( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a :ref:`ref_flyteidl.admin.Project` */ async fn get_project( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a list of :ref:`ref_flyteidl.admin.Project` */ async fn list_projects( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Indicates a :ref:`ref_flyteidl.event.WorkflowExecutionEvent` has occurred. */ async fn create_workflow_event( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Indicates a :ref:`ref_flyteidl.event.NodeExecutionEvent` has occurred. */ async fn create_node_event( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Indicates a :ref:`ref_flyteidl.event.TaskExecutionEvent` has occurred. */ async fn create_task_event( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a :ref:`ref_flyteidl.admin.TaskExecution`. */ async fn get_task_execution( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches a list of :ref:`ref_flyteidl.admin.TaskExecution`. */ async fn list_task_executions( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches input and output data for a :ref:`ref_flyteidl.admin.TaskExecution`. */ async fn get_task_execution_data( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ async fn update_project_domain_attributes( &self, request: tonic::Request< super::super::admin::ProjectDomainAttributesUpdateRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ async fn get_project_domain_attributes( &self, request: tonic::Request< super::super::admin::ProjectDomainAttributesGetRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ async fn delete_project_domain_attributes( &self, request: tonic::Request< super::super::admin::ProjectDomainAttributesDeleteRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` at the project level */ async fn update_project_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ async fn get_project_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project and domain. */ async fn delete_project_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Creates or updates custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ async fn update_workflow_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ async fn get_workflow_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Deletes custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a project, domain and workflow. */ async fn delete_workflow_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Lists custom :ref:`ref_flyteidl.admin.MatchableAttributesConfiguration` for a specific resource type. */ async fn list_matchable_attributes( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Returns a list of :ref:`ref_flyteidl.admin.NamedEntity` objects. */ async fn list_named_entities( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Returns a :ref:`ref_flyteidl.admin.NamedEntity` object. */ async fn get_named_entity( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Updates a :ref:`ref_flyteidl.admin.NamedEntity` object. */ async fn update_named_entity( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /// async fn get_version( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a :ref:`ref_flyteidl.admin.DescriptionEntity` object. */ async fn get_description_entity( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.DescriptionEntity` definitions. */ async fn list_description_entities( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetches runtime metrics for a :ref:`ref_flyteidl.admin.Execution`. */ async fn get_execution_metrics( &self, request: tonic::Request< super::super::admin::WorkflowExecutionGetMetricsRequest, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** The following defines an RPC service that is also served over HTTP via grpc-gateway. Standard response codes for both are defined here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go */ #[derive(Debug)] pub struct AdminServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl AdminServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for AdminServiceServer where T: AdminService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.AdminService/CreateTask" => { #[allow(non_camel_case_types)] struct CreateTaskSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for CreateTaskSvc { type Response = super::super::admin::TaskCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::TaskCreateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_task(&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 inner = inner.0; let method = CreateTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetTask" => { #[allow(non_camel_case_types)] struct GetTaskSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetTaskSvc { type Response = super::super::admin::Task; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ObjectGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_task(&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 inner = inner.0; let method = GetTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListTaskIds" => { #[allow(non_camel_case_types)] struct ListTaskIdsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityIdentifierListRequest, > for ListTaskIdsSvc { type Response = super::super::admin::NamedEntityIdentifierList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_task_ids(&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 inner = inner.0; let method = ListTaskIdsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListTasks" => { #[allow(non_camel_case_types)] struct ListTasksSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ResourceListRequest, > for ListTasksSvc { type Response = super::super::admin::TaskList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ResourceListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_tasks(&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 inner = inner.0; let method = ListTasksSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateWorkflow" => { #[allow(non_camel_case_types)] struct CreateWorkflowSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowCreateRequest, > for CreateWorkflowSvc { type Response = super::super::admin::WorkflowCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowCreateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_workflow(&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 inner = inner.0; let method = CreateWorkflowSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetWorkflow" => { #[allow(non_camel_case_types)] struct GetWorkflowSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetWorkflowSvc { type Response = super::super::admin::Workflow; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ObjectGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_workflow(&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 inner = inner.0; let method = GetWorkflowSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListWorkflowIds" => { #[allow(non_camel_case_types)] struct ListWorkflowIdsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityIdentifierListRequest, > for ListWorkflowIdsSvc { type Response = super::super::admin::NamedEntityIdentifierList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_workflow_ids(&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 inner = inner.0; let method = ListWorkflowIdsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListWorkflows" => { #[allow(non_camel_case_types)] struct ListWorkflowsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ResourceListRequest, > for ListWorkflowsSvc { type Response = super::super::admin::WorkflowList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ResourceListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_workflows(&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 inner = inner.0; let method = ListWorkflowsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateLaunchPlan" => { #[allow(non_camel_case_types)] struct CreateLaunchPlanSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::LaunchPlanCreateRequest, > for CreateLaunchPlanSvc { type Response = super::super::admin::LaunchPlanCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::LaunchPlanCreateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_launch_plan(&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 inner = inner.0; let method = CreateLaunchPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetLaunchPlan" => { #[allow(non_camel_case_types)] struct GetLaunchPlanSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetLaunchPlanSvc { type Response = super::super::admin::LaunchPlan; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ObjectGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_launch_plan(&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 inner = inner.0; let method = GetLaunchPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetActiveLaunchPlan" => { #[allow(non_camel_case_types)] struct GetActiveLaunchPlanSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ActiveLaunchPlanRequest, > for GetActiveLaunchPlanSvc { type Response = super::super::admin::LaunchPlan; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ActiveLaunchPlanRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_active_launch_plan(&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 inner = inner.0; let method = GetActiveLaunchPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListActiveLaunchPlans" => { #[allow(non_camel_case_types)] struct ListActiveLaunchPlansSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ActiveLaunchPlanListRequest, > for ListActiveLaunchPlansSvc { type Response = super::super::admin::LaunchPlanList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ActiveLaunchPlanListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_active_launch_plans( &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 inner = inner.0; let method = ListActiveLaunchPlansSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListLaunchPlanIds" => { #[allow(non_camel_case_types)] struct ListLaunchPlanIdsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityIdentifierListRequest, > for ListLaunchPlanIdsSvc { type Response = super::super::admin::NamedEntityIdentifierList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityIdentifierListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_launch_plan_ids(&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 inner = inner.0; let method = ListLaunchPlanIdsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListLaunchPlans" => { #[allow(non_camel_case_types)] struct ListLaunchPlansSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ResourceListRequest, > for ListLaunchPlansSvc { type Response = super::super::admin::LaunchPlanList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ResourceListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_launch_plans(&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 inner = inner.0; let method = ListLaunchPlansSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateLaunchPlan" => { #[allow(non_camel_case_types)] struct UpdateLaunchPlanSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::LaunchPlanUpdateRequest, > for UpdateLaunchPlanSvc { type Response = super::super::admin::LaunchPlanUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::LaunchPlanUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_launch_plan(&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 inner = inner.0; let method = UpdateLaunchPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateExecution" => { #[allow(non_camel_case_types)] struct CreateExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ExecutionCreateRequest, > for CreateExecutionSvc { type Response = super::super::admin::ExecutionCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ExecutionCreateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_execution(&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 inner = inner.0; let method = CreateExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/RelaunchExecution" => { #[allow(non_camel_case_types)] struct RelaunchExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ExecutionRelaunchRequest, > for RelaunchExecutionSvc { type Response = super::super::admin::ExecutionCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ExecutionRelaunchRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::relaunch_execution(&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 inner = inner.0; let method = RelaunchExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/RecoverExecution" => { #[allow(non_camel_case_types)] struct RecoverExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ExecutionRecoverRequest, > for RecoverExecutionSvc { type Response = super::super::admin::ExecutionCreateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ExecutionRecoverRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::recover_execution(&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 inner = inner.0; let method = RecoverExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetExecution" => { #[allow(non_camel_case_types)] struct GetExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowExecutionGetRequest, > for GetExecutionSvc { type Response = super::super::admin::Execution; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowExecutionGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_execution(&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 inner = inner.0; let method = GetExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateExecution" => { #[allow(non_camel_case_types)] struct UpdateExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ExecutionUpdateRequest, > for UpdateExecutionSvc { type Response = super::super::admin::ExecutionUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ExecutionUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_execution(&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 inner = inner.0; let method = UpdateExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetExecutionData" => { #[allow(non_camel_case_types)] struct GetExecutionDataSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowExecutionGetDataRequest, > for GetExecutionDataSvc { type Response = super::super::admin::WorkflowExecutionGetDataResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowExecutionGetDataRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_execution_data(&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 inner = inner.0; let method = GetExecutionDataSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListExecutions" => { #[allow(non_camel_case_types)] struct ListExecutionsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ResourceListRequest, > for ListExecutionsSvc { type Response = super::super::admin::ExecutionList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ResourceListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_executions(&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 inner = inner.0; let method = ListExecutionsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/TerminateExecution" => { #[allow(non_camel_case_types)] struct TerminateExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ExecutionTerminateRequest, > for TerminateExecutionSvc { type Response = super::super::admin::ExecutionTerminateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ExecutionTerminateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::terminate_execution(&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 inner = inner.0; let method = TerminateExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetNodeExecution" => { #[allow(non_camel_case_types)] struct GetNodeExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NodeExecutionGetRequest, > for GetNodeExecutionSvc { type Response = super::super::admin::NodeExecution; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NodeExecutionGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_node_execution(&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 inner = inner.0; let method = GetNodeExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetDynamicNodeWorkflow" => { #[allow(non_camel_case_types)] struct GetDynamicNodeWorkflowSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::GetDynamicNodeWorkflowRequest, > for GetDynamicNodeWorkflowSvc { type Response = super::super::admin::DynamicNodeWorkflowResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::GetDynamicNodeWorkflowRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_dynamic_node_workflow( &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 inner = inner.0; let method = GetDynamicNodeWorkflowSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListNodeExecutions" => { #[allow(non_camel_case_types)] struct ListNodeExecutionsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NodeExecutionListRequest, > for ListNodeExecutionsSvc { type Response = super::super::admin::NodeExecutionList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NodeExecutionListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_node_executions(&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 inner = inner.0; let method = ListNodeExecutionsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListNodeExecutionsForTask" => { #[allow(non_camel_case_types)] struct ListNodeExecutionsForTaskSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NodeExecutionForTaskListRequest, > for ListNodeExecutionsForTaskSvc { type Response = super::super::admin::NodeExecutionList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NodeExecutionForTaskListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_node_executions_for_task( &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 inner = inner.0; let method = ListNodeExecutionsForTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetNodeExecutionData" => { #[allow(non_camel_case_types)] struct GetNodeExecutionDataSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NodeExecutionGetDataRequest, > for GetNodeExecutionDataSvc { type Response = super::super::admin::NodeExecutionGetDataResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NodeExecutionGetDataRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_node_execution_data( &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 inner = inner.0; let method = GetNodeExecutionDataSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/RegisterProject" => { #[allow(non_camel_case_types)] struct RegisterProjectSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectRegisterRequest, > for RegisterProjectSvc { type Response = super::super::admin::ProjectRegisterResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectRegisterRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::register_project(&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 inner = inner.0; let method = RegisterProjectSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateProject" => { #[allow(non_camel_case_types)] struct UpdateProjectSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for UpdateProjectSvc { type Response = super::super::admin::ProjectUpdateResponse; 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_project(&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 inner = inner.0; let method = UpdateProjectSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetProject" => { #[allow(non_camel_case_types)] struct GetProjectSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetProjectSvc { type Response = super::super::admin::Project; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_project(&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 inner = inner.0; let method = GetProjectSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListProjects" => { #[allow(non_camel_case_types)] struct ListProjectsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectListRequest, > for ListProjectsSvc { type Response = super::super::admin::Projects; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_projects(&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 inner = inner.0; let method = ListProjectsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateWorkflowEvent" => { #[allow(non_camel_case_types)] struct CreateWorkflowEventSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowExecutionEventRequest, > for CreateWorkflowEventSvc { type Response = super::super::admin::WorkflowExecutionEventResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowExecutionEventRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_workflow_event(&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 inner = inner.0; let method = CreateWorkflowEventSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateNodeEvent" => { #[allow(non_camel_case_types)] struct CreateNodeEventSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NodeExecutionEventRequest, > for CreateNodeEventSvc { type Response = super::super::admin::NodeExecutionEventResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NodeExecutionEventRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_node_event(&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 inner = inner.0; let method = CreateNodeEventSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/CreateTaskEvent" => { #[allow(non_camel_case_types)] struct CreateTaskEventSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::TaskExecutionEventRequest, > for CreateTaskEventSvc { type Response = super::super::admin::TaskExecutionEventResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::TaskExecutionEventRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_task_event(&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 inner = inner.0; let method = CreateTaskEventSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetTaskExecution" => { #[allow(non_camel_case_types)] struct GetTaskExecutionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::TaskExecutionGetRequest, > for GetTaskExecutionSvc { type Response = super::super::admin::TaskExecution; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::TaskExecutionGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_task_execution(&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 inner = inner.0; let method = GetTaskExecutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListTaskExecutions" => { #[allow(non_camel_case_types)] struct ListTaskExecutionsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::TaskExecutionListRequest, > for ListTaskExecutionsSvc { type Response = super::super::admin::TaskExecutionList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::TaskExecutionListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_task_executions(&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 inner = inner.0; let method = ListTaskExecutionsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetTaskExecutionData" => { #[allow(non_camel_case_types)] struct GetTaskExecutionDataSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::TaskExecutionGetDataRequest, > for GetTaskExecutionDataSvc { type Response = super::super::admin::TaskExecutionGetDataResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::TaskExecutionGetDataRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_task_execution_data( &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 inner = inner.0; let method = GetTaskExecutionDataSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateProjectDomainAttributes" => { #[allow(non_camel_case_types)] struct UpdateProjectDomainAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectDomainAttributesUpdateRequest, > for UpdateProjectDomainAttributesSvc { type Response = super::super::admin::ProjectDomainAttributesUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectDomainAttributesUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_project_domain_attributes( &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 inner = inner.0; let method = UpdateProjectDomainAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetProjectDomainAttributes" => { #[allow(non_camel_case_types)] struct GetProjectDomainAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectDomainAttributesGetRequest, > for GetProjectDomainAttributesSvc { type Response = super::super::admin::ProjectDomainAttributesGetResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectDomainAttributesGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_project_domain_attributes( &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 inner = inner.0; let method = GetProjectDomainAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/DeleteProjectDomainAttributes" => { #[allow(non_camel_case_types)] struct DeleteProjectDomainAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectDomainAttributesDeleteRequest, > for DeleteProjectDomainAttributesSvc { type Response = super::super::admin::ProjectDomainAttributesDeleteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectDomainAttributesDeleteRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::delete_project_domain_attributes( &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 inner = inner.0; let method = DeleteProjectDomainAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateProjectAttributes" => { #[allow(non_camel_case_types)] struct UpdateProjectAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectAttributesUpdateRequest, > for UpdateProjectAttributesSvc { type Response = super::super::admin::ProjectAttributesUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectAttributesUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_project_attributes( &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 inner = inner.0; let method = UpdateProjectAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetProjectAttributes" => { #[allow(non_camel_case_types)] struct GetProjectAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectAttributesGetRequest, > for GetProjectAttributesSvc { type Response = super::super::admin::ProjectAttributesGetResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectAttributesGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_project_attributes(&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 inner = inner.0; let method = GetProjectAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/DeleteProjectAttributes" => { #[allow(non_camel_case_types)] struct DeleteProjectAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ProjectAttributesDeleteRequest, > for DeleteProjectAttributesSvc { type Response = super::super::admin::ProjectAttributesDeleteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ProjectAttributesDeleteRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::delete_project_attributes( &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 inner = inner.0; let method = DeleteProjectAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateWorkflowAttributes" => { #[allow(non_camel_case_types)] struct UpdateWorkflowAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowAttributesUpdateRequest, > for UpdateWorkflowAttributesSvc { type Response = super::super::admin::WorkflowAttributesUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowAttributesUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_workflow_attributes( &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 inner = inner.0; let method = UpdateWorkflowAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetWorkflowAttributes" => { #[allow(non_camel_case_types)] struct GetWorkflowAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowAttributesGetRequest, > for GetWorkflowAttributesSvc { type Response = super::super::admin::WorkflowAttributesGetResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowAttributesGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_workflow_attributes( &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 inner = inner.0; let method = GetWorkflowAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/DeleteWorkflowAttributes" => { #[allow(non_camel_case_types)] struct DeleteWorkflowAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowAttributesDeleteRequest, > for DeleteWorkflowAttributesSvc { type Response = super::super::admin::WorkflowAttributesDeleteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowAttributesDeleteRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::delete_workflow_attributes( &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 inner = inner.0; let method = DeleteWorkflowAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListMatchableAttributes" => { #[allow(non_camel_case_types)] struct ListMatchableAttributesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::ListMatchableAttributesRequest, > for ListMatchableAttributesSvc { type Response = super::super::admin::ListMatchableAttributesResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ListMatchableAttributesRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_matchable_attributes( &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 inner = inner.0; let method = ListMatchableAttributesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListNamedEntities" => { #[allow(non_camel_case_types)] struct ListNamedEntitiesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityListRequest, > for ListNamedEntitiesSvc { type Response = super::super::admin::NamedEntityList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_named_entities(&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 inner = inner.0; let method = ListNamedEntitiesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetNamedEntity" => { #[allow(non_camel_case_types)] struct GetNamedEntitySvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityGetRequest, > for GetNamedEntitySvc { type Response = super::super::admin::NamedEntity; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_named_entity(&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 inner = inner.0; let method = GetNamedEntitySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/UpdateNamedEntity" => { #[allow(non_camel_case_types)] struct UpdateNamedEntitySvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::NamedEntityUpdateRequest, > for UpdateNamedEntitySvc { type Response = super::super::admin::NamedEntityUpdateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::NamedEntityUpdateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::update_named_entity(&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 inner = inner.0; let method = UpdateNamedEntitySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetVersion" => { #[allow(non_camel_case_types)] struct GetVersionSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetVersionSvc { type Response = super::super::admin::GetVersionResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::GetVersionRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_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 inner = inner.0; let method = GetVersionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetDescriptionEntity" => { #[allow(non_camel_case_types)] struct GetDescriptionEntitySvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService for GetDescriptionEntitySvc { type Response = super::super::admin::DescriptionEntity; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ObjectGetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_description_entity(&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 inner = inner.0; let method = GetDescriptionEntitySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/ListDescriptionEntities" => { #[allow(non_camel_case_types)] struct ListDescriptionEntitiesSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::DescriptionEntityListRequest, > for ListDescriptionEntitiesSvc { type Response = super::super::admin::DescriptionEntityList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::DescriptionEntityListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_description_entities( &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 inner = inner.0; let method = ListDescriptionEntitiesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AdminService/GetExecutionMetrics" => { #[allow(non_camel_case_types)] struct GetExecutionMetricsSvc(pub Arc); impl< T: AdminService, > tonic::server::UnaryService< super::super::admin::WorkflowExecutionGetMetricsRequest, > for GetExecutionMetricsSvc { type Response = super::super::admin::WorkflowExecutionGetMetricsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::WorkflowExecutionGetMetricsRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_execution_metrics(&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 inner = inner.0; let method = GetExecutionMetricsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for AdminServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for AdminServiceServer { const NAME: &'static str = "flyteidl.service.AdminService"; } } /// Generated client implementations. pub mod sync_agent_service_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 SyncAgentServiceClient { inner: tonic::client::Grpc, } impl SyncAgentServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl SyncAgentServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> SyncAgentServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { SyncAgentServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. */ pub async fn execute_task_sync( &mut self, request: impl tonic::IntoStreamingRequest< Message = super::super::admin::ExecuteTaskSyncRequest, >, ) -> std::result::Result< tonic::Response< tonic::codec::Streaming, >, 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( "/flyteidl.service.SyncAgentService/ExecuteTaskSync", ); let mut req = request.into_streaming_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.SyncAgentService", "ExecuteTaskSync", ), ); self.inner.streaming(req, path, codec).await } } } /// Generated server implementations. pub mod sync_agent_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SyncAgentServiceServer. #[async_trait] pub trait SyncAgentService: Send + Sync + 'static { /// Server streaming response type for the ExecuteTaskSync method. type ExecuteTaskSyncStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result< super::super::admin::ExecuteTaskSyncResponse, tonic::Status, >, > + Send + 'static; /** ExecuteTaskSync streams the create request and inputs to the agent service and streams the outputs back. */ async fn execute_task_sync( &self, request: tonic::Request< tonic::Streaming, >, ) -> std::result::Result< tonic::Response, tonic::Status, >; } #[derive(Debug)] pub struct SyncAgentServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl SyncAgentServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for SyncAgentServiceServer where T: SyncAgentService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.SyncAgentService/ExecuteTaskSync" => { #[allow(non_camel_case_types)] struct ExecuteTaskSyncSvc(pub Arc); impl< T: SyncAgentService, > tonic::server::StreamingService< super::super::admin::ExecuteTaskSyncRequest, > for ExecuteTaskSyncSvc { type Response = super::super::admin::ExecuteTaskSyncResponse; type ResponseStream = T::ExecuteTaskSyncStream; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< tonic::Streaming< super::super::admin::ExecuteTaskSyncRequest, >, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::execute_task_sync(&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 inner = inner.0; let method = ExecuteTaskSyncSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.streaming(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for SyncAgentServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for SyncAgentServiceServer { const NAME: &'static str = "flyteidl.service.SyncAgentService"; } } /// Generated client implementations. pub mod async_agent_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. */ #[derive(Debug, Clone)] pub struct AsyncAgentServiceClient { inner: tonic::client::Grpc, } impl AsyncAgentServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl AsyncAgentServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> AsyncAgentServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { AsyncAgentServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** CreateTask sends a task create request to the agent service. */ pub async fn create_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AsyncAgentService/CreateTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AsyncAgentService", "CreateTask"), ); self.inner.unary(req, path, codec).await } /** Get job status. */ pub async fn get_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AsyncAgentService/GetTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AsyncAgentService", "GetTask"), ); self.inner.unary(req, path, codec).await } /** Delete the task resource. */ pub async fn delete_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AsyncAgentService/DeleteTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AsyncAgentService", "DeleteTask"), ); self.inner.unary(req, path, codec).await } /** GetTaskMetrics returns one or more task execution metrics, if available. Errors include * OutOfRange if metrics are not available for the specified task time range * various other errors */ pub async fn get_task_metrics( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AsyncAgentService/GetTaskMetrics", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AsyncAgentService", "GetTaskMetrics", ), ); self.inner.unary(req, path, codec).await } /** GetTaskLogs returns task execution logs, if available. */ pub async fn get_task_logs( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response< tonic::codec::Streaming, >, 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( "/flyteidl.service.AsyncAgentService/GetTaskLogs", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AsyncAgentService", "GetTaskLogs"), ); self.inner.server_streaming(req, path, codec).await } } } /// Generated server implementations. pub mod async_agent_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with AsyncAgentServiceServer. #[async_trait] pub trait AsyncAgentService: Send + Sync + 'static { /** CreateTask sends a task create request to the agent service. */ async fn create_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Get job status. */ async fn get_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Delete the task resource. */ async fn delete_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** GetTaskMetrics returns one or more task execution metrics, if available. Errors include * OutOfRange if metrics are not available for the specified task time range * various other errors */ async fn get_task_metrics( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /// Server streaming response type for the GetTaskLogs method. type GetTaskLogsStream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result< super::super::admin::GetTaskLogsResponse, tonic::Status, >, > + Send + 'static; /** GetTaskLogs returns task execution logs, if available. */ async fn get_task_logs( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server asynchronously. */ #[derive(Debug)] pub struct AsyncAgentServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl AsyncAgentServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for AsyncAgentServiceServer where T: AsyncAgentService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.AsyncAgentService/CreateTask" => { #[allow(non_camel_case_types)] struct CreateTaskSvc(pub Arc); impl< T: AsyncAgentService, > tonic::server::UnaryService for CreateTaskSvc { type Response = super::super::admin::CreateTaskResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::CreateTaskRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::create_task(&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 inner = inner.0; let method = CreateTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AsyncAgentService/GetTask" => { #[allow(non_camel_case_types)] struct GetTaskSvc(pub Arc); impl< T: AsyncAgentService, > tonic::server::UnaryService for GetTaskSvc { type Response = super::super::admin::GetTaskResponse; 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 { ::get_task(&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 inner = inner.0; let method = GetTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AsyncAgentService/DeleteTask" => { #[allow(non_camel_case_types)] struct DeleteTaskSvc(pub Arc); impl< T: AsyncAgentService, > tonic::server::UnaryService for DeleteTaskSvc { type Response = super::super::admin::DeleteTaskResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::DeleteTaskRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::delete_task(&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 inner = inner.0; let method = DeleteTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AsyncAgentService/GetTaskMetrics" => { #[allow(non_camel_case_types)] struct GetTaskMetricsSvc(pub Arc); impl< T: AsyncAgentService, > tonic::server::UnaryService< super::super::admin::GetTaskMetricsRequest, > for GetTaskMetricsSvc { type Response = super::super::admin::GetTaskMetricsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::GetTaskMetricsRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_task_metrics(&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 inner = inner.0; let method = GetTaskMetricsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AsyncAgentService/GetTaskLogs" => { #[allow(non_camel_case_types)] struct GetTaskLogsSvc(pub Arc); impl< T: AsyncAgentService, > tonic::server::ServerStreamingService< super::super::admin::GetTaskLogsRequest, > for GetTaskLogsSvc { type Response = super::super::admin::GetTaskLogsResponse; type ResponseStream = T::GetTaskLogsStream; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::GetTaskLogsRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_task_logs(&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 inner = inner.0; let method = GetTaskLogsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.server_streaming(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for AsyncAgentServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for AsyncAgentServiceServer { const NAME: &'static str = "flyteidl.service.AsyncAgentService"; } } /// Generated client implementations. pub mod agent_metadata_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. This service allows propeller or users to get the metadata of agents. */ #[derive(Debug, Clone)] pub struct AgentMetadataServiceClient { inner: tonic::client::Grpc, } impl AgentMetadataServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl AgentMetadataServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> AgentMetadataServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { AgentMetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** Fetch a :ref:`ref_flyteidl.admin.Agent` definition. */ pub async fn get_agent( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AgentMetadataService/GetAgent", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.AgentMetadataService", "GetAgent"), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. */ pub async fn list_agents( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AgentMetadataService/ListAgents", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AgentMetadataService", "ListAgents", ), ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod agent_metadata_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with AgentMetadataServiceServer. #[async_trait] pub trait AgentMetadataService: Send + Sync + 'static { /** Fetch a :ref:`ref_flyteidl.admin.Agent` definition. */ async fn get_agent( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. */ async fn list_agents( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. This service allows propeller or users to get the metadata of agents. */ #[derive(Debug)] pub struct AgentMetadataServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl AgentMetadataServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for AgentMetadataServiceServer where T: AgentMetadataService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.AgentMetadataService/GetAgent" => { #[allow(non_camel_case_types)] struct GetAgentSvc(pub Arc); impl< T: AgentMetadataService, > tonic::server::UnaryService for GetAgentSvc { type Response = super::super::admin::GetAgentResponse; 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 { ::get_agent(&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 inner = inner.0; let method = GetAgentSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AgentMetadataService/ListAgents" => { #[allow(non_camel_case_types)] struct ListAgentsSvc(pub Arc); impl< T: AgentMetadataService, > tonic::server::UnaryService for ListAgentsSvc { type Response = super::super::admin::ListAgentsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::ListAgentsRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_agents(&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 inner = inner.0; let method = ListAgentsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for AgentMetadataServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for AgentMetadataServiceServer { const NAME: &'static str = "flyteidl.service.AgentMetadataService"; } } /// Generated client implementations. pub mod auth_metadata_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** The following defines an RPC service that is also served over HTTP via grpc-gateway. Standard response codes for both are defined here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go RPCs defined in this service must be anonymously accessible. */ #[derive(Debug, Clone)] pub struct AuthMetadataServiceClient { inner: tonic::client::Grpc, } impl AuthMetadataServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl AuthMetadataServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> AuthMetadataServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { AuthMetadataServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** Anonymously accessible. Retrieves local or external oauth authorization server metadata. */ pub async fn get_o_auth2_metadata( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AuthMetadataService/GetOAuth2Metadata", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AuthMetadataService", "GetOAuth2Metadata", ), ); self.inner.unary(req, path, codec).await } /** Anonymously accessible. Retrieves the client information clients should use when initiating OAuth2 authorization requests. */ pub async fn get_public_client_config( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.AuthMetadataService/GetPublicClientConfig", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.AuthMetadataService", "GetPublicClientConfig", ), ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod auth_metadata_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with AuthMetadataServiceServer. #[async_trait] pub trait AuthMetadataService: Send + Sync + 'static { /** Anonymously accessible. Retrieves local or external oauth authorization server metadata. */ async fn get_o_auth2_metadata( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Anonymously accessible. Retrieves the client information clients should use when initiating OAuth2 authorization requests. */ async fn get_public_client_config( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** The following defines an RPC service that is also served over HTTP via grpc-gateway. Standard response codes for both are defined here: https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go RPCs defined in this service must be anonymously accessible. */ #[derive(Debug)] pub struct AuthMetadataServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl AuthMetadataServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for AuthMetadataServiceServer where T: AuthMetadataService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.AuthMetadataService/GetOAuth2Metadata" => { #[allow(non_camel_case_types)] struct GetOAuth2MetadataSvc(pub Arc); impl< T: AuthMetadataService, > tonic::server::UnaryService for GetOAuth2MetadataSvc { type Response = super::OAuth2MetadataResponse; 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 { ::get_o_auth2_metadata( &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 inner = inner.0; let method = GetOAuth2MetadataSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.AuthMetadataService/GetPublicClientConfig" => { #[allow(non_camel_case_types)] struct GetPublicClientConfigSvc(pub Arc); impl< T: AuthMetadataService, > tonic::server::UnaryService for GetPublicClientConfigSvc { type Response = super::PublicClientAuthConfigResponse; 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 { ::get_public_client_config( &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 inner = inner.0; let method = GetPublicClientConfigSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for AuthMetadataServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for AuthMetadataServiceServer { const NAME: &'static str = "flyteidl.service.AuthMetadataService"; } } /// Generated client implementations. pub mod data_proxy_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** DataProxyService defines an RPC Service that allows access to user-data in a controlled manner. */ #[derive(Debug, Clone)] pub struct DataProxyServiceClient { inner: tonic::client::Grpc, } impl DataProxyServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl DataProxyServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> DataProxyServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { DataProxyServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** CreateUploadLocation creates a signed url to upload artifacts to for a given project/domain. */ pub async fn create_upload_location( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.DataProxyService/CreateUploadLocation", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.DataProxyService", "CreateUploadLocation", ), ); self.inner.unary(req, path, codec).await } /** CreateDownloadLocation creates a signed url to download artifacts. */ pub async fn create_download_location( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.DataProxyService/CreateDownloadLocation", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.DataProxyService", "CreateDownloadLocation", ), ); self.inner.unary(req, path, codec).await } /** CreateDownloadLocation creates a signed url to download artifacts. */ pub async fn create_download_link( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.DataProxyService/CreateDownloadLink", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.DataProxyService", "CreateDownloadLink", ), ); self.inner.unary(req, path, codec).await } /// pub async fn get_data( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.DataProxyService/GetData", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.DataProxyService", "GetData")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod data_proxy_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with DataProxyServiceServer. #[async_trait] pub trait DataProxyService: Send + Sync + 'static { /** CreateUploadLocation creates a signed url to upload artifacts to for a given project/domain. */ async fn create_upload_location( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** CreateDownloadLocation creates a signed url to download artifacts. */ async fn create_download_location( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** CreateDownloadLocation creates a signed url to download artifacts. */ async fn create_download_link( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /// async fn get_data( &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; } /** DataProxyService defines an RPC Service that allows access to user-data in a controlled manner. */ #[derive(Debug)] pub struct DataProxyServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl DataProxyServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for DataProxyServiceServer where T: DataProxyService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.DataProxyService/CreateUploadLocation" => { #[allow(non_camel_case_types)] struct CreateUploadLocationSvc(pub Arc); impl< T: DataProxyService, > tonic::server::UnaryService for CreateUploadLocationSvc { type Response = super::CreateUploadLocationResponse; 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_upload_location( &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 inner = inner.0; let method = CreateUploadLocationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.DataProxyService/CreateDownloadLocation" => { #[allow(non_camel_case_types)] struct CreateDownloadLocationSvc(pub Arc); impl< T: DataProxyService, > tonic::server::UnaryService for CreateDownloadLocationSvc { type Response = super::CreateDownloadLocationResponse; 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_download_location( &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 inner = inner.0; let method = CreateDownloadLocationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.DataProxyService/CreateDownloadLink" => { #[allow(non_camel_case_types)] struct CreateDownloadLinkSvc(pub Arc); impl< T: DataProxyService, > tonic::server::UnaryService for CreateDownloadLinkSvc { type Response = super::CreateDownloadLinkResponse; 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_download_link( &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 inner = inner.0; let method = CreateDownloadLinkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.DataProxyService/GetData" => { #[allow(non_camel_case_types)] struct GetDataSvc(pub Arc); impl< T: DataProxyService, > tonic::server::UnaryService for GetDataSvc { type Response = super::GetDataResponse; 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 { ::get_data(&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 inner = inner.0; let method = GetDataSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for DataProxyServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for DataProxyServiceServer { const NAME: &'static str = "flyteidl.service.DataProxyService"; } } /// Generated client implementations. pub mod external_plugin_service_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 ExternalPluginServiceClient { inner: tonic::client::Grpc, } impl ExternalPluginServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl ExternalPluginServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> ExternalPluginServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { ExternalPluginServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } pub async fn create_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.ExternalPluginService/CreateTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.ExternalPluginService", "CreateTask", ), ); self.inner.unary(req, path, codec).await } pub async fn get_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.ExternalPluginService/GetTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.ExternalPluginService", "GetTask"), ); self.inner.unary(req, path, codec).await } pub async fn delete_task( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.ExternalPluginService/DeleteTask", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.ExternalPluginService", "DeleteTask", ), ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod external_plugin_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with ExternalPluginServiceServer. #[async_trait] pub trait ExternalPluginService: Send + Sync + 'static { async fn create_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; async fn get_task( &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; async fn delete_task( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } #[derive(Debug)] pub struct ExternalPluginServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl ExternalPluginServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for ExternalPluginServiceServer where T: ExternalPluginService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.ExternalPluginService/CreateTask" => { #[allow(non_camel_case_types)] struct CreateTaskSvc(pub Arc); impl< T: ExternalPluginService, > tonic::server::UnaryService for CreateTaskSvc { type Response = super::TaskCreateResponse; 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_task(&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 inner = inner.0; let method = CreateTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.ExternalPluginService/GetTask" => { #[allow(non_camel_case_types)] struct GetTaskSvc(pub Arc); impl< T: ExternalPluginService, > tonic::server::UnaryService for GetTaskSvc { type Response = super::TaskGetResponse; 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 { ::get_task(&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 inner = inner.0; let method = GetTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.ExternalPluginService/DeleteTask" => { #[allow(non_camel_case_types)] struct DeleteTaskSvc(pub Arc); impl< T: ExternalPluginService, > tonic::server::UnaryService for DeleteTaskSvc { type Response = super::TaskDeleteResponse; 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_task(&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 inner = inner.0; let method = DeleteTaskSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for ExternalPluginServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for ExternalPluginServiceServer { const NAME: &'static str = "flyteidl.service.ExternalPluginService"; } } /// Generated client implementations. pub mod identity_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** IdentityService defines an RPC Service that interacts with user/app identities. */ #[derive(Debug, Clone)] pub struct IdentityServiceClient { inner: tonic::client::Grpc, } impl IdentityServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl IdentityServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> IdentityServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { IdentityServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** Retrieves user information about the currently logged in user. */ pub async fn user_info( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.IdentityService/UserInfo", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.IdentityService", "UserInfo")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod identity_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with IdentityServiceServer. #[async_trait] pub trait IdentityService: Send + Sync + 'static { /** Retrieves user information about the currently logged in user. */ async fn user_info( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** IdentityService defines an RPC Service that interacts with user/app identities. */ #[derive(Debug)] pub struct IdentityServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl IdentityServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for IdentityServiceServer where T: IdentityService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.IdentityService/UserInfo" => { #[allow(non_camel_case_types)] struct UserInfoSvc(pub Arc); impl< T: IdentityService, > tonic::server::UnaryService for UserInfoSvc { type Response = super::UserInfoResponse; 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 { ::user_info(&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 inner = inner.0; let method = UserInfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for IdentityServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for IdentityServiceServer { const NAME: &'static str = "flyteidl.service.IdentityService"; } } /// Generated client implementations. pub mod signal_service_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; /** SignalService defines an RPC Service that may create, update, and retrieve signal(s). */ #[derive(Debug, Clone)] pub struct SignalServiceClient { inner: tonic::client::Grpc, } impl SignalServiceClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl SignalServiceClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + 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( inner: T, interceptor: F, ) -> SignalServiceClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, , >>::Error: Into + Send + Sync, { SignalServiceClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_decoding_message_size(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.inner = self.inner.max_encoding_message_size(limit); self } /** Fetches or creates a :ref:`ref_flyteidl.admin.Signal`. */ pub async fn get_or_create_signal( &mut self, request: impl tonic::IntoRequest< super::super::admin::SignalGetOrCreateRequest, >, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.SignalService/GetOrCreateSignal", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( "flyteidl.service.SignalService", "GetOrCreateSignal", ), ); self.inner.unary(req, path, codec).await } /** Fetch a list of :ref:`ref_flyteidl.admin.Signal` definitions. */ pub async fn list_signals( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.SignalService/ListSignals", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new("flyteidl.service.SignalService", "ListSignals"), ); self.inner.unary(req, path, codec).await } /** Sets the value on a :ref:`ref_flyteidl.admin.Signal` definition */ pub async fn set_signal( &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< tonic::Response, 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( "/flyteidl.service.SignalService/SetSignal", ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("flyteidl.service.SignalService", "SetSignal")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod signal_service_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with SignalServiceServer. #[async_trait] pub trait SignalService: Send + Sync + 'static { /** Fetches or creates a :ref:`ref_flyteidl.admin.Signal`. */ async fn get_or_create_signal( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Fetch a list of :ref:`ref_flyteidl.admin.Signal` definitions. */ async fn list_signals( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; /** Sets the value on a :ref:`ref_flyteidl.admin.Signal` definition */ async fn set_signal( &self, request: tonic::Request, ) -> std::result::Result< tonic::Response, tonic::Status, >; } /** SignalService defines an RPC Service that may create, update, and retrieve signal(s). */ #[derive(Debug)] pub struct SignalServiceServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } struct _Inner(Arc); impl SignalServiceServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, } } pub fn with_interceptor( inner: T, interceptor: F, ) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } /// Limits the maximum size of a decoded message. /// /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); self } /// Limits the maximum size of an encoded message. /// /// Default: `usize::MAX` #[must_use] pub fn max_encoding_message_size(mut self, limit: usize) -> Self { self.max_encoding_message_size = Some(limit); self } } impl tonic::codegen::Service> for SignalServiceServer where T: SignalService, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( &mut self, _cx: &mut Context<'_>, ) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/flyteidl.service.SignalService/GetOrCreateSignal" => { #[allow(non_camel_case_types)] struct GetOrCreateSignalSvc(pub Arc); impl< T: SignalService, > tonic::server::UnaryService< super::super::admin::SignalGetOrCreateRequest, > for GetOrCreateSignalSvc { type Response = super::super::admin::Signal; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::SignalGetOrCreateRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::get_or_create_signal(&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 inner = inner.0; let method = GetOrCreateSignalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.SignalService/ListSignals" => { #[allow(non_camel_case_types)] struct ListSignalsSvc(pub Arc); impl< T: SignalService, > tonic::server::UnaryService for ListSignalsSvc { type Response = super::super::admin::SignalList; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::SignalListRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::list_signals(&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 inner = inner.0; let method = ListSignalsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/flyteidl.service.SignalService/SetSignal" => { #[allow(non_camel_case_types)] struct SetSignalSvc(pub Arc); impl< T: SignalService, > tonic::server::UnaryService for SetSignalSvc { type Response = super::super::admin::SignalSetResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, request: tonic::Request< super::super::admin::SignalSetRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { ::set_signal(&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 inner = inner.0; let method = SetSignalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( accept_compression_encodings, send_compression_encodings, ) .apply_max_message_size_config( max_decoding_message_size, max_encoding_message_size, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => { Box::pin(async move { Ok( http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap(), ) }) } } } } impl Clone for SignalServiceServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for SignalServiceServer { const NAME: &'static str = "flyteidl.service.SignalService"; } }