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