1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AiInfo {
5 #[prost(string, tag = "1")]
7 pub name: ::prost::alloc::string::String,
8 #[prost(string, tag = "2")]
10 pub pic_url: ::prost::alloc::string::String,
11 #[prost(string, repeated, tag = "3")]
13 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
14}
15#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct Announcement {
18 #[prost(bool, tag = "1")]
20 pub enable: bool,
21 #[prost(string, tag = "2")]
23 pub content: ::prost::alloc::string::String,
24 #[prost(bool, tag = "3")]
26 pub jump_enable: bool,
27 #[prost(string, tag = "4")]
29 pub jump_url: ::prost::alloc::string::String,
30}
31#[derive(Clone, Copy, PartialEq, ::prost::Message)]
33pub struct Empty {}
34#[derive(Clone, Copy, PartialEq, ::prost::Message)]
36pub struct FinishParagraphsRenderReq {
37 #[prost(int64, tag = "1")]
39 pub msg_key: i64,
40 #[prost(int64, tag = "2")]
42 pub status: i64,
43 #[prost(message, optional, tag = "3")]
45 pub stop_pos: ::core::option::Option<FinishParagraphsRenderStopPos>,
46}
47#[derive(Clone, Copy, PartialEq, ::prost::Message)]
49pub struct FinishParagraphsRenderRsp {}
50#[derive(Clone, Copy, PartialEq, ::prost::Message)]
52pub struct FinishParagraphsRenderStopPos {
53 #[prost(int64, tag = "1")]
55 pub para: i64,
56 #[prost(int64, tag = "2")]
58 pub node: i64,
59}
60#[derive(Clone, Copy, PartialEq, ::prost::Message)]
62pub struct GetNewSessionsReq {
63 #[prost(int64, tag = "1")]
65 pub begin_ts: i64,
66 #[prost(int32, tag = "2")]
68 pub size: i32,
69 #[prost(int64, tag = "3")]
71 pub recv_uid: i64,
72}
73#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct GetSessDetailReq {
76 #[prost(message, repeated, tag = "1")]
78 pub shop: ::prost::alloc::vec::Vec<Shop>,
79 #[prost(int64, tag = "2")]
81 pub group_id: i64,
82}
83#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct GetSessDetailRsp {
86 #[prost(message, repeated, tag = "1")]
88 pub session_list: ::prost::alloc::vec::Vec<super::model::SessionInfo>,
89}
90#[derive(Clone, Copy, PartialEq, ::prost::Message)]
92pub struct GetSessionsReq {
93 #[prost(int64, tag = "1")]
95 pub begin_ts: i64,
96 #[prost(int64, tag = "2")]
98 pub end_ts: i64,
99 #[prost(int32, tag = "3")]
101 pub size: i32,
102}
103#[derive(Clone, Copy, PartialEq, ::prost::Message)]
105pub struct GetUserSettingsReq {
106 #[prost(int64, tag = "1")]
108 pub shop_father_id: i64,
109 #[prost(int64, tag = "2")]
111 pub shop_id: i64,
112}
113#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct GetUserSettingsRsp {
116 #[prost(bool, tag = "1")]
118 pub enable_initiative_msg: bool,
119 #[prost(bool, tag = "2")]
121 pub do_not_disturb: bool,
122 #[prost(string, tag = "3")]
124 pub report_url: ::prost::alloc::string::String,
125}
126#[derive(Clone, Copy, PartialEq, ::prost::Message)]
128pub struct OutCustomerQueueReq {
129 #[prost(int64, tag = "1")]
131 pub shop_father_id: i64,
132 #[prost(int64, tag = "2")]
134 pub shop_id: i64,
135 #[prost(int64, tag = "3")]
137 pub msg_key: i64,
138}
139#[derive(Clone, Copy, PartialEq, ::prost::Message)]
141pub struct PopResultUpdateReq {
142 #[prost(enumeration = "super::model::ComplianceAlertType", tag = "1")]
144 pub pop_field: i32,
145 #[prost(bool, tag = "2")]
147 pub is_allow: bool,
148}
149#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct PopResultUpdateRsp {
152 #[prost(string, tag = "1")]
154 pub msg: ::prost::alloc::string::String,
155}
156#[derive(Clone, Copy, PartialEq, ::prost::Message)]
158pub struct PreEvaluateReq {
159 #[prost(enumeration = "super::model::EvaluateType", tag = "1")]
161 pub r#type: i32,
162 #[prost(int64, tag = "2")]
164 pub shop_father_id: i64,
165 #[prost(int64, tag = "3")]
167 pub shop_id: i64,
168 #[prost(int64, tag = "4")]
170 pub msg_key: i64,
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct PreEvaluateRsp {
175 #[prost(message, optional, tag = "1")]
177 pub rsp: ::core::option::Option<super::model::EvaluationShowInfo>,
178}
179#[derive(Clone, Copy, PartialEq, ::prost::Message)]
181pub struct RemoveSessionReq {
182 #[prost(int64, tag = "1")]
184 pub talker_id: i64,
185 #[prost(int64, tag = "2")]
187 pub shop_id: i64,
188 #[prost(int64, tag = "3")]
190 pub shop_father_id: i64,
191 #[prost(int32, tag = "4")]
193 pub session_type: i32,
194}
195#[derive(Clone, Copy, PartialEq, ::prost::Message)]
197pub struct SendHeartBeatReq {
198 #[prost(int64, tag = "1")]
200 pub shop_id: i64,
201 #[prost(int64, tag = "2")]
203 pub shop_father_id: i64,
204}
205#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct SendMsgExt {
208 #[prost(int64, tag = "1")]
210 pub source_up: i64,
211 #[prost(string, tag = "2")]
213 pub source_bvid: ::prost::alloc::string::String,
214 #[prost(string, tag = "3")]
216 pub cm_from_track_id: ::prost::alloc::string::String,
217 #[prost(string, tag = "4")]
219 pub from_spmid: ::prost::alloc::string::String,
220}
221#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct SendMsgReq {
224 #[prost(message, optional, tag = "1")]
226 pub msg: ::core::option::Option<super::model::Msg>,
227 #[prost(int64, tag = "2")]
229 pub skill_group_id: i64,
230 #[prost(message, optional, tag = "3")]
232 pub ext: ::core::option::Option<SendMsgExt>,
233}
234#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct SendMsgRsp {
237 #[prost(int64, tag = "1")]
239 pub msg_key: i64,
240 #[prost(string, tag = "2")]
242 pub msg_content: ::prost::alloc::string::String,
243 #[prost(message, repeated, tag = "3")]
245 pub e_infos: ::prost::alloc::vec::Vec<super::model::EmotionInfo>,
246 #[prost(message, optional, tag = "4")]
248 pub ai_info: ::core::option::Option<AiInfo>,
249}
250#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct SessionMsgReq {
253 #[prost(int64, tag = "1")]
255 pub shop_father_id: i64,
256 #[prost(int64, tag = "2")]
258 pub shop_id: i64,
259 #[prost(int64, tag = "3")]
261 pub begin_seqno: i64,
262 #[prost(int64, tag = "4")]
264 pub end_seqno: i64,
265 #[prost(int32, tag = "5")]
267 pub size: i32,
268 #[prost(int32, tag = "6")]
270 pub order: i32,
271 #[prost(string, tag = "7")]
273 pub dev_id: ::prost::alloc::string::String,
274 #[prost(int32, tag = "8")]
276 pub situation: i32,
277 #[prost(int32, tag = "9")]
279 pub gid: i32,
280 #[prost(message, optional, tag = "10")]
282 pub ext: ::core::option::Option<SessionMsgReqExt>,
283}
284#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct SessionMsgReqExt {
287 #[prost(int64, tag = "1")]
289 pub source_up: i64,
290 #[prost(string, tag = "2")]
292 pub source_bvid: ::prost::alloc::string::String,
293}
294#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct SessionMsgRsp {
297 #[prost(message, repeated, tag = "1")]
299 pub messages: ::prost::alloc::vec::Vec<super::model::Msg>,
300 #[prost(int32, tag = "2")]
302 pub has_more: i32,
303 #[prost(int64, tag = "3")]
305 pub min_seqno: i64,
306 #[prost(int64, tag = "4")]
308 pub max_seqno: i64,
309 #[prost(message, repeated, tag = "5")]
311 pub e_infos: ::prost::alloc::vec::Vec<super::model::EmotionInfo>,
312 #[prost(int32, tag = "6")]
314 pub fetch_interval: i32,
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct SessionsRsp {
319 #[prost(message, repeated, tag = "1")]
321 pub session_list: ::prost::alloc::vec::Vec<super::model::SessionInfo>,
322 #[prost(int32, tag = "2")]
324 pub has_more: i32,
325}
326#[derive(Clone, Copy, PartialEq, ::prost::Message)]
328pub struct SetTopReq {
329 #[prost(int64, tag = "1")]
331 pub talker_id: i64,
332 #[prost(int64, tag = "2")]
334 pub shop_id: i64,
335 #[prost(int64, tag = "3")]
337 pub shop_father_id: i64,
338 #[prost(int32, tag = "4")]
340 pub session_type: i32,
341}
342#[derive(Clone, Copy, PartialEq, ::prost::Message)]
344pub struct SetUserSettingsReq {
345 #[prost(int64, tag = "1")]
347 pub shop_father_id: i64,
348 #[prost(int64, tag = "2")]
350 pub shop_id: i64,
351 #[prost(bool, tag = "3")]
353 pub enable_initiative_msg: bool,
354 #[prost(bool, tag = "4")]
356 pub do_not_disturb: bool,
357}
358#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct SetUserSettingsRsp {
361 #[prost(string, tag = "1")]
363 pub msg: ::prost::alloc::string::String,
364}
365#[derive(Clone, Copy, PartialEq, ::prost::Message)]
367pub struct Shop {
368 #[prost(int64, tag = "1")]
370 pub shop_father_id: i64,
371 #[prost(int64, tag = "2")]
373 pub shop_id: i64,
374}
375#[derive(Clone, Copy, PartialEq, ::prost::Message)]
377pub struct ShopCfgReq {
378 #[prost(int64, tag = "1")]
380 pub shop_id: i64,
381 #[prost(int64, tag = "2")]
383 pub shop_father_id: i64,
384}
385#[derive(Clone, PartialEq, ::prost::Message)]
387pub struct ShopCfgRsp {
388 #[prost(message, optional, tag = "1")]
390 pub announcement: ::core::option::Option<Announcement>,
391}
392#[derive(Clone, Copy, PartialEq, ::prost::Message)]
394pub struct ShopInfoReq {
395 #[prost(int64, tag = "1")]
397 pub shop_id: i64,
398 #[prost(int64, tag = "2")]
400 pub shop_father_id: i64,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct ShopInfoRsp {
405 #[prost(string, tag = "1")]
407 pub name: ::prost::alloc::string::String,
408 #[prost(string, tag = "2")]
410 pub face: ::prost::alloc::string::String,
411}
412#[derive(Clone, Copy, PartialEq, ::prost::Message)]
414pub struct UpdateAckReq {
415 #[prost(int64, tag = "1")]
417 pub shop_father_id: i64,
418 #[prost(int64, tag = "2")]
420 pub shop_id: i64,
421}
422#[derive(Clone, Copy, PartialEq, ::prost::Message)]
424pub struct WindowOptionsReq {
425 #[prost(int64, tag = "2")]
427 pub shop_father_id: i64,
428 #[prost(int64, tag = "3")]
430 pub shop_id: i64,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct WindowOptionsRsp {
435 #[prost(message, optional, tag = "1")]
437 pub goods: ::core::option::Option<super::model::WindowOptionGoods>,
438 #[prost(message, optional, tag = "2")]
440 pub order: ::core::option::Option<super::model::WindowOptionOrder>,
441 #[prost(message, optional, tag = "3")]
443 pub evaluation: ::core::option::Option<super::model::WindowOptionEvaluation>,
444 #[prost(message, optional, tag = "4")]
446 pub message: ::core::option::Option<super::model::WindowOptionMessage>,
447 #[prost(message, optional, tag = "5")]
449 pub history: ::core::option::Option<super::model::WindowOptionHistory>,
450}
451pub mod customer_interface_client {
453 #![allow(
454 unused_variables,
455 dead_code,
456 missing_docs,
457 clippy::wildcard_imports,
458 clippy::let_unit_value,
459 )]
460 use tonic::codegen::*;
461 use tonic::codegen::http::Uri;
462 #[derive(Debug, Clone)]
464 pub struct CustomerInterfaceClient<T> {
465 inner: tonic::client::Grpc<T>,
466 }
467 impl<T> CustomerInterfaceClient<T>
468 where
469 T: tonic::client::GrpcService<tonic::body::BoxBody>,
470 T::Error: Into<StdError>,
471 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
472 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
473 {
474 pub fn new(inner: T) -> Self {
475 let inner = tonic::client::Grpc::new(inner);
476 Self { inner }
477 }
478 pub fn with_origin(inner: T, origin: Uri) -> Self {
479 let inner = tonic::client::Grpc::with_origin(inner, origin);
480 Self { inner }
481 }
482 pub fn with_interceptor<F>(
483 inner: T,
484 interceptor: F,
485 ) -> CustomerInterfaceClient<InterceptedService<T, F>>
486 where
487 F: tonic::service::Interceptor,
488 T::ResponseBody: Default,
489 T: tonic::codegen::Service<
490 http::Request<tonic::body::BoxBody>,
491 Response = http::Response<
492 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
493 >,
494 >,
495 <T as tonic::codegen::Service<
496 http::Request<tonic::body::BoxBody>,
497 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
498 {
499 CustomerInterfaceClient::new(InterceptedService::new(inner, interceptor))
500 }
501 #[must_use]
506 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
507 self.inner = self.inner.send_compressed(encoding);
508 self
509 }
510 #[must_use]
512 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
513 self.inner = self.inner.accept_compressed(encoding);
514 self
515 }
516 #[must_use]
520 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
521 self.inner = self.inner.max_decoding_message_size(limit);
522 self
523 }
524 #[must_use]
528 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
529 self.inner = self.inner.max_encoding_message_size(limit);
530 self
531 }
532 pub async fn customer_pre_evaluate(
534 &mut self,
535 request: impl tonic::IntoRequest<super::PreEvaluateReq>,
536 ) -> std::result::Result<tonic::Response<super::PreEvaluateRsp>, tonic::Status> {
537 self.inner
538 .ready()
539 .await
540 .map_err(|e| {
541 tonic::Status::unknown(
542 format!("Service was not ready: {}", e.into()),
543 )
544 })?;
545 let codec = tonic::codec::ProstCodec::default();
546 let path = http::uri::PathAndQuery::from_static(
547 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerPreEvaluate",
548 );
549 let mut req = request.into_request();
550 req.extensions_mut()
551 .insert(
552 GrpcMethod::new(
553 "bilibili.im.customer.interfaces.CustomerInterface",
554 "CustomerPreEvaluate",
555 ),
556 );
557 self.inner.unary(req, path, codec).await
558 }
559 pub async fn customer_update_ack(
561 &mut self,
562 request: impl tonic::IntoRequest<super::UpdateAckReq>,
563 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
564 self.inner
565 .ready()
566 .await
567 .map_err(|e| {
568 tonic::Status::unknown(
569 format!("Service was not ready: {}", e.into()),
570 )
571 })?;
572 let codec = tonic::codec::ProstCodec::default();
573 let path = http::uri::PathAndQuery::from_static(
574 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerUpdateAck",
575 );
576 let mut req = request.into_request();
577 req.extensions_mut()
578 .insert(
579 GrpcMethod::new(
580 "bilibili.im.customer.interfaces.CustomerInterface",
581 "CustomerUpdateAck",
582 ),
583 );
584 self.inner.unary(req, path, codec).await
585 }
586 pub async fn customer_window_options(
588 &mut self,
589 request: impl tonic::IntoRequest<super::WindowOptionsReq>,
590 ) -> std::result::Result<
591 tonic::Response<super::WindowOptionsRsp>,
592 tonic::Status,
593 > {
594 self.inner
595 .ready()
596 .await
597 .map_err(|e| {
598 tonic::Status::unknown(
599 format!("Service was not ready: {}", e.into()),
600 )
601 })?;
602 let codec = tonic::codec::ProstCodec::default();
603 let path = http::uri::PathAndQuery::from_static(
604 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerWindowOptions",
605 );
606 let mut req = request.into_request();
607 req.extensions_mut()
608 .insert(
609 GrpcMethod::new(
610 "bilibili.im.customer.interfaces.CustomerInterface",
611 "CustomerWindowOptions",
612 ),
613 );
614 self.inner.unary(req, path, codec).await
615 }
616 pub async fn finish_paragraphs_render(
618 &mut self,
619 request: impl tonic::IntoRequest<super::FinishParagraphsRenderReq>,
620 ) -> std::result::Result<
621 tonic::Response<super::FinishParagraphsRenderRsp>,
622 tonic::Status,
623 > {
624 self.inner
625 .ready()
626 .await
627 .map_err(|e| {
628 tonic::Status::unknown(
629 format!("Service was not ready: {}", e.into()),
630 )
631 })?;
632 let codec = tonic::codec::ProstCodec::default();
633 let path = http::uri::PathAndQuery::from_static(
634 "/bilibili.im.customer.interfaces.CustomerInterface/FinishParagraphsRender",
635 );
636 let mut req = request.into_request();
637 req.extensions_mut()
638 .insert(
639 GrpcMethod::new(
640 "bilibili.im.customer.interfaces.CustomerInterface",
641 "FinishParagraphsRender",
642 ),
643 );
644 self.inner.unary(req, path, codec).await
645 }
646 pub async fn get_customer_sess_detail(
648 &mut self,
649 request: impl tonic::IntoRequest<super::GetSessDetailReq>,
650 ) -> std::result::Result<
651 tonic::Response<super::GetSessDetailRsp>,
652 tonic::Status,
653 > {
654 self.inner
655 .ready()
656 .await
657 .map_err(|e| {
658 tonic::Status::unknown(
659 format!("Service was not ready: {}", e.into()),
660 )
661 })?;
662 let codec = tonic::codec::ProstCodec::default();
663 let path = http::uri::PathAndQuery::from_static(
664 "/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessDetail",
665 );
666 let mut req = request.into_request();
667 req.extensions_mut()
668 .insert(
669 GrpcMethod::new(
670 "bilibili.im.customer.interfaces.CustomerInterface",
671 "GetCustomerSessDetail",
672 ),
673 );
674 self.inner.unary(req, path, codec).await
675 }
676 pub async fn get_customer_sessions(
678 &mut self,
679 request: impl tonic::IntoRequest<super::GetSessionsReq>,
680 ) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status> {
681 self.inner
682 .ready()
683 .await
684 .map_err(|e| {
685 tonic::Status::unknown(
686 format!("Service was not ready: {}", e.into()),
687 )
688 })?;
689 let codec = tonic::codec::ProstCodec::default();
690 let path = http::uri::PathAndQuery::from_static(
691 "/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessions",
692 );
693 let mut req = request.into_request();
694 req.extensions_mut()
695 .insert(
696 GrpcMethod::new(
697 "bilibili.im.customer.interfaces.CustomerInterface",
698 "GetCustomerSessions",
699 ),
700 );
701 self.inner.unary(req, path, codec).await
702 }
703 pub async fn get_new_customer_sessions(
705 &mut self,
706 request: impl tonic::IntoRequest<super::GetNewSessionsReq>,
707 ) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status> {
708 self.inner
709 .ready()
710 .await
711 .map_err(|e| {
712 tonic::Status::unknown(
713 format!("Service was not ready: {}", e.into()),
714 )
715 })?;
716 let codec = tonic::codec::ProstCodec::default();
717 let path = http::uri::PathAndQuery::from_static(
718 "/bilibili.im.customer.interfaces.CustomerInterface/GetNewCustomerSessions",
719 );
720 let mut req = request.into_request();
721 req.extensions_mut()
722 .insert(
723 GrpcMethod::new(
724 "bilibili.im.customer.interfaces.CustomerInterface",
725 "GetNewCustomerSessions",
726 ),
727 );
728 self.inner.unary(req, path, codec).await
729 }
730 pub async fn get_shop_cfg(
732 &mut self,
733 request: impl tonic::IntoRequest<super::ShopCfgReq>,
734 ) -> std::result::Result<tonic::Response<super::ShopCfgRsp>, tonic::Status> {
735 self.inner
736 .ready()
737 .await
738 .map_err(|e| {
739 tonic::Status::unknown(
740 format!("Service was not ready: {}", e.into()),
741 )
742 })?;
743 let codec = tonic::codec::ProstCodec::default();
744 let path = http::uri::PathAndQuery::from_static(
745 "/bilibili.im.customer.interfaces.CustomerInterface/GetShopCfg",
746 );
747 let mut req = request.into_request();
748 req.extensions_mut()
749 .insert(
750 GrpcMethod::new(
751 "bilibili.im.customer.interfaces.CustomerInterface",
752 "GetShopCfg",
753 ),
754 );
755 self.inner.unary(req, path, codec).await
756 }
757 pub async fn get_shop_info(
759 &mut self,
760 request: impl tonic::IntoRequest<super::ShopInfoReq>,
761 ) -> std::result::Result<tonic::Response<super::ShopInfoRsp>, tonic::Status> {
762 self.inner
763 .ready()
764 .await
765 .map_err(|e| {
766 tonic::Status::unknown(
767 format!("Service was not ready: {}", e.into()),
768 )
769 })?;
770 let codec = tonic::codec::ProstCodec::default();
771 let path = http::uri::PathAndQuery::from_static(
772 "/bilibili.im.customer.interfaces.CustomerInterface/GetShopInfo",
773 );
774 let mut req = request.into_request();
775 req.extensions_mut()
776 .insert(
777 GrpcMethod::new(
778 "bilibili.im.customer.interfaces.CustomerInterface",
779 "GetShopInfo",
780 ),
781 );
782 self.inner.unary(req, path, codec).await
783 }
784 pub async fn get_user_settings(
786 &mut self,
787 request: impl tonic::IntoRequest<super::GetUserSettingsReq>,
788 ) -> std::result::Result<
789 tonic::Response<super::GetUserSettingsRsp>,
790 tonic::Status,
791 > {
792 self.inner
793 .ready()
794 .await
795 .map_err(|e| {
796 tonic::Status::unknown(
797 format!("Service was not ready: {}", e.into()),
798 )
799 })?;
800 let codec = tonic::codec::ProstCodec::default();
801 let path = http::uri::PathAndQuery::from_static(
802 "/bilibili.im.customer.interfaces.CustomerInterface/GetUserSettings",
803 );
804 let mut req = request.into_request();
805 req.extensions_mut()
806 .insert(
807 GrpcMethod::new(
808 "bilibili.im.customer.interfaces.CustomerInterface",
809 "GetUserSettings",
810 ),
811 );
812 self.inner.unary(req, path, codec).await
813 }
814 pub async fn heart_beat(
816 &mut self,
817 request: impl tonic::IntoRequest<super::SendHeartBeatReq>,
818 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
819 self.inner
820 .ready()
821 .await
822 .map_err(|e| {
823 tonic::Status::unknown(
824 format!("Service was not ready: {}", e.into()),
825 )
826 })?;
827 let codec = tonic::codec::ProstCodec::default();
828 let path = http::uri::PathAndQuery::from_static(
829 "/bilibili.im.customer.interfaces.CustomerInterface/HeartBeat",
830 );
831 let mut req = request.into_request();
832 req.extensions_mut()
833 .insert(
834 GrpcMethod::new(
835 "bilibili.im.customer.interfaces.CustomerInterface",
836 "HeartBeat",
837 ),
838 );
839 self.inner.unary(req, path, codec).await
840 }
841 pub async fn out_customer_queue(
843 &mut self,
844 request: impl tonic::IntoRequest<super::OutCustomerQueueReq>,
845 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
846 self.inner
847 .ready()
848 .await
849 .map_err(|e| {
850 tonic::Status::unknown(
851 format!("Service was not ready: {}", e.into()),
852 )
853 })?;
854 let codec = tonic::codec::ProstCodec::default();
855 let path = http::uri::PathAndQuery::from_static(
856 "/bilibili.im.customer.interfaces.CustomerInterface/OutCustomerQueue",
857 );
858 let mut req = request.into_request();
859 req.extensions_mut()
860 .insert(
861 GrpcMethod::new(
862 "bilibili.im.customer.interfaces.CustomerInterface",
863 "OutCustomerQueue",
864 ),
865 );
866 self.inner.unary(req, path, codec).await
867 }
868 pub async fn pop_result_update(
870 &mut self,
871 request: impl tonic::IntoRequest<super::PopResultUpdateReq>,
872 ) -> std::result::Result<
873 tonic::Response<super::PopResultUpdateRsp>,
874 tonic::Status,
875 > {
876 self.inner
877 .ready()
878 .await
879 .map_err(|e| {
880 tonic::Status::unknown(
881 format!("Service was not ready: {}", e.into()),
882 )
883 })?;
884 let codec = tonic::codec::ProstCodec::default();
885 let path = http::uri::PathAndQuery::from_static(
886 "/bilibili.im.customer.interfaces.CustomerInterface/PopResultUpdate",
887 );
888 let mut req = request.into_request();
889 req.extensions_mut()
890 .insert(
891 GrpcMethod::new(
892 "bilibili.im.customer.interfaces.CustomerInterface",
893 "PopResultUpdate",
894 ),
895 );
896 self.inner.unary(req, path, codec).await
897 }
898 pub async fn remove_session(
900 &mut self,
901 request: impl tonic::IntoRequest<super::RemoveSessionReq>,
902 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
903 self.inner
904 .ready()
905 .await
906 .map_err(|e| {
907 tonic::Status::unknown(
908 format!("Service was not ready: {}", e.into()),
909 )
910 })?;
911 let codec = tonic::codec::ProstCodec::default();
912 let path = http::uri::PathAndQuery::from_static(
913 "/bilibili.im.customer.interfaces.CustomerInterface/RemoveSession",
914 );
915 let mut req = request.into_request();
916 req.extensions_mut()
917 .insert(
918 GrpcMethod::new(
919 "bilibili.im.customer.interfaces.CustomerInterface",
920 "RemoveSession",
921 ),
922 );
923 self.inner.unary(req, path, codec).await
924 }
925 pub async fn send_customer_msg(
927 &mut self,
928 request: impl tonic::IntoRequest<super::SendMsgReq>,
929 ) -> std::result::Result<tonic::Response<super::SendMsgRsp>, tonic::Status> {
930 self.inner
931 .ready()
932 .await
933 .map_err(|e| {
934 tonic::Status::unknown(
935 format!("Service was not ready: {}", e.into()),
936 )
937 })?;
938 let codec = tonic::codec::ProstCodec::default();
939 let path = http::uri::PathAndQuery::from_static(
940 "/bilibili.im.customer.interfaces.CustomerInterface/SendCustomerMsg",
941 );
942 let mut req = request.into_request();
943 req.extensions_mut()
944 .insert(
945 GrpcMethod::new(
946 "bilibili.im.customer.interfaces.CustomerInterface",
947 "SendCustomerMsg",
948 ),
949 );
950 self.inner.unary(req, path, codec).await
951 }
952 pub async fn set_top(
954 &mut self,
955 request: impl tonic::IntoRequest<super::SetTopReq>,
956 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
957 self.inner
958 .ready()
959 .await
960 .map_err(|e| {
961 tonic::Status::unknown(
962 format!("Service was not ready: {}", e.into()),
963 )
964 })?;
965 let codec = tonic::codec::ProstCodec::default();
966 let path = http::uri::PathAndQuery::from_static(
967 "/bilibili.im.customer.interfaces.CustomerInterface/SetTop",
968 );
969 let mut req = request.into_request();
970 req.extensions_mut()
971 .insert(
972 GrpcMethod::new(
973 "bilibili.im.customer.interfaces.CustomerInterface",
974 "SetTop",
975 ),
976 );
977 self.inner.unary(req, path, codec).await
978 }
979 pub async fn set_user_settings(
981 &mut self,
982 request: impl tonic::IntoRequest<super::SetUserSettingsReq>,
983 ) -> std::result::Result<
984 tonic::Response<super::SetUserSettingsRsp>,
985 tonic::Status,
986 > {
987 self.inner
988 .ready()
989 .await
990 .map_err(|e| {
991 tonic::Status::unknown(
992 format!("Service was not ready: {}", e.into()),
993 )
994 })?;
995 let codec = tonic::codec::ProstCodec::default();
996 let path = http::uri::PathAndQuery::from_static(
997 "/bilibili.im.customer.interfaces.CustomerInterface/SetUserSettings",
998 );
999 let mut req = request.into_request();
1000 req.extensions_mut()
1001 .insert(
1002 GrpcMethod::new(
1003 "bilibili.im.customer.interfaces.CustomerInterface",
1004 "SetUserSettings",
1005 ),
1006 );
1007 self.inner.unary(req, path, codec).await
1008 }
1009 pub async fn sync_fetch_customer_session_msgs(
1011 &mut self,
1012 request: impl tonic::IntoRequest<super::SessionMsgReq>,
1013 ) -> std::result::Result<tonic::Response<super::SessionMsgRsp>, tonic::Status> {
1014 self.inner
1015 .ready()
1016 .await
1017 .map_err(|e| {
1018 tonic::Status::unknown(
1019 format!("Service was not ready: {}", e.into()),
1020 )
1021 })?;
1022 let codec = tonic::codec::ProstCodec::default();
1023 let path = http::uri::PathAndQuery::from_static(
1024 "/bilibili.im.customer.interfaces.CustomerInterface/SyncFetchCustomerSessionMsgs",
1025 );
1026 let mut req = request.into_request();
1027 req.extensions_mut()
1028 .insert(
1029 GrpcMethod::new(
1030 "bilibili.im.customer.interfaces.CustomerInterface",
1031 "SyncFetchCustomerSessionMsgs",
1032 ),
1033 );
1034 self.inner.unary(req, path, codec).await
1035 }
1036 }
1037}
1038pub mod customer_interface_server {
1040 #![allow(
1041 unused_variables,
1042 dead_code,
1043 missing_docs,
1044 clippy::wildcard_imports,
1045 clippy::let_unit_value,
1046 )]
1047 use tonic::codegen::*;
1048 #[async_trait]
1050 pub trait CustomerInterface: std::marker::Send + std::marker::Sync + 'static {
1051 async fn customer_pre_evaluate(
1053 &self,
1054 request: tonic::Request<super::PreEvaluateReq>,
1055 ) -> std::result::Result<tonic::Response<super::PreEvaluateRsp>, tonic::Status>;
1056 async fn customer_update_ack(
1058 &self,
1059 request: tonic::Request<super::UpdateAckReq>,
1060 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
1061 async fn customer_window_options(
1063 &self,
1064 request: tonic::Request<super::WindowOptionsReq>,
1065 ) -> std::result::Result<
1066 tonic::Response<super::WindowOptionsRsp>,
1067 tonic::Status,
1068 >;
1069 async fn finish_paragraphs_render(
1071 &self,
1072 request: tonic::Request<super::FinishParagraphsRenderReq>,
1073 ) -> std::result::Result<
1074 tonic::Response<super::FinishParagraphsRenderRsp>,
1075 tonic::Status,
1076 >;
1077 async fn get_customer_sess_detail(
1079 &self,
1080 request: tonic::Request<super::GetSessDetailReq>,
1081 ) -> std::result::Result<
1082 tonic::Response<super::GetSessDetailRsp>,
1083 tonic::Status,
1084 >;
1085 async fn get_customer_sessions(
1087 &self,
1088 request: tonic::Request<super::GetSessionsReq>,
1089 ) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status>;
1090 async fn get_new_customer_sessions(
1092 &self,
1093 request: tonic::Request<super::GetNewSessionsReq>,
1094 ) -> std::result::Result<tonic::Response<super::SessionsRsp>, tonic::Status>;
1095 async fn get_shop_cfg(
1097 &self,
1098 request: tonic::Request<super::ShopCfgReq>,
1099 ) -> std::result::Result<tonic::Response<super::ShopCfgRsp>, tonic::Status>;
1100 async fn get_shop_info(
1102 &self,
1103 request: tonic::Request<super::ShopInfoReq>,
1104 ) -> std::result::Result<tonic::Response<super::ShopInfoRsp>, tonic::Status>;
1105 async fn get_user_settings(
1107 &self,
1108 request: tonic::Request<super::GetUserSettingsReq>,
1109 ) -> std::result::Result<
1110 tonic::Response<super::GetUserSettingsRsp>,
1111 tonic::Status,
1112 >;
1113 async fn heart_beat(
1115 &self,
1116 request: tonic::Request<super::SendHeartBeatReq>,
1117 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
1118 async fn out_customer_queue(
1120 &self,
1121 request: tonic::Request<super::OutCustomerQueueReq>,
1122 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
1123 async fn pop_result_update(
1125 &self,
1126 request: tonic::Request<super::PopResultUpdateReq>,
1127 ) -> std::result::Result<
1128 tonic::Response<super::PopResultUpdateRsp>,
1129 tonic::Status,
1130 >;
1131 async fn remove_session(
1133 &self,
1134 request: tonic::Request<super::RemoveSessionReq>,
1135 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
1136 async fn send_customer_msg(
1138 &self,
1139 request: tonic::Request<super::SendMsgReq>,
1140 ) -> std::result::Result<tonic::Response<super::SendMsgRsp>, tonic::Status>;
1141 async fn set_top(
1143 &self,
1144 request: tonic::Request<super::SetTopReq>,
1145 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
1146 async fn set_user_settings(
1148 &self,
1149 request: tonic::Request<super::SetUserSettingsReq>,
1150 ) -> std::result::Result<
1151 tonic::Response<super::SetUserSettingsRsp>,
1152 tonic::Status,
1153 >;
1154 async fn sync_fetch_customer_session_msgs(
1156 &self,
1157 request: tonic::Request<super::SessionMsgReq>,
1158 ) -> std::result::Result<tonic::Response<super::SessionMsgRsp>, tonic::Status>;
1159 }
1160 #[derive(Debug)]
1162 pub struct CustomerInterfaceServer<T> {
1163 inner: Arc<T>,
1164 accept_compression_encodings: EnabledCompressionEncodings,
1165 send_compression_encodings: EnabledCompressionEncodings,
1166 max_decoding_message_size: Option<usize>,
1167 max_encoding_message_size: Option<usize>,
1168 }
1169 impl<T> CustomerInterfaceServer<T> {
1170 pub fn new(inner: T) -> Self {
1171 Self::from_arc(Arc::new(inner))
1172 }
1173 pub fn from_arc(inner: Arc<T>) -> Self {
1174 Self {
1175 inner,
1176 accept_compression_encodings: Default::default(),
1177 send_compression_encodings: Default::default(),
1178 max_decoding_message_size: None,
1179 max_encoding_message_size: None,
1180 }
1181 }
1182 pub fn with_interceptor<F>(
1183 inner: T,
1184 interceptor: F,
1185 ) -> InterceptedService<Self, F>
1186 where
1187 F: tonic::service::Interceptor,
1188 {
1189 InterceptedService::new(Self::new(inner), interceptor)
1190 }
1191 #[must_use]
1193 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1194 self.accept_compression_encodings.enable(encoding);
1195 self
1196 }
1197 #[must_use]
1199 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1200 self.send_compression_encodings.enable(encoding);
1201 self
1202 }
1203 #[must_use]
1207 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1208 self.max_decoding_message_size = Some(limit);
1209 self
1210 }
1211 #[must_use]
1215 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1216 self.max_encoding_message_size = Some(limit);
1217 self
1218 }
1219 }
1220 impl<T, B> tonic::codegen::Service<http::Request<B>> for CustomerInterfaceServer<T>
1221 where
1222 T: CustomerInterface,
1223 B: Body + std::marker::Send + 'static,
1224 B::Error: Into<StdError> + std::marker::Send + 'static,
1225 {
1226 type Response = http::Response<tonic::body::BoxBody>;
1227 type Error = std::convert::Infallible;
1228 type Future = BoxFuture<Self::Response, Self::Error>;
1229 fn poll_ready(
1230 &mut self,
1231 _cx: &mut Context<'_>,
1232 ) -> Poll<std::result::Result<(), Self::Error>> {
1233 Poll::Ready(Ok(()))
1234 }
1235 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1236 match req.uri().path() {
1237 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerPreEvaluate" => {
1238 #[allow(non_camel_case_types)]
1239 struct CustomerPreEvaluateSvc<T: CustomerInterface>(pub Arc<T>);
1240 impl<
1241 T: CustomerInterface,
1242 > tonic::server::UnaryService<super::PreEvaluateReq>
1243 for CustomerPreEvaluateSvc<T> {
1244 type Response = super::PreEvaluateRsp;
1245 type Future = BoxFuture<
1246 tonic::Response<Self::Response>,
1247 tonic::Status,
1248 >;
1249 fn call(
1250 &mut self,
1251 request: tonic::Request<super::PreEvaluateReq>,
1252 ) -> Self::Future {
1253 let inner = Arc::clone(&self.0);
1254 let fut = async move {
1255 <T as CustomerInterface>::customer_pre_evaluate(
1256 &inner,
1257 request,
1258 )
1259 .await
1260 };
1261 Box::pin(fut)
1262 }
1263 }
1264 let accept_compression_encodings = self.accept_compression_encodings;
1265 let send_compression_encodings = self.send_compression_encodings;
1266 let max_decoding_message_size = self.max_decoding_message_size;
1267 let max_encoding_message_size = self.max_encoding_message_size;
1268 let inner = self.inner.clone();
1269 let fut = async move {
1270 let method = CustomerPreEvaluateSvc(inner);
1271 let codec = tonic::codec::ProstCodec::default();
1272 let mut grpc = tonic::server::Grpc::new(codec)
1273 .apply_compression_config(
1274 accept_compression_encodings,
1275 send_compression_encodings,
1276 )
1277 .apply_max_message_size_config(
1278 max_decoding_message_size,
1279 max_encoding_message_size,
1280 );
1281 let res = grpc.unary(method, req).await;
1282 Ok(res)
1283 };
1284 Box::pin(fut)
1285 }
1286 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerUpdateAck" => {
1287 #[allow(non_camel_case_types)]
1288 struct CustomerUpdateAckSvc<T: CustomerInterface>(pub Arc<T>);
1289 impl<
1290 T: CustomerInterface,
1291 > tonic::server::UnaryService<super::UpdateAckReq>
1292 for CustomerUpdateAckSvc<T> {
1293 type Response = super::Empty;
1294 type Future = BoxFuture<
1295 tonic::Response<Self::Response>,
1296 tonic::Status,
1297 >;
1298 fn call(
1299 &mut self,
1300 request: tonic::Request<super::UpdateAckReq>,
1301 ) -> Self::Future {
1302 let inner = Arc::clone(&self.0);
1303 let fut = async move {
1304 <T as CustomerInterface>::customer_update_ack(
1305 &inner,
1306 request,
1307 )
1308 .await
1309 };
1310 Box::pin(fut)
1311 }
1312 }
1313 let accept_compression_encodings = self.accept_compression_encodings;
1314 let send_compression_encodings = self.send_compression_encodings;
1315 let max_decoding_message_size = self.max_decoding_message_size;
1316 let max_encoding_message_size = self.max_encoding_message_size;
1317 let inner = self.inner.clone();
1318 let fut = async move {
1319 let method = CustomerUpdateAckSvc(inner);
1320 let codec = tonic::codec::ProstCodec::default();
1321 let mut grpc = tonic::server::Grpc::new(codec)
1322 .apply_compression_config(
1323 accept_compression_encodings,
1324 send_compression_encodings,
1325 )
1326 .apply_max_message_size_config(
1327 max_decoding_message_size,
1328 max_encoding_message_size,
1329 );
1330 let res = grpc.unary(method, req).await;
1331 Ok(res)
1332 };
1333 Box::pin(fut)
1334 }
1335 "/bilibili.im.customer.interfaces.CustomerInterface/CustomerWindowOptions" => {
1336 #[allow(non_camel_case_types)]
1337 struct CustomerWindowOptionsSvc<T: CustomerInterface>(pub Arc<T>);
1338 impl<
1339 T: CustomerInterface,
1340 > tonic::server::UnaryService<super::WindowOptionsReq>
1341 for CustomerWindowOptionsSvc<T> {
1342 type Response = super::WindowOptionsRsp;
1343 type Future = BoxFuture<
1344 tonic::Response<Self::Response>,
1345 tonic::Status,
1346 >;
1347 fn call(
1348 &mut self,
1349 request: tonic::Request<super::WindowOptionsReq>,
1350 ) -> Self::Future {
1351 let inner = Arc::clone(&self.0);
1352 let fut = async move {
1353 <T as CustomerInterface>::customer_window_options(
1354 &inner,
1355 request,
1356 )
1357 .await
1358 };
1359 Box::pin(fut)
1360 }
1361 }
1362 let accept_compression_encodings = self.accept_compression_encodings;
1363 let send_compression_encodings = self.send_compression_encodings;
1364 let max_decoding_message_size = self.max_decoding_message_size;
1365 let max_encoding_message_size = self.max_encoding_message_size;
1366 let inner = self.inner.clone();
1367 let fut = async move {
1368 let method = CustomerWindowOptionsSvc(inner);
1369 let codec = tonic::codec::ProstCodec::default();
1370 let mut grpc = tonic::server::Grpc::new(codec)
1371 .apply_compression_config(
1372 accept_compression_encodings,
1373 send_compression_encodings,
1374 )
1375 .apply_max_message_size_config(
1376 max_decoding_message_size,
1377 max_encoding_message_size,
1378 );
1379 let res = grpc.unary(method, req).await;
1380 Ok(res)
1381 };
1382 Box::pin(fut)
1383 }
1384 "/bilibili.im.customer.interfaces.CustomerInterface/FinishParagraphsRender" => {
1385 #[allow(non_camel_case_types)]
1386 struct FinishParagraphsRenderSvc<T: CustomerInterface>(pub Arc<T>);
1387 impl<
1388 T: CustomerInterface,
1389 > tonic::server::UnaryService<super::FinishParagraphsRenderReq>
1390 for FinishParagraphsRenderSvc<T> {
1391 type Response = super::FinishParagraphsRenderRsp;
1392 type Future = BoxFuture<
1393 tonic::Response<Self::Response>,
1394 tonic::Status,
1395 >;
1396 fn call(
1397 &mut self,
1398 request: tonic::Request<super::FinishParagraphsRenderReq>,
1399 ) -> Self::Future {
1400 let inner = Arc::clone(&self.0);
1401 let fut = async move {
1402 <T as CustomerInterface>::finish_paragraphs_render(
1403 &inner,
1404 request,
1405 )
1406 .await
1407 };
1408 Box::pin(fut)
1409 }
1410 }
1411 let accept_compression_encodings = self.accept_compression_encodings;
1412 let send_compression_encodings = self.send_compression_encodings;
1413 let max_decoding_message_size = self.max_decoding_message_size;
1414 let max_encoding_message_size = self.max_encoding_message_size;
1415 let inner = self.inner.clone();
1416 let fut = async move {
1417 let method = FinishParagraphsRenderSvc(inner);
1418 let codec = tonic::codec::ProstCodec::default();
1419 let mut grpc = tonic::server::Grpc::new(codec)
1420 .apply_compression_config(
1421 accept_compression_encodings,
1422 send_compression_encodings,
1423 )
1424 .apply_max_message_size_config(
1425 max_decoding_message_size,
1426 max_encoding_message_size,
1427 );
1428 let res = grpc.unary(method, req).await;
1429 Ok(res)
1430 };
1431 Box::pin(fut)
1432 }
1433 "/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessDetail" => {
1434 #[allow(non_camel_case_types)]
1435 struct GetCustomerSessDetailSvc<T: CustomerInterface>(pub Arc<T>);
1436 impl<
1437 T: CustomerInterface,
1438 > tonic::server::UnaryService<super::GetSessDetailReq>
1439 for GetCustomerSessDetailSvc<T> {
1440 type Response = super::GetSessDetailRsp;
1441 type Future = BoxFuture<
1442 tonic::Response<Self::Response>,
1443 tonic::Status,
1444 >;
1445 fn call(
1446 &mut self,
1447 request: tonic::Request<super::GetSessDetailReq>,
1448 ) -> Self::Future {
1449 let inner = Arc::clone(&self.0);
1450 let fut = async move {
1451 <T as CustomerInterface>::get_customer_sess_detail(
1452 &inner,
1453 request,
1454 )
1455 .await
1456 };
1457 Box::pin(fut)
1458 }
1459 }
1460 let accept_compression_encodings = self.accept_compression_encodings;
1461 let send_compression_encodings = self.send_compression_encodings;
1462 let max_decoding_message_size = self.max_decoding_message_size;
1463 let max_encoding_message_size = self.max_encoding_message_size;
1464 let inner = self.inner.clone();
1465 let fut = async move {
1466 let method = GetCustomerSessDetailSvc(inner);
1467 let codec = tonic::codec::ProstCodec::default();
1468 let mut grpc = tonic::server::Grpc::new(codec)
1469 .apply_compression_config(
1470 accept_compression_encodings,
1471 send_compression_encodings,
1472 )
1473 .apply_max_message_size_config(
1474 max_decoding_message_size,
1475 max_encoding_message_size,
1476 );
1477 let res = grpc.unary(method, req).await;
1478 Ok(res)
1479 };
1480 Box::pin(fut)
1481 }
1482 "/bilibili.im.customer.interfaces.CustomerInterface/GetCustomerSessions" => {
1483 #[allow(non_camel_case_types)]
1484 struct GetCustomerSessionsSvc<T: CustomerInterface>(pub Arc<T>);
1485 impl<
1486 T: CustomerInterface,
1487 > tonic::server::UnaryService<super::GetSessionsReq>
1488 for GetCustomerSessionsSvc<T> {
1489 type Response = super::SessionsRsp;
1490 type Future = BoxFuture<
1491 tonic::Response<Self::Response>,
1492 tonic::Status,
1493 >;
1494 fn call(
1495 &mut self,
1496 request: tonic::Request<super::GetSessionsReq>,
1497 ) -> Self::Future {
1498 let inner = Arc::clone(&self.0);
1499 let fut = async move {
1500 <T as CustomerInterface>::get_customer_sessions(
1501 &inner,
1502 request,
1503 )
1504 .await
1505 };
1506 Box::pin(fut)
1507 }
1508 }
1509 let accept_compression_encodings = self.accept_compression_encodings;
1510 let send_compression_encodings = self.send_compression_encodings;
1511 let max_decoding_message_size = self.max_decoding_message_size;
1512 let max_encoding_message_size = self.max_encoding_message_size;
1513 let inner = self.inner.clone();
1514 let fut = async move {
1515 let method = GetCustomerSessionsSvc(inner);
1516 let codec = tonic::codec::ProstCodec::default();
1517 let mut grpc = tonic::server::Grpc::new(codec)
1518 .apply_compression_config(
1519 accept_compression_encodings,
1520 send_compression_encodings,
1521 )
1522 .apply_max_message_size_config(
1523 max_decoding_message_size,
1524 max_encoding_message_size,
1525 );
1526 let res = grpc.unary(method, req).await;
1527 Ok(res)
1528 };
1529 Box::pin(fut)
1530 }
1531 "/bilibili.im.customer.interfaces.CustomerInterface/GetNewCustomerSessions" => {
1532 #[allow(non_camel_case_types)]
1533 struct GetNewCustomerSessionsSvc<T: CustomerInterface>(pub Arc<T>);
1534 impl<
1535 T: CustomerInterface,
1536 > tonic::server::UnaryService<super::GetNewSessionsReq>
1537 for GetNewCustomerSessionsSvc<T> {
1538 type Response = super::SessionsRsp;
1539 type Future = BoxFuture<
1540 tonic::Response<Self::Response>,
1541 tonic::Status,
1542 >;
1543 fn call(
1544 &mut self,
1545 request: tonic::Request<super::GetNewSessionsReq>,
1546 ) -> Self::Future {
1547 let inner = Arc::clone(&self.0);
1548 let fut = async move {
1549 <T as CustomerInterface>::get_new_customer_sessions(
1550 &inner,
1551 request,
1552 )
1553 .await
1554 };
1555 Box::pin(fut)
1556 }
1557 }
1558 let accept_compression_encodings = self.accept_compression_encodings;
1559 let send_compression_encodings = self.send_compression_encodings;
1560 let max_decoding_message_size = self.max_decoding_message_size;
1561 let max_encoding_message_size = self.max_encoding_message_size;
1562 let inner = self.inner.clone();
1563 let fut = async move {
1564 let method = GetNewCustomerSessionsSvc(inner);
1565 let codec = tonic::codec::ProstCodec::default();
1566 let mut grpc = tonic::server::Grpc::new(codec)
1567 .apply_compression_config(
1568 accept_compression_encodings,
1569 send_compression_encodings,
1570 )
1571 .apply_max_message_size_config(
1572 max_decoding_message_size,
1573 max_encoding_message_size,
1574 );
1575 let res = grpc.unary(method, req).await;
1576 Ok(res)
1577 };
1578 Box::pin(fut)
1579 }
1580 "/bilibili.im.customer.interfaces.CustomerInterface/GetShopCfg" => {
1581 #[allow(non_camel_case_types)]
1582 struct GetShopCfgSvc<T: CustomerInterface>(pub Arc<T>);
1583 impl<
1584 T: CustomerInterface,
1585 > tonic::server::UnaryService<super::ShopCfgReq>
1586 for GetShopCfgSvc<T> {
1587 type Response = super::ShopCfgRsp;
1588 type Future = BoxFuture<
1589 tonic::Response<Self::Response>,
1590 tonic::Status,
1591 >;
1592 fn call(
1593 &mut self,
1594 request: tonic::Request<super::ShopCfgReq>,
1595 ) -> Self::Future {
1596 let inner = Arc::clone(&self.0);
1597 let fut = async move {
1598 <T as CustomerInterface>::get_shop_cfg(&inner, request)
1599 .await
1600 };
1601 Box::pin(fut)
1602 }
1603 }
1604 let accept_compression_encodings = self.accept_compression_encodings;
1605 let send_compression_encodings = self.send_compression_encodings;
1606 let max_decoding_message_size = self.max_decoding_message_size;
1607 let max_encoding_message_size = self.max_encoding_message_size;
1608 let inner = self.inner.clone();
1609 let fut = async move {
1610 let method = GetShopCfgSvc(inner);
1611 let codec = tonic::codec::ProstCodec::default();
1612 let mut grpc = tonic::server::Grpc::new(codec)
1613 .apply_compression_config(
1614 accept_compression_encodings,
1615 send_compression_encodings,
1616 )
1617 .apply_max_message_size_config(
1618 max_decoding_message_size,
1619 max_encoding_message_size,
1620 );
1621 let res = grpc.unary(method, req).await;
1622 Ok(res)
1623 };
1624 Box::pin(fut)
1625 }
1626 "/bilibili.im.customer.interfaces.CustomerInterface/GetShopInfo" => {
1627 #[allow(non_camel_case_types)]
1628 struct GetShopInfoSvc<T: CustomerInterface>(pub Arc<T>);
1629 impl<
1630 T: CustomerInterface,
1631 > tonic::server::UnaryService<super::ShopInfoReq>
1632 for GetShopInfoSvc<T> {
1633 type Response = super::ShopInfoRsp;
1634 type Future = BoxFuture<
1635 tonic::Response<Self::Response>,
1636 tonic::Status,
1637 >;
1638 fn call(
1639 &mut self,
1640 request: tonic::Request<super::ShopInfoReq>,
1641 ) -> Self::Future {
1642 let inner = Arc::clone(&self.0);
1643 let fut = async move {
1644 <T as CustomerInterface>::get_shop_info(&inner, request)
1645 .await
1646 };
1647 Box::pin(fut)
1648 }
1649 }
1650 let accept_compression_encodings = self.accept_compression_encodings;
1651 let send_compression_encodings = self.send_compression_encodings;
1652 let max_decoding_message_size = self.max_decoding_message_size;
1653 let max_encoding_message_size = self.max_encoding_message_size;
1654 let inner = self.inner.clone();
1655 let fut = async move {
1656 let method = GetShopInfoSvc(inner);
1657 let codec = tonic::codec::ProstCodec::default();
1658 let mut grpc = tonic::server::Grpc::new(codec)
1659 .apply_compression_config(
1660 accept_compression_encodings,
1661 send_compression_encodings,
1662 )
1663 .apply_max_message_size_config(
1664 max_decoding_message_size,
1665 max_encoding_message_size,
1666 );
1667 let res = grpc.unary(method, req).await;
1668 Ok(res)
1669 };
1670 Box::pin(fut)
1671 }
1672 "/bilibili.im.customer.interfaces.CustomerInterface/GetUserSettings" => {
1673 #[allow(non_camel_case_types)]
1674 struct GetUserSettingsSvc<T: CustomerInterface>(pub Arc<T>);
1675 impl<
1676 T: CustomerInterface,
1677 > tonic::server::UnaryService<super::GetUserSettingsReq>
1678 for GetUserSettingsSvc<T> {
1679 type Response = super::GetUserSettingsRsp;
1680 type Future = BoxFuture<
1681 tonic::Response<Self::Response>,
1682 tonic::Status,
1683 >;
1684 fn call(
1685 &mut self,
1686 request: tonic::Request<super::GetUserSettingsReq>,
1687 ) -> Self::Future {
1688 let inner = Arc::clone(&self.0);
1689 let fut = async move {
1690 <T as CustomerInterface>::get_user_settings(&inner, request)
1691 .await
1692 };
1693 Box::pin(fut)
1694 }
1695 }
1696 let accept_compression_encodings = self.accept_compression_encodings;
1697 let send_compression_encodings = self.send_compression_encodings;
1698 let max_decoding_message_size = self.max_decoding_message_size;
1699 let max_encoding_message_size = self.max_encoding_message_size;
1700 let inner = self.inner.clone();
1701 let fut = async move {
1702 let method = GetUserSettingsSvc(inner);
1703 let codec = tonic::codec::ProstCodec::default();
1704 let mut grpc = tonic::server::Grpc::new(codec)
1705 .apply_compression_config(
1706 accept_compression_encodings,
1707 send_compression_encodings,
1708 )
1709 .apply_max_message_size_config(
1710 max_decoding_message_size,
1711 max_encoding_message_size,
1712 );
1713 let res = grpc.unary(method, req).await;
1714 Ok(res)
1715 };
1716 Box::pin(fut)
1717 }
1718 "/bilibili.im.customer.interfaces.CustomerInterface/HeartBeat" => {
1719 #[allow(non_camel_case_types)]
1720 struct HeartBeatSvc<T: CustomerInterface>(pub Arc<T>);
1721 impl<
1722 T: CustomerInterface,
1723 > tonic::server::UnaryService<super::SendHeartBeatReq>
1724 for HeartBeatSvc<T> {
1725 type Response = super::Empty;
1726 type Future = BoxFuture<
1727 tonic::Response<Self::Response>,
1728 tonic::Status,
1729 >;
1730 fn call(
1731 &mut self,
1732 request: tonic::Request<super::SendHeartBeatReq>,
1733 ) -> Self::Future {
1734 let inner = Arc::clone(&self.0);
1735 let fut = async move {
1736 <T as CustomerInterface>::heart_beat(&inner, request).await
1737 };
1738 Box::pin(fut)
1739 }
1740 }
1741 let accept_compression_encodings = self.accept_compression_encodings;
1742 let send_compression_encodings = self.send_compression_encodings;
1743 let max_decoding_message_size = self.max_decoding_message_size;
1744 let max_encoding_message_size = self.max_encoding_message_size;
1745 let inner = self.inner.clone();
1746 let fut = async move {
1747 let method = HeartBeatSvc(inner);
1748 let codec = tonic::codec::ProstCodec::default();
1749 let mut grpc = tonic::server::Grpc::new(codec)
1750 .apply_compression_config(
1751 accept_compression_encodings,
1752 send_compression_encodings,
1753 )
1754 .apply_max_message_size_config(
1755 max_decoding_message_size,
1756 max_encoding_message_size,
1757 );
1758 let res = grpc.unary(method, req).await;
1759 Ok(res)
1760 };
1761 Box::pin(fut)
1762 }
1763 "/bilibili.im.customer.interfaces.CustomerInterface/OutCustomerQueue" => {
1764 #[allow(non_camel_case_types)]
1765 struct OutCustomerQueueSvc<T: CustomerInterface>(pub Arc<T>);
1766 impl<
1767 T: CustomerInterface,
1768 > tonic::server::UnaryService<super::OutCustomerQueueReq>
1769 for OutCustomerQueueSvc<T> {
1770 type Response = super::Empty;
1771 type Future = BoxFuture<
1772 tonic::Response<Self::Response>,
1773 tonic::Status,
1774 >;
1775 fn call(
1776 &mut self,
1777 request: tonic::Request<super::OutCustomerQueueReq>,
1778 ) -> Self::Future {
1779 let inner = Arc::clone(&self.0);
1780 let fut = async move {
1781 <T as CustomerInterface>::out_customer_queue(
1782 &inner,
1783 request,
1784 )
1785 .await
1786 };
1787 Box::pin(fut)
1788 }
1789 }
1790 let accept_compression_encodings = self.accept_compression_encodings;
1791 let send_compression_encodings = self.send_compression_encodings;
1792 let max_decoding_message_size = self.max_decoding_message_size;
1793 let max_encoding_message_size = self.max_encoding_message_size;
1794 let inner = self.inner.clone();
1795 let fut = async move {
1796 let method = OutCustomerQueueSvc(inner);
1797 let codec = tonic::codec::ProstCodec::default();
1798 let mut grpc = tonic::server::Grpc::new(codec)
1799 .apply_compression_config(
1800 accept_compression_encodings,
1801 send_compression_encodings,
1802 )
1803 .apply_max_message_size_config(
1804 max_decoding_message_size,
1805 max_encoding_message_size,
1806 );
1807 let res = grpc.unary(method, req).await;
1808 Ok(res)
1809 };
1810 Box::pin(fut)
1811 }
1812 "/bilibili.im.customer.interfaces.CustomerInterface/PopResultUpdate" => {
1813 #[allow(non_camel_case_types)]
1814 struct PopResultUpdateSvc<T: CustomerInterface>(pub Arc<T>);
1815 impl<
1816 T: CustomerInterface,
1817 > tonic::server::UnaryService<super::PopResultUpdateReq>
1818 for PopResultUpdateSvc<T> {
1819 type Response = super::PopResultUpdateRsp;
1820 type Future = BoxFuture<
1821 tonic::Response<Self::Response>,
1822 tonic::Status,
1823 >;
1824 fn call(
1825 &mut self,
1826 request: tonic::Request<super::PopResultUpdateReq>,
1827 ) -> Self::Future {
1828 let inner = Arc::clone(&self.0);
1829 let fut = async move {
1830 <T as CustomerInterface>::pop_result_update(&inner, request)
1831 .await
1832 };
1833 Box::pin(fut)
1834 }
1835 }
1836 let accept_compression_encodings = self.accept_compression_encodings;
1837 let send_compression_encodings = self.send_compression_encodings;
1838 let max_decoding_message_size = self.max_decoding_message_size;
1839 let max_encoding_message_size = self.max_encoding_message_size;
1840 let inner = self.inner.clone();
1841 let fut = async move {
1842 let method = PopResultUpdateSvc(inner);
1843 let codec = tonic::codec::ProstCodec::default();
1844 let mut grpc = tonic::server::Grpc::new(codec)
1845 .apply_compression_config(
1846 accept_compression_encodings,
1847 send_compression_encodings,
1848 )
1849 .apply_max_message_size_config(
1850 max_decoding_message_size,
1851 max_encoding_message_size,
1852 );
1853 let res = grpc.unary(method, req).await;
1854 Ok(res)
1855 };
1856 Box::pin(fut)
1857 }
1858 "/bilibili.im.customer.interfaces.CustomerInterface/RemoveSession" => {
1859 #[allow(non_camel_case_types)]
1860 struct RemoveSessionSvc<T: CustomerInterface>(pub Arc<T>);
1861 impl<
1862 T: CustomerInterface,
1863 > tonic::server::UnaryService<super::RemoveSessionReq>
1864 for RemoveSessionSvc<T> {
1865 type Response = super::Empty;
1866 type Future = BoxFuture<
1867 tonic::Response<Self::Response>,
1868 tonic::Status,
1869 >;
1870 fn call(
1871 &mut self,
1872 request: tonic::Request<super::RemoveSessionReq>,
1873 ) -> Self::Future {
1874 let inner = Arc::clone(&self.0);
1875 let fut = async move {
1876 <T as CustomerInterface>::remove_session(&inner, request)
1877 .await
1878 };
1879 Box::pin(fut)
1880 }
1881 }
1882 let accept_compression_encodings = self.accept_compression_encodings;
1883 let send_compression_encodings = self.send_compression_encodings;
1884 let max_decoding_message_size = self.max_decoding_message_size;
1885 let max_encoding_message_size = self.max_encoding_message_size;
1886 let inner = self.inner.clone();
1887 let fut = async move {
1888 let method = RemoveSessionSvc(inner);
1889 let codec = tonic::codec::ProstCodec::default();
1890 let mut grpc = tonic::server::Grpc::new(codec)
1891 .apply_compression_config(
1892 accept_compression_encodings,
1893 send_compression_encodings,
1894 )
1895 .apply_max_message_size_config(
1896 max_decoding_message_size,
1897 max_encoding_message_size,
1898 );
1899 let res = grpc.unary(method, req).await;
1900 Ok(res)
1901 };
1902 Box::pin(fut)
1903 }
1904 "/bilibili.im.customer.interfaces.CustomerInterface/SendCustomerMsg" => {
1905 #[allow(non_camel_case_types)]
1906 struct SendCustomerMsgSvc<T: CustomerInterface>(pub Arc<T>);
1907 impl<
1908 T: CustomerInterface,
1909 > tonic::server::UnaryService<super::SendMsgReq>
1910 for SendCustomerMsgSvc<T> {
1911 type Response = super::SendMsgRsp;
1912 type Future = BoxFuture<
1913 tonic::Response<Self::Response>,
1914 tonic::Status,
1915 >;
1916 fn call(
1917 &mut self,
1918 request: tonic::Request<super::SendMsgReq>,
1919 ) -> Self::Future {
1920 let inner = Arc::clone(&self.0);
1921 let fut = async move {
1922 <T as CustomerInterface>::send_customer_msg(&inner, request)
1923 .await
1924 };
1925 Box::pin(fut)
1926 }
1927 }
1928 let accept_compression_encodings = self.accept_compression_encodings;
1929 let send_compression_encodings = self.send_compression_encodings;
1930 let max_decoding_message_size = self.max_decoding_message_size;
1931 let max_encoding_message_size = self.max_encoding_message_size;
1932 let inner = self.inner.clone();
1933 let fut = async move {
1934 let method = SendCustomerMsgSvc(inner);
1935 let codec = tonic::codec::ProstCodec::default();
1936 let mut grpc = tonic::server::Grpc::new(codec)
1937 .apply_compression_config(
1938 accept_compression_encodings,
1939 send_compression_encodings,
1940 )
1941 .apply_max_message_size_config(
1942 max_decoding_message_size,
1943 max_encoding_message_size,
1944 );
1945 let res = grpc.unary(method, req).await;
1946 Ok(res)
1947 };
1948 Box::pin(fut)
1949 }
1950 "/bilibili.im.customer.interfaces.CustomerInterface/SetTop" => {
1951 #[allow(non_camel_case_types)]
1952 struct SetTopSvc<T: CustomerInterface>(pub Arc<T>);
1953 impl<
1954 T: CustomerInterface,
1955 > tonic::server::UnaryService<super::SetTopReq> for SetTopSvc<T> {
1956 type Response = super::Empty;
1957 type Future = BoxFuture<
1958 tonic::Response<Self::Response>,
1959 tonic::Status,
1960 >;
1961 fn call(
1962 &mut self,
1963 request: tonic::Request<super::SetTopReq>,
1964 ) -> Self::Future {
1965 let inner = Arc::clone(&self.0);
1966 let fut = async move {
1967 <T as CustomerInterface>::set_top(&inner, request).await
1968 };
1969 Box::pin(fut)
1970 }
1971 }
1972 let accept_compression_encodings = self.accept_compression_encodings;
1973 let send_compression_encodings = self.send_compression_encodings;
1974 let max_decoding_message_size = self.max_decoding_message_size;
1975 let max_encoding_message_size = self.max_encoding_message_size;
1976 let inner = self.inner.clone();
1977 let fut = async move {
1978 let method = SetTopSvc(inner);
1979 let codec = tonic::codec::ProstCodec::default();
1980 let mut grpc = tonic::server::Grpc::new(codec)
1981 .apply_compression_config(
1982 accept_compression_encodings,
1983 send_compression_encodings,
1984 )
1985 .apply_max_message_size_config(
1986 max_decoding_message_size,
1987 max_encoding_message_size,
1988 );
1989 let res = grpc.unary(method, req).await;
1990 Ok(res)
1991 };
1992 Box::pin(fut)
1993 }
1994 "/bilibili.im.customer.interfaces.CustomerInterface/SetUserSettings" => {
1995 #[allow(non_camel_case_types)]
1996 struct SetUserSettingsSvc<T: CustomerInterface>(pub Arc<T>);
1997 impl<
1998 T: CustomerInterface,
1999 > tonic::server::UnaryService<super::SetUserSettingsReq>
2000 for SetUserSettingsSvc<T> {
2001 type Response = super::SetUserSettingsRsp;
2002 type Future = BoxFuture<
2003 tonic::Response<Self::Response>,
2004 tonic::Status,
2005 >;
2006 fn call(
2007 &mut self,
2008 request: tonic::Request<super::SetUserSettingsReq>,
2009 ) -> Self::Future {
2010 let inner = Arc::clone(&self.0);
2011 let fut = async move {
2012 <T as CustomerInterface>::set_user_settings(&inner, request)
2013 .await
2014 };
2015 Box::pin(fut)
2016 }
2017 }
2018 let accept_compression_encodings = self.accept_compression_encodings;
2019 let send_compression_encodings = self.send_compression_encodings;
2020 let max_decoding_message_size = self.max_decoding_message_size;
2021 let max_encoding_message_size = self.max_encoding_message_size;
2022 let inner = self.inner.clone();
2023 let fut = async move {
2024 let method = SetUserSettingsSvc(inner);
2025 let codec = tonic::codec::ProstCodec::default();
2026 let mut grpc = tonic::server::Grpc::new(codec)
2027 .apply_compression_config(
2028 accept_compression_encodings,
2029 send_compression_encodings,
2030 )
2031 .apply_max_message_size_config(
2032 max_decoding_message_size,
2033 max_encoding_message_size,
2034 );
2035 let res = grpc.unary(method, req).await;
2036 Ok(res)
2037 };
2038 Box::pin(fut)
2039 }
2040 "/bilibili.im.customer.interfaces.CustomerInterface/SyncFetchCustomerSessionMsgs" => {
2041 #[allow(non_camel_case_types)]
2042 struct SyncFetchCustomerSessionMsgsSvc<T: CustomerInterface>(
2043 pub Arc<T>,
2044 );
2045 impl<
2046 T: CustomerInterface,
2047 > tonic::server::UnaryService<super::SessionMsgReq>
2048 for SyncFetchCustomerSessionMsgsSvc<T> {
2049 type Response = super::SessionMsgRsp;
2050 type Future = BoxFuture<
2051 tonic::Response<Self::Response>,
2052 tonic::Status,
2053 >;
2054 fn call(
2055 &mut self,
2056 request: tonic::Request<super::SessionMsgReq>,
2057 ) -> Self::Future {
2058 let inner = Arc::clone(&self.0);
2059 let fut = async move {
2060 <T as CustomerInterface>::sync_fetch_customer_session_msgs(
2061 &inner,
2062 request,
2063 )
2064 .await
2065 };
2066 Box::pin(fut)
2067 }
2068 }
2069 let accept_compression_encodings = self.accept_compression_encodings;
2070 let send_compression_encodings = self.send_compression_encodings;
2071 let max_decoding_message_size = self.max_decoding_message_size;
2072 let max_encoding_message_size = self.max_encoding_message_size;
2073 let inner = self.inner.clone();
2074 let fut = async move {
2075 let method = SyncFetchCustomerSessionMsgsSvc(inner);
2076 let codec = tonic::codec::ProstCodec::default();
2077 let mut grpc = tonic::server::Grpc::new(codec)
2078 .apply_compression_config(
2079 accept_compression_encodings,
2080 send_compression_encodings,
2081 )
2082 .apply_max_message_size_config(
2083 max_decoding_message_size,
2084 max_encoding_message_size,
2085 );
2086 let res = grpc.unary(method, req).await;
2087 Ok(res)
2088 };
2089 Box::pin(fut)
2090 }
2091 _ => {
2092 Box::pin(async move {
2093 let mut response = http::Response::new(empty_body());
2094 let headers = response.headers_mut();
2095 headers
2096 .insert(
2097 tonic::Status::GRPC_STATUS,
2098 (tonic::Code::Unimplemented as i32).into(),
2099 );
2100 headers
2101 .insert(
2102 http::header::CONTENT_TYPE,
2103 tonic::metadata::GRPC_CONTENT_TYPE,
2104 );
2105 Ok(response)
2106 })
2107 }
2108 }
2109 }
2110 }
2111 impl<T> Clone for CustomerInterfaceServer<T> {
2112 fn clone(&self) -> Self {
2113 let inner = self.inner.clone();
2114 Self {
2115 inner,
2116 accept_compression_encodings: self.accept_compression_encodings,
2117 send_compression_encodings: self.send_compression_encodings,
2118 max_decoding_message_size: self.max_decoding_message_size,
2119 max_encoding_message_size: self.max_encoding_message_size,
2120 }
2121 }
2122 }
2123 pub const SERVICE_NAME: &str = "bilibili.im.customer.interfaces.CustomerInterface";
2125 impl<T> tonic::server::NamedService for CustomerInterfaceServer<T> {
2126 const NAME: &'static str = SERVICE_NAME;
2127 }
2128}