ora_proto/generated/
ora.snapshot.v1.rs

1// This file is @generated by prost-build.
2/// Request for `Export`.
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct ExportRequest {}
5impl ::prost::Name for ExportRequest {
6    const NAME: &'static str = "ExportRequest";
7    const PACKAGE: &'static str = "ora.snapshot.v1";
8    fn full_name() -> ::prost::alloc::string::String {
9        "ora.snapshot.v1.ExportRequest".into()
10    }
11    fn type_url() -> ::prost::alloc::string::String {
12        "/ora.snapshot.v1.ExportRequest".into()
13    }
14}
15/// Response for `Export`.
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct ExportResponse {
18    /// The batch of data.
19    #[prost(message, optional, tag = "1")]
20    pub data: ::core::option::Option<SnapshotData>,
21}
22impl ::prost::Name for ExportResponse {
23    const NAME: &'static str = "ExportResponse";
24    const PACKAGE: &'static str = "ora.snapshot.v1";
25    fn full_name() -> ::prost::alloc::string::String {
26        "ora.snapshot.v1.ExportResponse".into()
27    }
28    fn type_url() -> ::prost::alloc::string::String {
29        "/ora.snapshot.v1.ExportResponse".into()
30    }
31}
32/// Request for `Import`.
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct ImportRequest {
35    /// The batch of data.
36    #[prost(message, optional, tag = "1")]
37    pub data: ::core::option::Option<SnapshotData>,
38}
39impl ::prost::Name for ImportRequest {
40    const NAME: &'static str = "ImportRequest";
41    const PACKAGE: &'static str = "ora.snapshot.v1";
42    fn full_name() -> ::prost::alloc::string::String {
43        "ora.snapshot.v1.ImportRequest".into()
44    }
45    fn type_url() -> ::prost::alloc::string::String {
46        "/ora.snapshot.v1.ImportRequest".into()
47    }
48}
49/// Response for `Import`.
50#[derive(Clone, Copy, PartialEq, ::prost::Message)]
51pub struct ImportResponse {}
52impl ::prost::Name for ImportResponse {
53    const NAME: &'static str = "ImportResponse";
54    const PACKAGE: &'static str = "ora.snapshot.v1";
55    fn full_name() -> ::prost::alloc::string::String {
56        "ora.snapshot.v1.ImportResponse".into()
57    }
58    fn type_url() -> ::prost::alloc::string::String {
59        "/ora.snapshot.v1.ImportResponse".into()
60    }
61}
62/// A batch of data.
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct SnapshotData {
65    /// The jobs in the batch.
66    #[prost(message, repeated, tag = "1")]
67    pub jobs: ::prost::alloc::vec::Vec<ExportedJob>,
68    /// The job executions in the batch.
69    #[prost(message, repeated, tag = "2")]
70    pub executions: ::prost::alloc::vec::Vec<ExportedExecution>,
71    /// The schedules in the batch.
72    #[prost(message, repeated, tag = "3")]
73    pub schedules: ::prost::alloc::vec::Vec<ExportedSchedule>,
74    /// The job types in the batch.
75    #[prost(message, repeated, tag = "4")]
76    pub job_types: ::prost::alloc::vec::Vec<ExportedJobType>,
77}
78impl ::prost::Name for SnapshotData {
79    const NAME: &'static str = "SnapshotData";
80    const PACKAGE: &'static str = "ora.snapshot.v1";
81    fn full_name() -> ::prost::alloc::string::String {
82        "ora.snapshot.v1.SnapshotData".into()
83    }
84    fn type_url() -> ::prost::alloc::string::String {
85        "/ora.snapshot.v1.SnapshotData".into()
86    }
87}
88/// All data belonging to a job.
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct ExportedJob {
91    /// The ID of the job.
92    #[prost(string, tag = "1")]
93    pub id: ::prost::alloc::string::String,
94    /// The ID of the schedule that the job belongs to.
95    #[prost(string, optional, tag = "2")]
96    pub schedule_id: ::core::option::Option<::prost::alloc::string::String>,
97    /// The time when the job was created.
98    #[prost(message, optional, tag = "3")]
99    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
100    /// The ID of the job type.
101    #[prost(string, tag = "4")]
102    pub job_type_id: ::prost::alloc::string::String,
103    /// The target execution time of the job.
104    #[prost(message, optional, tag = "5")]
105    pub target_execution_time: ::core::option::Option<::prost_types::Timestamp>,
106    /// The retry policy of the job.
107    #[prost(message, optional, tag = "6")]
108    pub retry_policy: ::core::option::Option<super::super::common::v1::JobRetryPolicy>,
109    /// The timeout policy of the job.
110    #[prost(message, optional, tag = "7")]
111    pub timeout_policy: ::core::option::Option<super::super::common::v1::JobTimeoutPolicy>,
112    /// The labels of the job.
113    #[prost(message, repeated, tag = "8")]
114    pub labels: ::prost::alloc::vec::Vec<super::super::common::v1::JobLabel>,
115    /// The time when the job was marked as inactive.
116    #[prost(message, optional, tag = "9")]
117    pub marked_unschedulable_at: ::core::option::Option<::prost_types::Timestamp>,
118    /// The time when the job was cancelled.
119    #[prost(message, optional, tag = "10")]
120    pub cancelled_at: ::core::option::Option<::prost_types::Timestamp>,
121    /// The input payload of the job.
122    #[prost(string, tag = "11")]
123    pub input_payload_json: ::prost::alloc::string::String,
124    /// Arbitrary metadata in JSON format.
125    #[prost(string, optional, tag = "12")]
126    pub metadata_json: ::core::option::Option<::prost::alloc::string::String>,
127}
128impl ::prost::Name for ExportedJob {
129    const NAME: &'static str = "ExportedJob";
130    const PACKAGE: &'static str = "ora.snapshot.v1";
131    fn full_name() -> ::prost::alloc::string::String {
132        "ora.snapshot.v1.ExportedJob".into()
133    }
134    fn type_url() -> ::prost::alloc::string::String {
135        "/ora.snapshot.v1.ExportedJob".into()
136    }
137}
138/// All data belonging to a job execution.
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct ExportedExecution {
141    /// The ID of the job execution.
142    #[prost(string, tag = "1")]
143    pub id: ::prost::alloc::string::String,
144    /// The ID of the job.
145    #[prost(string, tag = "2")]
146    pub job_id: ::prost::alloc::string::String,
147    /// The target execution time of the job.
148    #[prost(message, optional, tag = "3")]
149    pub target_execution_time: ::core::option::Option<::prost_types::Timestamp>,
150    /// The ID of the executor that executed the job.
151    #[prost(string, optional, tag = "4")]
152    pub executor_id: ::core::option::Option<::prost::alloc::string::String>,
153    /// The time when the job execution was created.
154    #[prost(message, optional, tag = "5")]
155    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
156    /// The time when the job execution was
157    /// ready
158    #[prost(message, optional, tag = "6")]
159    pub ready_at: ::core::option::Option<::prost_types::Timestamp>,
160    /// The time when the job execution was
161    /// assigned to an executor.
162    #[prost(message, optional, tag = "7")]
163    pub assigned_at: ::core::option::Option<::prost_types::Timestamp>,
164    /// The time when the job execution was
165    /// started.
166    #[prost(message, optional, tag = "8")]
167    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
168    /// The time when the job execution succeeded.
169    #[prost(message, optional, tag = "9")]
170    pub succeeded_at: ::core::option::Option<::prost_types::Timestamp>,
171    /// The time when the job execution failed.
172    #[prost(message, optional, tag = "10")]
173    pub failed_at: ::core::option::Option<::prost_types::Timestamp>,
174    /// The output payload of the job.
175    #[prost(string, optional, tag = "11")]
176    pub output_payload_json: ::core::option::Option<::prost::alloc::string::String>,
177    /// The reason why the job execution failed.
178    #[prost(string, optional, tag = "12")]
179    pub failure_reason: ::core::option::Option<::prost::alloc::string::String>,
180}
181impl ::prost::Name for ExportedExecution {
182    const NAME: &'static str = "ExportedExecution";
183    const PACKAGE: &'static str = "ora.snapshot.v1";
184    fn full_name() -> ::prost::alloc::string::String {
185        "ora.snapshot.v1.ExportedExecution".into()
186    }
187    fn type_url() -> ::prost::alloc::string::String {
188        "/ora.snapshot.v1.ExportedExecution".into()
189    }
190}
191/// All data belonging to a schedule.
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct ExportedSchedule {
194    /// The ID of the schedule.
195    #[prost(string, tag = "1")]
196    pub id: ::prost::alloc::string::String,
197    /// The time when the schedule was created.
198    #[prost(message, optional, tag = "2")]
199    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
200    /// The ID of the job type.
201    #[prost(string, optional, tag = "3")]
202    pub job_type_id: ::core::option::Option<::prost::alloc::string::String>,
203    /// The labels of the schedule.
204    #[prost(message, repeated, tag = "4")]
205    pub labels: ::prost::alloc::vec::Vec<super::super::common::v1::ScheduleLabel>,
206    /// The time when the schedule was marked as inactive.
207    #[prost(message, optional, tag = "5")]
208    pub marked_unschedulable_at: ::core::option::Option<::prost_types::Timestamp>,
209    /// The time when the schedule was cancelled.
210    #[prost(message, optional, tag = "6")]
211    pub cancelled_at: ::core::option::Option<::prost_types::Timestamp>,
212    /// The scheduling policy of the schedule.
213    #[prost(message, optional, tag = "7")]
214    pub job_timing_policy:
215        ::core::option::Option<super::super::common::v1::ScheduleJobTimingPolicy>,
216    /// The new job policy of the schedule.
217    #[prost(message, optional, tag = "8")]
218    pub job_creation_policy:
219        ::core::option::Option<super::super::common::v1::ScheduleJobCreationPolicy>,
220    /// The time range of the schedule.
221    #[prost(message, optional, tag = "10")]
222    pub time_range: ::core::option::Option<super::super::common::v1::TimeRange>,
223    /// Arbitrary metadata in JSON format.
224    #[prost(string, optional, tag = "11")]
225    pub metadata_json: ::core::option::Option<::prost::alloc::string::String>,
226}
227impl ::prost::Name for ExportedSchedule {
228    const NAME: &'static str = "ExportedSchedule";
229    const PACKAGE: &'static str = "ora.snapshot.v1";
230    fn full_name() -> ::prost::alloc::string::String {
231        "ora.snapshot.v1.ExportedSchedule".into()
232    }
233    fn type_url() -> ::prost::alloc::string::String {
234        "/ora.snapshot.v1.ExportedSchedule".into()
235    }
236}
237/// All data belonging to a job type.
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct ExportedJobType {
240    #[prost(message, optional, tag = "1")]
241    pub job_type: ::core::option::Option<super::super::common::v1::JobType>,
242}
243impl ::prost::Name for ExportedJobType {
244    const NAME: &'static str = "ExportedJobType";
245    const PACKAGE: &'static str = "ora.snapshot.v1";
246    fn full_name() -> ::prost::alloc::string::String {
247        "ora.snapshot.v1.ExportedJobType".into()
248    }
249    fn type_url() -> ::prost::alloc::string::String {
250        "/ora.snapshot.v1.ExportedJobType".into()
251    }
252}
253/// Generated client implementations.
254pub mod snapshot_service_client {
255    #![allow(
256        unused_variables,
257        dead_code,
258        missing_docs,
259        clippy::wildcard_imports,
260        clippy::let_unit_value
261    )]
262    use tonic::codegen::http::Uri;
263    use tonic::codegen::*;
264    /// A service that provides the ability to export and import
265    /// the state of the system for backup and migration purposes.
266    ///
267    /// Note that the data exported and imported is not guaranteed
268    /// to be compatible across implementations, some systems may
269    /// export only a subset of the data, others may import only
270    /// a subset of the data. This is especially important when
271    /// jobs are being executed during the export and import process.
272    #[derive(Debug, Clone)]
273    pub struct SnapshotServiceClient<T> {
274        inner: tonic::client::Grpc<T>,
275    }
276    impl SnapshotServiceClient<tonic::transport::Channel> {
277        /// Attempt to create a new client by connecting to a given endpoint.
278        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
279        where
280            D: TryInto<tonic::transport::Endpoint>,
281            D::Error: Into<StdError>,
282        {
283            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
284            Ok(Self::new(conn))
285        }
286    }
287    impl<T> SnapshotServiceClient<T>
288    where
289        T: tonic::client::GrpcService<tonic::body::BoxBody>,
290        T::Error: Into<StdError>,
291        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
292        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
293    {
294        pub fn new(inner: T) -> Self {
295            let inner = tonic::client::Grpc::new(inner);
296            Self { inner }
297        }
298        pub fn with_origin(inner: T, origin: Uri) -> Self {
299            let inner = tonic::client::Grpc::with_origin(inner, origin);
300            Self { inner }
301        }
302        pub fn with_interceptor<F>(
303            inner: T,
304            interceptor: F,
305        ) -> SnapshotServiceClient<InterceptedService<T, F>>
306        where
307            F: tonic::service::Interceptor,
308            T::ResponseBody: Default,
309            T: tonic::codegen::Service<
310                http::Request<tonic::body::BoxBody>,
311                Response = http::Response<
312                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
313                >,
314            >,
315            <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
316                Into<StdError> + std::marker::Send + std::marker::Sync,
317        {
318            SnapshotServiceClient::new(InterceptedService::new(inner, interceptor))
319        }
320        /// Compress requests with the given encoding.
321        ///
322        /// This requires the server to support it otherwise it might respond with an
323        /// error.
324        #[must_use]
325        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
326            self.inner = self.inner.send_compressed(encoding);
327            self
328        }
329        /// Enable decompressing responses.
330        #[must_use]
331        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
332            self.inner = self.inner.accept_compressed(encoding);
333            self
334        }
335        /// Limits the maximum size of a decoded message.
336        ///
337        /// Default: `4MB`
338        #[must_use]
339        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
340            self.inner = self.inner.max_decoding_message_size(limit);
341            self
342        }
343        /// Limits the maximum size of an encoded message.
344        ///
345        /// Default: `usize::MAX`
346        #[must_use]
347        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
348            self.inner = self.inner.max_encoding_message_size(limit);
349            self
350        }
351        /// Export all the data of the system.
352        pub async fn export(
353            &mut self,
354            request: impl tonic::IntoRequest<super::ExportRequest>,
355        ) -> std::result::Result<
356            tonic::Response<tonic::codec::Streaming<super::ExportResponse>>,
357            tonic::Status,
358        > {
359            self.inner.ready().await.map_err(|e| {
360                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
361            })?;
362            let codec = tonic::codec::ProstCodec::default();
363            let path =
364                http::uri::PathAndQuery::from_static("/ora.snapshot.v1.SnapshotService/Export");
365            let mut req = request.into_request();
366            req.extensions_mut()
367                .insert(GrpcMethod::new("ora.snapshot.v1.SnapshotService", "Export"));
368            self.inner.server_streaming(req, path, codec).await
369        }
370        /// Import the full snapshot of the system.
371        ///
372        /// Note that this may overwrite the existing state of the system
373        /// depending on the implementation.
374        pub async fn import(
375            &mut self,
376            request: impl tonic::IntoStreamingRequest<Message = super::ImportRequest>,
377        ) -> std::result::Result<tonic::Response<super::ImportResponse>, tonic::Status> {
378            self.inner.ready().await.map_err(|e| {
379                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
380            })?;
381            let codec = tonic::codec::ProstCodec::default();
382            let path =
383                http::uri::PathAndQuery::from_static("/ora.snapshot.v1.SnapshotService/Import");
384            let mut req = request.into_streaming_request();
385            req.extensions_mut()
386                .insert(GrpcMethod::new("ora.snapshot.v1.SnapshotService", "Import"));
387            self.inner.client_streaming(req, path, codec).await
388        }
389    }
390}
391/// Generated server implementations.
392pub mod snapshot_service_server {
393    #![allow(
394        unused_variables,
395        dead_code,
396        missing_docs,
397        clippy::wildcard_imports,
398        clippy::let_unit_value
399    )]
400    use tonic::codegen::*;
401    /// Generated trait containing gRPC methods that should be implemented for use with SnapshotServiceServer.
402    #[async_trait]
403    pub trait SnapshotService: std::marker::Send + std::marker::Sync + 'static {
404        /// Export all the data of the system.
405        async fn export(
406            &self,
407            request: tonic::Request<super::ExportRequest>,
408        ) -> std::result::Result<tonic::Response<BoxStream<super::ExportResponse>>, tonic::Status>
409        {
410            Err(tonic::Status::unimplemented("Not yet implemented"))
411        }
412        /// Import the full snapshot of the system.
413        ///
414        /// Note that this may overwrite the existing state of the system
415        /// depending on the implementation.
416        async fn import(
417            &self,
418            request: tonic::Request<tonic::Streaming<super::ImportRequest>>,
419        ) -> std::result::Result<tonic::Response<super::ImportResponse>, tonic::Status> {
420            Err(tonic::Status::unimplemented("Not yet implemented"))
421        }
422    }
423    /// A service that provides the ability to export and import
424    /// the state of the system for backup and migration purposes.
425    ///
426    /// Note that the data exported and imported is not guaranteed
427    /// to be compatible across implementations, some systems may
428    /// export only a subset of the data, others may import only
429    /// a subset of the data. This is especially important when
430    /// jobs are being executed during the export and import process.
431    #[derive(Debug)]
432    pub struct SnapshotServiceServer<T> {
433        inner: Arc<T>,
434        accept_compression_encodings: EnabledCompressionEncodings,
435        send_compression_encodings: EnabledCompressionEncodings,
436        max_decoding_message_size: Option<usize>,
437        max_encoding_message_size: Option<usize>,
438    }
439    impl<T> SnapshotServiceServer<T> {
440        pub fn new(inner: T) -> Self {
441            Self::from_arc(Arc::new(inner))
442        }
443        pub fn from_arc(inner: Arc<T>) -> Self {
444            Self {
445                inner,
446                accept_compression_encodings: Default::default(),
447                send_compression_encodings: Default::default(),
448                max_decoding_message_size: None,
449                max_encoding_message_size: None,
450            }
451        }
452        pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
453        where
454            F: tonic::service::Interceptor,
455        {
456            InterceptedService::new(Self::new(inner), interceptor)
457        }
458        /// Enable decompressing requests with the given encoding.
459        #[must_use]
460        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
461            self.accept_compression_encodings.enable(encoding);
462            self
463        }
464        /// Compress responses with the given encoding, if the client supports it.
465        #[must_use]
466        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
467            self.send_compression_encodings.enable(encoding);
468            self
469        }
470        /// Limits the maximum size of a decoded message.
471        ///
472        /// Default: `4MB`
473        #[must_use]
474        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
475            self.max_decoding_message_size = Some(limit);
476            self
477        }
478        /// Limits the maximum size of an encoded message.
479        ///
480        /// Default: `usize::MAX`
481        #[must_use]
482        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
483            self.max_encoding_message_size = Some(limit);
484            self
485        }
486    }
487    impl<T, B> tonic::codegen::Service<http::Request<B>> for SnapshotServiceServer<T>
488    where
489        T: SnapshotService,
490        B: Body + std::marker::Send + 'static,
491        B::Error: Into<StdError> + std::marker::Send + 'static,
492    {
493        type Response = http::Response<tonic::body::BoxBody>;
494        type Error = std::convert::Infallible;
495        type Future = BoxFuture<Self::Response, Self::Error>;
496        fn poll_ready(
497            &mut self,
498            _cx: &mut Context<'_>,
499        ) -> Poll<std::result::Result<(), Self::Error>> {
500            Poll::Ready(Ok(()))
501        }
502        fn call(&mut self, req: http::Request<B>) -> Self::Future {
503            match req.uri().path() {
504                "/ora.snapshot.v1.SnapshotService/Export" => {
505                    #[allow(non_camel_case_types)]
506                    struct ExportSvc<T: SnapshotService>(pub Arc<T>);
507                    impl<T: SnapshotService>
508                        tonic::server::ServerStreamingService<super::ExportRequest>
509                        for ExportSvc<T>
510                    {
511                        type Response = super::ExportResponse;
512                        type ResponseStream = BoxStream<super::ExportResponse>;
513                        type Future =
514                            BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
515                        fn call(
516                            &mut self,
517                            request: tonic::Request<super::ExportRequest>,
518                        ) -> Self::Future {
519                            let inner = Arc::clone(&self.0);
520                            let fut = async move {
521                                <T as SnapshotService>::export(&inner, request).await
522                            };
523                            Box::pin(fut)
524                        }
525                    }
526                    let accept_compression_encodings = self.accept_compression_encodings;
527                    let send_compression_encodings = self.send_compression_encodings;
528                    let max_decoding_message_size = self.max_decoding_message_size;
529                    let max_encoding_message_size = self.max_encoding_message_size;
530                    let inner = self.inner.clone();
531                    let fut = async move {
532                        let method = ExportSvc(inner);
533                        let codec = tonic::codec::ProstCodec::default();
534                        let mut grpc = tonic::server::Grpc::new(codec)
535                            .apply_compression_config(
536                                accept_compression_encodings,
537                                send_compression_encodings,
538                            )
539                            .apply_max_message_size_config(
540                                max_decoding_message_size,
541                                max_encoding_message_size,
542                            );
543                        let res = grpc.server_streaming(method, req).await;
544                        Ok(res)
545                    };
546                    Box::pin(fut)
547                }
548                "/ora.snapshot.v1.SnapshotService/Import" => {
549                    #[allow(non_camel_case_types)]
550                    struct ImportSvc<T: SnapshotService>(pub Arc<T>);
551                    impl<T: SnapshotService>
552                        tonic::server::ClientStreamingService<super::ImportRequest>
553                        for ImportSvc<T>
554                    {
555                        type Response = super::ImportResponse;
556                        type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
557                        fn call(
558                            &mut self,
559                            request: tonic::Request<tonic::Streaming<super::ImportRequest>>,
560                        ) -> Self::Future {
561                            let inner = Arc::clone(&self.0);
562                            let fut = async move {
563                                <T as SnapshotService>::import(&inner, request).await
564                            };
565                            Box::pin(fut)
566                        }
567                    }
568                    let accept_compression_encodings = self.accept_compression_encodings;
569                    let send_compression_encodings = self.send_compression_encodings;
570                    let max_decoding_message_size = self.max_decoding_message_size;
571                    let max_encoding_message_size = self.max_encoding_message_size;
572                    let inner = self.inner.clone();
573                    let fut = async move {
574                        let method = ImportSvc(inner);
575                        let codec = tonic::codec::ProstCodec::default();
576                        let mut grpc = tonic::server::Grpc::new(codec)
577                            .apply_compression_config(
578                                accept_compression_encodings,
579                                send_compression_encodings,
580                            )
581                            .apply_max_message_size_config(
582                                max_decoding_message_size,
583                                max_encoding_message_size,
584                            );
585                        let res = grpc.client_streaming(method, req).await;
586                        Ok(res)
587                    };
588                    Box::pin(fut)
589                }
590                _ => Box::pin(async move {
591                    let mut response = http::Response::new(empty_body());
592                    let headers = response.headers_mut();
593                    headers.insert(
594                        tonic::Status::GRPC_STATUS,
595                        (tonic::Code::Unimplemented as i32).into(),
596                    );
597                    headers.insert(
598                        http::header::CONTENT_TYPE,
599                        tonic::metadata::GRPC_CONTENT_TYPE,
600                    );
601                    Ok(response)
602                }),
603            }
604        }
605    }
606    impl<T> Clone for SnapshotServiceServer<T> {
607        fn clone(&self) -> Self {
608            let inner = self.inner.clone();
609            Self {
610                inner,
611                accept_compression_encodings: self.accept_compression_encodings,
612                send_compression_encodings: self.send_compression_encodings,
613                max_decoding_message_size: self.max_decoding_message_size,
614                max_encoding_message_size: self.max_encoding_message_size,
615            }
616        }
617    }
618    /// Generated gRPC service name
619    pub const SERVICE_NAME: &str = "ora.snapshot.v1.SnapshotService";
620    impl<T> tonic::server::NamedService for SnapshotServiceServer<T> {
621        const NAME: &'static str = SERVICE_NAME;
622    }
623}