1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ExecutorConnectionRequest {
5 #[prost(message, optional, tag = "1")]
7 pub message: ::core::option::Option<ExecutorMessage>,
8}
9impl ::prost::Name for ExecutorConnectionRequest {
10 const NAME: &'static str = "ExecutorConnectionRequest";
11 const PACKAGE: &'static str = "ora.server.v1";
12 fn full_name() -> ::prost::alloc::string::String {
13 "ora.server.v1.ExecutorConnectionRequest".into()
14 }
15 fn type_url() -> ::prost::alloc::string::String {
16 "/ora.server.v1.ExecutorConnectionRequest".into()
17 }
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct ExecutorConnectionResponse {
22 #[prost(message, optional, tag = "1")]
24 pub message: ::core::option::Option<ServerMessage>,
25}
26impl ::prost::Name for ExecutorConnectionResponse {
27 const NAME: &'static str = "ExecutorConnectionResponse";
28 const PACKAGE: &'static str = "ora.server.v1";
29 fn full_name() -> ::prost::alloc::string::String {
30 "ora.server.v1.ExecutorConnectionResponse".into()
31 }
32 fn type_url() -> ::prost::alloc::string::String {
33 "/ora.server.v1.ExecutorConnectionResponse".into()
34 }
35}
36#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct ExecutorMessage {
39 #[prost(
41 oneof = "executor_message::ExecutorMessageKind",
42 tags = "1, 2, 3, 4, 5"
43 )]
44 pub executor_message_kind: ::core::option::Option<executor_message::ExecutorMessageKind>,
45}
46pub mod executor_message {
48 #[derive(Clone, PartialEq, ::prost::Oneof)]
50 pub enum ExecutorMessageKind {
51 #[prost(message, tag = "1")]
58 Capabilities(super::ExecutorCapabilities),
59 #[prost(message, tag = "2")]
61 Heartbeat(super::ExecutorHeartbeat),
62 #[prost(message, tag = "3")]
64 ExecutionStarted(super::ExecutionStarted),
65 #[prost(message, tag = "4")]
67 ExecutionSucceeded(super::ExecutionSucceeded),
68 #[prost(message, tag = "5")]
70 ExecutionFailed(super::ExecutionFailed),
71 }
72}
73impl ::prost::Name for ExecutorMessage {
74 const NAME: &'static str = "ExecutorMessage";
75 const PACKAGE: &'static str = "ora.server.v1";
76 fn full_name() -> ::prost::alloc::string::String {
77 "ora.server.v1.ExecutorMessage".into()
78 }
79 fn type_url() -> ::prost::alloc::string::String {
80 "/ora.server.v1.ExecutorMessage".into()
81 }
82}
83#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct ExecutorCapabilities {
87 #[prost(string, tag = "1")]
89 pub name: ::prost::alloc::string::String,
90 #[prost(message, repeated, tag = "2")]
92 pub supported_job_types: ::prost::alloc::vec::Vec<super::super::common::v1::JobType>,
93 #[prost(uint32, tag = "3")]
102 pub max_concurrent_executions: u32,
103}
104impl ::prost::Name for ExecutorCapabilities {
105 const NAME: &'static str = "ExecutorCapabilities";
106 const PACKAGE: &'static str = "ora.server.v1";
107 fn full_name() -> ::prost::alloc::string::String {
108 "ora.server.v1.ExecutorCapabilities".into()
109 }
110 fn type_url() -> ::prost::alloc::string::String {
111 "/ora.server.v1.ExecutorCapabilities".into()
112 }
113}
114#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct ExecutorHeartbeat {}
117impl ::prost::Name for ExecutorHeartbeat {
118 const NAME: &'static str = "ExecutorHeartbeat";
119 const PACKAGE: &'static str = "ora.server.v1";
120 fn full_name() -> ::prost::alloc::string::String {
121 "ora.server.v1.ExecutorHeartbeat".into()
122 }
123 fn type_url() -> ::prost::alloc::string::String {
124 "/ora.server.v1.ExecutorHeartbeat".into()
125 }
126}
127#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct ExecutionStarted {
130 #[prost(string, tag = "1")]
132 pub execution_id: ::prost::alloc::string::String,
133 #[prost(message, optional, tag = "2")]
135 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
136}
137impl ::prost::Name for ExecutionStarted {
138 const NAME: &'static str = "ExecutionStarted";
139 const PACKAGE: &'static str = "ora.server.v1";
140 fn full_name() -> ::prost::alloc::string::String {
141 "ora.server.v1.ExecutionStarted".into()
142 }
143 fn type_url() -> ::prost::alloc::string::String {
144 "/ora.server.v1.ExecutionStarted".into()
145 }
146}
147#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct ExecutionSucceeded {
150 #[prost(string, tag = "1")]
152 pub execution_id: ::prost::alloc::string::String,
153 #[prost(message, optional, tag = "2")]
155 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
156 #[prost(string, tag = "3")]
158 pub output_payload_json: ::prost::alloc::string::String,
159}
160impl ::prost::Name for ExecutionSucceeded {
161 const NAME: &'static str = "ExecutionSucceeded";
162 const PACKAGE: &'static str = "ora.server.v1";
163 fn full_name() -> ::prost::alloc::string::String {
164 "ora.server.v1.ExecutionSucceeded".into()
165 }
166 fn type_url() -> ::prost::alloc::string::String {
167 "/ora.server.v1.ExecutionSucceeded".into()
168 }
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct ExecutionFailed {
173 #[prost(string, tag = "1")]
175 pub execution_id: ::prost::alloc::string::String,
176 #[prost(message, optional, tag = "2")]
178 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
179 #[prost(string, tag = "3")]
181 pub error_message: ::prost::alloc::string::String,
182}
183impl ::prost::Name for ExecutionFailed {
184 const NAME: &'static str = "ExecutionFailed";
185 const PACKAGE: &'static str = "ora.server.v1";
186 fn full_name() -> ::prost::alloc::string::String {
187 "ora.server.v1.ExecutionFailed".into()
188 }
189 fn type_url() -> ::prost::alloc::string::String {
190 "/ora.server.v1.ExecutionFailed".into()
191 }
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
195pub struct ServerMessage {
196 #[prost(oneof = "server_message::ServerMessageKind", tags = "1, 2, 3")]
198 pub server_message_kind: ::core::option::Option<server_message::ServerMessageKind>,
199}
200pub mod server_message {
202 #[derive(Clone, PartialEq, ::prost::Oneof)]
204 pub enum ServerMessageKind {
205 #[prost(message, tag = "1")]
207 Properties(super::ExecutorProperties),
208 #[prost(message, tag = "2")]
210 ExecutionReady(super::ExecutionReady),
211 #[prost(message, tag = "3")]
213 ExecutionCancelled(super::ExecutionCancelled),
214 }
215}
216impl ::prost::Name for ServerMessage {
217 const NAME: &'static str = "ServerMessage";
218 const PACKAGE: &'static str = "ora.server.v1";
219 fn full_name() -> ::prost::alloc::string::String {
220 "ora.server.v1.ServerMessage".into()
221 }
222 fn type_url() -> ::prost::alloc::string::String {
223 "/ora.server.v1.ServerMessage".into()
224 }
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct ExecutorProperties {
229 #[prost(string, tag = "1")]
231 pub executor_id: ::prost::alloc::string::String,
232 #[prost(message, optional, tag = "2")]
242 pub max_heartbeat_interval: ::core::option::Option<::prost_types::Duration>,
243}
244impl ::prost::Name for ExecutorProperties {
245 const NAME: &'static str = "ExecutorProperties";
246 const PACKAGE: &'static str = "ora.server.v1";
247 fn full_name() -> ::prost::alloc::string::String {
248 "ora.server.v1.ExecutorProperties".into()
249 }
250 fn type_url() -> ::prost::alloc::string::String {
251 "/ora.server.v1.ExecutorProperties".into()
252 }
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct ExecutionReady {
257 #[prost(string, tag = "1")]
259 pub job_id: ::prost::alloc::string::String,
260 #[prost(string, tag = "2")]
262 pub execution_id: ::prost::alloc::string::String,
263 #[prost(string, tag = "3")]
265 pub job_type_id: ::prost::alloc::string::String,
266 #[prost(uint64, tag = "4")]
270 pub attempt_number: u64,
271 #[prost(string, tag = "5")]
273 pub input_payload_json: ::prost::alloc::string::String,
274 #[prost(message, optional, tag = "6")]
276 pub target_execution_time: ::core::option::Option<::prost_types::Timestamp>,
277}
278impl ::prost::Name for ExecutionReady {
279 const NAME: &'static str = "ExecutionReady";
280 const PACKAGE: &'static str = "ora.server.v1";
281 fn full_name() -> ::prost::alloc::string::String {
282 "ora.server.v1.ExecutionReady".into()
283 }
284 fn type_url() -> ::prost::alloc::string::String {
285 "/ora.server.v1.ExecutionReady".into()
286 }
287}
288#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct ExecutionCancelled {
291 #[prost(string, tag = "1")]
293 pub execution_id: ::prost::alloc::string::String,
294}
295impl ::prost::Name for ExecutionCancelled {
296 const NAME: &'static str = "ExecutionCancelled";
297 const PACKAGE: &'static str = "ora.server.v1";
298 fn full_name() -> ::prost::alloc::string::String {
299 "ora.server.v1.ExecutionCancelled".into()
300 }
301 fn type_url() -> ::prost::alloc::string::String {
302 "/ora.server.v1.ExecutionCancelled".into()
303 }
304}
305pub mod executor_service_client {
307 #![allow(
308 unused_variables,
309 dead_code,
310 missing_docs,
311 clippy::wildcard_imports,
312 clippy::let_unit_value
313 )]
314 use tonic::codegen::http::Uri;
315 use tonic::codegen::*;
316 #[derive(Debug, Clone)]
318 pub struct ExecutorServiceClient<T> {
319 inner: tonic::client::Grpc<T>,
320 }
321 impl ExecutorServiceClient<tonic::transport::Channel> {
322 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
324 where
325 D: TryInto<tonic::transport::Endpoint>,
326 D::Error: Into<StdError>,
327 {
328 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
329 Ok(Self::new(conn))
330 }
331 }
332 impl<T> ExecutorServiceClient<T>
333 where
334 T: tonic::client::GrpcService<tonic::body::BoxBody>,
335 T::Error: Into<StdError>,
336 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
337 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
338 {
339 pub fn new(inner: T) -> Self {
340 let inner = tonic::client::Grpc::new(inner);
341 Self { inner }
342 }
343 pub fn with_origin(inner: T, origin: Uri) -> Self {
344 let inner = tonic::client::Grpc::with_origin(inner, origin);
345 Self { inner }
346 }
347 pub fn with_interceptor<F>(
348 inner: T,
349 interceptor: F,
350 ) -> ExecutorServiceClient<InterceptedService<T, F>>
351 where
352 F: tonic::service::Interceptor,
353 T::ResponseBody: Default,
354 T: tonic::codegen::Service<
355 http::Request<tonic::body::BoxBody>,
356 Response = http::Response<
357 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
358 >,
359 >,
360 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
361 Into<StdError> + std::marker::Send + std::marker::Sync,
362 {
363 ExecutorServiceClient::new(InterceptedService::new(inner, interceptor))
364 }
365 #[must_use]
370 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
371 self.inner = self.inner.send_compressed(encoding);
372 self
373 }
374 #[must_use]
376 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
377 self.inner = self.inner.accept_compressed(encoding);
378 self
379 }
380 #[must_use]
384 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
385 self.inner = self.inner.max_decoding_message_size(limit);
386 self
387 }
388 #[must_use]
392 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
393 self.inner = self.inner.max_encoding_message_size(limit);
394 self
395 }
396 pub async fn executor_connection(
398 &mut self,
399 request: impl tonic::IntoStreamingRequest<Message = super::ExecutorConnectionRequest>,
400 ) -> std::result::Result<
401 tonic::Response<tonic::codec::Streaming<super::ExecutorConnectionResponse>>,
402 tonic::Status,
403 > {
404 self.inner.ready().await.map_err(|e| {
405 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
406 })?;
407 let codec = tonic::codec::ProstCodec::default();
408 let path = http::uri::PathAndQuery::from_static(
409 "/ora.server.v1.ExecutorService/ExecutorConnection",
410 );
411 let mut req = request.into_streaming_request();
412 req.extensions_mut().insert(GrpcMethod::new(
413 "ora.server.v1.ExecutorService",
414 "ExecutorConnection",
415 ));
416 self.inner.streaming(req, path, codec).await
417 }
418 }
419}
420pub mod executor_service_server {
422 #![allow(
423 unused_variables,
424 dead_code,
425 missing_docs,
426 clippy::wildcard_imports,
427 clippy::let_unit_value
428 )]
429 use tonic::codegen::*;
430 #[async_trait]
432 pub trait ExecutorService: std::marker::Send + std::marker::Sync + 'static {
433 async fn executor_connection(
435 &self,
436 request: tonic::Request<tonic::Streaming<super::ExecutorConnectionRequest>>,
437 ) -> std::result::Result<
438 tonic::Response<BoxStream<super::ExecutorConnectionResponse>>,
439 tonic::Status,
440 > {
441 Err(tonic::Status::unimplemented("Not yet implemented"))
442 }
443 }
444 #[derive(Debug)]
446 pub struct ExecutorServiceServer<T> {
447 inner: Arc<T>,
448 accept_compression_encodings: EnabledCompressionEncodings,
449 send_compression_encodings: EnabledCompressionEncodings,
450 max_decoding_message_size: Option<usize>,
451 max_encoding_message_size: Option<usize>,
452 }
453 impl<T> ExecutorServiceServer<T> {
454 pub fn new(inner: T) -> Self {
455 Self::from_arc(Arc::new(inner))
456 }
457 pub fn from_arc(inner: Arc<T>) -> Self {
458 Self {
459 inner,
460 accept_compression_encodings: Default::default(),
461 send_compression_encodings: Default::default(),
462 max_decoding_message_size: None,
463 max_encoding_message_size: None,
464 }
465 }
466 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
467 where
468 F: tonic::service::Interceptor,
469 {
470 InterceptedService::new(Self::new(inner), interceptor)
471 }
472 #[must_use]
474 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
475 self.accept_compression_encodings.enable(encoding);
476 self
477 }
478 #[must_use]
480 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
481 self.send_compression_encodings.enable(encoding);
482 self
483 }
484 #[must_use]
488 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
489 self.max_decoding_message_size = Some(limit);
490 self
491 }
492 #[must_use]
496 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
497 self.max_encoding_message_size = Some(limit);
498 self
499 }
500 }
501 impl<T, B> tonic::codegen::Service<http::Request<B>> for ExecutorServiceServer<T>
502 where
503 T: ExecutorService,
504 B: Body + std::marker::Send + 'static,
505 B::Error: Into<StdError> + std::marker::Send + 'static,
506 {
507 type Response = http::Response<tonic::body::BoxBody>;
508 type Error = std::convert::Infallible;
509 type Future = BoxFuture<Self::Response, Self::Error>;
510 fn poll_ready(
511 &mut self,
512 _cx: &mut Context<'_>,
513 ) -> Poll<std::result::Result<(), Self::Error>> {
514 Poll::Ready(Ok(()))
515 }
516 fn call(&mut self, req: http::Request<B>) -> Self::Future {
517 match req.uri().path() {
518 "/ora.server.v1.ExecutorService/ExecutorConnection" => {
519 #[allow(non_camel_case_types)]
520 struct ExecutorConnectionSvc<T: ExecutorService>(pub Arc<T>);
521 impl<T: ExecutorService>
522 tonic::server::StreamingService<super::ExecutorConnectionRequest>
523 for ExecutorConnectionSvc<T>
524 {
525 type Response = super::ExecutorConnectionResponse;
526 type ResponseStream = BoxStream<super::ExecutorConnectionResponse>;
527 type Future =
528 BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
529 fn call(
530 &mut self,
531 request: tonic::Request<
532 tonic::Streaming<super::ExecutorConnectionRequest>,
533 >,
534 ) -> Self::Future {
535 let inner = Arc::clone(&self.0);
536 let fut = async move {
537 <T as ExecutorService>::executor_connection(&inner, request).await
538 };
539 Box::pin(fut)
540 }
541 }
542 let accept_compression_encodings = self.accept_compression_encodings;
543 let send_compression_encodings = self.send_compression_encodings;
544 let max_decoding_message_size = self.max_decoding_message_size;
545 let max_encoding_message_size = self.max_encoding_message_size;
546 let inner = self.inner.clone();
547 let fut = async move {
548 let method = ExecutorConnectionSvc(inner);
549 let codec = tonic::codec::ProstCodec::default();
550 let mut grpc = tonic::server::Grpc::new(codec)
551 .apply_compression_config(
552 accept_compression_encodings,
553 send_compression_encodings,
554 )
555 .apply_max_message_size_config(
556 max_decoding_message_size,
557 max_encoding_message_size,
558 );
559 let res = grpc.streaming(method, req).await;
560 Ok(res)
561 };
562 Box::pin(fut)
563 }
564 _ => Box::pin(async move {
565 let mut response = http::Response::new(empty_body());
566 let headers = response.headers_mut();
567 headers.insert(
568 tonic::Status::GRPC_STATUS,
569 (tonic::Code::Unimplemented as i32).into(),
570 );
571 headers.insert(
572 http::header::CONTENT_TYPE,
573 tonic::metadata::GRPC_CONTENT_TYPE,
574 );
575 Ok(response)
576 }),
577 }
578 }
579 }
580 impl<T> Clone for ExecutorServiceServer<T> {
581 fn clone(&self) -> Self {
582 let inner = self.inner.clone();
583 Self {
584 inner,
585 accept_compression_encodings: self.accept_compression_encodings,
586 send_compression_encodings: self.send_compression_encodings,
587 max_decoding_message_size: self.max_decoding_message_size,
588 max_encoding_message_size: self.max_encoding_message_size,
589 }
590 }
591 }
592 pub const SERVICE_NAME: &str = "ora.server.v1.ExecutorService";
594 impl<T> tonic::server::NamedService for ExecutorServiceServer<T> {
595 const NAME: &'static str = SERVICE_NAME;
596 }
597}
598#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct AddJobsRequest {
601 #[prost(message, repeated, tag = "1")]
603 pub jobs: ::prost::alloc::vec::Vec<super::super::common::v1::JobDefinition>,
604}
605impl ::prost::Name for AddJobsRequest {
606 const NAME: &'static str = "AddJobsRequest";
607 const PACKAGE: &'static str = "ora.server.v1";
608 fn full_name() -> ::prost::alloc::string::String {
609 "ora.server.v1.AddJobsRequest".into()
610 }
611 fn type_url() -> ::prost::alloc::string::String {
612 "/ora.server.v1.AddJobsRequest".into()
613 }
614}
615#[derive(Clone, PartialEq, ::prost::Message)]
617pub struct AddJobsResponse {
618 #[prost(string, repeated, tag = "1")]
620 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
621}
622impl ::prost::Name for AddJobsResponse {
623 const NAME: &'static str = "AddJobsResponse";
624 const PACKAGE: &'static str = "ora.server.v1";
625 fn full_name() -> ::prost::alloc::string::String {
626 "ora.server.v1.AddJobsResponse".into()
627 }
628 fn type_url() -> ::prost::alloc::string::String {
629 "/ora.server.v1.AddJobsResponse".into()
630 }
631}
632#[derive(Clone, PartialEq, ::prost::Message)]
634pub struct AddJobIfNotExistsRequest {
635 #[prost(message, optional, tag = "1")]
637 pub job: ::core::option::Option<super::super::common::v1::JobDefinition>,
638 #[prost(message, optional, tag = "2")]
644 pub filter: ::core::option::Option<JobQueryFilter>,
645}
646impl ::prost::Name for AddJobIfNotExistsRequest {
647 const NAME: &'static str = "AddJobIfNotExistsRequest";
648 const PACKAGE: &'static str = "ora.server.v1";
649 fn full_name() -> ::prost::alloc::string::String {
650 "ora.server.v1.AddJobIfNotExistsRequest".into()
651 }
652 fn type_url() -> ::prost::alloc::string::String {
653 "/ora.server.v1.AddJobIfNotExistsRequest".into()
654 }
655}
656#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct AddJobIfNotExistsResponse {
659 #[prost(string, tag = "1")]
661 pub job_id: ::prost::alloc::string::String,
662 #[prost(bool, tag = "2")]
664 pub added: bool,
665}
666impl ::prost::Name for AddJobIfNotExistsResponse {
667 const NAME: &'static str = "AddJobIfNotExistsResponse";
668 const PACKAGE: &'static str = "ora.server.v1";
669 fn full_name() -> ::prost::alloc::string::String {
670 "ora.server.v1.AddJobIfNotExistsResponse".into()
671 }
672 fn type_url() -> ::prost::alloc::string::String {
673 "/ora.server.v1.AddJobIfNotExistsResponse".into()
674 }
675}
676#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct ListJobsRequest {
679 #[prost(string, optional, tag = "1")]
684 pub cursor: ::core::option::Option<::prost::alloc::string::String>,
685 #[prost(message, optional, tag = "2")]
687 pub filter: ::core::option::Option<JobQueryFilter>,
688 #[prost(enumeration = "JobQueryOrder", optional, tag = "3")]
690 pub order: ::core::option::Option<i32>,
691 #[prost(uint32, tag = "4")]
696 pub limit: u32,
697}
698impl ::prost::Name for ListJobsRequest {
699 const NAME: &'static str = "ListJobsRequest";
700 const PACKAGE: &'static str = "ora.server.v1";
701 fn full_name() -> ::prost::alloc::string::String {
702 "ora.server.v1.ListJobsRequest".into()
703 }
704 fn type_url() -> ::prost::alloc::string::String {
705 "/ora.server.v1.ListJobsRequest".into()
706 }
707}
708#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct ListJobsResponse {
711 #[prost(message, repeated, tag = "1")]
713 pub jobs: ::prost::alloc::vec::Vec<Job>,
714 #[prost(string, optional, tag = "2")]
722 pub cursor: ::core::option::Option<::prost::alloc::string::String>,
723 #[prost(bool, tag = "3")]
725 pub has_more: bool,
726}
727impl ::prost::Name for ListJobsResponse {
728 const NAME: &'static str = "ListJobsResponse";
729 const PACKAGE: &'static str = "ora.server.v1";
730 fn full_name() -> ::prost::alloc::string::String {
731 "ora.server.v1.ListJobsResponse".into()
732 }
733 fn type_url() -> ::prost::alloc::string::String {
734 "/ora.server.v1.ListJobsResponse".into()
735 }
736}
737#[derive(Clone, Copy, PartialEq, ::prost::Message)]
739pub struct ListJobTypesRequest {}
740impl ::prost::Name for ListJobTypesRequest {
741 const NAME: &'static str = "ListJobTypesRequest";
742 const PACKAGE: &'static str = "ora.server.v1";
743 fn full_name() -> ::prost::alloc::string::String {
744 "ora.server.v1.ListJobTypesRequest".into()
745 }
746 fn type_url() -> ::prost::alloc::string::String {
747 "/ora.server.v1.ListJobTypesRequest".into()
748 }
749}
750#[derive(Clone, PartialEq, ::prost::Message)]
752pub struct ListJobTypesResponse {
753 #[prost(message, repeated, tag = "1")]
755 pub job_types: ::prost::alloc::vec::Vec<super::super::common::v1::JobType>,
756}
757impl ::prost::Name for ListJobTypesResponse {
758 const NAME: &'static str = "ListJobTypesResponse";
759 const PACKAGE: &'static str = "ora.server.v1";
760 fn full_name() -> ::prost::alloc::string::String {
761 "ora.server.v1.ListJobTypesResponse".into()
762 }
763 fn type_url() -> ::prost::alloc::string::String {
764 "/ora.server.v1.ListJobTypesResponse".into()
765 }
766}
767#[derive(Clone, PartialEq, ::prost::Message)]
769pub struct CountJobsRequest {
770 #[prost(message, optional, tag = "1")]
772 pub filter: ::core::option::Option<JobQueryFilter>,
773}
774impl ::prost::Name for CountJobsRequest {
775 const NAME: &'static str = "CountJobsRequest";
776 const PACKAGE: &'static str = "ora.server.v1";
777 fn full_name() -> ::prost::alloc::string::String {
778 "ora.server.v1.CountJobsRequest".into()
779 }
780 fn type_url() -> ::prost::alloc::string::String {
781 "/ora.server.v1.CountJobsRequest".into()
782 }
783}
784#[derive(Clone, Copy, PartialEq, ::prost::Message)]
786pub struct CountJobsResponse {
787 #[prost(uint64, tag = "1")]
789 pub count: u64,
790}
791impl ::prost::Name for CountJobsResponse {
792 const NAME: &'static str = "CountJobsResponse";
793 const PACKAGE: &'static str = "ora.server.v1";
794 fn full_name() -> ::prost::alloc::string::String {
795 "ora.server.v1.CountJobsResponse".into()
796 }
797 fn type_url() -> ::prost::alloc::string::String {
798 "/ora.server.v1.CountJobsResponse".into()
799 }
800}
801#[derive(Clone, PartialEq, ::prost::Message)]
803pub struct CancelJobsRequest {
804 #[prost(message, optional, tag = "1")]
806 pub filter: ::core::option::Option<JobQueryFilter>,
807}
808impl ::prost::Name for CancelJobsRequest {
809 const NAME: &'static str = "CancelJobsRequest";
810 const PACKAGE: &'static str = "ora.server.v1";
811 fn full_name() -> ::prost::alloc::string::String {
812 "ora.server.v1.CancelJobsRequest".into()
813 }
814 fn type_url() -> ::prost::alloc::string::String {
815 "/ora.server.v1.CancelJobsRequest".into()
816 }
817}
818#[derive(Clone, PartialEq, ::prost::Message)]
820pub struct CancelJobsResponse {
821 #[prost(string, repeated, tag = "1")]
823 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
824}
825impl ::prost::Name for CancelJobsResponse {
826 const NAME: &'static str = "CancelJobsResponse";
827 const PACKAGE: &'static str = "ora.server.v1";
828 fn full_name() -> ::prost::alloc::string::String {
829 "ora.server.v1.CancelJobsResponse".into()
830 }
831 fn type_url() -> ::prost::alloc::string::String {
832 "/ora.server.v1.CancelJobsResponse".into()
833 }
834}
835#[derive(Clone, PartialEq, ::prost::Message)]
837pub struct DeleteInactiveJobsRequest {
838 #[prost(message, optional, tag = "1")]
840 pub filter: ::core::option::Option<JobQueryFilter>,
841}
842impl ::prost::Name for DeleteInactiveJobsRequest {
843 const NAME: &'static str = "DeleteInactiveJobsRequest";
844 const PACKAGE: &'static str = "ora.server.v1";
845 fn full_name() -> ::prost::alloc::string::String {
846 "ora.server.v1.DeleteInactiveJobsRequest".into()
847 }
848 fn type_url() -> ::prost::alloc::string::String {
849 "/ora.server.v1.DeleteInactiveJobsRequest".into()
850 }
851}
852#[derive(Clone, PartialEq, ::prost::Message)]
854pub struct DeleteInactiveJobsResponse {
855 #[prost(string, repeated, tag = "1")]
857 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
858}
859impl ::prost::Name for DeleteInactiveJobsResponse {
860 const NAME: &'static str = "DeleteInactiveJobsResponse";
861 const PACKAGE: &'static str = "ora.server.v1";
862 fn full_name() -> ::prost::alloc::string::String {
863 "ora.server.v1.DeleteInactiveJobsResponse".into()
864 }
865 fn type_url() -> ::prost::alloc::string::String {
866 "/ora.server.v1.DeleteInactiveJobsResponse".into()
867 }
868}
869#[derive(Clone, Copy, PartialEq, ::prost::Message)]
871pub struct ListExecutorsRequest {}
872impl ::prost::Name for ListExecutorsRequest {
873 const NAME: &'static str = "ListExecutorsRequest";
874 const PACKAGE: &'static str = "ora.server.v1";
875 fn full_name() -> ::prost::alloc::string::String {
876 "ora.server.v1.ListExecutorsRequest".into()
877 }
878 fn type_url() -> ::prost::alloc::string::String {
879 "/ora.server.v1.ListExecutorsRequest".into()
880 }
881}
882#[derive(Clone, PartialEq, ::prost::Message)]
884pub struct ListExecutorsResponse {
885 #[prost(message, repeated, tag = "1")]
887 pub executors: ::prost::alloc::vec::Vec<ExecutorInfo>,
888}
889impl ::prost::Name for ListExecutorsResponse {
890 const NAME: &'static str = "ListExecutorsResponse";
891 const PACKAGE: &'static str = "ora.server.v1";
892 fn full_name() -> ::prost::alloc::string::String {
893 "ora.server.v1.ListExecutorsResponse".into()
894 }
895 fn type_url() -> ::prost::alloc::string::String {
896 "/ora.server.v1.ListExecutorsResponse".into()
897 }
898}
899#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct CreateSchedulesRequest {
902 #[prost(message, repeated, tag = "1")]
904 pub schedules: ::prost::alloc::vec::Vec<super::super::common::v1::ScheduleDefinition>,
905}
906impl ::prost::Name for CreateSchedulesRequest {
907 const NAME: &'static str = "CreateSchedulesRequest";
908 const PACKAGE: &'static str = "ora.server.v1";
909 fn full_name() -> ::prost::alloc::string::String {
910 "ora.server.v1.CreateSchedulesRequest".into()
911 }
912 fn type_url() -> ::prost::alloc::string::String {
913 "/ora.server.v1.CreateSchedulesRequest".into()
914 }
915}
916#[derive(Clone, PartialEq, ::prost::Message)]
918pub struct CreateSchedulesResponse {
919 #[prost(string, repeated, tag = "1")]
921 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
922}
923impl ::prost::Name for CreateSchedulesResponse {
924 const NAME: &'static str = "CreateSchedulesResponse";
925 const PACKAGE: &'static str = "ora.server.v1";
926 fn full_name() -> ::prost::alloc::string::String {
927 "ora.server.v1.CreateSchedulesResponse".into()
928 }
929 fn type_url() -> ::prost::alloc::string::String {
930 "/ora.server.v1.CreateSchedulesResponse".into()
931 }
932}
933#[derive(Clone, PartialEq, ::prost::Message)]
935pub struct AddSchedulesRequest {
936 #[prost(message, repeated, tag = "1")]
938 pub schedules: ::prost::alloc::vec::Vec<super::super::common::v1::ScheduleDefinition>,
939}
940impl ::prost::Name for AddSchedulesRequest {
941 const NAME: &'static str = "AddSchedulesRequest";
942 const PACKAGE: &'static str = "ora.server.v1";
943 fn full_name() -> ::prost::alloc::string::String {
944 "ora.server.v1.AddSchedulesRequest".into()
945 }
946 fn type_url() -> ::prost::alloc::string::String {
947 "/ora.server.v1.AddSchedulesRequest".into()
948 }
949}
950#[derive(Clone, PartialEq, ::prost::Message)]
952pub struct AddSchedulesResponse {
953 #[prost(string, repeated, tag = "1")]
955 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
956}
957impl ::prost::Name for AddSchedulesResponse {
958 const NAME: &'static str = "AddSchedulesResponse";
959 const PACKAGE: &'static str = "ora.server.v1";
960 fn full_name() -> ::prost::alloc::string::String {
961 "ora.server.v1.AddSchedulesResponse".into()
962 }
963 fn type_url() -> ::prost::alloc::string::String {
964 "/ora.server.v1.AddSchedulesResponse".into()
965 }
966}
967#[derive(Clone, PartialEq, ::prost::Message)]
969pub struct AddScheduleIfNotExistsRequest {
970 #[prost(message, optional, tag = "1")]
972 pub schedule: ::core::option::Option<super::super::common::v1::ScheduleDefinition>,
973 #[prost(message, optional, tag = "2")]
979 pub filter: ::core::option::Option<ScheduleQueryFilter>,
980}
981impl ::prost::Name for AddScheduleIfNotExistsRequest {
982 const NAME: &'static str = "AddScheduleIfNotExistsRequest";
983 const PACKAGE: &'static str = "ora.server.v1";
984 fn full_name() -> ::prost::alloc::string::String {
985 "ora.server.v1.AddScheduleIfNotExistsRequest".into()
986 }
987 fn type_url() -> ::prost::alloc::string::String {
988 "/ora.server.v1.AddScheduleIfNotExistsRequest".into()
989 }
990}
991#[derive(Clone, PartialEq, ::prost::Message)]
993pub struct AddScheduleIfNotExistsResponse {
994 #[prost(string, tag = "1")]
996 pub schedule_id: ::prost::alloc::string::String,
997 #[prost(bool, tag = "2")]
999 pub added: bool,
1000}
1001impl ::prost::Name for AddScheduleIfNotExistsResponse {
1002 const NAME: &'static str = "AddScheduleIfNotExistsResponse";
1003 const PACKAGE: &'static str = "ora.server.v1";
1004 fn full_name() -> ::prost::alloc::string::String {
1005 "ora.server.v1.AddScheduleIfNotExistsResponse".into()
1006 }
1007 fn type_url() -> ::prost::alloc::string::String {
1008 "/ora.server.v1.AddScheduleIfNotExistsResponse".into()
1009 }
1010}
1011#[derive(Clone, PartialEq, ::prost::Message)]
1013pub struct ListSchedulesRequest {
1014 #[prost(string, optional, tag = "1")]
1019 pub cursor: ::core::option::Option<::prost::alloc::string::String>,
1020 #[prost(message, optional, tag = "2")]
1022 pub filter: ::core::option::Option<ScheduleQueryFilter>,
1023 #[prost(enumeration = "ScheduleQueryOrder", optional, tag = "3")]
1025 pub order: ::core::option::Option<i32>,
1026 #[prost(uint32, tag = "4")]
1031 pub limit: u32,
1032}
1033impl ::prost::Name for ListSchedulesRequest {
1034 const NAME: &'static str = "ListSchedulesRequest";
1035 const PACKAGE: &'static str = "ora.server.v1";
1036 fn full_name() -> ::prost::alloc::string::String {
1037 "ora.server.v1.ListSchedulesRequest".into()
1038 }
1039 fn type_url() -> ::prost::alloc::string::String {
1040 "/ora.server.v1.ListSchedulesRequest".into()
1041 }
1042}
1043#[derive(Clone, PartialEq, ::prost::Message)]
1045pub struct ListSchedulesResponse {
1046 #[prost(message, repeated, tag = "1")]
1048 pub schedules: ::prost::alloc::vec::Vec<Schedule>,
1049 #[prost(string, optional, tag = "2")]
1057 pub cursor: ::core::option::Option<::prost::alloc::string::String>,
1058 #[prost(bool, tag = "3")]
1060 pub has_more: bool,
1061}
1062impl ::prost::Name for ListSchedulesResponse {
1063 const NAME: &'static str = "ListSchedulesResponse";
1064 const PACKAGE: &'static str = "ora.server.v1";
1065 fn full_name() -> ::prost::alloc::string::String {
1066 "ora.server.v1.ListSchedulesResponse".into()
1067 }
1068 fn type_url() -> ::prost::alloc::string::String {
1069 "/ora.server.v1.ListSchedulesResponse".into()
1070 }
1071}
1072#[derive(Clone, PartialEq, ::prost::Message)]
1074pub struct CountSchedulesRequest {
1075 #[prost(message, optional, tag = "1")]
1077 pub filter: ::core::option::Option<ScheduleQueryFilter>,
1078}
1079impl ::prost::Name for CountSchedulesRequest {
1080 const NAME: &'static str = "CountSchedulesRequest";
1081 const PACKAGE: &'static str = "ora.server.v1";
1082 fn full_name() -> ::prost::alloc::string::String {
1083 "ora.server.v1.CountSchedulesRequest".into()
1084 }
1085 fn type_url() -> ::prost::alloc::string::String {
1086 "/ora.server.v1.CountSchedulesRequest".into()
1087 }
1088}
1089#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1091pub struct CountSchedulesResponse {
1092 #[prost(uint64, tag = "1")]
1094 pub count: u64,
1095}
1096impl ::prost::Name for CountSchedulesResponse {
1097 const NAME: &'static str = "CountSchedulesResponse";
1098 const PACKAGE: &'static str = "ora.server.v1";
1099 fn full_name() -> ::prost::alloc::string::String {
1100 "ora.server.v1.CountSchedulesResponse".into()
1101 }
1102 fn type_url() -> ::prost::alloc::string::String {
1103 "/ora.server.v1.CountSchedulesResponse".into()
1104 }
1105}
1106#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct CancelSchedulesRequest {
1109 #[prost(message, optional, tag = "1")]
1111 pub filter: ::core::option::Option<ScheduleQueryFilter>,
1112 #[prost(bool, tag = "2")]
1114 pub cancel_jobs: bool,
1115}
1116impl ::prost::Name for CancelSchedulesRequest {
1117 const NAME: &'static str = "CancelSchedulesRequest";
1118 const PACKAGE: &'static str = "ora.server.v1";
1119 fn full_name() -> ::prost::alloc::string::String {
1120 "ora.server.v1.CancelSchedulesRequest".into()
1121 }
1122 fn type_url() -> ::prost::alloc::string::String {
1123 "/ora.server.v1.CancelSchedulesRequest".into()
1124 }
1125}
1126#[derive(Clone, PartialEq, ::prost::Message)]
1128pub struct CancelSchedulesResponse {
1129 #[prost(string, repeated, tag = "1")]
1131 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1132 #[prost(string, repeated, tag = "2")]
1135 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1136}
1137impl ::prost::Name for CancelSchedulesResponse {
1138 const NAME: &'static str = "CancelSchedulesResponse";
1139 const PACKAGE: &'static str = "ora.server.v1";
1140 fn full_name() -> ::prost::alloc::string::String {
1141 "ora.server.v1.CancelSchedulesResponse".into()
1142 }
1143 fn type_url() -> ::prost::alloc::string::String {
1144 "/ora.server.v1.CancelSchedulesResponse".into()
1145 }
1146}
1147#[derive(Clone, PartialEq, ::prost::Message)]
1149pub struct DeleteInactiveSchedulesRequest {
1150 #[prost(message, optional, tag = "1")]
1152 pub filter: ::core::option::Option<ScheduleQueryFilter>,
1153}
1154impl ::prost::Name for DeleteInactiveSchedulesRequest {
1155 const NAME: &'static str = "DeleteInactiveSchedulesRequest";
1156 const PACKAGE: &'static str = "ora.server.v1";
1157 fn full_name() -> ::prost::alloc::string::String {
1158 "ora.server.v1.DeleteInactiveSchedulesRequest".into()
1159 }
1160 fn type_url() -> ::prost::alloc::string::String {
1161 "/ora.server.v1.DeleteInactiveSchedulesRequest".into()
1162 }
1163}
1164#[derive(Clone, PartialEq, ::prost::Message)]
1166pub struct DeleteInactiveSchedulesResponse {
1167 #[prost(string, repeated, tag = "1")]
1169 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1170}
1171impl ::prost::Name for DeleteInactiveSchedulesResponse {
1172 const NAME: &'static str = "DeleteInactiveSchedulesResponse";
1173 const PACKAGE: &'static str = "ora.server.v1";
1174 fn full_name() -> ::prost::alloc::string::String {
1175 "ora.server.v1.DeleteInactiveSchedulesResponse".into()
1176 }
1177 fn type_url() -> ::prost::alloc::string::String {
1178 "/ora.server.v1.DeleteInactiveSchedulesResponse".into()
1179 }
1180}
1181#[derive(Clone, PartialEq, ::prost::Message)]
1183pub struct JobQueryFilter {
1184 #[prost(string, repeated, tag = "1")]
1188 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1189 #[prost(string, repeated, tag = "2")]
1193 pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1194 #[prost(string, repeated, tag = "3")]
1198 pub execution_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1199 #[prost(string, repeated, tag = "4")]
1204 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1205 #[prost(enumeration = "JobExecutionStatus", repeated, tag = "5")]
1214 pub status: ::prost::alloc::vec::Vec<i32>,
1215 #[prost(message, repeated, tag = "6")]
1220 pub labels: ::prost::alloc::vec::Vec<JobLabelFilter>,
1221 #[prost(bool, optional, tag = "7")]
1225 pub active: ::core::option::Option<bool>,
1226 #[prost(message, optional, tag = "8")]
1230 pub target_execution_time: ::core::option::Option<super::super::common::v1::TimeRange>,
1231 #[prost(message, optional, tag = "9")]
1235 pub created_at: ::core::option::Option<super::super::common::v1::TimeRange>,
1236}
1237impl ::prost::Name for JobQueryFilter {
1238 const NAME: &'static str = "JobQueryFilter";
1239 const PACKAGE: &'static str = "ora.server.v1";
1240 fn full_name() -> ::prost::alloc::string::String {
1241 "ora.server.v1.JobQueryFilter".into()
1242 }
1243 fn type_url() -> ::prost::alloc::string::String {
1244 "/ora.server.v1.JobQueryFilter".into()
1245 }
1246}
1247#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct JobLabelFilter {
1250 #[prost(string, tag = "1")]
1252 pub key: ::prost::alloc::string::String,
1253 #[prost(oneof = "job_label_filter::Value", tags = "2, 3")]
1255 pub value: ::core::option::Option<job_label_filter::Value>,
1256}
1257pub mod job_label_filter {
1259 #[derive(Clone, PartialEq, ::prost::Oneof)]
1261 pub enum Value {
1262 #[prost(enumeration = "super::LabelFilterExistCondition", tag = "2")]
1264 Exists(i32),
1265 #[prost(string, tag = "3")]
1267 Equals(::prost::alloc::string::String),
1268 }
1269}
1270impl ::prost::Name for JobLabelFilter {
1271 const NAME: &'static str = "JobLabelFilter";
1272 const PACKAGE: &'static str = "ora.server.v1";
1273 fn full_name() -> ::prost::alloc::string::String {
1274 "ora.server.v1.JobLabelFilter".into()
1275 }
1276 fn type_url() -> ::prost::alloc::string::String {
1277 "/ora.server.v1.JobLabelFilter".into()
1278 }
1279}
1280#[derive(Clone, PartialEq, ::prost::Message)]
1282pub struct Job {
1283 #[prost(string, tag = "1")]
1285 pub id: ::prost::alloc::string::String,
1286 #[prost(string, optional, tag = "2")]
1288 pub schedule_id: ::core::option::Option<::prost::alloc::string::String>,
1289 #[prost(message, optional, tag = "3")]
1291 pub definition: ::core::option::Option<super::super::common::v1::JobDefinition>,
1292 #[prost(message, optional, tag = "4")]
1294 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1295 #[prost(message, repeated, tag = "5")]
1297 pub executions: ::prost::alloc::vec::Vec<JobExecution>,
1298 #[prost(bool, tag = "6")]
1300 pub active: bool,
1301 #[prost(bool, tag = "7")]
1303 pub cancelled: bool,
1304}
1305impl ::prost::Name for Job {
1306 const NAME: &'static str = "Job";
1307 const PACKAGE: &'static str = "ora.server.v1";
1308 fn full_name() -> ::prost::alloc::string::String {
1309 "ora.server.v1.Job".into()
1310 }
1311 fn type_url() -> ::prost::alloc::string::String {
1312 "/ora.server.v1.Job".into()
1313 }
1314}
1315#[derive(Clone, PartialEq, ::prost::Message)]
1316pub struct JobExecution {
1317 #[prost(string, tag = "1")]
1319 pub id: ::prost::alloc::string::String,
1320 #[prost(string, tag = "2")]
1322 pub job_id: ::prost::alloc::string::String,
1323 #[prost(string, optional, tag = "3")]
1325 pub executor_id: ::core::option::Option<::prost::alloc::string::String>,
1326 #[prost(enumeration = "JobExecutionStatus", tag = "4")]
1328 pub status: i32,
1329 #[prost(message, optional, tag = "5")]
1331 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1332 #[prost(message, optional, tag = "6")]
1334 pub ready_at: ::core::option::Option<::prost_types::Timestamp>,
1335 #[prost(message, optional, tag = "7")]
1337 pub assigned_at: ::core::option::Option<::prost_types::Timestamp>,
1338 #[prost(message, optional, tag = "8")]
1340 pub started_at: ::core::option::Option<::prost_types::Timestamp>,
1341 #[prost(message, optional, tag = "9")]
1343 pub succeeded_at: ::core::option::Option<::prost_types::Timestamp>,
1344 #[prost(message, optional, tag = "10")]
1346 pub failed_at: ::core::option::Option<::prost_types::Timestamp>,
1347 #[prost(string, optional, tag = "11")]
1349 pub output_payload_json: ::core::option::Option<::prost::alloc::string::String>,
1350 #[prost(string, optional, tag = "12")]
1352 pub failure_reason: ::core::option::Option<::prost::alloc::string::String>,
1353}
1354impl ::prost::Name for JobExecution {
1355 const NAME: &'static str = "JobExecution";
1356 const PACKAGE: &'static str = "ora.server.v1";
1357 fn full_name() -> ::prost::alloc::string::String {
1358 "ora.server.v1.JobExecution".into()
1359 }
1360 fn type_url() -> ::prost::alloc::string::String {
1361 "/ora.server.v1.JobExecution".into()
1362 }
1363}
1364#[derive(Clone, PartialEq, ::prost::Message)]
1366pub struct ExecutorInfo {
1367 #[prost(string, tag = "1")]
1369 pub id: ::prost::alloc::string::String,
1370 #[prost(string, tag = "2")]
1372 pub name: ::prost::alloc::string::String,
1373 #[prost(message, optional, tag = "3")]
1375 pub last_seen_at: ::core::option::Option<::prost_types::Timestamp>,
1376 #[prost(bool, tag = "4")]
1378 pub alive: bool,
1379 #[prost(string, repeated, tag = "5")]
1381 pub supported_job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1382 #[prost(uint32, tag = "6")]
1384 pub max_concurrent_executions: u32,
1385 #[prost(string, repeated, tag = "7")]
1387 pub assigned_execution_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1388}
1389impl ::prost::Name for ExecutorInfo {
1390 const NAME: &'static str = "ExecutorInfo";
1391 const PACKAGE: &'static str = "ora.server.v1";
1392 fn full_name() -> ::prost::alloc::string::String {
1393 "ora.server.v1.ExecutorInfo".into()
1394 }
1395 fn type_url() -> ::prost::alloc::string::String {
1396 "/ora.server.v1.ExecutorInfo".into()
1397 }
1398}
1399#[derive(Clone, PartialEq, ::prost::Message)]
1401pub struct Schedule {
1402 #[prost(string, tag = "1")]
1404 pub id: ::prost::alloc::string::String,
1405 #[prost(message, optional, tag = "2")]
1407 pub definition: ::core::option::Option<super::super::common::v1::ScheduleDefinition>,
1408 #[prost(message, optional, tag = "3")]
1410 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1411 #[prost(bool, tag = "5")]
1413 pub active: bool,
1414 #[prost(bool, tag = "6")]
1416 pub cancelled: bool,
1417}
1418impl ::prost::Name for Schedule {
1419 const NAME: &'static str = "Schedule";
1420 const PACKAGE: &'static str = "ora.server.v1";
1421 fn full_name() -> ::prost::alloc::string::String {
1422 "ora.server.v1.Schedule".into()
1423 }
1424 fn type_url() -> ::prost::alloc::string::String {
1425 "/ora.server.v1.Schedule".into()
1426 }
1427}
1428#[derive(Clone, PartialEq, ::prost::Message)]
1430pub struct ScheduleQueryFilter {
1431 #[prost(string, repeated, tag = "1")]
1435 pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1436 #[prost(string, repeated, tag = "2")]
1441 pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1442 #[prost(string, repeated, tag = "3")]
1447 pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1448 #[prost(message, repeated, tag = "4")]
1453 pub labels: ::prost::alloc::vec::Vec<ScheduleLabelFilter>,
1454 #[prost(bool, optional, tag = "5")]
1458 pub active: ::core::option::Option<bool>,
1459 #[prost(message, optional, tag = "6")]
1463 pub created_at: ::core::option::Option<super::super::common::v1::TimeRange>,
1464}
1465impl ::prost::Name for ScheduleQueryFilter {
1466 const NAME: &'static str = "ScheduleQueryFilter";
1467 const PACKAGE: &'static str = "ora.server.v1";
1468 fn full_name() -> ::prost::alloc::string::String {
1469 "ora.server.v1.ScheduleQueryFilter".into()
1470 }
1471 fn type_url() -> ::prost::alloc::string::String {
1472 "/ora.server.v1.ScheduleQueryFilter".into()
1473 }
1474}
1475#[derive(Clone, PartialEq, ::prost::Message)]
1477pub struct ScheduleLabelFilter {
1478 #[prost(string, tag = "1")]
1480 pub key: ::prost::alloc::string::String,
1481 #[prost(oneof = "schedule_label_filter::Value", tags = "2, 3")]
1483 pub value: ::core::option::Option<schedule_label_filter::Value>,
1484}
1485pub mod schedule_label_filter {
1487 #[derive(Clone, PartialEq, ::prost::Oneof)]
1489 pub enum Value {
1490 #[prost(enumeration = "super::LabelFilterExistCondition", tag = "2")]
1492 Exists(i32),
1493 #[prost(string, tag = "3")]
1495 Equals(::prost::alloc::string::String),
1496 }
1497}
1498impl ::prost::Name for ScheduleLabelFilter {
1499 const NAME: &'static str = "ScheduleLabelFilter";
1500 const PACKAGE: &'static str = "ora.server.v1";
1501 fn full_name() -> ::prost::alloc::string::String {
1502 "ora.server.v1.ScheduleLabelFilter".into()
1503 }
1504 fn type_url() -> ::prost::alloc::string::String {
1505 "/ora.server.v1.ScheduleLabelFilter".into()
1506 }
1507}
1508#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1510#[repr(i32)]
1511pub enum JobQueryOrder {
1512 Unspecified = 0,
1514 CreatedAtAsc = 1,
1516 CreatedAtDesc = 2,
1518 TargetExecutionTimeAsc = 3,
1520 TargetExecutionTimeDesc = 4,
1522}
1523impl JobQueryOrder {
1524 pub fn as_str_name(&self) -> &'static str {
1529 match self {
1530 Self::Unspecified => "JOB_QUERY_ORDER_UNSPECIFIED",
1531 Self::CreatedAtAsc => "JOB_QUERY_ORDER_CREATED_AT_ASC",
1532 Self::CreatedAtDesc => "JOB_QUERY_ORDER_CREATED_AT_DESC",
1533 Self::TargetExecutionTimeAsc => "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_ASC",
1534 Self::TargetExecutionTimeDesc => "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_DESC",
1535 }
1536 }
1537 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1539 match value {
1540 "JOB_QUERY_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
1541 "JOB_QUERY_ORDER_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
1542 "JOB_QUERY_ORDER_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
1543 "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_ASC" => Some(Self::TargetExecutionTimeAsc),
1544 "JOB_QUERY_ORDER_TARGET_EXECUTION_TIME_DESC" => Some(Self::TargetExecutionTimeDesc),
1545 _ => None,
1546 }
1547 }
1548}
1549#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1551#[repr(i32)]
1552pub enum JobExecutionStatus {
1553 Unspecified = 0,
1555 Pending = 1,
1557 Ready = 2,
1559 Assigned = 3,
1561 Running = 4,
1563 Succeeded = 5,
1565 Failed = 6,
1567}
1568impl JobExecutionStatus {
1569 pub fn as_str_name(&self) -> &'static str {
1574 match self {
1575 Self::Unspecified => "JOB_EXECUTION_STATUS_UNSPECIFIED",
1576 Self::Pending => "JOB_EXECUTION_STATUS_PENDING",
1577 Self::Ready => "JOB_EXECUTION_STATUS_READY",
1578 Self::Assigned => "JOB_EXECUTION_STATUS_ASSIGNED",
1579 Self::Running => "JOB_EXECUTION_STATUS_RUNNING",
1580 Self::Succeeded => "JOB_EXECUTION_STATUS_SUCCEEDED",
1581 Self::Failed => "JOB_EXECUTION_STATUS_FAILED",
1582 }
1583 }
1584 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1586 match value {
1587 "JOB_EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1588 "JOB_EXECUTION_STATUS_PENDING" => Some(Self::Pending),
1589 "JOB_EXECUTION_STATUS_READY" => Some(Self::Ready),
1590 "JOB_EXECUTION_STATUS_ASSIGNED" => Some(Self::Assigned),
1591 "JOB_EXECUTION_STATUS_RUNNING" => Some(Self::Running),
1592 "JOB_EXECUTION_STATUS_SUCCEEDED" => Some(Self::Succeeded),
1593 "JOB_EXECUTION_STATUS_FAILED" => Some(Self::Failed),
1594 _ => None,
1595 }
1596 }
1597}
1598#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1600#[repr(i32)]
1601pub enum ScheduleQueryOrder {
1602 Unspecified = 0,
1604 CreatedAtAsc = 1,
1606 CreatedAtDesc = 2,
1608}
1609impl ScheduleQueryOrder {
1610 pub fn as_str_name(&self) -> &'static str {
1615 match self {
1616 Self::Unspecified => "SCHEDULE_QUERY_ORDER_UNSPECIFIED",
1617 Self::CreatedAtAsc => "SCHEDULE_QUERY_ORDER_CREATED_AT_ASC",
1618 Self::CreatedAtDesc => "SCHEDULE_QUERY_ORDER_CREATED_AT_DESC",
1619 }
1620 }
1621 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1623 match value {
1624 "SCHEDULE_QUERY_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
1625 "SCHEDULE_QUERY_ORDER_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
1626 "SCHEDULE_QUERY_ORDER_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
1627 _ => None,
1628 }
1629 }
1630}
1631#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1632#[repr(i32)]
1633pub enum LabelFilterExistCondition {
1634 Unspecified = 0,
1636 Exists = 1,
1638}
1639impl LabelFilterExistCondition {
1640 pub fn as_str_name(&self) -> &'static str {
1645 match self {
1646 Self::Unspecified => "LABEL_FILTER_EXIST_CONDITION_UNSPECIFIED",
1647 Self::Exists => "LABEL_FILTER_EXIST_CONDITION_EXISTS",
1648 }
1649 }
1650 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1652 match value {
1653 "LABEL_FILTER_EXIST_CONDITION_UNSPECIFIED" => Some(Self::Unspecified),
1654 "LABEL_FILTER_EXIST_CONDITION_EXISTS" => Some(Self::Exists),
1655 _ => None,
1656 }
1657 }
1658}
1659pub mod admin_service_client {
1661 #![allow(
1662 unused_variables,
1663 dead_code,
1664 missing_docs,
1665 clippy::wildcard_imports,
1666 clippy::let_unit_value
1667 )]
1668 use tonic::codegen::http::Uri;
1669 use tonic::codegen::*;
1670 #[derive(Debug, Clone)]
1672 pub struct AdminServiceClient<T> {
1673 inner: tonic::client::Grpc<T>,
1674 }
1675 impl AdminServiceClient<tonic::transport::Channel> {
1676 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1678 where
1679 D: TryInto<tonic::transport::Endpoint>,
1680 D::Error: Into<StdError>,
1681 {
1682 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1683 Ok(Self::new(conn))
1684 }
1685 }
1686 impl<T> AdminServiceClient<T>
1687 where
1688 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1689 T::Error: Into<StdError>,
1690 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1691 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1692 {
1693 pub fn new(inner: T) -> Self {
1694 let inner = tonic::client::Grpc::new(inner);
1695 Self { inner }
1696 }
1697 pub fn with_origin(inner: T, origin: Uri) -> Self {
1698 let inner = tonic::client::Grpc::with_origin(inner, origin);
1699 Self { inner }
1700 }
1701 pub fn with_interceptor<F>(
1702 inner: T,
1703 interceptor: F,
1704 ) -> AdminServiceClient<InterceptedService<T, F>>
1705 where
1706 F: tonic::service::Interceptor,
1707 T::ResponseBody: Default,
1708 T: tonic::codegen::Service<
1709 http::Request<tonic::body::BoxBody>,
1710 Response = http::Response<
1711 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1712 >,
1713 >,
1714 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
1715 Into<StdError> + std::marker::Send + std::marker::Sync,
1716 {
1717 AdminServiceClient::new(InterceptedService::new(inner, interceptor))
1718 }
1719 #[must_use]
1724 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1725 self.inner = self.inner.send_compressed(encoding);
1726 self
1727 }
1728 #[must_use]
1730 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1731 self.inner = self.inner.accept_compressed(encoding);
1732 self
1733 }
1734 #[must_use]
1738 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1739 self.inner = self.inner.max_decoding_message_size(limit);
1740 self
1741 }
1742 #[must_use]
1746 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1747 self.inner = self.inner.max_encoding_message_size(limit);
1748 self
1749 }
1750 pub async fn add_jobs(
1752 &mut self,
1753 request: impl tonic::IntoRequest<super::AddJobsRequest>,
1754 ) -> std::result::Result<tonic::Response<super::AddJobsResponse>, tonic::Status> {
1755 self.inner.ready().await.map_err(|e| {
1756 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1757 })?;
1758 let codec = tonic::codec::ProstCodec::default();
1759 let path = http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/AddJobs");
1760 let mut req = request.into_request();
1761 req.extensions_mut()
1762 .insert(GrpcMethod::new("ora.server.v1.AdminService", "AddJobs"));
1763 self.inner.unary(req, path, codec).await
1764 }
1765 pub async fn add_job_if_not_exists(
1773 &mut self,
1774 request: impl tonic::IntoRequest<super::AddJobIfNotExistsRequest>,
1775 ) -> std::result::Result<tonic::Response<super::AddJobIfNotExistsResponse>, tonic::Status>
1776 {
1777 self.inner.ready().await.map_err(|e| {
1778 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1779 })?;
1780 let codec = tonic::codec::ProstCodec::default();
1781 let path = http::uri::PathAndQuery::from_static(
1782 "/ora.server.v1.AdminService/AddJobIfNotExists",
1783 );
1784 let mut req = request.into_request();
1785 req.extensions_mut().insert(GrpcMethod::new(
1786 "ora.server.v1.AdminService",
1787 "AddJobIfNotExists",
1788 ));
1789 self.inner.unary(req, path, codec).await
1790 }
1791 pub async fn list_jobs(
1793 &mut self,
1794 request: impl tonic::IntoRequest<super::ListJobsRequest>,
1795 ) -> std::result::Result<tonic::Response<super::ListJobsResponse>, tonic::Status> {
1796 self.inner.ready().await.map_err(|e| {
1797 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1798 })?;
1799 let codec = tonic::codec::ProstCodec::default();
1800 let path = http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListJobs");
1801 let mut req = request.into_request();
1802 req.extensions_mut()
1803 .insert(GrpcMethod::new("ora.server.v1.AdminService", "ListJobs"));
1804 self.inner.unary(req, path, codec).await
1805 }
1806 pub async fn count_jobs(
1808 &mut self,
1809 request: impl tonic::IntoRequest<super::CountJobsRequest>,
1810 ) -> std::result::Result<tonic::Response<super::CountJobsResponse>, tonic::Status> {
1811 self.inner.ready().await.map_err(|e| {
1812 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1813 })?;
1814 let codec = tonic::codec::ProstCodec::default();
1815 let path =
1816 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CountJobs");
1817 let mut req = request.into_request();
1818 req.extensions_mut()
1819 .insert(GrpcMethod::new("ora.server.v1.AdminService", "CountJobs"));
1820 self.inner.unary(req, path, codec).await
1821 }
1822 pub async fn list_job_types(
1824 &mut self,
1825 request: impl tonic::IntoRequest<super::ListJobTypesRequest>,
1826 ) -> std::result::Result<tonic::Response<super::ListJobTypesResponse>, tonic::Status>
1827 {
1828 self.inner.ready().await.map_err(|e| {
1829 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1830 })?;
1831 let codec = tonic::codec::ProstCodec::default();
1832 let path =
1833 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListJobTypes");
1834 let mut req = request.into_request();
1835 req.extensions_mut().insert(GrpcMethod::new(
1836 "ora.server.v1.AdminService",
1837 "ListJobTypes",
1838 ));
1839 self.inner.unary(req, path, codec).await
1840 }
1841 pub async fn cancel_jobs(
1843 &mut self,
1844 request: impl tonic::IntoRequest<super::CancelJobsRequest>,
1845 ) -> std::result::Result<tonic::Response<super::CancelJobsResponse>, tonic::Status>
1846 {
1847 self.inner.ready().await.map_err(|e| {
1848 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1849 })?;
1850 let codec = tonic::codec::ProstCodec::default();
1851 let path =
1852 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CancelJobs");
1853 let mut req = request.into_request();
1854 req.extensions_mut()
1855 .insert(GrpcMethod::new("ora.server.v1.AdminService", "CancelJobs"));
1856 self.inner.unary(req, path, codec).await
1857 }
1858 pub async fn delete_inactive_jobs(
1860 &mut self,
1861 request: impl tonic::IntoRequest<super::DeleteInactiveJobsRequest>,
1862 ) -> std::result::Result<tonic::Response<super::DeleteInactiveJobsResponse>, tonic::Status>
1863 {
1864 self.inner.ready().await.map_err(|e| {
1865 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1866 })?;
1867 let codec = tonic::codec::ProstCodec::default();
1868 let path = http::uri::PathAndQuery::from_static(
1869 "/ora.server.v1.AdminService/DeleteInactiveJobs",
1870 );
1871 let mut req = request.into_request();
1872 req.extensions_mut().insert(GrpcMethod::new(
1873 "ora.server.v1.AdminService",
1874 "DeleteInactiveJobs",
1875 ));
1876 self.inner.unary(req, path, codec).await
1877 }
1878 pub async fn list_executors(
1880 &mut self,
1881 request: impl tonic::IntoRequest<super::ListExecutorsRequest>,
1882 ) -> std::result::Result<tonic::Response<super::ListExecutorsResponse>, tonic::Status>
1883 {
1884 self.inner.ready().await.map_err(|e| {
1885 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1886 })?;
1887 let codec = tonic::codec::ProstCodec::default();
1888 let path =
1889 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListExecutors");
1890 let mut req = request.into_request();
1891 req.extensions_mut().insert(GrpcMethod::new(
1892 "ora.server.v1.AdminService",
1893 "ListExecutors",
1894 ));
1895 self.inner.unary(req, path, codec).await
1896 }
1897 #[deprecated]
1901 pub async fn create_schedules(
1902 &mut self,
1903 request: impl tonic::IntoRequest<super::CreateSchedulesRequest>,
1904 ) -> std::result::Result<tonic::Response<super::CreateSchedulesResponse>, tonic::Status>
1905 {
1906 self.inner.ready().await.map_err(|e| {
1907 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1908 })?;
1909 let codec = tonic::codec::ProstCodec::default();
1910 let path =
1911 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CreateSchedules");
1912 let mut req = request.into_request();
1913 req.extensions_mut().insert(GrpcMethod::new(
1914 "ora.server.v1.AdminService",
1915 "CreateSchedules",
1916 ));
1917 self.inner.unary(req, path, codec).await
1918 }
1919 pub async fn add_schedules(
1921 &mut self,
1922 request: impl tonic::IntoRequest<super::AddSchedulesRequest>,
1923 ) -> std::result::Result<tonic::Response<super::AddSchedulesResponse>, tonic::Status>
1924 {
1925 self.inner.ready().await.map_err(|e| {
1926 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1927 })?;
1928 let codec = tonic::codec::ProstCodec::default();
1929 let path =
1930 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/AddSchedules");
1931 let mut req = request.into_request();
1932 req.extensions_mut().insert(GrpcMethod::new(
1933 "ora.server.v1.AdminService",
1934 "AddSchedules",
1935 ));
1936 self.inner.unary(req, path, codec).await
1937 }
1938 pub async fn add_schedule_if_not_exists(
1946 &mut self,
1947 request: impl tonic::IntoRequest<super::AddScheduleIfNotExistsRequest>,
1948 ) -> std::result::Result<
1949 tonic::Response<super::AddScheduleIfNotExistsResponse>,
1950 tonic::Status,
1951 > {
1952 self.inner.ready().await.map_err(|e| {
1953 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1954 })?;
1955 let codec = tonic::codec::ProstCodec::default();
1956 let path = http::uri::PathAndQuery::from_static(
1957 "/ora.server.v1.AdminService/AddScheduleIfNotExists",
1958 );
1959 let mut req = request.into_request();
1960 req.extensions_mut().insert(GrpcMethod::new(
1961 "ora.server.v1.AdminService",
1962 "AddScheduleIfNotExists",
1963 ));
1964 self.inner.unary(req, path, codec).await
1965 }
1966 pub async fn list_schedules(
1968 &mut self,
1969 request: impl tonic::IntoRequest<super::ListSchedulesRequest>,
1970 ) -> std::result::Result<tonic::Response<super::ListSchedulesResponse>, tonic::Status>
1971 {
1972 self.inner.ready().await.map_err(|e| {
1973 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1974 })?;
1975 let codec = tonic::codec::ProstCodec::default();
1976 let path =
1977 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/ListSchedules");
1978 let mut req = request.into_request();
1979 req.extensions_mut().insert(GrpcMethod::new(
1980 "ora.server.v1.AdminService",
1981 "ListSchedules",
1982 ));
1983 self.inner.unary(req, path, codec).await
1984 }
1985 pub async fn count_schedules(
1987 &mut self,
1988 request: impl tonic::IntoRequest<super::CountSchedulesRequest>,
1989 ) -> std::result::Result<tonic::Response<super::CountSchedulesResponse>, tonic::Status>
1990 {
1991 self.inner.ready().await.map_err(|e| {
1992 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
1993 })?;
1994 let codec = tonic::codec::ProstCodec::default();
1995 let path =
1996 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CountSchedules");
1997 let mut req = request.into_request();
1998 req.extensions_mut().insert(GrpcMethod::new(
1999 "ora.server.v1.AdminService",
2000 "CountSchedules",
2001 ));
2002 self.inner.unary(req, path, codec).await
2003 }
2004 pub async fn cancel_schedules(
2006 &mut self,
2007 request: impl tonic::IntoRequest<super::CancelSchedulesRequest>,
2008 ) -> std::result::Result<tonic::Response<super::CancelSchedulesResponse>, tonic::Status>
2009 {
2010 self.inner.ready().await.map_err(|e| {
2011 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
2012 })?;
2013 let codec = tonic::codec::ProstCodec::default();
2014 let path =
2015 http::uri::PathAndQuery::from_static("/ora.server.v1.AdminService/CancelSchedules");
2016 let mut req = request.into_request();
2017 req.extensions_mut().insert(GrpcMethod::new(
2018 "ora.server.v1.AdminService",
2019 "CancelSchedules",
2020 ));
2021 self.inner.unary(req, path, codec).await
2022 }
2023 pub async fn delete_inactive_schedules(
2025 &mut self,
2026 request: impl tonic::IntoRequest<super::DeleteInactiveSchedulesRequest>,
2027 ) -> std::result::Result<
2028 tonic::Response<super::DeleteInactiveSchedulesResponse>,
2029 tonic::Status,
2030 > {
2031 self.inner.ready().await.map_err(|e| {
2032 tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
2033 })?;
2034 let codec = tonic::codec::ProstCodec::default();
2035 let path = http::uri::PathAndQuery::from_static(
2036 "/ora.server.v1.AdminService/DeleteInactiveSchedules",
2037 );
2038 let mut req = request.into_request();
2039 req.extensions_mut().insert(GrpcMethod::new(
2040 "ora.server.v1.AdminService",
2041 "DeleteInactiveSchedules",
2042 ));
2043 self.inner.unary(req, path, codec).await
2044 }
2045 }
2046}
2047pub mod admin_service_server {
2049 #![allow(
2050 unused_variables,
2051 dead_code,
2052 missing_docs,
2053 clippy::wildcard_imports,
2054 clippy::let_unit_value
2055 )]
2056 use tonic::codegen::*;
2057 #[async_trait]
2059 pub trait AdminService: std::marker::Send + std::marker::Sync + 'static {
2060 async fn add_jobs(
2062 &self,
2063 request: tonic::Request<super::AddJobsRequest>,
2064 ) -> std::result::Result<tonic::Response<super::AddJobsResponse>, tonic::Status> {
2065 Err(tonic::Status::unimplemented("Not yet implemented"))
2066 }
2067 async fn add_job_if_not_exists(
2075 &self,
2076 request: tonic::Request<super::AddJobIfNotExistsRequest>,
2077 ) -> std::result::Result<tonic::Response<super::AddJobIfNotExistsResponse>, tonic::Status>
2078 {
2079 Err(tonic::Status::unimplemented("Not yet implemented"))
2080 }
2081 async fn list_jobs(
2083 &self,
2084 request: tonic::Request<super::ListJobsRequest>,
2085 ) -> std::result::Result<tonic::Response<super::ListJobsResponse>, tonic::Status> {
2086 Err(tonic::Status::unimplemented("Not yet implemented"))
2087 }
2088 async fn count_jobs(
2090 &self,
2091 request: tonic::Request<super::CountJobsRequest>,
2092 ) -> std::result::Result<tonic::Response<super::CountJobsResponse>, tonic::Status> {
2093 Err(tonic::Status::unimplemented("Not yet implemented"))
2094 }
2095 async fn list_job_types(
2097 &self,
2098 request: tonic::Request<super::ListJobTypesRequest>,
2099 ) -> std::result::Result<tonic::Response<super::ListJobTypesResponse>, tonic::Status>
2100 {
2101 Err(tonic::Status::unimplemented("Not yet implemented"))
2102 }
2103 async fn cancel_jobs(
2105 &self,
2106 request: tonic::Request<super::CancelJobsRequest>,
2107 ) -> std::result::Result<tonic::Response<super::CancelJobsResponse>, tonic::Status>
2108 {
2109 Err(tonic::Status::unimplemented("Not yet implemented"))
2110 }
2111 async fn delete_inactive_jobs(
2113 &self,
2114 request: tonic::Request<super::DeleteInactiveJobsRequest>,
2115 ) -> std::result::Result<tonic::Response<super::DeleteInactiveJobsResponse>, tonic::Status>
2116 {
2117 Err(tonic::Status::unimplemented("Not yet implemented"))
2118 }
2119 async fn list_executors(
2121 &self,
2122 request: tonic::Request<super::ListExecutorsRequest>,
2123 ) -> std::result::Result<tonic::Response<super::ListExecutorsResponse>, tonic::Status>
2124 {
2125 Err(tonic::Status::unimplemented("Not yet implemented"))
2126 }
2127 async fn create_schedules(
2131 &self,
2132 request: tonic::Request<super::CreateSchedulesRequest>,
2133 ) -> std::result::Result<tonic::Response<super::CreateSchedulesResponse>, tonic::Status>
2134 {
2135 Err(tonic::Status::unimplemented("Not yet implemented"))
2136 }
2137 async fn add_schedules(
2139 &self,
2140 request: tonic::Request<super::AddSchedulesRequest>,
2141 ) -> std::result::Result<tonic::Response<super::AddSchedulesResponse>, tonic::Status>
2142 {
2143 Err(tonic::Status::unimplemented("Not yet implemented"))
2144 }
2145 async fn add_schedule_if_not_exists(
2153 &self,
2154 request: tonic::Request<super::AddScheduleIfNotExistsRequest>,
2155 ) -> std::result::Result<
2156 tonic::Response<super::AddScheduleIfNotExistsResponse>,
2157 tonic::Status,
2158 > {
2159 Err(tonic::Status::unimplemented("Not yet implemented"))
2160 }
2161 async fn list_schedules(
2163 &self,
2164 request: tonic::Request<super::ListSchedulesRequest>,
2165 ) -> std::result::Result<tonic::Response<super::ListSchedulesResponse>, tonic::Status>
2166 {
2167 Err(tonic::Status::unimplemented("Not yet implemented"))
2168 }
2169 async fn count_schedules(
2171 &self,
2172 request: tonic::Request<super::CountSchedulesRequest>,
2173 ) -> std::result::Result<tonic::Response<super::CountSchedulesResponse>, tonic::Status>
2174 {
2175 Err(tonic::Status::unimplemented("Not yet implemented"))
2176 }
2177 async fn cancel_schedules(
2179 &self,
2180 request: tonic::Request<super::CancelSchedulesRequest>,
2181 ) -> std::result::Result<tonic::Response<super::CancelSchedulesResponse>, tonic::Status>
2182 {
2183 Err(tonic::Status::unimplemented("Not yet implemented"))
2184 }
2185 async fn delete_inactive_schedules(
2187 &self,
2188 request: tonic::Request<super::DeleteInactiveSchedulesRequest>,
2189 ) -> std::result::Result<
2190 tonic::Response<super::DeleteInactiveSchedulesResponse>,
2191 tonic::Status,
2192 > {
2193 Err(tonic::Status::unimplemented("Not yet implemented"))
2194 }
2195 }
2196 #[derive(Debug)]
2198 pub struct AdminServiceServer<T> {
2199 inner: Arc<T>,
2200 accept_compression_encodings: EnabledCompressionEncodings,
2201 send_compression_encodings: EnabledCompressionEncodings,
2202 max_decoding_message_size: Option<usize>,
2203 max_encoding_message_size: Option<usize>,
2204 }
2205 impl<T> AdminServiceServer<T> {
2206 pub fn new(inner: T) -> Self {
2207 Self::from_arc(Arc::new(inner))
2208 }
2209 pub fn from_arc(inner: Arc<T>) -> Self {
2210 Self {
2211 inner,
2212 accept_compression_encodings: Default::default(),
2213 send_compression_encodings: Default::default(),
2214 max_decoding_message_size: None,
2215 max_encoding_message_size: None,
2216 }
2217 }
2218 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
2219 where
2220 F: tonic::service::Interceptor,
2221 {
2222 InterceptedService::new(Self::new(inner), interceptor)
2223 }
2224 #[must_use]
2226 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2227 self.accept_compression_encodings.enable(encoding);
2228 self
2229 }
2230 #[must_use]
2232 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2233 self.send_compression_encodings.enable(encoding);
2234 self
2235 }
2236 #[must_use]
2240 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2241 self.max_decoding_message_size = Some(limit);
2242 self
2243 }
2244 #[must_use]
2248 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2249 self.max_encoding_message_size = Some(limit);
2250 self
2251 }
2252 }
2253 impl<T, B> tonic::codegen::Service<http::Request<B>> for AdminServiceServer<T>
2254 where
2255 T: AdminService,
2256 B: Body + std::marker::Send + 'static,
2257 B::Error: Into<StdError> + std::marker::Send + 'static,
2258 {
2259 type Response = http::Response<tonic::body::BoxBody>;
2260 type Error = std::convert::Infallible;
2261 type Future = BoxFuture<Self::Response, Self::Error>;
2262 fn poll_ready(
2263 &mut self,
2264 _cx: &mut Context<'_>,
2265 ) -> Poll<std::result::Result<(), Self::Error>> {
2266 Poll::Ready(Ok(()))
2267 }
2268 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2269 match req.uri().path() {
2270 "/ora.server.v1.AdminService/AddJobs" => {
2271 #[allow(non_camel_case_types)]
2272 struct AddJobsSvc<T: AdminService>(pub Arc<T>);
2273 impl<T: AdminService> tonic::server::UnaryService<super::AddJobsRequest> for AddJobsSvc<T> {
2274 type Response = super::AddJobsResponse;
2275 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2276 fn call(
2277 &mut self,
2278 request: tonic::Request<super::AddJobsRequest>,
2279 ) -> Self::Future {
2280 let inner = Arc::clone(&self.0);
2281 let fut =
2282 async move { <T as AdminService>::add_jobs(&inner, request).await };
2283 Box::pin(fut)
2284 }
2285 }
2286 let accept_compression_encodings = self.accept_compression_encodings;
2287 let send_compression_encodings = self.send_compression_encodings;
2288 let max_decoding_message_size = self.max_decoding_message_size;
2289 let max_encoding_message_size = self.max_encoding_message_size;
2290 let inner = self.inner.clone();
2291 let fut = async move {
2292 let method = AddJobsSvc(inner);
2293 let codec = tonic::codec::ProstCodec::default();
2294 let mut grpc = tonic::server::Grpc::new(codec)
2295 .apply_compression_config(
2296 accept_compression_encodings,
2297 send_compression_encodings,
2298 )
2299 .apply_max_message_size_config(
2300 max_decoding_message_size,
2301 max_encoding_message_size,
2302 );
2303 let res = grpc.unary(method, req).await;
2304 Ok(res)
2305 };
2306 Box::pin(fut)
2307 }
2308 "/ora.server.v1.AdminService/AddJobIfNotExists" => {
2309 #[allow(non_camel_case_types)]
2310 struct AddJobIfNotExistsSvc<T: AdminService>(pub Arc<T>);
2311 impl<T: AdminService>
2312 tonic::server::UnaryService<super::AddJobIfNotExistsRequest>
2313 for AddJobIfNotExistsSvc<T>
2314 {
2315 type Response = super::AddJobIfNotExistsResponse;
2316 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2317 fn call(
2318 &mut self,
2319 request: tonic::Request<super::AddJobIfNotExistsRequest>,
2320 ) -> Self::Future {
2321 let inner = Arc::clone(&self.0);
2322 let fut = async move {
2323 <T as AdminService>::add_job_if_not_exists(&inner, request).await
2324 };
2325 Box::pin(fut)
2326 }
2327 }
2328 let accept_compression_encodings = self.accept_compression_encodings;
2329 let send_compression_encodings = self.send_compression_encodings;
2330 let max_decoding_message_size = self.max_decoding_message_size;
2331 let max_encoding_message_size = self.max_encoding_message_size;
2332 let inner = self.inner.clone();
2333 let fut = async move {
2334 let method = AddJobIfNotExistsSvc(inner);
2335 let codec = tonic::codec::ProstCodec::default();
2336 let mut grpc = tonic::server::Grpc::new(codec)
2337 .apply_compression_config(
2338 accept_compression_encodings,
2339 send_compression_encodings,
2340 )
2341 .apply_max_message_size_config(
2342 max_decoding_message_size,
2343 max_encoding_message_size,
2344 );
2345 let res = grpc.unary(method, req).await;
2346 Ok(res)
2347 };
2348 Box::pin(fut)
2349 }
2350 "/ora.server.v1.AdminService/ListJobs" => {
2351 #[allow(non_camel_case_types)]
2352 struct ListJobsSvc<T: AdminService>(pub Arc<T>);
2353 impl<T: AdminService> tonic::server::UnaryService<super::ListJobsRequest> for ListJobsSvc<T> {
2354 type Response = super::ListJobsResponse;
2355 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2356 fn call(
2357 &mut self,
2358 request: tonic::Request<super::ListJobsRequest>,
2359 ) -> Self::Future {
2360 let inner = Arc::clone(&self.0);
2361 let fut = async move {
2362 <T as AdminService>::list_jobs(&inner, request).await
2363 };
2364 Box::pin(fut)
2365 }
2366 }
2367 let accept_compression_encodings = self.accept_compression_encodings;
2368 let send_compression_encodings = self.send_compression_encodings;
2369 let max_decoding_message_size = self.max_decoding_message_size;
2370 let max_encoding_message_size = self.max_encoding_message_size;
2371 let inner = self.inner.clone();
2372 let fut = async move {
2373 let method = ListJobsSvc(inner);
2374 let codec = tonic::codec::ProstCodec::default();
2375 let mut grpc = tonic::server::Grpc::new(codec)
2376 .apply_compression_config(
2377 accept_compression_encodings,
2378 send_compression_encodings,
2379 )
2380 .apply_max_message_size_config(
2381 max_decoding_message_size,
2382 max_encoding_message_size,
2383 );
2384 let res = grpc.unary(method, req).await;
2385 Ok(res)
2386 };
2387 Box::pin(fut)
2388 }
2389 "/ora.server.v1.AdminService/CountJobs" => {
2390 #[allow(non_camel_case_types)]
2391 struct CountJobsSvc<T: AdminService>(pub Arc<T>);
2392 impl<T: AdminService> tonic::server::UnaryService<super::CountJobsRequest> for CountJobsSvc<T> {
2393 type Response = super::CountJobsResponse;
2394 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2395 fn call(
2396 &mut self,
2397 request: tonic::Request<super::CountJobsRequest>,
2398 ) -> Self::Future {
2399 let inner = Arc::clone(&self.0);
2400 let fut = async move {
2401 <T as AdminService>::count_jobs(&inner, request).await
2402 };
2403 Box::pin(fut)
2404 }
2405 }
2406 let accept_compression_encodings = self.accept_compression_encodings;
2407 let send_compression_encodings = self.send_compression_encodings;
2408 let max_decoding_message_size = self.max_decoding_message_size;
2409 let max_encoding_message_size = self.max_encoding_message_size;
2410 let inner = self.inner.clone();
2411 let fut = async move {
2412 let method = CountJobsSvc(inner);
2413 let codec = tonic::codec::ProstCodec::default();
2414 let mut grpc = tonic::server::Grpc::new(codec)
2415 .apply_compression_config(
2416 accept_compression_encodings,
2417 send_compression_encodings,
2418 )
2419 .apply_max_message_size_config(
2420 max_decoding_message_size,
2421 max_encoding_message_size,
2422 );
2423 let res = grpc.unary(method, req).await;
2424 Ok(res)
2425 };
2426 Box::pin(fut)
2427 }
2428 "/ora.server.v1.AdminService/ListJobTypes" => {
2429 #[allow(non_camel_case_types)]
2430 struct ListJobTypesSvc<T: AdminService>(pub Arc<T>);
2431 impl<T: AdminService> tonic::server::UnaryService<super::ListJobTypesRequest>
2432 for ListJobTypesSvc<T>
2433 {
2434 type Response = super::ListJobTypesResponse;
2435 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2436 fn call(
2437 &mut self,
2438 request: tonic::Request<super::ListJobTypesRequest>,
2439 ) -> Self::Future {
2440 let inner = Arc::clone(&self.0);
2441 let fut = async move {
2442 <T as AdminService>::list_job_types(&inner, request).await
2443 };
2444 Box::pin(fut)
2445 }
2446 }
2447 let accept_compression_encodings = self.accept_compression_encodings;
2448 let send_compression_encodings = self.send_compression_encodings;
2449 let max_decoding_message_size = self.max_decoding_message_size;
2450 let max_encoding_message_size = self.max_encoding_message_size;
2451 let inner = self.inner.clone();
2452 let fut = async move {
2453 let method = ListJobTypesSvc(inner);
2454 let codec = tonic::codec::ProstCodec::default();
2455 let mut grpc = tonic::server::Grpc::new(codec)
2456 .apply_compression_config(
2457 accept_compression_encodings,
2458 send_compression_encodings,
2459 )
2460 .apply_max_message_size_config(
2461 max_decoding_message_size,
2462 max_encoding_message_size,
2463 );
2464 let res = grpc.unary(method, req).await;
2465 Ok(res)
2466 };
2467 Box::pin(fut)
2468 }
2469 "/ora.server.v1.AdminService/CancelJobs" => {
2470 #[allow(non_camel_case_types)]
2471 struct CancelJobsSvc<T: AdminService>(pub Arc<T>);
2472 impl<T: AdminService> tonic::server::UnaryService<super::CancelJobsRequest> for CancelJobsSvc<T> {
2473 type Response = super::CancelJobsResponse;
2474 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2475 fn call(
2476 &mut self,
2477 request: tonic::Request<super::CancelJobsRequest>,
2478 ) -> Self::Future {
2479 let inner = Arc::clone(&self.0);
2480 let fut = async move {
2481 <T as AdminService>::cancel_jobs(&inner, request).await
2482 };
2483 Box::pin(fut)
2484 }
2485 }
2486 let accept_compression_encodings = self.accept_compression_encodings;
2487 let send_compression_encodings = self.send_compression_encodings;
2488 let max_decoding_message_size = self.max_decoding_message_size;
2489 let max_encoding_message_size = self.max_encoding_message_size;
2490 let inner = self.inner.clone();
2491 let fut = async move {
2492 let method = CancelJobsSvc(inner);
2493 let codec = tonic::codec::ProstCodec::default();
2494 let mut grpc = tonic::server::Grpc::new(codec)
2495 .apply_compression_config(
2496 accept_compression_encodings,
2497 send_compression_encodings,
2498 )
2499 .apply_max_message_size_config(
2500 max_decoding_message_size,
2501 max_encoding_message_size,
2502 );
2503 let res = grpc.unary(method, req).await;
2504 Ok(res)
2505 };
2506 Box::pin(fut)
2507 }
2508 "/ora.server.v1.AdminService/DeleteInactiveJobs" => {
2509 #[allow(non_camel_case_types)]
2510 struct DeleteInactiveJobsSvc<T: AdminService>(pub Arc<T>);
2511 impl<T: AdminService>
2512 tonic::server::UnaryService<super::DeleteInactiveJobsRequest>
2513 for DeleteInactiveJobsSvc<T>
2514 {
2515 type Response = super::DeleteInactiveJobsResponse;
2516 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2517 fn call(
2518 &mut self,
2519 request: tonic::Request<super::DeleteInactiveJobsRequest>,
2520 ) -> Self::Future {
2521 let inner = Arc::clone(&self.0);
2522 let fut = async move {
2523 <T as AdminService>::delete_inactive_jobs(&inner, request).await
2524 };
2525 Box::pin(fut)
2526 }
2527 }
2528 let accept_compression_encodings = self.accept_compression_encodings;
2529 let send_compression_encodings = self.send_compression_encodings;
2530 let max_decoding_message_size = self.max_decoding_message_size;
2531 let max_encoding_message_size = self.max_encoding_message_size;
2532 let inner = self.inner.clone();
2533 let fut = async move {
2534 let method = DeleteInactiveJobsSvc(inner);
2535 let codec = tonic::codec::ProstCodec::default();
2536 let mut grpc = tonic::server::Grpc::new(codec)
2537 .apply_compression_config(
2538 accept_compression_encodings,
2539 send_compression_encodings,
2540 )
2541 .apply_max_message_size_config(
2542 max_decoding_message_size,
2543 max_encoding_message_size,
2544 );
2545 let res = grpc.unary(method, req).await;
2546 Ok(res)
2547 };
2548 Box::pin(fut)
2549 }
2550 "/ora.server.v1.AdminService/ListExecutors" => {
2551 #[allow(non_camel_case_types)]
2552 struct ListExecutorsSvc<T: AdminService>(pub Arc<T>);
2553 impl<T: AdminService> tonic::server::UnaryService<super::ListExecutorsRequest>
2554 for ListExecutorsSvc<T>
2555 {
2556 type Response = super::ListExecutorsResponse;
2557 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2558 fn call(
2559 &mut self,
2560 request: tonic::Request<super::ListExecutorsRequest>,
2561 ) -> Self::Future {
2562 let inner = Arc::clone(&self.0);
2563 let fut = async move {
2564 <T as AdminService>::list_executors(&inner, request).await
2565 };
2566 Box::pin(fut)
2567 }
2568 }
2569 let accept_compression_encodings = self.accept_compression_encodings;
2570 let send_compression_encodings = self.send_compression_encodings;
2571 let max_decoding_message_size = self.max_decoding_message_size;
2572 let max_encoding_message_size = self.max_encoding_message_size;
2573 let inner = self.inner.clone();
2574 let fut = async move {
2575 let method = ListExecutorsSvc(inner);
2576 let codec = tonic::codec::ProstCodec::default();
2577 let mut grpc = tonic::server::Grpc::new(codec)
2578 .apply_compression_config(
2579 accept_compression_encodings,
2580 send_compression_encodings,
2581 )
2582 .apply_max_message_size_config(
2583 max_decoding_message_size,
2584 max_encoding_message_size,
2585 );
2586 let res = grpc.unary(method, req).await;
2587 Ok(res)
2588 };
2589 Box::pin(fut)
2590 }
2591 "/ora.server.v1.AdminService/CreateSchedules" => {
2592 #[allow(non_camel_case_types)]
2593 struct CreateSchedulesSvc<T: AdminService>(pub Arc<T>);
2594 impl<T: AdminService> tonic::server::UnaryService<super::CreateSchedulesRequest>
2595 for CreateSchedulesSvc<T>
2596 {
2597 type Response = super::CreateSchedulesResponse;
2598 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2599 fn call(
2600 &mut self,
2601 request: tonic::Request<super::CreateSchedulesRequest>,
2602 ) -> Self::Future {
2603 let inner = Arc::clone(&self.0);
2604 let fut = async move {
2605 <T as AdminService>::create_schedules(&inner, request).await
2606 };
2607 Box::pin(fut)
2608 }
2609 }
2610 let accept_compression_encodings = self.accept_compression_encodings;
2611 let send_compression_encodings = self.send_compression_encodings;
2612 let max_decoding_message_size = self.max_decoding_message_size;
2613 let max_encoding_message_size = self.max_encoding_message_size;
2614 let inner = self.inner.clone();
2615 let fut = async move {
2616 let method = CreateSchedulesSvc(inner);
2617 let codec = tonic::codec::ProstCodec::default();
2618 let mut grpc = tonic::server::Grpc::new(codec)
2619 .apply_compression_config(
2620 accept_compression_encodings,
2621 send_compression_encodings,
2622 )
2623 .apply_max_message_size_config(
2624 max_decoding_message_size,
2625 max_encoding_message_size,
2626 );
2627 let res = grpc.unary(method, req).await;
2628 Ok(res)
2629 };
2630 Box::pin(fut)
2631 }
2632 "/ora.server.v1.AdminService/AddSchedules" => {
2633 #[allow(non_camel_case_types)]
2634 struct AddSchedulesSvc<T: AdminService>(pub Arc<T>);
2635 impl<T: AdminService> tonic::server::UnaryService<super::AddSchedulesRequest>
2636 for AddSchedulesSvc<T>
2637 {
2638 type Response = super::AddSchedulesResponse;
2639 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2640 fn call(
2641 &mut self,
2642 request: tonic::Request<super::AddSchedulesRequest>,
2643 ) -> Self::Future {
2644 let inner = Arc::clone(&self.0);
2645 let fut = async move {
2646 <T as AdminService>::add_schedules(&inner, request).await
2647 };
2648 Box::pin(fut)
2649 }
2650 }
2651 let accept_compression_encodings = self.accept_compression_encodings;
2652 let send_compression_encodings = self.send_compression_encodings;
2653 let max_decoding_message_size = self.max_decoding_message_size;
2654 let max_encoding_message_size = self.max_encoding_message_size;
2655 let inner = self.inner.clone();
2656 let fut = async move {
2657 let method = AddSchedulesSvc(inner);
2658 let codec = tonic::codec::ProstCodec::default();
2659 let mut grpc = tonic::server::Grpc::new(codec)
2660 .apply_compression_config(
2661 accept_compression_encodings,
2662 send_compression_encodings,
2663 )
2664 .apply_max_message_size_config(
2665 max_decoding_message_size,
2666 max_encoding_message_size,
2667 );
2668 let res = grpc.unary(method, req).await;
2669 Ok(res)
2670 };
2671 Box::pin(fut)
2672 }
2673 "/ora.server.v1.AdminService/AddScheduleIfNotExists" => {
2674 #[allow(non_camel_case_types)]
2675 struct AddScheduleIfNotExistsSvc<T: AdminService>(pub Arc<T>);
2676 impl<T: AdminService>
2677 tonic::server::UnaryService<super::AddScheduleIfNotExistsRequest>
2678 for AddScheduleIfNotExistsSvc<T>
2679 {
2680 type Response = super::AddScheduleIfNotExistsResponse;
2681 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2682 fn call(
2683 &mut self,
2684 request: tonic::Request<super::AddScheduleIfNotExistsRequest>,
2685 ) -> Self::Future {
2686 let inner = Arc::clone(&self.0);
2687 let fut = async move {
2688 <T as AdminService>::add_schedule_if_not_exists(&inner, request)
2689 .await
2690 };
2691 Box::pin(fut)
2692 }
2693 }
2694 let accept_compression_encodings = self.accept_compression_encodings;
2695 let send_compression_encodings = self.send_compression_encodings;
2696 let max_decoding_message_size = self.max_decoding_message_size;
2697 let max_encoding_message_size = self.max_encoding_message_size;
2698 let inner = self.inner.clone();
2699 let fut = async move {
2700 let method = AddScheduleIfNotExistsSvc(inner);
2701 let codec = tonic::codec::ProstCodec::default();
2702 let mut grpc = tonic::server::Grpc::new(codec)
2703 .apply_compression_config(
2704 accept_compression_encodings,
2705 send_compression_encodings,
2706 )
2707 .apply_max_message_size_config(
2708 max_decoding_message_size,
2709 max_encoding_message_size,
2710 );
2711 let res = grpc.unary(method, req).await;
2712 Ok(res)
2713 };
2714 Box::pin(fut)
2715 }
2716 "/ora.server.v1.AdminService/ListSchedules" => {
2717 #[allow(non_camel_case_types)]
2718 struct ListSchedulesSvc<T: AdminService>(pub Arc<T>);
2719 impl<T: AdminService> tonic::server::UnaryService<super::ListSchedulesRequest>
2720 for ListSchedulesSvc<T>
2721 {
2722 type Response = super::ListSchedulesResponse;
2723 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2724 fn call(
2725 &mut self,
2726 request: tonic::Request<super::ListSchedulesRequest>,
2727 ) -> Self::Future {
2728 let inner = Arc::clone(&self.0);
2729 let fut = async move {
2730 <T as AdminService>::list_schedules(&inner, request).await
2731 };
2732 Box::pin(fut)
2733 }
2734 }
2735 let accept_compression_encodings = self.accept_compression_encodings;
2736 let send_compression_encodings = self.send_compression_encodings;
2737 let max_decoding_message_size = self.max_decoding_message_size;
2738 let max_encoding_message_size = self.max_encoding_message_size;
2739 let inner = self.inner.clone();
2740 let fut = async move {
2741 let method = ListSchedulesSvc(inner);
2742 let codec = tonic::codec::ProstCodec::default();
2743 let mut grpc = tonic::server::Grpc::new(codec)
2744 .apply_compression_config(
2745 accept_compression_encodings,
2746 send_compression_encodings,
2747 )
2748 .apply_max_message_size_config(
2749 max_decoding_message_size,
2750 max_encoding_message_size,
2751 );
2752 let res = grpc.unary(method, req).await;
2753 Ok(res)
2754 };
2755 Box::pin(fut)
2756 }
2757 "/ora.server.v1.AdminService/CountSchedules" => {
2758 #[allow(non_camel_case_types)]
2759 struct CountSchedulesSvc<T: AdminService>(pub Arc<T>);
2760 impl<T: AdminService> tonic::server::UnaryService<super::CountSchedulesRequest>
2761 for CountSchedulesSvc<T>
2762 {
2763 type Response = super::CountSchedulesResponse;
2764 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2765 fn call(
2766 &mut self,
2767 request: tonic::Request<super::CountSchedulesRequest>,
2768 ) -> Self::Future {
2769 let inner = Arc::clone(&self.0);
2770 let fut = async move {
2771 <T as AdminService>::count_schedules(&inner, request).await
2772 };
2773 Box::pin(fut)
2774 }
2775 }
2776 let accept_compression_encodings = self.accept_compression_encodings;
2777 let send_compression_encodings = self.send_compression_encodings;
2778 let max_decoding_message_size = self.max_decoding_message_size;
2779 let max_encoding_message_size = self.max_encoding_message_size;
2780 let inner = self.inner.clone();
2781 let fut = async move {
2782 let method = CountSchedulesSvc(inner);
2783 let codec = tonic::codec::ProstCodec::default();
2784 let mut grpc = tonic::server::Grpc::new(codec)
2785 .apply_compression_config(
2786 accept_compression_encodings,
2787 send_compression_encodings,
2788 )
2789 .apply_max_message_size_config(
2790 max_decoding_message_size,
2791 max_encoding_message_size,
2792 );
2793 let res = grpc.unary(method, req).await;
2794 Ok(res)
2795 };
2796 Box::pin(fut)
2797 }
2798 "/ora.server.v1.AdminService/CancelSchedules" => {
2799 #[allow(non_camel_case_types)]
2800 struct CancelSchedulesSvc<T: AdminService>(pub Arc<T>);
2801 impl<T: AdminService> tonic::server::UnaryService<super::CancelSchedulesRequest>
2802 for CancelSchedulesSvc<T>
2803 {
2804 type Response = super::CancelSchedulesResponse;
2805 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2806 fn call(
2807 &mut self,
2808 request: tonic::Request<super::CancelSchedulesRequest>,
2809 ) -> Self::Future {
2810 let inner = Arc::clone(&self.0);
2811 let fut = async move {
2812 <T as AdminService>::cancel_schedules(&inner, request).await
2813 };
2814 Box::pin(fut)
2815 }
2816 }
2817 let accept_compression_encodings = self.accept_compression_encodings;
2818 let send_compression_encodings = self.send_compression_encodings;
2819 let max_decoding_message_size = self.max_decoding_message_size;
2820 let max_encoding_message_size = self.max_encoding_message_size;
2821 let inner = self.inner.clone();
2822 let fut = async move {
2823 let method = CancelSchedulesSvc(inner);
2824 let codec = tonic::codec::ProstCodec::default();
2825 let mut grpc = tonic::server::Grpc::new(codec)
2826 .apply_compression_config(
2827 accept_compression_encodings,
2828 send_compression_encodings,
2829 )
2830 .apply_max_message_size_config(
2831 max_decoding_message_size,
2832 max_encoding_message_size,
2833 );
2834 let res = grpc.unary(method, req).await;
2835 Ok(res)
2836 };
2837 Box::pin(fut)
2838 }
2839 "/ora.server.v1.AdminService/DeleteInactiveSchedules" => {
2840 #[allow(non_camel_case_types)]
2841 struct DeleteInactiveSchedulesSvc<T: AdminService>(pub Arc<T>);
2842 impl<T: AdminService>
2843 tonic::server::UnaryService<super::DeleteInactiveSchedulesRequest>
2844 for DeleteInactiveSchedulesSvc<T>
2845 {
2846 type Response = super::DeleteInactiveSchedulesResponse;
2847 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
2848 fn call(
2849 &mut self,
2850 request: tonic::Request<super::DeleteInactiveSchedulesRequest>,
2851 ) -> Self::Future {
2852 let inner = Arc::clone(&self.0);
2853 let fut = async move {
2854 <T as AdminService>::delete_inactive_schedules(&inner, request)
2855 .await
2856 };
2857 Box::pin(fut)
2858 }
2859 }
2860 let accept_compression_encodings = self.accept_compression_encodings;
2861 let send_compression_encodings = self.send_compression_encodings;
2862 let max_decoding_message_size = self.max_decoding_message_size;
2863 let max_encoding_message_size = self.max_encoding_message_size;
2864 let inner = self.inner.clone();
2865 let fut = async move {
2866 let method = DeleteInactiveSchedulesSvc(inner);
2867 let codec = tonic::codec::ProstCodec::default();
2868 let mut grpc = tonic::server::Grpc::new(codec)
2869 .apply_compression_config(
2870 accept_compression_encodings,
2871 send_compression_encodings,
2872 )
2873 .apply_max_message_size_config(
2874 max_decoding_message_size,
2875 max_encoding_message_size,
2876 );
2877 let res = grpc.unary(method, req).await;
2878 Ok(res)
2879 };
2880 Box::pin(fut)
2881 }
2882 _ => Box::pin(async move {
2883 let mut response = http::Response::new(empty_body());
2884 let headers = response.headers_mut();
2885 headers.insert(
2886 tonic::Status::GRPC_STATUS,
2887 (tonic::Code::Unimplemented as i32).into(),
2888 );
2889 headers.insert(
2890 http::header::CONTENT_TYPE,
2891 tonic::metadata::GRPC_CONTENT_TYPE,
2892 );
2893 Ok(response)
2894 }),
2895 }
2896 }
2897 }
2898 impl<T> Clone for AdminServiceServer<T> {
2899 fn clone(&self) -> Self {
2900 let inner = self.inner.clone();
2901 Self {
2902 inner,
2903 accept_compression_encodings: self.accept_compression_encodings,
2904 send_compression_encodings: self.send_compression_encodings,
2905 max_decoding_message_size: self.max_decoding_message_size,
2906 max_encoding_message_size: self.max_encoding_message_size,
2907 }
2908 }
2909 }
2910 pub const SERVICE_NAME: &str = "ora.server.v1.AdminService";
2912 impl<T> tonic::server::NamedService for AdminServiceServer<T> {
2913 const NAME: &'static str = SERVICE_NAME;
2914 }
2915}