mikufans_proto_intl/
bilibili.app.mine.v1.rs

1// This file is @generated by prost-build.
2///
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Arc {
5    ///
6    #[prost(string, tag = "1")]
7    pub date: ::prost::alloc::string::String,
8    ///
9    #[prost(message, optional, tag = "2")]
10    pub stat: ::core::option::Option<Stat>,
11    ///
12    #[prost(string, tag = "3")]
13    pub cover: ::prost::alloc::string::String,
14    ///
15    #[prost(int64, tag = "4")]
16    pub duration: i64,
17    ///
18    #[prost(int64, tag = "5")]
19    pub aid: i64,
20    ///
21    #[prost(int64, tag = "6")]
22    pub cid: i64,
23    ///
24    #[prost(enumeration = "ArcState", tag = "7")]
25    pub state: i32,
26}
27///
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct Button {
30    ///
31    #[prost(string, tag = "1")]
32    pub light_icon: ::prost::alloc::string::String,
33    ///
34    #[prost(string, tag = "2")]
35    pub dark_icon: ::prost::alloc::string::String,
36    ///
37    #[prost(string, tag = "3")]
38    pub url: ::prost::alloc::string::String,
39    ///
40    #[prost(string, tag = "4")]
41    pub text: ::prost::alloc::string::String,
42}
43///
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct CardMore {
46    ///
47    #[prost(message, optional, tag = "1")]
48    pub button: ::core::option::Option<Button>,
49}
50///
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct CardOpus {
53    ///
54    #[prost(message, optional, tag = "1")]
55    pub word_paragraph: ::core::option::Option<super::super::dynamic::v2::Paragraph>,
56    ///
57    #[prost(string, tag = "2")]
58    pub cover: ::prost::alloc::string::String,
59    ///
60    #[prost(string, tag = "3")]
61    pub url: ::prost::alloc::string::String,
62    ///
63    #[prost(message, optional, tag = "4")]
64    pub stat_title: ::core::option::Option<SubTitleWithStat>,
65    ///
66    #[prost(message, optional, tag = "5")]
67    pub stat: ::core::option::Option<Stat>,
68    ///
69    #[prost(string, tag = "6")]
70    pub date: ::prost::alloc::string::String,
71    ///
72    #[prost(int64, tag = "7")]
73    pub dyn_id: i64,
74    ///
75    #[prost(bool, tag = "8")]
76    pub has_share: bool,
77    ///
78    #[prost(enumeration = "OpusState", tag = "9")]
79    pub state: i32,
80}
81///
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct CardPubGuide {
84    ///
85    #[prost(message, optional, tag = "1")]
86    pub title: ::core::option::Option<Title>,
87    ///
88    #[prost(message, optional, tag = "2")]
89    pub button: ::core::option::Option<Button>,
90    ///
91    #[prost(message, repeated, tag = "3")]
92    pub material: ::prost::alloc::vec::Vec<PubGuideMaterial>,
93    ///
94    #[prost(message, optional, tag = "4")]
95    pub more_button: ::core::option::Option<Button>,
96}
97///
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct CardUgc {
100    ///
101    #[prost(string, tag = "1")]
102    pub title: ::prost::alloc::string::String,
103    ///
104    #[prost(message, optional, tag = "2")]
105    pub title_color: ::core::option::Option<Color>,
106    ///
107    #[prost(message, optional, tag = "5")]
108    pub arc: ::core::option::Option<Arc>,
109    ///
110    #[prost(string, tag = "6")]
111    pub url: ::prost::alloc::string::String,
112    ///
113    #[prost(bool, tag = "7")]
114    pub has_share: bool,
115    ///
116    #[prost(string, tag = "8")]
117    pub archive_video_audit_json: ::prost::alloc::string::String,
118    ///
119    #[prost(oneof = "card_ugc::Subtitle", tags = "3, 4")]
120    pub subtitle: ::core::option::Option<card_ugc::Subtitle>,
121}
122/// Nested message and enum types in `CardUGC`.
123pub mod card_ugc {
124    ///
125    #[derive(Clone, PartialEq, ::prost::Oneof)]
126    pub enum Subtitle {
127        ///
128        #[prost(message, tag = "3")]
129        ButtonTitle(super::SubTitleWithButton),
130        ///
131        #[prost(message, tag = "4")]
132        StatTitle(super::SubTitleWithStat),
133    }
134}
135///
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct Color {
138    ///
139    #[prost(string, tag = "1")]
140    pub light_color: ::prost::alloc::string::String,
141    ///
142    #[prost(string, tag = "2")]
143    pub dark_color: ::prost::alloc::string::String,
144}
145///
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct DisplayReportReq {
148    ///
149    #[prost(message, repeated, tag = "1")]
150    pub content: ::prost::alloc::vec::Vec<display_report_req::ReportContent>,
151}
152/// Nested message and enum types in `DisplayReportReq`.
153pub mod display_report_req {
154    ///
155    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
156    pub struct ReportContent {
157        ///
158        #[prost(int64, tag = "1")]
159        pub times: i64,
160        ///
161        #[prost(enumeration = "super::DisplayPos", tag = "2")]
162        pub pos: i32,
163    }
164}
165///
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct PubCard {
168    ///
169    #[prost(enumeration = "CardType", tag = "5")]
170    pub r#type: i32,
171    ///
172    #[prost(oneof = "pub_card::Card", tags = "1, 2, 3, 4")]
173    pub card: ::core::option::Option<pub_card::Card>,
174}
175/// Nested message and enum types in `PubCard`.
176pub mod pub_card {
177    ///
178    #[derive(Clone, PartialEq, ::prost::Oneof)]
179    pub enum Card {
180        ///
181        #[prost(message, tag = "1")]
182        PubGuide(super::CardPubGuide),
183        ///
184        #[prost(message, tag = "2")]
185        Ugc(super::CardUgc),
186        ///
187        #[prost(message, tag = "3")]
188        Opus(super::CardOpus),
189        ///
190        #[prost(message, tag = "4")]
191        More(super::CardMore),
192    }
193}
194///
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct PubGuideMaterial {
197    ///
198    #[prost(int64, tag = "1")]
199    pub id: i64,
200    ///
201    #[prost(message, optional, tag = "2")]
202    pub title: ::core::option::Option<Title>,
203    ///
204    #[prost(string, tag = "3")]
205    pub cover: ::prost::alloc::string::String,
206    ///
207    #[prost(string, tag = "4")]
208    pub url: ::prost::alloc::string::String,
209}
210///
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct PubModuleReq {
213    ///
214    #[prost(int64, tag = "1")]
215    pub user_original_state: i64,
216    ///
217    #[prost(int64, repeated, tag = "2")]
218    pub dyn_ids: ::prost::alloc::vec::Vec<i64>,
219    ///
220    #[prost(int64, tag = "3")]
221    pub card_num: i64,
222}
223///
224#[derive(Clone, PartialEq, ::prost::Message)]
225pub struct PubModuleResp {
226    ///
227    #[prost(message, repeated, tag = "1")]
228    pub pub_card: ::prost::alloc::vec::Vec<PubCard>,
229}
230///
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct Stat {
233    ///
234    #[prost(string, tag = "1")]
235    pub play_icon: ::prost::alloc::string::String,
236    ///
237    #[prost(string, tag = "2")]
238    pub play: ::prost::alloc::string::String,
239    ///
240    #[prost(string, tag = "3")]
241    pub like_icon: ::prost::alloc::string::String,
242    ///
243    #[prost(string, tag = "4")]
244    pub like: ::prost::alloc::string::String,
245}
246///
247#[derive(Clone, PartialEq, ::prost::Message)]
248pub struct SubTitleWithButton {
249    ///
250    #[prost(string, tag = "1")]
251    pub icon: ::prost::alloc::string::String,
252    ///
253    #[prost(string, tag = "2")]
254    pub url: ::prost::alloc::string::String,
255    ///
256    #[prost(message, optional, tag = "3")]
257    pub background_color: ::core::option::Option<Color>,
258    ///
259    #[prost(string, tag = "4")]
260    pub text: ::prost::alloc::string::String,
261    ///
262    #[prost(message, optional, tag = "5")]
263    pub text_color: ::core::option::Option<Color>,
264}
265///
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct SubTitleWithStat {
268    ///
269    #[prost(string, repeated, tag = "1")]
270    pub icon: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
271    ///
272    #[prost(string, tag = "2")]
273    pub text: ::prost::alloc::string::String,
274}
275///
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct Title {
278    ///
279    #[prost(string, tag = "1")]
280    pub main: ::prost::alloc::string::String,
281    ///
282    #[prost(string, tag = "2")]
283    pub sub: ::prost::alloc::string::String,
284}
285///
286#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
287#[repr(i32)]
288pub enum ArcState {
289    ///
290    StateUnknown = 0,
291    ///
292    Open = 1,
293    ///
294    Orange = 2,
295    ///
296    Wait = 3,
297    ///
298    Recicle = 4,
299    ///
300    Lock = 5,
301    ///
302    Fixed = 6,
303    ///
304    UserDelay = 7,
305    ///
306    FastPub = 8,
307    ///
308    XcodeFail = 9,
309}
310impl ArcState {
311    /// String value of the enum field names used in the ProtoBuf definition.
312    ///
313    /// The values are not transformed in any way and thus are considered stable
314    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
315    pub fn as_str_name(&self) -> &'static str {
316        match self {
317            Self::StateUnknown => "STATE_UNKNOWN",
318            Self::Open => "OPEN",
319            Self::Orange => "ORANGE",
320            Self::Wait => "WAIT",
321            Self::Recicle => "RECICLE",
322            Self::Lock => "LOCK",
323            Self::Fixed => "FIXED",
324            Self::UserDelay => "USER_DELAY",
325            Self::FastPub => "FAST_PUB",
326            Self::XcodeFail => "XCODE_FAIL",
327        }
328    }
329    /// Creates an enum from field names used in the ProtoBuf definition.
330    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
331        match value {
332            "STATE_UNKNOWN" => Some(Self::StateUnknown),
333            "OPEN" => Some(Self::Open),
334            "ORANGE" => Some(Self::Orange),
335            "WAIT" => Some(Self::Wait),
336            "RECICLE" => Some(Self::Recicle),
337            "LOCK" => Some(Self::Lock),
338            "FIXED" => Some(Self::Fixed),
339            "USER_DELAY" => Some(Self::UserDelay),
340            "FAST_PUB" => Some(Self::FastPub),
341            "XCODE_FAIL" => Some(Self::XcodeFail),
342            _ => None,
343        }
344    }
345}
346///
347#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
348#[repr(i32)]
349pub enum CardType {
350    ///
351    CardUnknown = 0,
352    ///
353    Pubguide = 1,
354    ///
355    Ugc = 2,
356    ///
357    Opus = 3,
358    ///
359    More = 4,
360}
361impl CardType {
362    /// String value of the enum field names used in the ProtoBuf definition.
363    ///
364    /// The values are not transformed in any way and thus are considered stable
365    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
366    pub fn as_str_name(&self) -> &'static str {
367        match self {
368            Self::CardUnknown => "CARD_UNKNOWN",
369            Self::Pubguide => "PUBGUIDE",
370            Self::Ugc => "UGC",
371            Self::Opus => "OPUS",
372            Self::More => "MORE",
373        }
374    }
375    /// Creates an enum from field names used in the ProtoBuf definition.
376    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
377        match value {
378            "CARD_UNKNOWN" => Some(Self::CardUnknown),
379            "PUBGUIDE" => Some(Self::Pubguide),
380            "UGC" => Some(Self::Ugc),
381            "OPUS" => Some(Self::Opus),
382            "MORE" => Some(Self::More),
383            _ => None,
384        }
385    }
386}
387///
388#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
389#[repr(i32)]
390pub enum DisplayPos {
391    ///
392    UnknownDisplaytype = 0,
393    ///
394    VipButtonStatic = 1,
395    ///
396    VipButtonDynamic = 2,
397    ///
398    VipButtonBirthday = 3,
399    ///
400    VipBackground = 4,
401}
402impl DisplayPos {
403    /// String value of the enum field names used in the ProtoBuf definition.
404    ///
405    /// The values are not transformed in any way and thus are considered stable
406    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
407    pub fn as_str_name(&self) -> &'static str {
408        match self {
409            Self::UnknownDisplaytype => "UNKNOWN_DISPLAYTYPE",
410            Self::VipButtonStatic => "VIP_BUTTON_STATIC",
411            Self::VipButtonDynamic => "VIP_BUTTON_DYNAMIC",
412            Self::VipButtonBirthday => "VIP_BUTTON_BIRTHDAY",
413            Self::VipBackground => "VIP_BACKGROUND",
414        }
415    }
416    /// Creates an enum from field names used in the ProtoBuf definition.
417    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
418        match value {
419            "UNKNOWN_DISPLAYTYPE" => Some(Self::UnknownDisplaytype),
420            "VIP_BUTTON_STATIC" => Some(Self::VipButtonStatic),
421            "VIP_BUTTON_DYNAMIC" => Some(Self::VipButtonDynamic),
422            "VIP_BUTTON_BIRTHDAY" => Some(Self::VipButtonBirthday),
423            "VIP_BACKGROUND" => Some(Self::VipBackground),
424            _ => None,
425        }
426    }
427}
428///
429#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
430#[repr(i32)]
431pub enum OpusState {
432    ///
433    OpusUnknown = 0,
434    ///
435    OpusOpen = 1,
436    ///
437    OpusNoForward = 2,
438}
439impl OpusState {
440    /// String value of the enum field names used in the ProtoBuf definition.
441    ///
442    /// The values are not transformed in any way and thus are considered stable
443    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
444    pub fn as_str_name(&self) -> &'static str {
445        match self {
446            Self::OpusUnknown => "OPUS_UNKNOWN",
447            Self::OpusOpen => "OPUS_OPEN",
448            Self::OpusNoForward => "OPUS_NO_FORWARD",
449        }
450    }
451    /// Creates an enum from field names used in the ProtoBuf definition.
452    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
453        match value {
454            "OPUS_UNKNOWN" => Some(Self::OpusUnknown),
455            "OPUS_OPEN" => Some(Self::OpusOpen),
456            "OPUS_NO_FORWARD" => Some(Self::OpusNoForward),
457            _ => None,
458        }
459    }
460}
461/// Generated client implementations.
462pub mod mine_client {
463    #![allow(
464        unused_variables,
465        dead_code,
466        missing_docs,
467        clippy::wildcard_imports,
468        clippy::let_unit_value,
469    )]
470    use tonic::codegen::*;
471    use tonic::codegen::http::Uri;
472    ///
473    #[derive(Debug, Clone)]
474    pub struct MineClient<T> {
475        inner: tonic::client::Grpc<T>,
476    }
477    impl<T> MineClient<T>
478    where
479        T: tonic::client::GrpcService<tonic::body::BoxBody>,
480        T::Error: Into<StdError>,
481        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
482        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
483    {
484        pub fn new(inner: T) -> Self {
485            let inner = tonic::client::Grpc::new(inner);
486            Self { inner }
487        }
488        pub fn with_origin(inner: T, origin: Uri) -> Self {
489            let inner = tonic::client::Grpc::with_origin(inner, origin);
490            Self { inner }
491        }
492        pub fn with_interceptor<F>(
493            inner: T,
494            interceptor: F,
495        ) -> MineClient<InterceptedService<T, F>>
496        where
497            F: tonic::service::Interceptor,
498            T::ResponseBody: Default,
499            T: tonic::codegen::Service<
500                http::Request<tonic::body::BoxBody>,
501                Response = http::Response<
502                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
503                >,
504            >,
505            <T as tonic::codegen::Service<
506                http::Request<tonic::body::BoxBody>,
507            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
508        {
509            MineClient::new(InterceptedService::new(inner, interceptor))
510        }
511        /// Compress requests with the given encoding.
512        ///
513        /// This requires the server to support it otherwise it might respond with an
514        /// error.
515        #[must_use]
516        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
517            self.inner = self.inner.send_compressed(encoding);
518            self
519        }
520        /// Enable decompressing responses.
521        #[must_use]
522        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
523            self.inner = self.inner.accept_compressed(encoding);
524            self
525        }
526        /// Limits the maximum size of a decoded message.
527        ///
528        /// Default: `4MB`
529        #[must_use]
530        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
531            self.inner = self.inner.max_decoding_message_size(limit);
532            self
533        }
534        /// Limits the maximum size of an encoded message.
535        ///
536        /// Default: `usize::MAX`
537        #[must_use]
538        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
539            self.inner = self.inner.max_encoding_message_size(limit);
540            self
541        }
542        ///
543        pub async fn display_report(
544            &mut self,
545            request: impl tonic::IntoRequest<super::DisplayReportReq>,
546        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
547            self.inner
548                .ready()
549                .await
550                .map_err(|e| {
551                    tonic::Status::unknown(
552                        format!("Service was not ready: {}", e.into()),
553                    )
554                })?;
555            let codec = tonic::codec::ProstCodec::default();
556            let path = http::uri::PathAndQuery::from_static(
557                "/bilibili.app.mine.v1.Mine/DisplayReport",
558            );
559            let mut req = request.into_request();
560            req.extensions_mut()
561                .insert(GrpcMethod::new("bilibili.app.mine.v1.Mine", "DisplayReport"));
562            self.inner.unary(req, path, codec).await
563        }
564        ///
565        pub async fn pub_module(
566            &mut self,
567            request: impl tonic::IntoRequest<super::PubModuleReq>,
568        ) -> std::result::Result<tonic::Response<super::PubModuleResp>, tonic::Status> {
569            self.inner
570                .ready()
571                .await
572                .map_err(|e| {
573                    tonic::Status::unknown(
574                        format!("Service was not ready: {}", e.into()),
575                    )
576                })?;
577            let codec = tonic::codec::ProstCodec::default();
578            let path = http::uri::PathAndQuery::from_static(
579                "/bilibili.app.mine.v1.Mine/PubModule",
580            );
581            let mut req = request.into_request();
582            req.extensions_mut()
583                .insert(GrpcMethod::new("bilibili.app.mine.v1.Mine", "PubModule"));
584            self.inner.unary(req, path, codec).await
585        }
586    }
587}
588/// Generated server implementations.
589pub mod mine_server {
590    #![allow(
591        unused_variables,
592        dead_code,
593        missing_docs,
594        clippy::wildcard_imports,
595        clippy::let_unit_value,
596    )]
597    use tonic::codegen::*;
598    /// Generated trait containing gRPC methods that should be implemented for use with MineServer.
599    #[async_trait]
600    pub trait Mine: std::marker::Send + std::marker::Sync + 'static {
601        ///
602        async fn display_report(
603            &self,
604            request: tonic::Request<super::DisplayReportReq>,
605        ) -> std::result::Result<tonic::Response<()>, tonic::Status>;
606        ///
607        async fn pub_module(
608            &self,
609            request: tonic::Request<super::PubModuleReq>,
610        ) -> std::result::Result<tonic::Response<super::PubModuleResp>, tonic::Status>;
611    }
612    ///
613    #[derive(Debug)]
614    pub struct MineServer<T> {
615        inner: Arc<T>,
616        accept_compression_encodings: EnabledCompressionEncodings,
617        send_compression_encodings: EnabledCompressionEncodings,
618        max_decoding_message_size: Option<usize>,
619        max_encoding_message_size: Option<usize>,
620    }
621    impl<T> MineServer<T> {
622        pub fn new(inner: T) -> Self {
623            Self::from_arc(Arc::new(inner))
624        }
625        pub fn from_arc(inner: Arc<T>) -> Self {
626            Self {
627                inner,
628                accept_compression_encodings: Default::default(),
629                send_compression_encodings: Default::default(),
630                max_decoding_message_size: None,
631                max_encoding_message_size: None,
632            }
633        }
634        pub fn with_interceptor<F>(
635            inner: T,
636            interceptor: F,
637        ) -> InterceptedService<Self, F>
638        where
639            F: tonic::service::Interceptor,
640        {
641            InterceptedService::new(Self::new(inner), interceptor)
642        }
643        /// Enable decompressing requests with the given encoding.
644        #[must_use]
645        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
646            self.accept_compression_encodings.enable(encoding);
647            self
648        }
649        /// Compress responses with the given encoding, if the client supports it.
650        #[must_use]
651        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
652            self.send_compression_encodings.enable(encoding);
653            self
654        }
655        /// Limits the maximum size of a decoded message.
656        ///
657        /// Default: `4MB`
658        #[must_use]
659        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
660            self.max_decoding_message_size = Some(limit);
661            self
662        }
663        /// Limits the maximum size of an encoded message.
664        ///
665        /// Default: `usize::MAX`
666        #[must_use]
667        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
668            self.max_encoding_message_size = Some(limit);
669            self
670        }
671    }
672    impl<T, B> tonic::codegen::Service<http::Request<B>> for MineServer<T>
673    where
674        T: Mine,
675        B: Body + std::marker::Send + 'static,
676        B::Error: Into<StdError> + std::marker::Send + 'static,
677    {
678        type Response = http::Response<tonic::body::BoxBody>;
679        type Error = std::convert::Infallible;
680        type Future = BoxFuture<Self::Response, Self::Error>;
681        fn poll_ready(
682            &mut self,
683            _cx: &mut Context<'_>,
684        ) -> Poll<std::result::Result<(), Self::Error>> {
685            Poll::Ready(Ok(()))
686        }
687        fn call(&mut self, req: http::Request<B>) -> Self::Future {
688            match req.uri().path() {
689                "/bilibili.app.mine.v1.Mine/DisplayReport" => {
690                    #[allow(non_camel_case_types)]
691                    struct DisplayReportSvc<T: Mine>(pub Arc<T>);
692                    impl<T: Mine> tonic::server::UnaryService<super::DisplayReportReq>
693                    for DisplayReportSvc<T> {
694                        type Response = ();
695                        type Future = BoxFuture<
696                            tonic::Response<Self::Response>,
697                            tonic::Status,
698                        >;
699                        fn call(
700                            &mut self,
701                            request: tonic::Request<super::DisplayReportReq>,
702                        ) -> Self::Future {
703                            let inner = Arc::clone(&self.0);
704                            let fut = async move {
705                                <T as Mine>::display_report(&inner, request).await
706                            };
707                            Box::pin(fut)
708                        }
709                    }
710                    let accept_compression_encodings = self.accept_compression_encodings;
711                    let send_compression_encodings = self.send_compression_encodings;
712                    let max_decoding_message_size = self.max_decoding_message_size;
713                    let max_encoding_message_size = self.max_encoding_message_size;
714                    let inner = self.inner.clone();
715                    let fut = async move {
716                        let method = DisplayReportSvc(inner);
717                        let codec = tonic::codec::ProstCodec::default();
718                        let mut grpc = tonic::server::Grpc::new(codec)
719                            .apply_compression_config(
720                                accept_compression_encodings,
721                                send_compression_encodings,
722                            )
723                            .apply_max_message_size_config(
724                                max_decoding_message_size,
725                                max_encoding_message_size,
726                            );
727                        let res = grpc.unary(method, req).await;
728                        Ok(res)
729                    };
730                    Box::pin(fut)
731                }
732                "/bilibili.app.mine.v1.Mine/PubModule" => {
733                    #[allow(non_camel_case_types)]
734                    struct PubModuleSvc<T: Mine>(pub Arc<T>);
735                    impl<T: Mine> tonic::server::UnaryService<super::PubModuleReq>
736                    for PubModuleSvc<T> {
737                        type Response = super::PubModuleResp;
738                        type Future = BoxFuture<
739                            tonic::Response<Self::Response>,
740                            tonic::Status,
741                        >;
742                        fn call(
743                            &mut self,
744                            request: tonic::Request<super::PubModuleReq>,
745                        ) -> Self::Future {
746                            let inner = Arc::clone(&self.0);
747                            let fut = async move {
748                                <T as Mine>::pub_module(&inner, request).await
749                            };
750                            Box::pin(fut)
751                        }
752                    }
753                    let accept_compression_encodings = self.accept_compression_encodings;
754                    let send_compression_encodings = self.send_compression_encodings;
755                    let max_decoding_message_size = self.max_decoding_message_size;
756                    let max_encoding_message_size = self.max_encoding_message_size;
757                    let inner = self.inner.clone();
758                    let fut = async move {
759                        let method = PubModuleSvc(inner);
760                        let codec = tonic::codec::ProstCodec::default();
761                        let mut grpc = tonic::server::Grpc::new(codec)
762                            .apply_compression_config(
763                                accept_compression_encodings,
764                                send_compression_encodings,
765                            )
766                            .apply_max_message_size_config(
767                                max_decoding_message_size,
768                                max_encoding_message_size,
769                            );
770                        let res = grpc.unary(method, req).await;
771                        Ok(res)
772                    };
773                    Box::pin(fut)
774                }
775                _ => {
776                    Box::pin(async move {
777                        let mut response = http::Response::new(empty_body());
778                        let headers = response.headers_mut();
779                        headers
780                            .insert(
781                                tonic::Status::GRPC_STATUS,
782                                (tonic::Code::Unimplemented as i32).into(),
783                            );
784                        headers
785                            .insert(
786                                http::header::CONTENT_TYPE,
787                                tonic::metadata::GRPC_CONTENT_TYPE,
788                            );
789                        Ok(response)
790                    })
791                }
792            }
793        }
794    }
795    impl<T> Clone for MineServer<T> {
796        fn clone(&self) -> Self {
797            let inner = self.inner.clone();
798            Self {
799                inner,
800                accept_compression_encodings: self.accept_compression_encodings,
801                send_compression_encodings: self.send_compression_encodings,
802                max_decoding_message_size: self.max_decoding_message_size,
803                max_encoding_message_size: self.max_encoding_message_size,
804            }
805        }
806    }
807    /// Generated gRPC service name
808    pub const SERVICE_NAME: &str = "bilibili.app.mine.v1.Mine";
809    impl<T> tonic::server::NamedService for MineServer<T> {
810        const NAME: &'static str = SERVICE_NAME;
811    }
812}