lightspeed_astro/
lightspeed.service.rs

1/// Generated server implementations.
2pub mod astro_generic_service_server {
3    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4    use tonic::codegen::*;
5    /// Generated trait containing gRPC methods that should be implemented for use with AstroGenericServiceServer.
6    #[async_trait]
7    pub trait AstroGenericService: Send + Sync + 'static {
8        async fn get_devices(
9            &self,
10            request: tonic::Request<super::super::request::GetDevicesRequest>,
11        ) -> std::result::Result<
12            tonic::Response<super::super::response::GetDevicesResponse>,
13            tonic::Status,
14        >;
15        async fn set_property(
16            &self,
17            request: tonic::Request<super::super::request::SetPropertyRequest>,
18        ) -> std::result::Result<
19            tonic::Response<super::super::response::SetPropertyResponse>,
20            tonic::Status,
21        >;
22    }
23    #[derive(Debug)]
24    pub struct AstroGenericServiceServer<T: AstroGenericService> {
25        inner: _Inner<T>,
26        accept_compression_encodings: EnabledCompressionEncodings,
27        send_compression_encodings: EnabledCompressionEncodings,
28        max_decoding_message_size: Option<usize>,
29        max_encoding_message_size: Option<usize>,
30    }
31    struct _Inner<T>(Arc<T>);
32    impl<T: AstroGenericService> AstroGenericServiceServer<T> {
33        pub fn new(inner: T) -> Self {
34            Self::from_arc(Arc::new(inner))
35        }
36        pub fn from_arc(inner: Arc<T>) -> Self {
37            let inner = _Inner(inner);
38            Self {
39                inner,
40                accept_compression_encodings: Default::default(),
41                send_compression_encodings: Default::default(),
42                max_decoding_message_size: None,
43                max_encoding_message_size: None,
44            }
45        }
46        pub fn with_interceptor<F>(
47            inner: T,
48            interceptor: F,
49        ) -> InterceptedService<Self, F>
50        where
51            F: tonic::service::Interceptor,
52        {
53            InterceptedService::new(Self::new(inner), interceptor)
54        }
55        /// Enable decompressing requests with the given encoding.
56        #[must_use]
57        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
58            self.accept_compression_encodings.enable(encoding);
59            self
60        }
61        /// Compress responses with the given encoding, if the client supports it.
62        #[must_use]
63        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
64            self.send_compression_encodings.enable(encoding);
65            self
66        }
67        /// Limits the maximum size of a decoded message.
68        ///
69        /// Default: `4MB`
70        #[must_use]
71        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
72            self.max_decoding_message_size = Some(limit);
73            self
74        }
75        /// Limits the maximum size of an encoded message.
76        ///
77        /// Default: `usize::MAX`
78        #[must_use]
79        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
80            self.max_encoding_message_size = Some(limit);
81            self
82        }
83    }
84    impl<T, B> tonic::codegen::Service<http::Request<B>> for AstroGenericServiceServer<T>
85    where
86        T: AstroGenericService,
87        B: Body + Send + 'static,
88        B::Error: Into<StdError> + Send + 'static,
89    {
90        type Response = http::Response<tonic::body::BoxBody>;
91        type Error = std::convert::Infallible;
92        type Future = BoxFuture<Self::Response, Self::Error>;
93        fn poll_ready(
94            &mut self,
95            _cx: &mut Context<'_>,
96        ) -> Poll<std::result::Result<(), Self::Error>> {
97            Poll::Ready(Ok(()))
98        }
99        fn call(&mut self, req: http::Request<B>) -> Self::Future {
100            let inner = self.inner.clone();
101            match req.uri().path() {
102                "/lightspeed.service.AstroGenericService/GetDevices" => {
103                    #[allow(non_camel_case_types)]
104                    struct GetDevicesSvc<T: AstroGenericService>(pub Arc<T>);
105                    impl<
106                        T: AstroGenericService,
107                    > tonic::server::UnaryService<
108                        super::super::request::GetDevicesRequest,
109                    > for GetDevicesSvc<T> {
110                        type Response = super::super::response::GetDevicesResponse;
111                        type Future = BoxFuture<
112                            tonic::Response<Self::Response>,
113                            tonic::Status,
114                        >;
115                        fn call(
116                            &mut self,
117                            request: tonic::Request<
118                                super::super::request::GetDevicesRequest,
119                            >,
120                        ) -> Self::Future {
121                            let inner = Arc::clone(&self.0);
122                            let fut = async move { (*inner).get_devices(request).await };
123                            Box::pin(fut)
124                        }
125                    }
126                    let accept_compression_encodings = self.accept_compression_encodings;
127                    let send_compression_encodings = self.send_compression_encodings;
128                    let max_decoding_message_size = self.max_decoding_message_size;
129                    let max_encoding_message_size = self.max_encoding_message_size;
130                    let inner = self.inner.clone();
131                    let fut = async move {
132                        let inner = inner.0;
133                        let method = GetDevicesSvc(inner);
134                        let codec = tonic::codec::ProstCodec::default();
135                        let mut grpc = tonic::server::Grpc::new(codec)
136                            .apply_compression_config(
137                                accept_compression_encodings,
138                                send_compression_encodings,
139                            )
140                            .apply_max_message_size_config(
141                                max_decoding_message_size,
142                                max_encoding_message_size,
143                            );
144                        let res = grpc.unary(method, req).await;
145                        Ok(res)
146                    };
147                    Box::pin(fut)
148                }
149                "/lightspeed.service.AstroGenericService/SetProperty" => {
150                    #[allow(non_camel_case_types)]
151                    struct SetPropertySvc<T: AstroGenericService>(pub Arc<T>);
152                    impl<
153                        T: AstroGenericService,
154                    > tonic::server::UnaryService<
155                        super::super::request::SetPropertyRequest,
156                    > for SetPropertySvc<T> {
157                        type Response = super::super::response::SetPropertyResponse;
158                        type Future = BoxFuture<
159                            tonic::Response<Self::Response>,
160                            tonic::Status,
161                        >;
162                        fn call(
163                            &mut self,
164                            request: tonic::Request<
165                                super::super::request::SetPropertyRequest,
166                            >,
167                        ) -> Self::Future {
168                            let inner = Arc::clone(&self.0);
169                            let fut = async move {
170                                (*inner).set_property(request).await
171                            };
172                            Box::pin(fut)
173                        }
174                    }
175                    let accept_compression_encodings = self.accept_compression_encodings;
176                    let send_compression_encodings = self.send_compression_encodings;
177                    let max_decoding_message_size = self.max_decoding_message_size;
178                    let max_encoding_message_size = self.max_encoding_message_size;
179                    let inner = self.inner.clone();
180                    let fut = async move {
181                        let inner = inner.0;
182                        let method = SetPropertySvc(inner);
183                        let codec = tonic::codec::ProstCodec::default();
184                        let mut grpc = tonic::server::Grpc::new(codec)
185                            .apply_compression_config(
186                                accept_compression_encodings,
187                                send_compression_encodings,
188                            )
189                            .apply_max_message_size_config(
190                                max_decoding_message_size,
191                                max_encoding_message_size,
192                            );
193                        let res = grpc.unary(method, req).await;
194                        Ok(res)
195                    };
196                    Box::pin(fut)
197                }
198                _ => {
199                    Box::pin(async move {
200                        Ok(
201                            http::Response::builder()
202                                .status(200)
203                                .header("grpc-status", "12")
204                                .header("content-type", "application/grpc")
205                                .body(empty_body())
206                                .unwrap(),
207                        )
208                    })
209                }
210            }
211        }
212    }
213    impl<T: AstroGenericService> Clone for AstroGenericServiceServer<T> {
214        fn clone(&self) -> Self {
215            let inner = self.inner.clone();
216            Self {
217                inner,
218                accept_compression_encodings: self.accept_compression_encodings,
219                send_compression_encodings: self.send_compression_encodings,
220                max_decoding_message_size: self.max_decoding_message_size,
221                max_encoding_message_size: self.max_encoding_message_size,
222            }
223        }
224    }
225    impl<T: AstroGenericService> Clone for _Inner<T> {
226        fn clone(&self) -> Self {
227            Self(Arc::clone(&self.0))
228        }
229    }
230    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
231        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
232            write!(f, "{:?}", self.0)
233        }
234    }
235    impl<T: AstroGenericService> tonic::server::NamedService
236    for AstroGenericServiceServer<T> {
237        const NAME: &'static str = "lightspeed.service.AstroGenericService";
238    }
239}
240/// Generated server implementations.
241pub mod astro_ccd_service_server {
242    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
243    use tonic::codegen::*;
244    /// Generated trait containing gRPC methods that should be implemented for use with AstroCcdServiceServer.
245    #[async_trait]
246    pub trait AstroCcdService: Send + Sync + 'static {
247        async fn get_devices(
248            &self,
249            request: tonic::Request<super::super::request::GetDevicesRequest>,
250        ) -> std::result::Result<
251            tonic::Response<super::super::response::GetDevicesResponse>,
252            tonic::Status,
253        >;
254        async fn set_property(
255            &self,
256            request: tonic::Request<super::super::request::SetPropertyRequest>,
257        ) -> std::result::Result<
258            tonic::Response<super::super::response::SetPropertyResponse>,
259            tonic::Status,
260        >;
261        async fn expose(
262            &self,
263            request: tonic::Request<super::super::request::CcdExposureRequest>,
264        ) -> std::result::Result<
265            tonic::Response<super::super::request::CcdExposureResponse>,
266            tonic::Status,
267        >;
268    }
269    #[derive(Debug)]
270    pub struct AstroCcdServiceServer<T: AstroCcdService> {
271        inner: _Inner<T>,
272        accept_compression_encodings: EnabledCompressionEncodings,
273        send_compression_encodings: EnabledCompressionEncodings,
274        max_decoding_message_size: Option<usize>,
275        max_encoding_message_size: Option<usize>,
276    }
277    struct _Inner<T>(Arc<T>);
278    impl<T: AstroCcdService> AstroCcdServiceServer<T> {
279        pub fn new(inner: T) -> Self {
280            Self::from_arc(Arc::new(inner))
281        }
282        pub fn from_arc(inner: Arc<T>) -> Self {
283            let inner = _Inner(inner);
284            Self {
285                inner,
286                accept_compression_encodings: Default::default(),
287                send_compression_encodings: Default::default(),
288                max_decoding_message_size: None,
289                max_encoding_message_size: None,
290            }
291        }
292        pub fn with_interceptor<F>(
293            inner: T,
294            interceptor: F,
295        ) -> InterceptedService<Self, F>
296        where
297            F: tonic::service::Interceptor,
298        {
299            InterceptedService::new(Self::new(inner), interceptor)
300        }
301        /// Enable decompressing requests with the given encoding.
302        #[must_use]
303        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
304            self.accept_compression_encodings.enable(encoding);
305            self
306        }
307        /// Compress responses with the given encoding, if the client supports it.
308        #[must_use]
309        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
310            self.send_compression_encodings.enable(encoding);
311            self
312        }
313        /// Limits the maximum size of a decoded message.
314        ///
315        /// Default: `4MB`
316        #[must_use]
317        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
318            self.max_decoding_message_size = Some(limit);
319            self
320        }
321        /// Limits the maximum size of an encoded message.
322        ///
323        /// Default: `usize::MAX`
324        #[must_use]
325        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
326            self.max_encoding_message_size = Some(limit);
327            self
328        }
329    }
330    impl<T, B> tonic::codegen::Service<http::Request<B>> for AstroCcdServiceServer<T>
331    where
332        T: AstroCcdService,
333        B: Body + Send + 'static,
334        B::Error: Into<StdError> + Send + 'static,
335    {
336        type Response = http::Response<tonic::body::BoxBody>;
337        type Error = std::convert::Infallible;
338        type Future = BoxFuture<Self::Response, Self::Error>;
339        fn poll_ready(
340            &mut self,
341            _cx: &mut Context<'_>,
342        ) -> Poll<std::result::Result<(), Self::Error>> {
343            Poll::Ready(Ok(()))
344        }
345        fn call(&mut self, req: http::Request<B>) -> Self::Future {
346            let inner = self.inner.clone();
347            match req.uri().path() {
348                "/lightspeed.service.AstroCcdService/GetDevices" => {
349                    #[allow(non_camel_case_types)]
350                    struct GetDevicesSvc<T: AstroCcdService>(pub Arc<T>);
351                    impl<
352                        T: AstroCcdService,
353                    > tonic::server::UnaryService<
354                        super::super::request::GetDevicesRequest,
355                    > for GetDevicesSvc<T> {
356                        type Response = super::super::response::GetDevicesResponse;
357                        type Future = BoxFuture<
358                            tonic::Response<Self::Response>,
359                            tonic::Status,
360                        >;
361                        fn call(
362                            &mut self,
363                            request: tonic::Request<
364                                super::super::request::GetDevicesRequest,
365                            >,
366                        ) -> Self::Future {
367                            let inner = Arc::clone(&self.0);
368                            let fut = async move { (*inner).get_devices(request).await };
369                            Box::pin(fut)
370                        }
371                    }
372                    let accept_compression_encodings = self.accept_compression_encodings;
373                    let send_compression_encodings = self.send_compression_encodings;
374                    let max_decoding_message_size = self.max_decoding_message_size;
375                    let max_encoding_message_size = self.max_encoding_message_size;
376                    let inner = self.inner.clone();
377                    let fut = async move {
378                        let inner = inner.0;
379                        let method = GetDevicesSvc(inner);
380                        let codec = tonic::codec::ProstCodec::default();
381                        let mut grpc = tonic::server::Grpc::new(codec)
382                            .apply_compression_config(
383                                accept_compression_encodings,
384                                send_compression_encodings,
385                            )
386                            .apply_max_message_size_config(
387                                max_decoding_message_size,
388                                max_encoding_message_size,
389                            );
390                        let res = grpc.unary(method, req).await;
391                        Ok(res)
392                    };
393                    Box::pin(fut)
394                }
395                "/lightspeed.service.AstroCcdService/SetProperty" => {
396                    #[allow(non_camel_case_types)]
397                    struct SetPropertySvc<T: AstroCcdService>(pub Arc<T>);
398                    impl<
399                        T: AstroCcdService,
400                    > tonic::server::UnaryService<
401                        super::super::request::SetPropertyRequest,
402                    > for SetPropertySvc<T> {
403                        type Response = super::super::response::SetPropertyResponse;
404                        type Future = BoxFuture<
405                            tonic::Response<Self::Response>,
406                            tonic::Status,
407                        >;
408                        fn call(
409                            &mut self,
410                            request: tonic::Request<
411                                super::super::request::SetPropertyRequest,
412                            >,
413                        ) -> Self::Future {
414                            let inner = Arc::clone(&self.0);
415                            let fut = async move {
416                                (*inner).set_property(request).await
417                            };
418                            Box::pin(fut)
419                        }
420                    }
421                    let accept_compression_encodings = self.accept_compression_encodings;
422                    let send_compression_encodings = self.send_compression_encodings;
423                    let max_decoding_message_size = self.max_decoding_message_size;
424                    let max_encoding_message_size = self.max_encoding_message_size;
425                    let inner = self.inner.clone();
426                    let fut = async move {
427                        let inner = inner.0;
428                        let method = SetPropertySvc(inner);
429                        let codec = tonic::codec::ProstCodec::default();
430                        let mut grpc = tonic::server::Grpc::new(codec)
431                            .apply_compression_config(
432                                accept_compression_encodings,
433                                send_compression_encodings,
434                            )
435                            .apply_max_message_size_config(
436                                max_decoding_message_size,
437                                max_encoding_message_size,
438                            );
439                        let res = grpc.unary(method, req).await;
440                        Ok(res)
441                    };
442                    Box::pin(fut)
443                }
444                "/lightspeed.service.AstroCcdService/Expose" => {
445                    #[allow(non_camel_case_types)]
446                    struct ExposeSvc<T: AstroCcdService>(pub Arc<T>);
447                    impl<
448                        T: AstroCcdService,
449                    > tonic::server::UnaryService<
450                        super::super::request::CcdExposureRequest,
451                    > for ExposeSvc<T> {
452                        type Response = super::super::request::CcdExposureResponse;
453                        type Future = BoxFuture<
454                            tonic::Response<Self::Response>,
455                            tonic::Status,
456                        >;
457                        fn call(
458                            &mut self,
459                            request: tonic::Request<
460                                super::super::request::CcdExposureRequest,
461                            >,
462                        ) -> Self::Future {
463                            let inner = Arc::clone(&self.0);
464                            let fut = async move { (*inner).expose(request).await };
465                            Box::pin(fut)
466                        }
467                    }
468                    let accept_compression_encodings = self.accept_compression_encodings;
469                    let send_compression_encodings = self.send_compression_encodings;
470                    let max_decoding_message_size = self.max_decoding_message_size;
471                    let max_encoding_message_size = self.max_encoding_message_size;
472                    let inner = self.inner.clone();
473                    let fut = async move {
474                        let inner = inner.0;
475                        let method = ExposeSvc(inner);
476                        let codec = tonic::codec::ProstCodec::default();
477                        let mut grpc = tonic::server::Grpc::new(codec)
478                            .apply_compression_config(
479                                accept_compression_encodings,
480                                send_compression_encodings,
481                            )
482                            .apply_max_message_size_config(
483                                max_decoding_message_size,
484                                max_encoding_message_size,
485                            );
486                        let res = grpc.unary(method, req).await;
487                        Ok(res)
488                    };
489                    Box::pin(fut)
490                }
491                _ => {
492                    Box::pin(async move {
493                        Ok(
494                            http::Response::builder()
495                                .status(200)
496                                .header("grpc-status", "12")
497                                .header("content-type", "application/grpc")
498                                .body(empty_body())
499                                .unwrap(),
500                        )
501                    })
502                }
503            }
504        }
505    }
506    impl<T: AstroCcdService> Clone for AstroCcdServiceServer<T> {
507        fn clone(&self) -> Self {
508            let inner = self.inner.clone();
509            Self {
510                inner,
511                accept_compression_encodings: self.accept_compression_encodings,
512                send_compression_encodings: self.send_compression_encodings,
513                max_decoding_message_size: self.max_decoding_message_size,
514                max_encoding_message_size: self.max_encoding_message_size,
515            }
516        }
517    }
518    impl<T: AstroCcdService> Clone for _Inner<T> {
519        fn clone(&self) -> Self {
520            Self(Arc::clone(&self.0))
521        }
522    }
523    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
524        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
525            write!(f, "{:?}", self.0)
526        }
527    }
528    impl<T: AstroCcdService> tonic::server::NamedService for AstroCcdServiceServer<T> {
529        const NAME: &'static str = "lightspeed.service.AstroCcdService";
530    }
531}
532/// Generated server implementations.
533pub mod astro_efw_service_server {
534    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
535    use tonic::codegen::*;
536    /// Generated trait containing gRPC methods that should be implemented for use with AstroEfwServiceServer.
537    #[async_trait]
538    pub trait AstroEfwService: Send + Sync + 'static {
539        async fn get_devices(
540            &self,
541            request: tonic::Request<super::super::request::GetDevicesRequest>,
542        ) -> std::result::Result<
543            tonic::Response<super::super::response::GetDevicesResponse>,
544            tonic::Status,
545        >;
546        async fn set_property(
547            &self,
548            request: tonic::Request<super::super::request::SetPropertyRequest>,
549        ) -> std::result::Result<
550            tonic::Response<super::super::response::SetPropertyResponse>,
551            tonic::Status,
552        >;
553        async fn calibrate(
554            &self,
555            request: tonic::Request<super::super::request::EfwCalibrationRequest>,
556        ) -> std::result::Result<
557            tonic::Response<super::super::response::EfwCalibrationResponse>,
558            tonic::Status,
559        >;
560    }
561    #[derive(Debug)]
562    pub struct AstroEfwServiceServer<T: AstroEfwService> {
563        inner: _Inner<T>,
564        accept_compression_encodings: EnabledCompressionEncodings,
565        send_compression_encodings: EnabledCompressionEncodings,
566        max_decoding_message_size: Option<usize>,
567        max_encoding_message_size: Option<usize>,
568    }
569    struct _Inner<T>(Arc<T>);
570    impl<T: AstroEfwService> AstroEfwServiceServer<T> {
571        pub fn new(inner: T) -> Self {
572            Self::from_arc(Arc::new(inner))
573        }
574        pub fn from_arc(inner: Arc<T>) -> Self {
575            let inner = _Inner(inner);
576            Self {
577                inner,
578                accept_compression_encodings: Default::default(),
579                send_compression_encodings: Default::default(),
580                max_decoding_message_size: None,
581                max_encoding_message_size: None,
582            }
583        }
584        pub fn with_interceptor<F>(
585            inner: T,
586            interceptor: F,
587        ) -> InterceptedService<Self, F>
588        where
589            F: tonic::service::Interceptor,
590        {
591            InterceptedService::new(Self::new(inner), interceptor)
592        }
593        /// Enable decompressing requests with the given encoding.
594        #[must_use]
595        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
596            self.accept_compression_encodings.enable(encoding);
597            self
598        }
599        /// Compress responses with the given encoding, if the client supports it.
600        #[must_use]
601        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
602            self.send_compression_encodings.enable(encoding);
603            self
604        }
605        /// Limits the maximum size of a decoded message.
606        ///
607        /// Default: `4MB`
608        #[must_use]
609        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
610            self.max_decoding_message_size = Some(limit);
611            self
612        }
613        /// Limits the maximum size of an encoded message.
614        ///
615        /// Default: `usize::MAX`
616        #[must_use]
617        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
618            self.max_encoding_message_size = Some(limit);
619            self
620        }
621    }
622    impl<T, B> tonic::codegen::Service<http::Request<B>> for AstroEfwServiceServer<T>
623    where
624        T: AstroEfwService,
625        B: Body + Send + 'static,
626        B::Error: Into<StdError> + Send + 'static,
627    {
628        type Response = http::Response<tonic::body::BoxBody>;
629        type Error = std::convert::Infallible;
630        type Future = BoxFuture<Self::Response, Self::Error>;
631        fn poll_ready(
632            &mut self,
633            _cx: &mut Context<'_>,
634        ) -> Poll<std::result::Result<(), Self::Error>> {
635            Poll::Ready(Ok(()))
636        }
637        fn call(&mut self, req: http::Request<B>) -> Self::Future {
638            let inner = self.inner.clone();
639            match req.uri().path() {
640                "/lightspeed.service.AstroEfwService/GetDevices" => {
641                    #[allow(non_camel_case_types)]
642                    struct GetDevicesSvc<T: AstroEfwService>(pub Arc<T>);
643                    impl<
644                        T: AstroEfwService,
645                    > tonic::server::UnaryService<
646                        super::super::request::GetDevicesRequest,
647                    > for GetDevicesSvc<T> {
648                        type Response = super::super::response::GetDevicesResponse;
649                        type Future = BoxFuture<
650                            tonic::Response<Self::Response>,
651                            tonic::Status,
652                        >;
653                        fn call(
654                            &mut self,
655                            request: tonic::Request<
656                                super::super::request::GetDevicesRequest,
657                            >,
658                        ) -> Self::Future {
659                            let inner = Arc::clone(&self.0);
660                            let fut = async move { (*inner).get_devices(request).await };
661                            Box::pin(fut)
662                        }
663                    }
664                    let accept_compression_encodings = self.accept_compression_encodings;
665                    let send_compression_encodings = self.send_compression_encodings;
666                    let max_decoding_message_size = self.max_decoding_message_size;
667                    let max_encoding_message_size = self.max_encoding_message_size;
668                    let inner = self.inner.clone();
669                    let fut = async move {
670                        let inner = inner.0;
671                        let method = GetDevicesSvc(inner);
672                        let codec = tonic::codec::ProstCodec::default();
673                        let mut grpc = tonic::server::Grpc::new(codec)
674                            .apply_compression_config(
675                                accept_compression_encodings,
676                                send_compression_encodings,
677                            )
678                            .apply_max_message_size_config(
679                                max_decoding_message_size,
680                                max_encoding_message_size,
681                            );
682                        let res = grpc.unary(method, req).await;
683                        Ok(res)
684                    };
685                    Box::pin(fut)
686                }
687                "/lightspeed.service.AstroEfwService/SetProperty" => {
688                    #[allow(non_camel_case_types)]
689                    struct SetPropertySvc<T: AstroEfwService>(pub Arc<T>);
690                    impl<
691                        T: AstroEfwService,
692                    > tonic::server::UnaryService<
693                        super::super::request::SetPropertyRequest,
694                    > for SetPropertySvc<T> {
695                        type Response = super::super::response::SetPropertyResponse;
696                        type Future = BoxFuture<
697                            tonic::Response<Self::Response>,
698                            tonic::Status,
699                        >;
700                        fn call(
701                            &mut self,
702                            request: tonic::Request<
703                                super::super::request::SetPropertyRequest,
704                            >,
705                        ) -> Self::Future {
706                            let inner = Arc::clone(&self.0);
707                            let fut = async move {
708                                (*inner).set_property(request).await
709                            };
710                            Box::pin(fut)
711                        }
712                    }
713                    let accept_compression_encodings = self.accept_compression_encodings;
714                    let send_compression_encodings = self.send_compression_encodings;
715                    let max_decoding_message_size = self.max_decoding_message_size;
716                    let max_encoding_message_size = self.max_encoding_message_size;
717                    let inner = self.inner.clone();
718                    let fut = async move {
719                        let inner = inner.0;
720                        let method = SetPropertySvc(inner);
721                        let codec = tonic::codec::ProstCodec::default();
722                        let mut grpc = tonic::server::Grpc::new(codec)
723                            .apply_compression_config(
724                                accept_compression_encodings,
725                                send_compression_encodings,
726                            )
727                            .apply_max_message_size_config(
728                                max_decoding_message_size,
729                                max_encoding_message_size,
730                            );
731                        let res = grpc.unary(method, req).await;
732                        Ok(res)
733                    };
734                    Box::pin(fut)
735                }
736                "/lightspeed.service.AstroEfwService/Calibrate" => {
737                    #[allow(non_camel_case_types)]
738                    struct CalibrateSvc<T: AstroEfwService>(pub Arc<T>);
739                    impl<
740                        T: AstroEfwService,
741                    > tonic::server::UnaryService<
742                        super::super::request::EfwCalibrationRequest,
743                    > for CalibrateSvc<T> {
744                        type Response = super::super::response::EfwCalibrationResponse;
745                        type Future = BoxFuture<
746                            tonic::Response<Self::Response>,
747                            tonic::Status,
748                        >;
749                        fn call(
750                            &mut self,
751                            request: tonic::Request<
752                                super::super::request::EfwCalibrationRequest,
753                            >,
754                        ) -> Self::Future {
755                            let inner = Arc::clone(&self.0);
756                            let fut = async move { (*inner).calibrate(request).await };
757                            Box::pin(fut)
758                        }
759                    }
760                    let accept_compression_encodings = self.accept_compression_encodings;
761                    let send_compression_encodings = self.send_compression_encodings;
762                    let max_decoding_message_size = self.max_decoding_message_size;
763                    let max_encoding_message_size = self.max_encoding_message_size;
764                    let inner = self.inner.clone();
765                    let fut = async move {
766                        let inner = inner.0;
767                        let method = CalibrateSvc(inner);
768                        let codec = tonic::codec::ProstCodec::default();
769                        let mut grpc = tonic::server::Grpc::new(codec)
770                            .apply_compression_config(
771                                accept_compression_encodings,
772                                send_compression_encodings,
773                            )
774                            .apply_max_message_size_config(
775                                max_decoding_message_size,
776                                max_encoding_message_size,
777                            );
778                        let res = grpc.unary(method, req).await;
779                        Ok(res)
780                    };
781                    Box::pin(fut)
782                }
783                _ => {
784                    Box::pin(async move {
785                        Ok(
786                            http::Response::builder()
787                                .status(200)
788                                .header("grpc-status", "12")
789                                .header("content-type", "application/grpc")
790                                .body(empty_body())
791                                .unwrap(),
792                        )
793                    })
794                }
795            }
796        }
797    }
798    impl<T: AstroEfwService> Clone for AstroEfwServiceServer<T> {
799        fn clone(&self) -> Self {
800            let inner = self.inner.clone();
801            Self {
802                inner,
803                accept_compression_encodings: self.accept_compression_encodings,
804                send_compression_encodings: self.send_compression_encodings,
805                max_decoding_message_size: self.max_decoding_message_size,
806                max_encoding_message_size: self.max_encoding_message_size,
807            }
808        }
809    }
810    impl<T: AstroEfwService> Clone for _Inner<T> {
811        fn clone(&self) -> Self {
812            Self(Arc::clone(&self.0))
813        }
814    }
815    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
816        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
817            write!(f, "{:?}", self.0)
818        }
819    }
820    impl<T: AstroEfwService> tonic::server::NamedService for AstroEfwServiceServer<T> {
821        const NAME: &'static str = "lightspeed.service.AstroEfwService";
822    }
823}