ids_apis/
kdo.v1.market.tonic.rs

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